Today I would like to share you a handful, useful Cinema 4D Python Script which selects all objects in document according to selected object’s size. Quite time-saving…
- Open Script Manager from Menu > Script
- Select Python. Empty code area and paste the code below.
- Click on execute button.
Script By : InkedInBlood
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import c4d from c4d import gui, documents #Welcome to the world of Python def GetNextObject(op): if op==None: return None if op.GetDown(): return op.GetDown() while not op.GetNext() and op.GetUp(): op = op.GetUp() return op.GetNext() def main(): obj = doc.GetActiveObject() objBB = obj.GetRad() myobject = doc.GetFirstObject() if myobject==None: return while myobject: if myobject.GetRad() == objBB: doc.SetActiveObject(myobject,1) print "selected" + str(myobject) else: None myobject = GetNextObject(myobject) c4d.EventAdd() if __name__=='__main__': main() |
Leave a Reply
Want to join the discussion?Feel free to contribute!