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

    Import / Export Preferences

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 525 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 08/10/2009 at 18:04, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.506 
      Platform:   Windows  ; Mac  ;  
      Language(s) :     C++  ;

      ---------
      Hey Guys,
      I have an import filter and I set the values of my preferences through my class' constructor using SetWorldPluginData(). No problems there. I am using GetWorldPluginData() to retrieve these values which kinda works 😃 I can get the initial values that I set through my constructor and SetWorldPluginData(). But if I change these values in the Preferences dialog, the next time I use my import filter it looks at the preferences values before I changed them. Now, I know I need to set these changes through SetWorldPluginData but how can I set them to new values if I can't get them correctly from GetWorldPluginData()?

      Thanks in advance,
      Josh

      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 12/10/2009 at 08:10, xxxxxxxx wrote:

        Has anyone got this to work properly? (i.e bump)

        Thanks,
        Josh

        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 12/10/2009 at 08:41, xxxxxxxx wrote:

          What kind of filter are you using? A SceneLoaderData plugin for instance uses descriptions and you access the data through the plugins container just like any other NodeData derived plugin.

          cheers,
          Matthias

          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 13/10/2009 at 21:28, xxxxxxxx wrote:

            Hi Matthias,
            Yeah the plugin is derived from SceneLoaderData. I am using only description resource files, so I shouldn't have to overload the GetDDescription, GetDParameter, etc. from the parent NodeData class.

            I am reading the descriptions from the base container which I get through the GetWorldPluginData() function. Now this does read all of my descriptions properly; but if I open Cinema change any of the values of my descriptions in the preferences, they will not be read correctly until I restart cinema. (i.e they retain the previous entry from the preferences).

            So I am just curious on I how I can open Cinema, go into the preferences and change one of the descriptions for my plugin, and then import the data and use the values I just entered into the preferences without restarting Cinema to take affect.

            Thanks in advance,
            Josh

            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 14/10/2009 at 02:54, xxxxxxxx wrote:

              You don't have to use GetWorldPluginData(). Simply use the scene loader's container.

              Example, data is the container:

              > \> class STLLoaderData : public SceneLoaderData \> { \>      public: \>           virtual Bool Init(GeListNode \*node); \>           virtual Bool Identify(PluginSceneLoader \*node, const Filename &name;, UCHAR \*probe, LONG size); \>           virtual LONG Load(PluginSceneLoader \*node, const Filename &name;, BaseDocument \*doc, LONG filterflags, String \*error, BaseThread \*thread); \> \>           static NodeData \*Alloc(void) { return gNew STLLoaderData; } \> }; \> \> Bool STLLoaderData::Init(GeListNode \*node) \> { \>      PluginSceneLoader \*loader = (PluginSceneLoader\* )node; \>      BaseContainer \*data = loader->GetDataInstance(); \> \>      data->SetString(STLFILTER_TEXT, "hello world"); //intialize settings for the first time \> \>      return TRUE; \> } \> \> Bool STLLoaderData::Identify(PluginSceneLoader \*node, const Filename &name;, UCHAR \*probe, LONG size) \> { \>      PluginSceneLoader \*loader = (PluginSceneLoader\* )node; \>      BaseContainer \*data = loader->GetDataInstance(); \>       \>      //do something \> } \> \> LONG STLLoaderData::Load(PluginSceneLoader \*node, const Filename &name;, BaseDocument \*doc, LONG flags, String \*error, BaseThread \*thread) \> { \>      PluginSceneLoader \*loader = (PluginSceneLoader\* )node; \>      BaseContainer \*data = loader->GetDataInstance(); \> \>      //do something \> } \>

              cheers,
              Matthias

              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 14/10/2009 at 17:09, xxxxxxxx wrote:

                This worked perfectly! Thanks Matthias.

                Josh

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