Reset PSR to worplane origin

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2013
Reset PSR to worplane origin

Recently I've discovered that there is no easy way to move already existing object to workplane origin. Align to workplane command only orientates and move selected object to closest point on workplane, not to its origin. There is GetWorplaneMatrix function in python sdk so i think it should be quite easy to write simple script to allow this functionality. Also it would be nice to have functionality to move only axis of an object or selected points/edges/polygons axis to workplanes origin when Enable Axis is turned on. This way we would have something like 3d cursor in Blender but one that can be turned of. Unfortunately I'm programing disabled so maybe someone have five minutes to spare on writhing this script.

Last edited by AdsovonMelk : 10 October 2013 at 10:30 PM.
 
  10 October 2013
::EDIT:: Disregard, reset psr + align selection to workplane doesn't work in a consistent manner.
__________________
www.kvbarnum.com
LOBODESTROYO!!!

Last edited by kvb : 10 October 2013 at 07:42 PM.
 
  10 October 2013
something like that might work: http://codepad.org/68TXY0mT. it will align all currently
selected objects to the active BaseDraws workplane matrix. if you do press ctrl or shift
while executing the script it will 'move' the axis (actually you cannot move the axis, but
you have the move the points). i have forced myself to include some comments, so that
it is not just some gibberish.

fyi : i have not implemented rotations for the axis mode and please do not post in times
new roman, it is just awful to read.
__________________
There are holes in the sky. Where the rain gets in.
But they're ever so small. That's why the rain is thin.

Last edited by littledevil : 10 October 2013 at 08:29 PM.
 
  10 October 2013
Originally Posted by littledevil: something like that might work: http://codepad.org/68TXY0mT. it will align all currently
selected objects to the active BaseDraws workplane matrix. if you do press ctrl or shift
while executing the script it will 'move' the axis (actually you cannot move the axis, but
you have the move the points). i have forced myself to include some comments, so that
it is not just some gibberish.

fyi : i have not implemented rotations for the axis mode and please do not post in times
new roman, it is just awful to read.


Thanks for reply, i will check the script. Sorry for this Times new roman thing, something was broken in my editor.
 
  10 October 2013
Unfortunately it's not working for some reason. Maybe I'm missing something.
Thanks anyway.
 
  10 October 2013
sure it does work.
__________________
There are holes in the sky. Where the rain gets in.
But they're ever so small. That's why the rain is thin.
 
  10 October 2013
So I'm doing something wrong.
This is the code I'm executing on polygonal object with model mode and move tool enabled.
Attached Images
File Type: png Code.PNG (47.1 KB, 11 views)
 
  10 October 2013
which version of c4d are you using ? might be some sdk version problem if you are using
r12 or r13 (although i think none of the used methods has been subject of changes). the
script does run fine for me on r14/15. please post your console output here or i won't be
able to help you.

on a more general note, i am not quite sure if the functionality of the script has been made
clear enough by me. the script won't care for the editor mode. it also does not care if enable
axis is turned on, unless you uncomment the respective line.

the script will try for each selected object in the object manager :

1. apply the workplane matrix to the object, which will work for all object types.
2. if you press ctrl/ctrl to do the axis thingy, unless the object is not editable (case 1 then).
__________________
There are holes in the sky. Where the rain gets in.
But they're ever so small. That's why the rain is thin.

Last edited by littledevil : 10 October 2013 at 11:31 PM.
 
  10 October 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:07 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.