Center Axis Via Python Cinema4d

Cinema 4D Center Axis with Python

0

This post has already been read 3427 times!

In this short tutorial we’ll have a look at how to center axis of an object in Cinema 4D with using python

XPRESSO PYTHON NODE SCRIPT

Create a point object. (In this tutorial we had used text and converted it to an editable spline.)

Create a null object and add a xpresso tag. Double-click on xpresso tag to open xpresso editor.

Add a python node.

Paste the script below inside python node.  Change this line to define your object which you want to center axis : obj = doc.SearchObject(“WriteYourObject’sNameHere“)

And when you execute your object’s axis will be centered.

PYTHON SCRIPT

If you would like to use it as a user script I have prepared another version which centers selected object’s axis.

For future use you may save it with a *.py extension and move script file to Cinema 4D > Library > Scripts folder.

Then you can easily create a shortcut from Window > Customization > Customize Commands > YourScriptName.py and you can drag&drop your script’s icon to anywhere in your layout.

UPDATE: CENTER AXIS OF ALL SELECTED OBJECTS

This script basically set all selected objects axis to center.

 

Leave a Reply