read preferences

On 13/10/2015 at 03:03, xxxxxxxx wrote:

Hi all,

This might be very obvious, but I couldn't find out how to do this.
I need to read out the OBJ import settings from the preferences pane. Anyone know how?


On 14/10/2015 at 10:16, xxxxxxxx wrote:


in our GitHub repository you can find examples for OBJ im-/export.
Basically it works the same for all im-/exporters (and as demonstrated for OBJ in above examples) :

  1. You find the plugin via its ID (FindPlugin(1030178, c4d.PLUGINTYPE_SCENESAVER), here ID of OBJ Exporter in R17)
  2. Get the private data from the plugin (Message(c4d.MSG_RETRIEVEPRIVATEDATA, op))
  3. Get the im-/exporter settings container (op["imexporter"])
  4. Access the settings in the returned BaseContainer

The IDs to get the settings from the BaseContainer are easiest to find, via dragging the desired option from the Im-/Exporter dialog into the console.

One more note:
The OBJ im-/exporter changed from R16 to R17. In the above mentioned examples you see the IDs for R17 (export: 1030178, import: 1030177). In R16 you can use c4d.FORMAT_OBJEXPORT and c4d.c4d.FORMAT_OBJIMPORT instead. The change of IDs unfortunately slipped through when R17 got released.

On 21/10/2015 at 03:22, xxxxxxxx wrote:

Sorry for the late response, but thanks for the info!