C4D way to Pick and use another objects coordinate system like in 3ds max?

Become a member of the CGSociety

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

 
Thread Tools Search this Thread Display Modes
  2 Weeks Ago
C4D way to Pick and use another objects coordinate system like in 3ds max?

Hi,

I would like to temporarily use the coordinate system of another object to move and rotate the current object like I'm used to in 3ds max. Is there a method to do this in C4D R18, please?

Thanks for any advice?



 
  2 Weeks Ago
Originally Posted by wrreisen: I would like to temporarily use the coordinate system of another object to move and rotate the current object like I'm used to in 3ds max. Is there a method to do this in C4D R18, please?

In model or object mode, move and rotate influence the coordinate system directly so you can't use another. However, if you are in point, edge, or polygon mode, you can set the Modeling Axis in the tool's settings to "Object" and link to another object's axis system. That means that your transformations will adhere to that other object's system but the current object will retain its own axis - just the polys are changed within this coordinate system. (Select all to work with the whole model.)

I don't know how exactly this works in 3ds Max so this is just from a C4D perspective.
 
  2 Weeks Ago
In Max you just pick the object you want  to use.

Last edited by Bullit : 2 Weeks Ago at 06:03 PM.
 
  2 Weeks Ago
I use a Null as a parent to do that sort of stuff.
Although it seems a bit counter intuitive, you actually have a lot more control, as you can place the null wherever you want, not just the Axis of the Object.
Also, all you need is to know is 4 shortcuts:
Shift-S for Snapping,
E for Move
R for Rotate
Hold L to move only the Null without the child.
__________________
----------------------
noseman.org
 
  2 Weeks Ago
Hi Bullit
That is indeed a handy feature in 3DS Max but there is no direct equivalent in C4D. You are better off following the suggestions from above. 
 
  2 Weeks Ago
Window menu > Customization > Customise commands...
Tick the edit palettes checkbox, then type 'Reset PSR' into the name filter field. Drag that icon into your layout.
...a very usefull function. You might want to save your new layout for future use.

Once you've got that...

create a null, place it as a child of your 'hub' object in the object manager.
with the null still selected, hit the PSR icon.
Ctrl click (Windows) on the object you want to rotate to add it to the selection.
On screen you'll see one main axis between the objects and two smaller axis - one on each object.
Click on the axis on the null, it will highlight - then rotate as required.
Once done, delete the null.
 
  2 Weeks Ago
Thanks for all your help. Will give it a go.
 
  2 Weeks Ago
Originally Posted by Mike Abbott: Window menu > Customization > Customise commands...
Tick the edit palettes checkbox, then type 'Reset PSR' into the name filter field. Drag that icon into your layout.
...a very usefull function. You might want to save your new layout for future use.


Why is there no function for each channel P S R ?  Unless I am missing something?
 
  1 Week Ago
Originally Posted by strangerthings: Why is there no function for each channel P S R ?  Unless I am missing something?
Because you can reset a single coordinate, scale or rotation by right clicking on the up and down arrows next to the value in the Attribute manager, Coord. Tab
__________________
----------------------
noseman.org
 
  1 Week Ago
you can do it with the plane axis, and then lock plane. 

just make sure to switch to world axis mode. 

here is a gif:
https://i.imgur.com/97jGLEg.gif

 
  1 Week Ago
Originally Posted by noseman: Because you can reset a single coordinate, scale or rotation by right clicking on the up and down arrows next to the value in the Attribute manager, Coord. Tab

Ah yes, but can you add that to a command/button/keystroke?  Possibly with a script? I did find one but doesn’t see:to work in r19
 
  1 Week Ago
Originally Posted by strangerthings: Ah yes, but can you add that to a command/button/keystroke?  Possibly with a script? I did find one but doesn’t see:to work in r19
With Reset PSR, you use one click to reset all. If you want to reset one parameter at a time, you need 9 shortcuts.
On the other hand, if you had a reset command with selectable parameters to reset, you would need to select the parameters and then press "Reset".
That's far more clicks that our current implementation. Just go to the parameter and right click.
If you insist though, here's a script that resets the X position, X Scale and H rotation.
You can adapt it to work on any single parameter or group of parameters.
Just change the appropriate X, Y and Z in the code, and generate any number of scripts you want.

