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
    The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.

    PrefsDialogObject

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 267 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 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 Offline
        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 Offline
          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