question

Shawn Kearney avatar image
Shawn Kearney asked ·

Export Hierarchy option does not Export Children

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)
c4dtoapython
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

1 Answer

· Write an Answer
Peter Horvath avatar image
Peter Horvath answered ·

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?

1 comment
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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! :)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.