THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/06/2011 at 08:56, xxxxxxxx wrote:
Hi, I fail making a ComboBox on a PyTag..
I'm trying to make a ComboBox with three options in it.
Is making a ComboBox anywhere close to how "regular" items are done?
(Like the CUSTOMGUI REALSLIDER shown below, that works fine.)
I get the error from the .res file at "COMBOBOX".
My .pyp init is:
def self.InitAttr(tag, int, [c4d.NROLLMODE])
tag[c4d.NROLLMODE] = 1
My .h file is:
#ifndef _nROLL_H_
#define _nROLL_H_
enum
{
NROLLRADIUS = 1000,
NROLLRADMIN = 1001,
NROLLMODE = 1003, # <- THIS IS THE COMBO BOX TRY
NROLLOFF = 5001,
NROLLWHEEL = 5002,
NROLLBALL = 5003,
NROLLHEIGHT = 1002,
NROLLTRIM = 1004,
NROLLSPINN = 1005,
NROLLINITROT = 1006,
NROLLFRAME = 1007,
NROLLGROUP = 2001
};
#endif
My .str file is:
STRINGTABLE nROLL
{
nROLL "nROLL";
NROLLRADIUS "Radius";
NROLLRADMIN "RadMin";
NROLLMODE "MODE";
NROLLOFF "OFF";
NROLLWHEEL "Wheel";
NROLLBALL "Ball";
NROLLHEIGHT "Height";
NROLLTRIM "Trim";
NROLLSPINN "Spinn";
NROLLINITROT "Init Rot";
NROLLFRAME "Frame";
NROLLGROUP "nROLL";
}
And .res file is:
CONTAINER nROLL
{
NAME nROLL;
INCLUDE Texpression;
GROUP NROLLGROUP
{ DEFAULT 1;
REAL NROLLRADIUS {UNIT METER; MIN 0.0; MAX 10000.0; CUSTOMGUI REALSLIDER; STEP 0.01; MINSLIDER 0.0; MAXSLIDER 1000.0;}
REAL NROLLRADMIN {UNIT METER; MIN 0.0; MAX 100.0; CUSTOMGUI REALSLIDER; STEP 0.1; MINSLIDER 0.0; MAXSLIDER 10.0;}
COMBOBOX NROLLMODE
{
CHILDS
{
NROLLOFF, NROLLOFF;
NROLLWHEEL, NROLLWHEEL;
NROLLBALL, NROLLBALL;
}
}
}
}
Cheers
Lennart