Hi Everyone, had a question. First I have little Python experience but lots of C# and Objective-C, and C. I have Kitbash libraries that I am trying to create a script to copy to a new document, process the object and export as an OBJ file. The problem that I am having is when I run the command to to open the Center Axis, it opens but continues to execute the code. I thought I might be able to have a MessageDialog pop up to pause the script, which it does, but I can't axis the Axis Center window.
My guess is the best approach is to try and move the axis center to the center of the model but the Y axis to 0.
import c4d
from c4d import gui
# Welcome to the world of Python
# Script state in the menu or the command palette
# Return True or c4d.CMD_ENABLED to enable, False or 0 to disable
# Alternatively return c4d.CMD_ENABLED|c4d.CMD_VALUE to enable and check/mark
#def state():
# return True
# Main function
def main():
c4d.CallCommand(12107, 12107) # Copy
c4d.CallCommand(12094, 12094) # New Project
c4d.CallCommand(100004821) # Paste
c4d.CallCommand(100004768, 100004768) # Select Children
c4d.CallCommand(16768, 16768) # Connect Objects + Delete
c4d.CallCommand(1010819) # Center Axis
printScript()
def printScript():
gui.MessageDialog('Delay Program')
# Execute main()
if __name__=='__main__':
main()
If anyone can help me, or direct me to documentation that will outline the steps needed to set the axis of the object to the bottom center, the reset of the code to export works fine, but I didn't include it here. Thanks you!