I'm having some issue with exporting an ass file using CallCommand(). I can export all, but when I try to export selected with children, it doesn't seem to want to export children. The script runs, writes a file. But is just the parent-most object, and (oddly) one shader that is attached to one of the children?
def writeAss(self, system, asset): #Container for the options options = c4d.BaseContainer() #name the ass file options.SetFilename(0, asset['ass_path']) #GZIP options.SetBool(1,False) #Bounds Export options.SetBool(2,True) #Binary Encoding options.SetBool(3,True) #Procedural Expand options.SetBool(4,False) #Start/End Frames options.SetInt32(6, 0) options.SetInt32(7, 0) #Only Selected options.SetInt32(11, 1) #Replace with Procedural options.SetBool(12,False) #Export Heirarchy options.SetBool(13, True) doc.GetSettingsInstance(c4d.DOCUMENTSETTINGS_DOCUMENT).SetContainer(ARNOLD_ASS_EXPORT, options) c4d.CallCommand(ARNOLD_ASS_EXPORT)
Solved! Go to Solution.
Solved by peter.horvath6V6K3. Go to Solution.
I've tried your code in a simple scene and it seems to be working fine. Does it happen in a specific scene with specific objects?
Hi Peter. Thank you for testing it out. I posted this after finding my script failed using Arnold 5.0, and referenced the Arnold 5.1 documentation. Since updating now to 5.1 the script provided does seem to work properly. I am not sure what went wrong from when I first authored it last summer and after we updated the C4D plugin, but it seems to be working.
But man. That was a stressful day! 🙂