To use the script, go to the Script menu - Script Manager, Create New Python Script, delete everything and paste the following code.

import c4d
from c4d import gui

#Reset Local Axis Position to 0 , Scale X to 1 and Rotation H to 0
def main():
    #change the VECTOR_X to VECTOR_Y or VECTOR_Z to reset the other Axis
    
    #Position
    op[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_X] = 0
    
    #Rotation
    op[c4d.ID_BASEOBJECT_REL_ROTATION,c4d.VECTOR_X] = 0
    
    #Scale
    op[c4d.ID_BASEOBJECT_REL_SCALE,c4d.VECTOR_X] = 1
    
    #Don't touch this
    c4d.EventAdd()

if __name__=='__main__':
    main()
__________________
----------------------
noseman.org
 
  1 Week Ago
Amazing! Thanks. I really need to have a look at python. I can code a little on unity...

I wouldn’t need to often reset the 9 values separately but the current job I am doing I do have to reset either the position and/or rotation keeping the scale.

Also would be great quick way of  keeping scale and rotation when zeroing a  child object.

thanks again  I’ll look at creating button icons for these as I know you can do that.
 
  1 Week Ago
Here's a script which resets the coordinates depending the active tool. Further only unlocked components will be reset.
E.g. when the move tool is active and the Y and Z axis are locked ('Y' and 'Z' icon with grey background, without orange circle) the script will only reset the X position of the selected objects.


import c4d
"""
Script: Reset Coordinates

Copyright: Peter Notz (alias: nophoto)
Date: 2018-01-07
Version: 1.00

Select one or more objects and execute the script.
Depending the active tool (move, rotate, scale tool) the corresponding component
(position, rotation, scale) will be reset.
Further only unlocked vector components (X,Y,Z resp. H,P,B) will be reset.
"""

def main():
    
    olist = doc.GetActiveObjects( c4d.GETACTIVEOBJECTFLAGS_CHILDREN)
    if not olist:
        print 'No selected objects'
        return
    
    dd = doc.GetDocumentData(c4d.DOCUMENTSETTINGS_GENERAL)
    
    if not(dd[c4d.DOCUMENT_MODE] == c4d.Mobject or dd[c4d.DOCUMENT_MODE] == c4d.Mmodel):
        print 'Document has to be in model or object mode'
        return
    
    doc.StartUndo()
    
    action = doc.GetAction()
    if action == c4d.ID_MODELING_MOVE:
        for o in olist:
            doc.AddUndo(c4d.UNDOTYPE_CHANGE, o)
            p = o.GetRelPos()
            if dd[c4d.DOCUMENT_STATEX]: p.x = 0.0
            if dd[c4d.DOCUMENT_STATEY]: p.y = 0.0
            if dd[c4d.DOCUMENT_STATEZ]: p.z = 0.0
            o.SetRelPos(p)
            o.Message(c4d.MSG_UPDATE)

    elif action == c4d.ID_MODELING_ROTATE:
        for o in olist:
            doc.AddUndo(c4d.UNDOTYPE_CHANGE, o)
            r = o.GetRelRot()
            if dd[c4d.DOCUMENT_STATEX]: r.x = 0.0
            if dd[c4d.DOCUMENT_STATEY]: r.y = 0.0
            if dd[c4d.DOCUMENT_STATEZ]: r.z = 0.0
            o.SetRelRot(r)
            o.Message(c4d.MSG_UPDATE)
            
    elif action == c4d.ID_MODELING_SCALE:
        for o in olist:
            doc.AddUndo(c4d.UNDOTYPE_CHANGE, o)
            s = o.GetRelScale()
            if dd[c4d.DOCUMENT_STATEX]: s.x = 1.0
            if dd[c4d.DOCUMENT_STATEY]: s.y = 1.0
            if dd[c4d.DOCUMENT_STATEZ]: s.z = 1.0
            o.SetRelScale(s)
            o.Message(c4d.MSG_UPDATE)
        
    doc.EndUndo()
    c4d.EventAdd()        
    
if __name__=='__main__':
    main()


Happy rendering!
Peter
 
reply 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:31 AM.


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