Fine-tuning Alembic Export

On 12/02/2013 at 10:34, xxxxxxxx wrote:

Originally posted by xxxxxxxx

Originally posted by xxxxxxxx

This isn't an omission but just an issue with the Python API. This will be fixed in the near future.

Thanks. Is there a timeline for this? (ie., is this something to reasonably expect in the next service update?)

Yes, if there's no problem with the fix it'll be included in the next service update.

Originally posted by xxxxxxxx

I'll go ahead and share my temporary workaround for those who might run into the same problem:

During any asset publish action, the first .abc export operation will pop up the settings dialog using saveflags=c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST | c4d.SAVEDOCUMENTFLAGS_DIALOGSALLOWED | c4d.SAVEDOCUMENTFLAGS_EXPORTDIALOG - Subsequent ones during that export (such as if we have both standalone camera and a camera+survey geometry in the asset container) will not present the dialog, taking the previous settings.

It's not ideal since it introduces a user step where errors may occur - but it addresses the problem in the short term in a way that's otherwise very automated.

Thanks for sharing your temporary workaround. I'm sure it'll be useful for other people.

Originally posted by xxxxxxxx

Besides my above complaint, we're having excellent results and I've been exceptionally pleased with the surprisingly well-designed API. I had expected issues with MoGraph or Simulations but Alembic support behind the scenes is obviously solid, so I look forward to making Cinema a full-fledged citizen.

I know integrating c4d into a high end, multiplatform vfx pipeline isn't a common task and we're treading on new ground trying to make this happen. Thanks for your support.

I'm glad to see CINEMA used in a complex VFX pipeline.
As you've said it, CINEMA has a powerful, well-designed and robust API so there's no reason it couldn't be integrated into high-hend pipelines 🙂.

On 26/02/2013 at 15:44, xxxxxxxx wrote:

We haven't moved to r14.034 yet - will probably put a dev machine on it in the next 24 hrs.

Curious if the configuring the alembic export from Python as discussed in this thread is now supported.

On 11/04/2013 at 15:40, xxxxxxxx wrote:

Revisiting this post just so we're on the same page:

As of the R14.034 update, this bug remains: Users must still manually specify the alembic export frame range.

On 12/04/2013 at 02:37, xxxxxxxx wrote:

Originally posted by xxxxxxxx

As of the R14.034 update, this bug remains: Users must still manually specify the alembic export frame range.

Hi Eddie,

The fix for changing importer/exporter settings hasn't been yet published.
It's expected for the next service update (3rd of R14).

On 27/06/2013 at 18:17, xxxxxxxx wrote:

It looks like there was some attention paid to this in the latest release (R14.041). It now is able to access and update the exporter private data. Or at least appears to:

Something like this Python function:

> def plugindata() :
>     exporter={} # Creates container for Message return object
>     plug=c4d.plugins.FindPlugin(1028082, c4d.PLUGINTYPE_SCENESAVER)
>     doc=c4d.documents.GetActiveDocument()
>     fps=doc.GetFps()
>     if plug:
>         if plug.Message(c4d.MSG_RETRIEVEPRIVATEDATA,exporter) :
>             data=exporter['imexporter'].GetDataInstance()
>             start=doc.GetMinTime()
>             end=doc.GetMaxTime()
>             data.SetTime(c4d.ABCEXPORT_FRAME_START,start)
>             data.SetTime(c4d.ABCEXPORT_FRAME_END,end)

It also updates the start/end export frame range. It sets them to 0. No matter what value is passed to either. I know it's "working" because I can control which parameter I want to set to zero by commenting out alternating data.SetTime instructions.

Am I just missing something, or is this still not working?

On 28/06/2013 at 01:24, xxxxxxxx wrote:

Originally posted by xxxxxxxx

It also updates the start/end export frame range. It sets them to 0. No matter what value is passed to either. I know it's "working" because I can control which parameter I want to set to zero by commenting out alternating data.SetTime instructions.

Am I just missing something, or is this still not working?

Hi Eddie,

ABCEXPORT_FRAME_START and ABCEXPORT_FRAME_END aren't BaseTime but LONG values in the Alembic export container. So you have to pass a frame number to set them successfully.

On 28/06/2013 at 10:32, xxxxxxxx wrote:

