THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/01/2009 at 06:11, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R11
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
I've written a file export/import plugin which uses a parameter to scale the data when reading/writing:
> \> LONG SceneLoader::Load(PluginSceneLoader \*fp_node, const Filename &fcr;\_filename, BaseDocument \*fp_document, LONG f_flags, String \* /\*error\*/, BaseThread \*fp_thread) \> { \> GeData l_data; \> if (fp_node->GetParameter(DescLevel(VRM3DIMPORT_SCALE),l_data,0)) \> { \> m_scalingFactor = l_data.GetReal(); \> } \> \> ... lots of code ... \> } \>
the parameters are defined in res/descriptions/xxx.res:
> \> CONTAINER Fvrm3dimport \> { \> NAME Fvrm3dimport; \> INCLUDE Fbase; \> \> GROUP Fvrm3dimport \> { \> REAL VRM3DIMPORT_SCALE {MINEX; MIN 0.0; STEP 0.01;} \> } \> } \>
so I can set the scaling value for the importer using C4D's preference dialog (Edit->Preferences Import/Export->MyImporterName)
The value I set there seems be be managed by C4D, it stores it and restores when I restart the application.
But on the first time I install the plugin and start C4D, it always has set the MIN-value (which is zero and quite bad as scaling factor). I would like to have it set to 1 (or something else) as initial value while still allowing the user to increase or decrease it later on.
So how can I set an initial value which is used on the first time the plugin starts (i.e. the user hasn't set anything on his own)?
Any help would be great.
Thanks in advance!