RADIOGROUP in .res file [SOLVED]
-
On 05/02/2015 at 13:31, xxxxxxxx wrote:
Hi,
I'm trying to get a RADIOGROUP with RADIOGADGET to work in my ".res" file from my TagDataPlugin. Everything works well, even I can't stand the ".res" files. They suck hard!
Since there is no answer in this old thread, I thought a new post is ok.
https://developers.maxon.net/forum/topic/6879/7705_resource-file-for-radiogroup&OB=DESC
I tried hard with lots of research, but with no success. BOOL, LONG and so on work perfect, as aspected, but not the RADIOGROUP.
My ".res" file looks like this, the three BOOLs at the end are placeholders and instead I have to use a RADIOGROUP:
CONTAINER Thydracameratag
{
NAME Thydracameratag;
GROUP
{
NAME HYDRA_CAMERA_SETTINGS;
GROUP
{
COLUMNS 1;
LONG ZERO_PLANE { MINEX; MIN 1; }
LONG VOLUME { MINEX; MIN 1; }SEPARATOR { SCALE_H; } BOOL DISPLAY_PRESET_1 {} BOOL DISPLAY_PRESET_2 {} BOOL DISPLAY_PRESET_3 {} } }
}
My ".h" file looks like this:
#ifndef _Thydracameratag_H_
#define _Thydracameratag_H_
enum
{
HYDRA_CAMERA_SETTINGS = 1000,
HYDRA_CAMERA_SETTINGS_GROUP = 1001,ZERO_PLANE = 1002, VOLUME = 1003, SEPERATOR_1 = 1005, DISPLAY_PRESET_1 = 1006, DISPLAY_PRESET_2 = 1007, DISPLAY_PRESET_3 = 1008
};
#endifMy ".str" file looks like this:
STRINGTABLE Thydracameratag
{
Thydracameratag "Stereoscopic Tools";
HYDRA_CAMERA_SETTINGS "Hydra Camera Settings";ZERO_PLANE "Zero Plane:"; VOLUME "3D Volume:"; DISPLAY_PRESET_1 "Disparity Preset 0,3%"; DISPLAY_PRESET_2 "Disparity Preset 0,5%"; DISPLAY_PRESET_3 "Disparity Preset 0,7%";
}
Sorry, the format seems to be broken. How do you post code here on the forum? Again, I would be very thankful for hints into the right direction. Cheers, Volker
-
On 06/02/2015 at 03:41, xxxxxxxx wrote:
My guess: CONTAINER vs DIALOG problem
-
On 06/02/2015 at 06:20, xxxxxxxx wrote:
Hello,
plugin description resource files describe parameters, not gadgets (
RADIOGROUP
[URL-REMOVED] is adialog gadget
[URL-REMOVED]). So when you create three BOOL parameters, these are three independent elements. If these parameters should act like a radio group you would have to implement such a behavior yourself.An alternative would be to use a
LONG parameter
[URL-REMOVED]. Such a LONG parameter can have aCYCLE flags
[URL-REMOVED] that allows the display of multiple values for this parameter. These parameters can be displayed as a radio group using the CUSTOMGUI RADIOBUTTONS. An example can be found in the resource description of the muscle object.You can format code using the CODE tag.
Best wishes,
Sebastian
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 06/02/2015 at 06:50, xxxxxxxx wrote:
Thanks Sebastian, just got it going with LONG and CYCLES. Works as aspected. Thanks, Volker
CONTAINER Thydracameratag { NAME HYDRA_CAMERA_SETTINGS; GROUP { COLUMNS 1; STATICTEXT TXT_1 { ANIM OFF; } SEPARATOR { SCALE_H; } LONG ZERO_PLANE { MINEX; MIN 1; } LONG VOLUME { MINEX; MIN 1; } SEPARATOR { SCALE_H; } LONG MULTIBUTTON { CYCLE { MULTI_1; MULTI_2; MULTI_3; } } SEPARATOR { SCALE_H; } STATICTEXT TXT_2 { ANIM OFF; } SEPARATOR { SCALE_H; } } }