PrefsDialogObject
-
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.
-
On 26/11/2013 at 06:24, xxxxxxxx wrote:
Can you share your code for GetDParameter() and SetDParameter() please?
-
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 { }
}
}