C4DLounge.eu - Cinema 4D Gebruikers Forum  

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 6th June 2014
pgrooff pgrooff is offline
Moderator
 
Join Date: Aug 2009
Posts: 1,183
Default Mograph python effector

Ik heb een mograph python effector waarmee ik, als uiteindelijk resultaat, een aantal cubes will samennemen tot een object (mograph gebruikt ik om de cubes te positioneren).

Dat lijkt heel simpel:
Insert een Null met daaronder de cubes als children.
Set de Nul als SetActiveObject
Select Children
Doe een Connect Objects + Delete:

Alleen, wat ik ook doe, de Children worden niet geselecteerd!
Zie bijgaande scene voor een uitgeklede versie.

Code:
    doc.SetActiveObject(nullGroup, mode=c4d.SELECTION_NEW)
    print "Active: ", doc.GetActiveObject()

    c4d.CallCommand(100004768) # Select Children
    #c4d.CallCommand(12236) # Make Editable, not really needed
    c4d.CallCommand(16768) # Connect Objects + Delete
Attached Images
File Type: jpg mograph2.jpg (134.1 KB, 10 views)
Attached Files
File Type: c4d test scene.c4d (112.5 KB, 3 views)
Reply With Quote
 

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 03:32.


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.