On 09/10/2014 at 12:22, xxxxxxxx wrote:
This is how to create a slider gizmo with a .res file.
And get it's value in the .pyp code.
### mytag.res ###
CONTAINER mytag #This container Must! be set to the same name as your .h file
{
NAME mytag;
GROUP GROUP1
{
COLUMNS 1;
DEFAULT 1;
REAL MY_SLIDER { UNIT METER; MINSLIDER 0; MAXSLIDER 1000; STEP 1; CUSTOMGUI REALSLIDER; }
}
}
### mytag.h ###
enum
{
GROUP1 = 9000,
MY_SLIDER = 1001,
};
### mtag.str ###
STRINGTABLE mytag
{
mytag "My Tag plugin";
GROUP1 "My Group";
MY_SLIDER "My Slider";
}
### mtag.pyp ###
def Execute(self, tag, doc, op, bt, priority, flags) :
bc = tag.GetDataInstance()
getValue = bc.GetReal(c4d.MY_SLIDER)
print getValue
-ScottA