forked from bartvdbraak/blender
RNA
* Added a function to define booleans negative, to turn negative properties into positive ones gettin rid of the no_ prefix, and also got rid of the use_ prefix for two booleans. * Also made the function for enum bitflags separate, this is quite rare so don't need to bother with this in most cases. * Removed svn:executable flags from some files.
This commit is contained in:
parent
a9374c5941
commit
8360dc066c
@ -205,15 +205,15 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
|
||||
rna_print_data_get(f, dp);
|
||||
if(dp->dnaarraylength == 1) {
|
||||
if(prop->type == PROP_BOOLEAN && dp->booleanbit)
|
||||
fprintf(f, " return ((data->%s & (%d<<index)) != 0);\n", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " return (%s(data->%s & (%d<<index)) != 0);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
|
||||
else
|
||||
fprintf(f, " return (%s)((&data->%s)[index]);\n", rna_type_type(prop), dp->dnaname);
|
||||
fprintf(f, " return (%s)%s((&data->%s)[index]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
|
||||
}
|
||||
else {
|
||||
if(prop->type == PROP_BOOLEAN && dp->booleanbit)
|
||||
fprintf(f, " return ((data->%s[index] & %d) != 0);\n", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " return (%s(data->%s[index] & %d) != 0);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
|
||||
else
|
||||
fprintf(f, " return (%s)(data->%s[index]);\n", rna_type_type(prop), dp->dnaname);
|
||||
fprintf(f, " return (%s)%s(data->%s[index]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
|
||||
}
|
||||
fprintf(f, "}\n\n");
|
||||
}
|
||||
@ -222,13 +222,13 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
|
||||
fprintf(f, "{\n");
|
||||
rna_print_data_get(f, dp);
|
||||
if(prop->type == PROP_BOOLEAN && dp->booleanbit)
|
||||
fprintf(f, " return (((data->%s) & %d) != 0);\n", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " return (%s((data->%s) & %d) != 0);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
|
||||
else if(prop->type == PROP_ENUM && dp->enumbitflags)
|
||||
fprintf(f, " return ((data->%s) & %d);\n", dp->dnaname, rna_enum_bitmask(prop));
|
||||
else if(prop->type == PROP_POINTER && dp->dnapointerlevel == 0)
|
||||
fprintf(f, " return (%s)&(data->%s);\n", rna_type_type(prop), dp->dnaname);
|
||||
else
|
||||
fprintf(f, " return (%s)(data->%s);\n", rna_type_type(prop), dp->dnaname);
|
||||
fprintf(f, " return (%s)%s(data->%s);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
|
||||
fprintf(f, "}\n\n");
|
||||
}
|
||||
break;
|
||||
@ -313,22 +313,22 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
|
||||
rna_print_data_get(f, dp);
|
||||
if(dp->dnaarraylength == 1) {
|
||||
if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
|
||||
fprintf(f, " if(value) data->%s |= (%d<<index);\n", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " if(%svalue) data->%s |= (%d<<index);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " else data->%s &= ~(%d<<index);\n", dp->dnaname, dp->booleanbit);
|
||||
}
|
||||
else {
|
||||
rna_clamp_value(f, prop);
|
||||
fprintf(f, " (&data->%s)[index]= value;\n", dp->dnaname);
|
||||
fprintf(f, " (&data->%s)[index]= %svalue;\n", dp->dnaname, (dp->booleannegative)? "!": "");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
|
||||
fprintf(f, " if(value) data->%s[index] |= %d;\n", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " if(%svalue) data->%s[index] |= %d;\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " else data->%s[index] &= ~%d;\n", dp->dnaname, dp->booleanbit);
|
||||
}
|
||||
else {
|
||||
rna_clamp_value(f, prop);
|
||||
fprintf(f, " data->%s[index]= value;\n", dp->dnaname);
|
||||
fprintf(f, " data->%s[index]= %svalue;\n", dp->dnaname, (dp->booleannegative)? "!": "");
|
||||
}
|
||||
}
|
||||
fprintf(f, "}\n\n");
|
||||
@ -338,7 +338,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
|
||||
fprintf(f, "{\n");
|
||||
rna_print_data_get(f, dp);
|
||||
if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
|
||||
fprintf(f, " if(value) data->%s |= %d;\n", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " if(%svalue) data->%s |= %d;\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
|
||||
fprintf(f, " else data->%s &= ~%d;\n", dp->dnaname, dp->booleanbit);
|
||||
}
|
||||
else if(prop->type == PROP_ENUM && dp->enumbitflags) {
|
||||
@ -347,7 +347,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
|
||||
}
|
||||
else {
|
||||
rna_clamp_value(f, prop);
|
||||
fprintf(f, " data->%s= value;\n", dp->dnaname);
|
||||
fprintf(f, " data->%s= %svalue;\n", dp->dnaname, (dp->booleannegative)? "!": "");
|
||||
}
|
||||
fprintf(f, "}\n\n");
|
||||
}
|
||||
|
0
source/blender/makesrna/intern/rna_brush.c
Executable file → Normal file
0
source/blender/makesrna/intern/rna_brush.c
Executable file → Normal file
@ -43,6 +43,10 @@ void RNA_def_camera(BlenderRNA *brna)
|
||||
{CAM_PERSP, "PERSP", "Perspective", ""},
|
||||
{CAM_ORTHO, "ORTHO", "Orthographic", ""},
|
||||
{0, NULL, NULL, NULL}};
|
||||
static EnumPropertyItem prop_lens_unit_items[] = {
|
||||
{0, "MILLIMETERS", "Millimeters", ""},
|
||||
{CAM_ANGLETOGGLE, "DEGREES", "Degrees", ""},
|
||||
{0, NULL, NULL, NULL}};
|
||||
|
||||
srna= RNA_def_struct(brna, "Camera", "ID", "Camera");
|
||||
|
||||
@ -124,11 +128,12 @@ void RNA_def_camera(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWNAME);
|
||||
RNA_def_property_ui_text(prop, "Show Name", "Draw the active Camera's name in Camera view.");
|
||||
|
||||
prop= RNA_def_property(srna, "use_degrees", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_ANGLETOGGLE);
|
||||
RNA_def_property_ui_text(prop, "Use Degrees", "Use degrees instead of mm as the unit of the Camera lens.");
|
||||
prop= RNA_def_property(srna, "lens_unit", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
||||
RNA_def_property_enum_items(prop, prop_lens_unit_items);
|
||||
RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface.");
|
||||
|
||||
/* Pointers */
|
||||
/* pointers */
|
||||
rna_def_ipo_common(srna);
|
||||
|
||||
prop= RNA_def_property(srna, "dof_object", PROP_POINTER, PROP_NONE);
|
||||
|
@ -53,7 +53,7 @@ static void rna_CurveMapping_curves_begin(CollectionPropertyIterator *iter, Poin
|
||||
rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), NULL);
|
||||
}
|
||||
|
||||
static void rna_CurveMapping_use_clipping_set(PointerRNA *ptr, int value)
|
||||
static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value)
|
||||
{
|
||||
CurveMapping *cumap= (CurveMapping*)ptr->data;
|
||||
|
||||
@ -132,7 +132,7 @@ static void rna_def_curvemappoint(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Location", "");
|
||||
|
||||
prop= RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "flag", PROP_DEF_ENUM_BITFLAGS);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
||||
RNA_def_property_enum_items(prop, prop_handle_type_items);
|
||||
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Handle Type", "");
|
||||
@ -157,7 +157,7 @@ static void rna_def_curvemap(BlenderRNA *brna)
|
||||
/* not editable for now, need to have CurveMapping to do curvemapping_changed */
|
||||
|
||||
prop= RNA_def_property(srna, "extend", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "flag", CUMA_EXTEND_EXTRAPOLATE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
||||
RNA_def_property_enum_items(prop, prop_extend_items);
|
||||
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Extend", "");
|
||||
@ -175,10 +175,10 @@ static void rna_def_curvemapping(BlenderRNA *brna)
|
||||
|
||||
srna= RNA_def_struct(brna, "CurveMapping", NULL, "CurveMapping");
|
||||
|
||||
prop= RNA_def_property(srna, "use_clipping", PROP_BOOLEAN, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "clip", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_DO_CLIP);
|
||||
RNA_def_property_ui_text(prop, "Use Clipping", "");
|
||||
RNA_def_property_boolean_funcs(prop, NULL, "rna_CurveMapping_use_clipping_set");
|
||||
RNA_def_property_ui_text(prop, "Clip", "");
|
||||
RNA_def_property_boolean_funcs(prop, NULL, "rna_CurveMapping_clip_set");
|
||||
|
||||
prop= RNA_def_property(srna, "clip_min_x", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "clipr.xmin");
|
||||
|
6
source/blender/makesrna/intern/rna_curve.c
Executable file → Normal file
6
source/blender/makesrna/intern/rna_curve.c
Executable file → Normal file
@ -166,9 +166,9 @@ static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
|
||||
RNA_def_property_ui_text(prop, "UV Orco", "Forces to use UV coordinates for texture mapping 'orco'.");
|
||||
|
||||
prop= RNA_def_property(srna, "no_puno_flip", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_NOPUNOFLIP);
|
||||
RNA_def_property_ui_text(prop, "No Puno Flip", "Don't flip vertex normals while rendering.");
|
||||
prop= RNA_def_property(srna, "vertex_normal_flip", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_NOPUNOFLIP);
|
||||
RNA_def_property_ui_text(prop, "Vertex Normal Flip", "Flip vertex normals towards the camera during render");
|
||||
}
|
||||
|
||||
static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
|
||||
|
@ -592,7 +592,7 @@ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type,
|
||||
}
|
||||
case PROP_ENUM:
|
||||
DefRNA.silent= 1;
|
||||
RNA_def_property_enum_sdna(prop, NULL, identifier, 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, identifier);
|
||||
DefRNA.silent= 0;
|
||||
break;
|
||||
case PROP_POINTER:
|
||||
@ -970,6 +970,17 @@ void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, co
|
||||
dp->booleanbit= bit;
|
||||
}
|
||||
|
||||
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int booleanbit)
|
||||
{
|
||||
StructDefRNA *ds;
|
||||
PropertyDefRNA *dp;
|
||||
|
||||
RNA_def_property_boolean_sdna(prop, structname, propname, booleanbit);
|
||||
|
||||
if((ds=DefRNA.structs.last) && (dp=ds->properties.last))
|
||||
dp->booleannegative= 1;
|
||||
}
|
||||
|
||||
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
|
||||
{
|
||||
PropertyDefRNA *dp;
|
||||
@ -1028,7 +1039,7 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons
|
||||
rna_def_property_sdna(prop, structname, propname);
|
||||
}
|
||||
|
||||
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname, EnumPropertyFlag flag)
|
||||
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
|
||||
{
|
||||
PropertyDefRNA *dp;
|
||||
StructRNA *srna= DefRNA.laststruct;
|
||||
@ -1045,8 +1056,6 @@ void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const
|
||||
}
|
||||
|
||||
if((dp=rna_def_property_sdna(prop, structname, propname))) {
|
||||
dp->enumbitflags= (flag & PROP_DEF_ENUM_BITFLAGS);
|
||||
|
||||
if(prop->arraylength) {
|
||||
prop->arraylength= 0;
|
||||
if(!DefRNA.silent) {
|
||||
@ -1057,6 +1066,17 @@ void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const
|
||||
}
|
||||
}
|
||||
|
||||
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
|
||||
{
|
||||
StructDefRNA *ds;
|
||||
PropertyDefRNA *dp;
|
||||
|
||||
RNA_def_property_enum_sdna(prop, structname, propname);
|
||||
|
||||
if((ds=DefRNA.structs.last) && (dp=ds->properties.last))
|
||||
dp->enumbitflags= 1;
|
||||
}
|
||||
|
||||
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
|
||||
{
|
||||
PropertyDefRNA *dp;
|
||||
|
@ -150,7 +150,7 @@ static void rna_def_image(BlenderRNA *brna)
|
||||
|
||||
/* generated image (image_generated_change_cb) */
|
||||
prop= RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "gen_type", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "gen_type");
|
||||
RNA_def_property_enum_items(prop, prop_generated_type_items);
|
||||
RNA_def_property_ui_text(prop, "Generated Type", "Generated image type.");
|
||||
|
||||
@ -166,7 +166,7 @@ static void rna_def_image(BlenderRNA *brna)
|
||||
|
||||
/* realtime properties */
|
||||
prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "flag", PROP_DEF_ENUM_BITFLAGS);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
||||
RNA_def_property_enum_items(prop, prop_mapping_items);
|
||||
RNA_def_property_ui_text(prop, "Mapping", "Mapping type to use for this image in the game engine.");
|
||||
|
||||
|
@ -56,7 +56,7 @@ typedef struct PropertyDefRNA {
|
||||
const char *dnalengthname;
|
||||
int dnalengthfixed;
|
||||
|
||||
int booleanbit;
|
||||
int booleanbit, booleannegative;
|
||||
int enumbitflags;
|
||||
} PropertyDefRNA;
|
||||
|
||||
|
@ -83,13 +83,13 @@ void rna_def_ipocurve(BlenderRNA *brna)
|
||||
|
||||
/* Enums */
|
||||
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "ipo", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "ipo");
|
||||
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
|
||||
RNA_def_property_enum_items(prop, prop_mode_interpolation_items);
|
||||
RNA_def_property_ui_text(prop, "Interpolation", "");
|
||||
|
||||
prop= RNA_def_property(srna, "extrapolation", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "extrap", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "extrap");
|
||||
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
|
||||
RNA_def_property_enum_items(prop, prop_mode_extend_items);
|
||||
RNA_def_property_ui_text(prop, "Extrapolation", "");
|
||||
@ -132,7 +132,7 @@ void rna_def_ipo(BlenderRNA *brna)
|
||||
|
||||
/* Enums */
|
||||
prop= RNA_def_property(srna, "block_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "blocktype", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "blocktype");
|
||||
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
|
||||
RNA_def_property_enum_items(prop, prop_blocktype_items);
|
||||
RNA_def_property_ui_text(prop, "Block Type", "");
|
||||
|
@ -128,7 +128,7 @@ void RNA_def_lamp(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Sky Color Space", "");
|
||||
|
||||
prop= RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "skyblendtype", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
|
||||
RNA_def_property_enum_items(prop, prop_blendmode_items);
|
||||
RNA_def_property_ui_text(prop, "Sky Blend Type", "Blend type for how sky is combined with world sky");
|
||||
|
||||
@ -141,12 +141,12 @@ void RNA_def_lamp(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Ray Sample Method", "The Method in how rays are sampled");
|
||||
|
||||
prop= RNA_def_property(srna, "buffer_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "buftype", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "buftype");
|
||||
RNA_def_property_enum_items(prop, prop_shadbuftype_items);
|
||||
RNA_def_property_ui_text(prop, "Buffer Type", "Type of Shadow Buffer.");
|
||||
|
||||
prop= RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "filtertype", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
|
||||
RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
|
||||
RNA_def_property_ui_text(prop, "Filter Type", "Type of Shadow Buffer Filter.");
|
||||
|
||||
@ -356,20 +356,20 @@ void RNA_def_lamp(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NEG);
|
||||
RNA_def_property_ui_text(prop, "Negative", "Lamp casts negative light.");
|
||||
|
||||
prop= RNA_def_property(srna, "no_specular", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NO_SPEC);
|
||||
RNA_def_property_ui_text(prop, "No Specular", "Lamp does not create specular highlights.");
|
||||
prop= RNA_def_property(srna, "specular", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC);
|
||||
RNA_def_property_ui_text(prop, "Specular", "Lamp creates specular highlights.");
|
||||
|
||||
prop= RNA_def_property(srna, "no_diffuse", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NO_DIFF);
|
||||
RNA_def_property_ui_text(prop, "No Diffuse", "Lamp does not create diffuse shading.");
|
||||
prop= RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
|
||||
RNA_def_property_ui_text(prop, "Diffuse", "Lamp does diffuse shading.");
|
||||
|
||||
prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW);
|
||||
RNA_def_property_ui_text(prop, "Only Shadow", "Lamp only creates shadows.");
|
||||
|
||||
prop= RNA_def_property(srna, "shadow", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "mode", PROP_DEF_ENUM_BITFLAGS);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
|
||||
RNA_def_property_enum_items(prop, prop_shadow_items);
|
||||
RNA_def_property_ui_text(prop, "Shadow", "Method to compute lamp shadow.");
|
||||
|
||||
|
@ -64,17 +64,17 @@ void RNA_def_lattice(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "W", "Points in W direction.");
|
||||
|
||||
prop= RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "typeu", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "typeu");
|
||||
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
|
||||
RNA_def_property_ui_text(prop, "Interpolation Type U", "");
|
||||
|
||||
prop= RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "typev", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "typev");
|
||||
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
|
||||
RNA_def_property_ui_text(prop, "Interpolation Type V", "");
|
||||
|
||||
prop= RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "typew", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "typew");
|
||||
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
|
||||
RNA_def_property_ui_text(prop, "Interpolation Type W", "");
|
||||
|
||||
|
@ -63,7 +63,7 @@ void RNA_def_material(BlenderRNA *brna)
|
||||
srna= RNA_def_struct(brna, "Material", "ID", "Material");
|
||||
|
||||
prop= RNA_def_property(srna, "color_model", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "colormodel", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "colormodel");
|
||||
RNA_def_property_enum_items(prop, prop_type_items);
|
||||
RNA_def_property_ui_text(prop, "Color Model", "");
|
||||
|
||||
@ -99,7 +99,7 @@ void RNA_def_material(BlenderRNA *brna)
|
||||
/* diffuse shaders */
|
||||
|
||||
prop= RNA_def_property(srna, "diffuse_shader", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "diff_shader", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "diff_shader");
|
||||
RNA_def_property_enum_items(prop, prop_diff_shader_items);
|
||||
RNA_def_property_ui_text(prop, "Diffuse Shader Model", "");
|
||||
|
||||
@ -172,7 +172,7 @@ void RNA_def_material(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Ray Mirror Max Dist", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color.");
|
||||
|
||||
prop= RNA_def_property(srna, "ray_mirror_fadeto", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir");
|
||||
RNA_def_property_enum_items(prop, prop_fadeto_mir_items);
|
||||
RNA_def_property_ui_text(prop, "Ray Mirror End Fade-out", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor.");
|
||||
|
||||
|
@ -942,9 +942,9 @@ static void rna_def_mesh(BlenderRNA *brna)
|
||||
RNA_def_property_range(prop, 1, 80);
|
||||
RNA_def_property_ui_text(prop, "Auto Smooth Angle", "Defines maximum angle between face normals that 'Auto Smooth' will operate on");
|
||||
|
||||
prop= RNA_def_property(srna, "no_vnormal_flip", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_NOPUNOFLIP);
|
||||
RNA_def_property_ui_text(prop, "No Vertex Normal Flip", "Disables flipping of vertexnormals during render");
|
||||
prop= RNA_def_property(srna, "vertex_normal_flip", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ME_NOPUNOFLIP);
|
||||
RNA_def_property_ui_text(prop, "Vertex Normal Flip", "Flip vertex normals towards the camera during render");
|
||||
|
||||
prop= RNA_def_property(srna, "double_sided", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_TWOSIDED);
|
||||
|
0
source/blender/makesrna/intern/rna_meta.c
Executable file → Normal file
0
source/blender/makesrna/intern/rna_meta.c
Executable file → Normal file
2
source/blender/makesrna/intern/rna_modifier.c
Executable file → Normal file
2
source/blender/makesrna/intern/rna_modifier.c
Executable file → Normal file
@ -83,7 +83,7 @@ void RNA_def_modifier(BlenderRNA *brna)
|
||||
/* enums */
|
||||
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type", PROP_DEF_ENUM_BITFLAGS);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type");
|
||||
RNA_def_property_enum_items(prop, type_items);
|
||||
RNA_def_property_ui_text(prop, "Type", "");
|
||||
|
||||
|
@ -50,7 +50,7 @@ void RNA_def_radio(BlenderRNA *brna)
|
||||
|
||||
/* Enums */
|
||||
prop= RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "drawtype", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
|
||||
RNA_def_property_enum_items(prop, prop_drawtype_items);
|
||||
RNA_def_property_ui_text(prop, "Draw Mode", "Radiosity draw modes.");
|
||||
|
||||
|
@ -137,7 +137,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping.");
|
||||
|
||||
prop= RNA_def_property(srna, "unwrapper", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "toolsettings->unwrapper", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "toolsettings->unwrapper");
|
||||
RNA_def_property_enum_items(prop, unwrapper_items);
|
||||
RNA_def_property_ui_text(prop, "Unwrapper", "Unwrap algorithm used by the Unwrap tool.");
|
||||
|
||||
|
@ -176,7 +176,7 @@ void rna_def_mouse_sensor(BlenderRNA *brna)
|
||||
RNA_def_struct_sdna_from(srna, "bMouseSensor", "data");
|
||||
|
||||
prop= RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type");
|
||||
RNA_def_property_enum_items(prop, mouse_event_items);
|
||||
RNA_def_property_ui_text(prop, "Mouse Event", "Specify the type of event this mouse sensor should trigger on.");
|
||||
}
|
||||
@ -249,7 +249,7 @@ void rna_def_property_sensor(BlenderRNA *brna)
|
||||
RNA_def_struct_sdna_from(srna, "bPropertySensor", "data");
|
||||
|
||||
prop= RNA_def_property(srna, "evaluation_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type");
|
||||
RNA_def_property_enum_items(prop, prop_type_items);
|
||||
RNA_def_property_ui_text(prop, "Evaluation Type", "Type of property evaluation.");
|
||||
|
||||
@ -325,7 +325,7 @@ void rna_def_collision_sensor(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Material Name", "Only look for Objects with this material.");
|
||||
|
||||
prop= RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "mode", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "mode");
|
||||
RNA_def_property_enum_items(prop, prop_type_items);
|
||||
RNA_def_property_ui_text(prop, "Collision Type", "Toggle collision on material or property.");
|
||||
}
|
||||
@ -406,7 +406,7 @@ void rna_def_ray_sensor(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material.");
|
||||
|
||||
prop= RNA_def_property(srna, "ray_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "mode", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "mode");
|
||||
RNA_def_property_enum_items(prop, prop_type_items);
|
||||
RNA_def_property_ui_text(prop, "Collision Type", "Toggle collision on material or property.");
|
||||
|
||||
@ -419,7 +419,7 @@ void rna_def_ray_sensor(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Range", "Sense objects no farther than this distance.");
|
||||
|
||||
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "axisflag", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "axisflag");
|
||||
RNA_def_property_enum_items(prop, axis_items);
|
||||
RNA_def_property_ui_text(prop, "Axis", "Specify along which axis the ray is cast.");
|
||||
}
|
||||
@ -463,7 +463,7 @@ void rna_def_joystick_sensor(BlenderRNA *brna)
|
||||
RNA_def_property_range(prop, 0, SENS_JOY_MAXINDEX-1);
|
||||
|
||||
prop= RNA_def_property(srna, "event_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "type");
|
||||
RNA_def_property_enum_items(prop, event_type_items);
|
||||
RNA_def_property_ui_text(prop, "Event Type", "The type of event this joystick sensor is triggered on.");
|
||||
|
||||
@ -489,7 +489,7 @@ void rna_def_joystick_sensor(BlenderRNA *brna)
|
||||
RNA_def_property_range(prop, 0, 32768);
|
||||
|
||||
prop= RNA_def_property(srna, "axis_direction", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "axisf", 0);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "axisf");
|
||||
RNA_def_property_enum_items(prop, axis_direction_items);
|
||||
RNA_def_property_ui_text(prop, "Axis Direction", "The direction of the axis.");
|
||||
|
||||
|
0
source/blender/makesrna/intern/rna_vfont.c
Executable file → Normal file
0
source/blender/makesrna/intern/rna_vfont.c
Executable file → Normal file
Loading…
Reference in New Issue
Block a user