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

    PrefsDialogObject

    SDK Help
    0
    3
    267
    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
      Helper
      last edited by

      On 26/11/2013 at 00:50, xxxxxxxx wrote:

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

      ---------
      Hello,
       
      I register an own preference category in C4D preference dialog. (PrefsDialogObject) And it's working for Bool, Long and Strings, but not with Filename. Althought I'm doing the same things in the GetDParameter() function and SetDParameter() function.
      But if I'm quit C4D and start it again, the FILENAME settings are always lost !!!!!Ouch[URL-REMOVED]
       
      regards
      Marky


      [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

        On 26/11/2013 at 06:24, xxxxxxxx wrote:

        Can you share your code for GetDParameter() and SetDParameter() please?

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

          On 26/11/2013 at 23:47, xxxxxxxx wrote:

          sure:
          Bool cTracePreference::GetDParameter(GeListNode *node, const DescID &id, GeData &t_data, DESCFLAGS_GET &flags)
          {
          BaseContainer* bc = GetTracePreference();
          if (!bc) SUPER::GetDParameter(node,id,t_data,flags);
          switch (id[0].id)
          {
          case PREFS_TM_OUTPUT:
          {
          t_data = bc->GetFilename(eTRACEPREFS_OUTPUT,"");
          flags |= DESCFLAGS_GET_PARAM_GET;
          }
          return TRUE;
          case PREFS_TM_VCDFILE:
          {
          t_data = bc->GetFilename(eTRACEPREFS_VCD_FILE,"");
          flags |= DESCFLAGS_GET_PARAM_GET;
          }
          return TRUE;
          default: return TRUE;
          }
          return SUPER::GetDParameter(node,id,t_data,flags);
          }
          //------------------------------------------------------------------------------------------------
          Bool cTracePreference::SetDParameter(GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags)
          {
          BaseContainer* bc = GetTracePreference();
          if (!bc) SUPER::SetDParameter(node,id,t_data,flags);
          switch (id[0].id)
          {
          case PREFS_TM_OUTPUT:
          {
          bc->SetFilename( eTRACEPREFS_OUTPUT, t_data.GetFilename() );
          flags |= DESCFLAGS_SET_PARAM_SET;
          return TRUE;
          }
          case PREFS_TM_VCDFILE:
          {
          bc->SetFilename(eTRACEPREFS_VCD_FILE,t_data.GetFilename().GetString());
          flags |= DESCFLAGS_SET_PARAM_SET;
          }
          return TRUE;
          }
          return SUPER::SetDParameter(node,id,t_data,flags);
          }

          CONTAINER PrefsTraceManager
          {
          NAME PrefsTraceManager;
          GROUP PREFS_TM_MAIN_GROUP
          {
          DEFAULT 1;
          FILENAME PREFS_TM_OUTPUT { }
          FILENAME PREFS_TM_VCDFILE { }
          }
          }

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