THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/10/2004 at 11:44, xxxxxxxx wrote:
Cinema 4D Version: 8.100
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
Is it possible to change the Min/Max flags of a description loaded from a resource file?
I have a tag with a slider and I want to give the user the option of setting the Min/Max limits of the slider. The Min/Max flags are initially set in the description's resource file.
On 06/10/2004 at 15:13, xxxxxxxx wrote:
Hey, Cactus Dan,
Yes! Use whichever of GeDialog::SetReal() or SetLong() or SetMeter() or SetDegree() or SetPercent() applies to change the slider/numerical edit field values (min/max/step/etc.).
On 06/10/2004 at 16:54, xxxxxxxx wrote:
Does that work for the Attributes Manager?
On 06/10/2004 at 17:31, xxxxxxxx wrote:
Should work as long as you get the BaseContainer for whatever it is (Object, Tag, Shader). For instance (an example from the code on which I'm working) :
// Add Restriction Tag to bone
if (!(rtag = boneObject->MakeTag(Trestriction))) throw ErrorException(ERROR_MEMORY, "PoserBase.SetWeights.rtag");
BaseContainer *bc = rtag->GetDataInstance();
Here I create a Restriction Tag, get an instance of its BaseContainer, then set the values (which are displayed in the AM). You just need to set the extended arguments, like for SetReal(), which I leave at default by not adding the arguments.
Unless this is your own Plugin object/tag/shader, the IDs for AM settings for C4D stuff can be found in the Resource/res/description folder under the appropriate name (i.e.: Trestriction.res).
On 06/10/2004 at 18:42, xxxxxxxx wrote:
Hmmm... when I looked up SetReal in the BaseContainer class, it only has 2 parameters (LONG id, Real r). Besides I really didn't want to set the "Real" value of the slider, I just want to be able to change the Min/Max limits of the slider.
On 06/10/2004 at 19:15, xxxxxxxx wrote:
Oops, sorry 'bout that. I was looking at GeDialog::SetReal() for some reason.
You are going to have to get to these using Descriptions and GetParameter(). Check out the SDK doc under "Description" for more info and a start on how to access and set these.
On 06/10/2004 at 19:29, xxxxxxxx wrote:
Ah, OK, I'm checking it out now. Thanks.