Today I would like to share a Python Cinema 4D Snippet ; “Reset Position & Rotation” of an object…
Create a python node inside xpresso and paste this script. Put your desired object’s name into ‘c’. obj = doc.SearchObject(‘c’)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import c4d from c4d import gui def main(): global out doc = c4d.documents.GetActiveDocument() doc.StartUndo() obj = doc.SearchObject('c') doc.AddUndo(c4d.UNDOTYPE_CHANGE, obj) obj.SetRelPos(c4d.Vector(0,0,0)) obj.SetRelRot(c4d.Vector(0,0,0)) c4d.EventAdd() doc.EndUndo() if __name__=='__main__': main() |
Wow THANK YOU !
It’s possable make universly for any object in c4d