Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    read preferences

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 309 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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?

      Greets!
      HW

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

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

        Hi,

        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.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

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

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post