Alembic itself supports float frames - which can be critical for capturing motion blur, especially while exchanging data between packages - but see, if I pass a float to either of those parameters, I get "argument 2 must be c4d.BaseTime, not float" - so the error message I get explicitly suggests I have to pass a BaseTime argument, not a LONG int.
If I pass an INT or a LONG, I get the same error - that "argument 2 must be a c4d.BaseTime, not _____" fill in the blank of whatever type I pass.

Give it a try. I think this still isn't working.

On 29/06/2013 at 06:52, xxxxxxxx wrote:

Got it - it's a SetLong instead of a SetTime.

On 26/02/2014 at 11:31, xxxxxxxx wrote:


I up this thread because the code above and the script (help/examples/scripts) were working fine in R14.041 but don't seem to work anymore in R15.037 or R15.057.

Is there a trick or another way to modify export settings or is it a regression bug ?



On 27/02/2014 at 01:25, xxxxxxxx wrote:

Thanks for reporting this bug. I reported it to the developers.
I'm afraid there's no other way to change exporters/importers settings.

On 03/08/2017 at 06:28, xxxxxxxx wrote:


Related question,

I am trying to access some of the other common alembic export settings...

etc. much the same way as offered in the python alembic export example in the documentation.

Sadly however, it appears as though these values (and others) are not supported on export as these values are not being changed? I'd like to be able to customize all of these values if possible please?

Should I try SetWorldPluginData() right before export instead?


On 03/08/2017 at 07:17, xxxxxxxx wrote:

Everything is in the code you provide above on github.
As you may already know using [parameter_name] allow you to change any parameter.
So in this exemple its a tool. The tool is grab by

plug = plugins.FindPlugin(1028082, c4d.PLUGINTYPE_SCENESAVER)
Then understand plug as a variable who hold the tool.
So now you simply have to set plug[parameter_name] = your value
And thats it ! 🙂

On 03/08/2017 at 07:34, xxxxxxxx wrote:

Thank you for the reply,

However this is what I am having problems with. While I can override some things, there does appear to be a whole bunch of these variables which I can't seem to access.

So for example:

# Begin Alembic export phase
# Get Alembic export plugin, 1028082 is its ID
plug = plugins.FindPlugin(1028082, c4d.PLUGINTYPE_SCENESAVER)
if plug is None:
op = {}
# Send MSG_RETRIEVEPRIVATEDATA to Alembic export plugin
if plug.Message(c4d.MSG_RETRIEVEPRIVATEDATA, op) :
	print '{} Loading Alembic plugin: {}'.format(self.debug_string, op)
	if "imexporter" not in op:
		print '{} Export Failed: There was a problem with the Alembic plugin: {}'.format(self.debug_string, op)
	# BaseList2D object stored in "imexporter" key hold the settings
	abcExport = op["imexporter"]
	if abcExport is None:
	# Change Alembic export settings			
	abcExport[c4d.ABCEXPORT_FORMAT] = abc_export_format
	abcExport[c4d.ABCEXPORT_FRAME_START] = frame_from_export	  	#WORKS!
	abcExport[c4d.ABCEXPORT_FRAME_END] = frame_to_export	       	#WORKS!
	abcExport[c4d.ABCEXPORT_FRAME_STEP] = frame_step		    	#WORKS!
	abcExport[c4d.ABCEXPORT_SUBFRAMES] = subframes			    	#UNCONFIRMED
	abcExport[c4d.ABCEXPORT_SELECTION_ONLY] = True		        		#WORKS!
	abcExport[c4d.ABCEXPORT_SPLINES] = True			         		#FAILS
	abcExport[c4d.ABCEXPORT_SDS_WEIGHTS] = True		       		#FAILS
	abcExport[c4d.ABCEXPORT_PARTICLES] = True				    	#WORKS

Running 18.057

On 04/08/2017 at 03:11, xxxxxxxx wrote:

Hi Matt,

The options you're referring to can be changed and does affect the Alembic export.
You should try to print their value before and after changing these.

On 04/08/2017 at 04:28, xxxxxxxx wrote:

Hi Yannick,

I just can't seem to change these settings. I'm on a mac. This just does not work for me:

abcExport[c4d.ABCEXPORT_SPLINES] = True			

Curiously, when i try to change it's value by dragging the Alembicabc[c4d.ABCEXPORT_SPLINES] globalplugin export prefs into the console, it also won't change while some other values do...

Am I doing something wrong?