COLUMNS for Description Resource [SOLVED]
-
On 28/10/2015 at 04:22, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;---------
Hi, one more question about dialog and descriptions resources.Even if i don't really understand difference between Dialog resource and Description resource. I found that columns group in Dialog resource could be EQUAL_COLS; and this is exactly what i need for my layout. Take a look :
Or maybe you know a better way to center elements ? For example the two bottom buttons should be centered ! no ?
Thanks for any suggestions
NB :
CONTAINER timer_visibility
{
NAME timer_visibility;INCLUDE Texpression;
GROUP ID_TAGPROPERTIES
{LONG CHOICE
{
CYCLE
{
IN_OUT_MODE;
PRINTER_MODE;
}
}GROUP GRP_ACTION
{
LAYOUTGROUP;
DEFAULT 1;
COLUMNS 2;GROUP{
LONG ACTION_1
{
CYCLE
{
DEFAULT;
SHOW;
HIDE;
}
}
}
GROUP{
LONG ACTION_2
{
CYCLE
{
DEFAULT;
SHOW;
HIDE;
}
}
}
}BOOL BOOL_INVERT {}
GROUP GRP_IN_OUT
{DEFAULT 1;
COLUMNS 2;REAL REAL_IN {}
REAL REAL_OUT {}
}GROUP GRP_PRINTER
{DEFAULT 1;
GROUP
{
STATICTEXT {NAME INFO_PRINTER; SCALE_H;}
}
GROUP{
STRING STRING_PRINTER {SCALE_H;}
}
}GROUP GRP_KEYFRAMES
{DEFAULT 1;
COLUMNS 2;BUTTON BUT_GETFROMKEY {}
BUTTON BUT_CREATEKEY {}
}}
} -
On 29/10/2015 at 03:51, xxxxxxxx wrote:
Hello,
the difference between dialog and description resource is actually quite simple:
- a dialog resource describes a dialog window and its GUI elements/widgets. So for example you add explicitly a number field or a slider widget.
- A description resource describes the parameters of a NodeData based plugin. These parameters are used to store the object's settings. One can read and write these parameters even if the object is not selected and there is no GUI to display the parameters. For example a parameter could be a REAL number. If this number should be presented using a number field or a slider is another question.
In your screenshot you show the description GUI of your plugin displayed in the Attribute Manager. So I guess what you want is to make sure that your elements use the whole width of the Attribute Manager.
If you want that a certain element uses the whole width of the Attribute Manager it has to scale in the horizontal direction. This is defined using the SCALE_H flag. This can look like this:
GROUP PARAMETERGROUP { SCALE_H; COLUMNS 2; GROUP { BUTTON BUTTON_A {SCALE_H;} } GROUP { BUTTON BUTTON_B {SCALE_H;} } }
best wishes,
Sebastian -
On 29/10/2015 at 08:44, xxxxxxxx wrote:
Thanks for your reply. I finally did it with your advices :
One of my major error was to forget in STRINGTABLE, string for LONG Cycle and some other littles things. So the dot for animation disappeared and layout breaks... But SCALE_H; help too
Thanks
With this code :
CONTAINER timer_visibility
{
NAME timer_visibility;INCLUDE Texpression;
GROUP ID_TAGPROPERTIES
{LONG MASTER_CHOICE
{
CYCLE
{
IN_OUT_MODE;
PRINTER_MODE;
}
}GROUP GRP_ACTION
{
DEFAULT 0;
SCALE_H;LONG ACTION_1
{ SCALE_H;
CYCLE
{
DEFAULT;
SHOW;
}
}LONG ACTION_2
{ SCALE_H;
CYCLE
{
DEFAULT;
SHOW;
}
}}
GROUP GRP_IN_OUT
{DEFAULT 1;
COLUMNS 2;REAL REAL_IN {}
REAL REAL_OUT {}BOOL BOOL_INVERT {}
}GROUP GRP_PRINTER
{DEFAULT 0;
SCALE_H;GROUP
{
STATICTEXT {NAME INFO_PRINTER_1;}
STATICTEXT {NAME INFO_PRINTER_2;}
STATICTEXT {NAME INFO_PRINTER_3;}
}
GROUP
{
STRING STRING_PRINTER { ANIM OFF; }
}
}GROUP GRP_KEYFRAMES
{DEFAULT 0;
COLUMNS 2;
SCALE_H;BUTTON BUT_GETFROMKEY {SCALE_H;}
BUTTON BUT_CREATEKEY {SCALE_H;}
}}
}