C4DLounge.eu - Cinema 4D Gebruikers Forum  

Go Back   C4DLounge.eu - Cinema 4D Gebruikers Forum > RESOURCES > Vragen >>> > Plugins & Scripts/Python/Coffee/Xpresso

Reply
 
Thread Tools Display Modes
  #1  
Old 3rd May 2016
pgrooff pgrooff is offline
Moderator
 
Join Date: Aug 2009
Posts: 1,183
Default Child niet mee laten roteren

Ik heb een parent met daaronder een child.
Nu wil ik de parent roteren of verplaatsen, maar de child mag niet mee roteren of verplaatsen.
Hoe doe ik dat met een script, python ofxpresso?

-Pim
Reply With Quote
  #2  
Old 3rd May 2016
Wes's Avatar
Wes Wes is offline
Senior Member
 
Join Date: Sep 2012
Location: Brooklyn, NY
Posts: 518
Default

Child er even uithalen? ^^
__________________
CREAM3D.com . Behance . Instagram
Reply With Quote
  #3  
Old 3rd May 2016
Cinemike's Avatar
Cinemike Cinemike is offline
Senior Member
 
Join Date: Jan 2012
Location: Deepest Saxony, Germany
Posts: 717
Default

Well, for an animation, you could e. g. create a copy of the object and constrain the original to this copy.
For use in editor, hold "7" while moving/rotating the parent, the child(ren) will stay put.
In any other case, it depends on what you want to achieve.
__________________
Cinema4D R20 & VrayforC4D 3.7
Reply With Quote
  #4  
Old 3rd May 2016
douwe's Avatar
douwe douwe is offline
Admin Team
 
Join Date: Feb 2010
Posts: 1,918
Default

Kom op, Pim !
Dit is een klassieker.

Een plaatje en een mp4tje als motivatie,
maar ik ga je zelf laten googelen.



d
Attached Images
File Type: jpg douwe-move-parent-not-child.jpg (375.8 KB, 16 views)
Attached Files
File Type: mp4 douwe-move-parent-not-child.mp4 (202.1 KB, 17 views)
Reply With Quote
  #5  
Old 4th May 2016
douwe's Avatar
douwe douwe is offline
Admin Team
 
Join Date: Feb 2010
Posts: 1,918
Default

En, geraak je er ?
Reply With Quote
  #6  
Old 4th May 2016
pgrooff pgrooff is offline
Moderator
 
Join Date: Aug 2009
Posts: 1,183
Default

Ja bedankt.
Ik had duidelijk een off day, of ik was gewoon lui.
Mijn oplossing:
Code:
        mat = object.GetMg() # Record the original matrix of the object 
        #insert object under null as child en set matrix terug
        object.SetMg(mat)

Last edited by pgrooff; 4th May 2016 at 20:47.
Reply With Quote
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +2. The time now is 04:16.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Met trots gehost door Webdesign bureau Graphic Violence.
(c) C4DLounge.eu . All documents on this forum are owned by their respective creators and may not be sold or republished in any way.