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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    settings from preferences dialog- Import/Export

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 428 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 14/07/2011 at 17:57, xxxxxxxx wrote:

      I have been going out of my mind how to access data from the c4d preferances dialog namely the import export section and hope someone can give me an answer.

      Now i can read the preferences like this for example:

      bc = c4d.plugins.GetWorldPluginData(c4d.FORMAT_OBJIMPORT)
              imp_normals = bc.GetBool(c4d.OBJIMPORTFILTER_IMPORTNORMALS)
              print "WaveFront import normals: " , imp_normals

      But this is where the problem lies the value returned is only the inital value that is set when c4d boots. It is not the actual CURRENT value as shown in the preferance dialog and never gets updated until c4d is closed and reopened.

      So my question is how do i get the CURRENT setting(s) of import/Exports filters as shown by the prefs dialog.

      p.s i have also tried using c4d.GetWorldContainerInstance() and the finding the data but for import/export filters it is the same as above only the inital value is shown not the current.

      i have also tried c4d.plugins.FindPlugin(c4d.FORMAT_OBJIMPORT).GetDataInstance() but this does not seem to return the data i am after- not sure what it is it actually returns but seems to be a couple of ids in the basecontainer that i have no idea what they are

      Many thanks in advance😉

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 15/07/2011 at 00:19, xxxxxxxx wrote:

        Read this in another post, but couldn't try it out yet.
        Maybe you try:

        data = doc.GetData()  
        print data[c4d.OBJIMPORTFILTER_IMPORTNORMALS]
        

        Cheers,

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 15/07/2011 at 04:19, xxxxxxxx wrote:

          data = doc.GetData()  
          print data[c4d.OBJIMPORTFILTER_IMPORTNORMALS]
          

          Thanks for the reply Nux however that does not work 😞  c4d.OBJIMPORTFILTER_IMPORTNORMALS should be a bool true/false - 0/1 but that actually returns 200000219<not sure what that is but i also tried it with a few others just to be sure it did not work for example:

          c4d.OBJIMPORTFILTER_OPTIMIZE - returns none should be bool
          c4d.FBXEXPORT_SAVE_NORMALS- returns none should be bool
          ......

          Any other ideas or is this just simply not possible for some reason .

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