"Reset to Default" issue
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2012 at 15:34, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R13
Platform: Windows ;
Language(s) : C++ ;---------
I created an object plugin and when I use the "Reset to Default" command to one of its parameters in the attributes manager the value will always be set to "0" instead of the value I defined in the objects init function.So where or how do I have to define preset values so that they will be recognized and used at a "Reset to Default"?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2012 at 15:41, xxxxxxxx wrote:
I've stumbled on something similar in Python but for me it turned out
that the init value type and the parameter description mismatched.
(One was a float the other something else, I can't remember right now)
Maybe check for that?Cheers
Lennart -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2012 at 16:27, xxxxxxxx wrote:
Okay, I guess this problem could be the downside of using SetParameter as recommended by Matthias Bober instead of the GetDataInstance method.
I think this way you maybe just alter a parameter value but don't set it as it's default value which remain unaffected by SetParameter, right?
Edit:
Or maybe I'm wrong!I now tried accessing the BaseContainer with GetDataInstance to set my base values but it didn't work either.
When I right click the parameter in the attributes manager and choose "Reset to Default" it is set to zero again.
And to countercheck I tried it with the spherify deformer example from the SDK with both methods and it worked in both cases as it should!?
I'm still confused.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2012 at 17:32, xxxxxxxx wrote:
Originally posted by xxxxxxxx
I've stumbled on something similar in Python but for me it turned out
that the init value type and the parameter description mismatched.
(One was a float the other something else, I can't remember right now)
Maybe check for that?Cheers
LennartHi Lennart,
thanks for the hint, I checked it but it doesn't seems to be the problem here.
Kind regards,
Tom -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/06/2012 at 08:44, xxxxxxxx wrote:
Have you set default values in the overridden ObjectData::Init method?
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/06/2012 at 12:57, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Have you set default values in the overridden ObjectData::Init method?cheers,Matthias
Yes
Edit:
Okay, I finaly hunted it down.
I used the same (in this case not so unique) ID for my SNHookClass as for my ObjectData class in this concerned project.Oddly enough that worked so far, apart from the reset to default problem.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/06/2012 at 06:43, xxxxxxxx wrote:
Glad you solved it.
cheers,
Matthias