RNA: add macros for EnumPropertyItem layout elements
Add the following macros for enums as support for these features wasn't all that obvious and there were some inconsistencies in their use. - RNA_ENUM_ITEM_HEADING(name, description) - RNA_ENUM_ITEM_SEPR - RNA_ENUM_ITEM_SEPR_COLUMN
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
* Note some are 'fake' ones, i.e. they are not hold by real CDLayers. */
|
||||
/* Not shared with modifier, since we use a usual enum here, not a multi-choice one. */
|
||||
static const EnumPropertyItem DT_layer_items[] = {
|
||||
{0, "", 0, "Vertex Data", ""},
|
||||
RNA_ENUM_ITEM_HEADING("Vertex Data", NULL),
|
||||
{DT_TYPE_MDEFORMVERT,
|
||||
"VGROUP_WEIGHTS",
|
||||
0,
|
||||
@@ -60,7 +60,8 @@ static const EnumPropertyItem DT_layer_items[] = {
|
||||
{DT_TYPE_SKIN, "SKIN", 0, "Skin Weight", "Transfer skin weights"},
|
||||
#endif
|
||||
{DT_TYPE_BWEIGHT_VERT, "BEVEL_WEIGHT_VERT", 0, "Bevel Weight", "Transfer bevel weights"},
|
||||
{0, "", 0, "Edge Data", ""},
|
||||
|
||||
RNA_ENUM_ITEM_HEADING("Edge Data", NULL),
|
||||
{DT_TYPE_SHARP_EDGE, "SHARP_EDGE", 0, "Sharp", "Transfer sharp mark"},
|
||||
{DT_TYPE_SEAM, "SEAM", 0, "UV Seam", "Transfer UV seam mark"},
|
||||
{DT_TYPE_CREASE, "CREASE", 0, "Subdivision Crease", "Transfer crease values"},
|
||||
@@ -70,11 +71,13 @@ static const EnumPropertyItem DT_layer_items[] = {
|
||||
0,
|
||||
"Freestyle Mark",
|
||||
"Transfer Freestyle edge mark"},
|
||||
{0, "", 0, "Face Corner Data", ""},
|
||||
|
||||
RNA_ENUM_ITEM_HEADING("Face Corner Data", NULL),
|
||||
{DT_TYPE_LNOR, "CUSTOM_NORMAL", 0, "Custom Normals", "Transfer custom normals"},
|
||||
{DT_TYPE_MPROPCOL_LOOP | DT_TYPE_MLOOPCOL_LOOP, "VCOL", 0, "Colors", "Color Attributes"},
|
||||
{DT_TYPE_UV, "UV", 0, "UVs", "Transfer UV layers"},
|
||||
{0, "", 0, "Face Data", ""},
|
||||
|
||||
RNA_ENUM_ITEM_HEADING("Face Data", NULL),
|
||||
{DT_TYPE_SHARP_FACE, "SMOOTH", 0, "Smooth", "Transfer flat/smooth mark"},
|
||||
{DT_TYPE_FREESTYLE_FACE,
|
||||
"FREESTYLE_FACE",
|
||||
|
||||
Reference in New Issue
Block a user