Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-09-15 04:15:24 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-09-15 04:15:24 +0400
commit41729976753523ee08a0afaf6a26b6caf3dee1d6 (patch)
treeba264fba22084f44eb50b952f375715f501acff9 /source/blender/makesrna
parenta5f8298ea5d13d7707bc0cbf0722013276bab9d6 (diff)
parenta425790065fedb2ae49f1b79770945d8528790d9 (diff)
Merged changes in the trunk up to revision 50607.
Conflicts resolved: source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_enum_types.h1
-rw-r--r--source/blender/makesrna/intern/makesrna.c135
-rw-r--r--source/blender/makesrna/intern/rna_access.c60
-rw-r--r--source/blender/makesrna/intern/rna_armature.c14
-rw-r--r--source/blender/makesrna/intern/rna_camera_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_define.c126
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c7
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
-rw-r--r--source/blender/makesrna/intern/rna_image.c15
-rw-r--r--source/blender/makesrna/intern/rna_main.c5
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c7
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c55
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_render.c20
-rw-r--r--source/blender/makesrna/intern/rna_scene.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c5
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c105
-rw-r--r--source/blender/makesrna/intern/rna_space.c9
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c5
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c21
-rwxr-xr-xsource/blender/makesrna/rna_cleanup/rna_cleaner.py2
24 files changed, 379 insertions, 235 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 240ad95bcee..1c41c67b39c 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -57,6 +57,7 @@ extern EnumPropertyItem sequence_modifier_type_items[];
extern EnumPropertyItem image_type_items[];
extern EnumPropertyItem image_color_mode_items[];
extern EnumPropertyItem image_depth_mode_items[];
+extern EnumPropertyItem image_generated_type_items[];
extern EnumPropertyItem color_sets_items[];
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index ca579dde033..4b65d7e0185 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -51,7 +51,7 @@
# define __func__ __FUNCTION__
#endif
-/* copied from BKE_utildefines.h ugh */
+/* copied from BLI_utildefines.h ugh */
#ifdef __GNUC__
# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
#else
@@ -532,7 +532,8 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
switch (prop->type) {
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
fprintf(f, "void %s(PointerRNA *ptr, char *value)\n", func);
fprintf(f, "{\n");
@@ -565,7 +566,8 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, "}\n\n");
break;
}
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
fprintf(f, "PointerRNA %s(PointerRNA *ptr)\n", func);
fprintf(f, "{\n");
if (manualfunc) {
@@ -584,7 +586,8 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, "}\n\n");
break;
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
fprintf(f, "static PointerRNA %s(CollectionPropertyIterator *iter)\n", func);
@@ -785,7 +788,8 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set");
switch (prop->type) {
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
fprintf(f, "void %s(PointerRNA *ptr, const char *value)\n", func);
fprintf(f, "{\n");
@@ -817,7 +821,8 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, "}\n\n");
break;
}
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
fprintf(f, "void %s(PointerRNA *ptr, PointerRNA value)\n", func);
fprintf(f, "{\n");
if (manualfunc) {
@@ -1275,7 +1280,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
prop = dp->prop;
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
if (!prop->arraydimension) {
@@ -1291,7 +1297,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
}
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
if (!prop->arraydimension) {
@@ -1310,7 +1317,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
}
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
if (!prop->arraydimension) {
@@ -1329,14 +1337,16 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
}
break;
}
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
eprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)eprop->get);
eprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)eprop->set);
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
sprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)sprop->get);
@@ -1344,7 +1354,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
sprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)sprop->set);
break;
}
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
pprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)pprop->get);
@@ -1356,7 +1367,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
}
break;
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
const char *nextfunc = (const char *)cprop->next;
@@ -1421,7 +1433,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
switch (prop->type) {
case PROP_BOOLEAN:
- case PROP_INT: {
+ case PROP_INT:
+ {
if (!prop->arraydimension) {
fprintf(f, "int %sget(PointerRNA *ptr);\n", func);
/*fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func); */
@@ -1436,7 +1449,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
}
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
if (!prop->arraydimension) {
fprintf(f, "float %sget(PointerRNA *ptr);\n", func);
/*fprintf(f, "void %sset(PointerRNA *ptr, float value);\n", func); */
@@ -1451,7 +1465,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
}
break;
}
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
int i;
@@ -1471,7 +1486,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
if (sprop->maxlength) {
@@ -1484,12 +1500,14 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
break;
}
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
fprintf(f, "PointerRNA %sget(PointerRNA *ptr);\n", func);
/*fprintf(f, "void %sset(PointerRNA *ptr, PointerRNA value);\n", func); */
break;
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
fprintf(f, "void %sbegin(CollectionPropertyIterator *iter, PointerRNA *ptr);\n", func);
fprintf(f, "void %snext(CollectionPropertyIterator *iter);\n", func);
fprintf(f, "void %send(CollectionPropertyIterator *iter);\n", func);
@@ -1520,28 +1538,32 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
fprintf(f, "\t/* */\n");
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
if (!prop->arraydimension)
fprintf(f, "\tinline bool %s(void);", rna_safe_id(prop->identifier));
else if (prop->totarraylength)
fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
if (!prop->arraydimension)
fprintf(f, "\tinline int %s(void);", rna_safe_id(prop->identifier));
else if (prop->totarraylength)
fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
if (!prop->arraydimension)
fprintf(f, "\tinline float %s(void);", rna_safe_id(prop->identifier));
else if (prop->totarraylength)
fprintf(f, "\tinline Array<float, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
int i;
@@ -1559,11 +1581,13 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
fprintf(f, "\tinline %s_enum %s(void);", rna_safe_id(prop->identifier), rna_safe_id(prop->identifier));
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
fprintf(f, "\tinline std::string %s(void);", rna_safe_id(prop->identifier));
break;
}
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
if (pprop->type)
@@ -1572,7 +1596,8 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
fprintf(f, "\tinline %s %s(void);", "UnknownType", rna_safe_id(prop->identifier));
break;
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
if (cprop->item_type)
@@ -1598,7 +1623,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
return;
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
if (!prop->arraydimension)
fprintf(f, "\tBOOLEAN_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
else if (prop->totarraylength)
@@ -1606,7 +1632,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
rna_safe_id(prop->identifier));
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
if (!prop->arraydimension)
fprintf(f, "\tINT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
else if (prop->totarraylength)
@@ -1614,7 +1641,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
rna_safe_id(prop->identifier));
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
if (!prop->arraydimension)
fprintf(f, "\tFLOAT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
else if (prop->totarraylength)
@@ -1622,17 +1650,20 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
rna_safe_id(prop->identifier));
break;
}
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
fprintf(f, "\tENUM_PROPERTY(%s_enum, %s, %s)", rna_safe_id(prop->identifier), srna->identifier,
rna_safe_id(prop->identifier));
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
fprintf(f, "\tSTRING_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
break;
}
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
if (pprop->type)
@@ -1643,7 +1674,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
rna_safe_id(prop->identifier));
break;
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
#if 0
CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
@@ -2218,7 +2250,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
}
switch (prop->type) {
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
int i, defaultfound = 0, totflag = 0;
@@ -2270,7 +2303,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
}
break;
}
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
unsigned int i;
@@ -2291,7 +2325,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
}
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
unsigned int i;
@@ -2312,7 +2347,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
}
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
unsigned int i;
@@ -2380,7 +2416,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "},\n");
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
fprintf(f, "\t%s, %s, %s, %s, %d, ",
rna_function_string(bprop->get),
@@ -2393,7 +2430,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
else fprintf(f, "NULL\n");
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
fprintf(f, "\t%s, %s, %s, %s, %s,\n\t",
rna_function_string(iprop->get),
@@ -2412,7 +2450,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
else fprintf(f, "NULL\n");
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
fprintf(f, "\t%s, %s, %s, %s, %s, ",
rna_function_string(fprop->get),
@@ -2432,7 +2471,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
else fprintf(f, "NULL\n");
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
fprintf(f, "\t%s, %s, %s, %d, ",
rna_function_string(sprop->get),
@@ -2442,7 +2482,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_print_c_string(f, sprop->defaultvalue); fprintf(f, "\n");
break;
}
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
fprintf(f, "\t%s, %s, %s, NULL, ",
rna_function_string(eprop->get),
@@ -2455,7 +2496,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "%d, %d\n", eprop->totitem, eprop->defaultvalue);
break;
}
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
fprintf(f, "\t%s, %s, %s, %s,", rna_function_string(pprop->get),
rna_function_string(pprop->set),
@@ -2465,7 +2507,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
else fprintf(f, "NULL\n");
break;
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ",
rna_function_string(cprop->begin),
@@ -2882,8 +2925,8 @@ static const char *cpp_classes = ""
" T data[Tsize];\n"
"\n"
" Array() {}\n"
-" Array(const Array<T, Tsize>& other) { memcpy(data, other.data, sizeof(T)*Tsize); }\n"
-" const Array<T, Tsize>& operator=(const Array<T, Tsize>& other) { memcpy(data, other.data, sizeof(T)*Tsize); "
+" Array(const Array<T, Tsize>& other) { memcpy(data, other.data, sizeof(T) * Tsize); }\n"
+" const Array<T, Tsize>& operator=(const Array<T, Tsize>& other) { memcpy(data, other.data, sizeof(T) * Tsize); "
"return *this; }\n"
"\n"
" operator T*() { return data; }\n"
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index ec4da311686..4c1c377cb9f 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1659,8 +1659,9 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
IDP_Int(idprop) = value;
rna_idproperty_touch(idprop);
}
- else if (bprop->set)
+ else if (bprop->set) {
bprop->set(ptr, value);
+ }
else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
@@ -3192,19 +3193,22 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
/* handle conversions */
if (set) {
switch (itemtype) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
int b;
RAW_GET(int, b, in, a);
RNA_property_boolean_set(&itemptr, iprop, b);
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
int i;
RAW_GET(int, i, in, a);
RNA_property_int_set(&itemptr, iprop, i);
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
float f;
RAW_GET(float, f, in, a);
RNA_property_float_set(&itemptr, iprop, f);
@@ -3216,17 +3220,20 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
else {
switch (itemtype) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
int b = RNA_property_boolean_get(&itemptr, iprop);
RAW_SET(int, in, a, b);
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
int i = RNA_property_int_get(&itemptr, iprop);
RAW_SET(int, in, a, i);
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
float f = RNA_property_float_get(&itemptr, iprop);
RAW_SET(float, in, a, f);
break;
@@ -3251,19 +3258,22 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
/* handle conversions */
if (set) {
switch (itemtype) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
for (j = 0; j < itemlen; j++, a++)
RAW_GET(int, ((int *)tmparray)[j], in, a);
RNA_property_boolean_set_array(&itemptr, iprop, tmparray);
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
for (j = 0; j < itemlen; j++, a++)
RAW_GET(int, ((int *)tmparray)[j], in, a);
RNA_property_int_set_array(&itemptr, iprop, tmparray);
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
for (j = 0; j < itemlen; j++, a++)
RAW_GET(float, ((float *)tmparray)[j], in, a);
RNA_property_float_set_array(&itemptr, iprop, tmparray);
@@ -3275,19 +3285,22 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
else {
switch (itemtype) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
RNA_property_boolean_get_array(&itemptr, iprop, tmparray);
for (j = 0; j < itemlen; j++, a++)
RAW_SET(int, in, a, ((int *)tmparray)[j]);
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
RNA_property_int_get_array(&itemptr, iprop, tmparray);
for (j = 0; j < itemlen; j++, a++)
RAW_SET(int, in, a, ((int *)tmparray)[j]);
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
RNA_property_float_get_array(&itemptr, iprop, tmparray);
for (j = 0; j < itemlen; j++, a++)
RAW_SET(float, in, a, ((float *)tmparray)[j]);
@@ -3301,17 +3314,20 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
else {
if (set) {
switch (itemtype) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
RNA_property_boolean_set_array(&itemptr, iprop, &((int *)in.array)[a]);
a += itemlen;
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
RNA_property_int_set_array(&itemptr, iprop, &((int *)in.array)[a]);
a += itemlen;
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
RNA_property_float_set_array(&itemptr, iprop, &((float *)in.array)[a]);
a += itemlen;
break;
@@ -3322,17 +3338,20 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
else {
switch (itemtype) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
RNA_property_boolean_get_array(&itemptr, iprop, &((int *)in.array)[a]);
a += itemlen;
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
RNA_property_int_get_array(&itemptr, iprop, &((int *)in.array)[a]);
a += itemlen;
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
RNA_property_float_get_array(&itemptr, iprop, &((float *)in.array)[a]);
a += itemlen;
break;
@@ -4924,7 +4943,8 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE
case PROP_ENUM:
memcpy(data, &((EnumPropertyRNA *)parm)->defaultvalue, size);
break;
- case PROP_STRING: {
+ case PROP_STRING:
+ {
const char *defvalue = ((StringPropertyRNA *)parm)->defaultvalue;
if (defvalue && defvalue[0]) {
/* causes bug [#29988], possibly this is only correct for thick wrapped
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 738e7ad2219..be70405d165 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -146,6 +146,18 @@ static void rna_Armature_redraw_data(Main *UNUSED(bmain), Scene *UNUSED(scene),
WM_main_add_notifier(NC_GEOM | ND_DATA, id);
}
+/* called whenever a bone is renamed */
+static void rna_Bone_update_renamed(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ ID *id = ptr->id.data;
+
+ /* redraw view */
+ WM_main_add_notifier(NC_GEOM | ND_DATA, id);
+
+ /* update animation channels */
+ WM_main_add_notifier(NC_ANIMATION | ND_ANIMCHAN, id);
+}
+
static void rna_Bone_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
ID *id = ptr->id.data;
@@ -470,7 +482,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_struct_name_property(srna, prop);
if (editbone) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_EditBone_name_set");
else RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Bone_name_set");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ RNA_def_property_update(prop, 0, "rna_Bone_update_renamed");
/* flags */
prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
diff --git a/source/blender/makesrna/intern/rna_camera_api.c b/source/blender/makesrna/intern/rna_camera_api.c
index 2d19047ef89..75941fa224f 100644
--- a/source/blender/makesrna/intern/rna_camera_api.c
+++ b/source/blender/makesrna/intern/rna_camera_api.c
@@ -29,9 +29,7 @@
#include <stdio.h>
#include <string.h>
-
#include "RNA_define.h"
-#include "BKE_utildefines.h"
#ifdef RNA_RUNTIME
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 0320c0d7142..45092d09ce1 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -926,7 +926,8 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
}
}
break;
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
iprop->hardmin = (subtype == PROP_UNSIGNED) ? 0 : INT_MIN;
@@ -937,7 +938,8 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
iprop->step = 1;
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
fprop->hardmin = (subtype == PROP_UNSIGNED) ? 0.0f : -FLT_MAX;
@@ -959,7 +961,8 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
fprop->precision = 3;
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
sprop->defaultvalue = "";
@@ -1009,19 +1012,22 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
RNA_def_property_boolean_sdna(prop, NULL, identifier, 0);
DefRNA.silent = 0;
break;
- case PROP_INT: {
+ case PROP_INT:
+ {
DefRNA.silent = 1;
RNA_def_property_int_sdna(prop, NULL, identifier);
DefRNA.silent = 0;
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
DefRNA.silent = 1;
RNA_def_property_float_sdna(prop, NULL, identifier);
DefRNA.silent = 0;
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
DefRNA.silent = 1;
RNA_def_property_string_sdna(prop, NULL, identifier);
DefRNA.silent = 0;
@@ -1173,14 +1179,16 @@ void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
iprop->softmin = (int)min;
iprop->softmax = (int)max;
iprop->step = (int)step;
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
fprop->softmin = (float)min;
fprop->softmax = (float)max;
@@ -1201,7 +1209,8 @@ void RNA_def_property_range(PropertyRNA *prop, double min, double max)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
iprop->hardmin = (int)min;
iprop->hardmax = (int)max;
@@ -1209,7 +1218,8 @@ void RNA_def_property_range(PropertyRNA *prop, double min, double max)
iprop->softmax = MIN2((int)max, iprop->hardmax);
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
fprop->hardmin = (float)min;
fprop->hardmax = (float)max;
@@ -1234,12 +1244,14 @@ void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
}
switch (prop->type) {
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
pprop->type = (StructRNA *)type;
break;
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
cprop->item_type = (StructRNA *)type;
break;
@@ -1262,7 +1274,8 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
}
switch (prop->type) {
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
pprop->type = type;
@@ -1271,7 +1284,8 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
break;
}
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
cprop->item_type = type;
break;
@@ -1290,7 +1304,8 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
int i, defaultfound = 0;
switch (prop->type) {
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
eprop->item = (EnumPropertyItem *)item;
eprop->totitem = 0;
@@ -1325,7 +1340,8 @@ void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
sprop->maxlength = maxlength;
break;
@@ -1342,7 +1358,8 @@ void RNA_def_property_boolean_default(PropertyRNA *prop, int value)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
bprop->defaultvalue = value;
break;
@@ -1359,7 +1376,8 @@ void RNA_def_property_boolean_array_default(PropertyRNA *prop, const int *array)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
bprop->defaultarray = array;
break;
@@ -1376,7 +1394,8 @@ void RNA_def_property_int_default(PropertyRNA *prop, int value)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
iprop->defaultvalue = value;
break;
@@ -1393,7 +1412,8 @@ void RNA_def_property_int_array_default(PropertyRNA *prop, const int *array)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
iprop->defaultarray = array;
break;
@@ -1410,7 +1430,8 @@ void RNA_def_property_float_default(PropertyRNA *prop, float value)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
fprop->defaultvalue = value;
break;
@@ -1427,7 +1448,8 @@ void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
fprop->defaultarray = array; /* WARNING, this array must not come from the stack and lost */
break;
@@ -1444,7 +1466,8 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
StructRNA *srna = DefRNA.laststruct;
switch (prop->type) {
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
sprop->defaultvalue = value;
break;
@@ -1462,7 +1485,8 @@ void RNA_def_property_enum_default(PropertyRNA *prop, int value)
int i, defaultfound = 0;
switch (prop->type) {
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
eprop->defaultvalue = value;
@@ -1945,7 +1969,8 @@ void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const ch
}
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
if (prop->arraydimension) {
@@ -1975,7 +2000,8 @@ void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *
}
switch (prop->type) {
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
if (prop->arraydimension) {
@@ -2006,7 +2032,8 @@ void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char
}
switch (prop->type) {
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
if (prop->arraydimension) {
@@ -2037,7 +2064,8 @@ void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char
}
switch (prop->type) {
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
if (get) eprop->get = (PropEnumGetFunc)get;
@@ -2062,7 +2090,8 @@ void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const cha
}
switch (prop->type) {
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
if (get) sprop->get = (PropStringGetFunc)get;
@@ -2088,7 +2117,8 @@ void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const ch
}
switch (prop->type) {
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
if (get) pprop->get = (PropPointerGetFunc)get;
@@ -2116,7 +2146,8 @@ void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, con
}
switch (prop->type) {
- case PROP_COLLECTION: {
+ case PROP_COLLECTION:
+ {
CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
if (begin) cprop->begin = (PropCollectionBeginFunc)begin;
@@ -2742,7 +2773,8 @@ int rna_parameter_size(PropertyRNA *parm)
}
else
return sizeof(char *);
- case PROP_POINTER: {
+ case PROP_POINTER:
+ {
#ifdef RNA_RUNTIME
if (parm->flag & PROP_RNAPTR)
return sizeof(PointerRNA);
@@ -2889,7 +2921,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
if (prop->description) prop->description = BLI_strdup(prop->description);
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
if (bprop->defaultarray) {
@@ -2899,7 +2932,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
}
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
if (iprop->defaultarray) {
@@ -2909,7 +2943,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
}
break;
}
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
if (eprop->item) {
@@ -2928,7 +2963,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
}
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
if (fprop->defaultarray) {
@@ -2938,7 +2974,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
}
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
if (sprop->defaultvalue)
sprop->defaultvalue = BLI_strdup(sprop->defaultvalue);
@@ -2966,25 +3003,29 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
MEM_freeN(prop->py_data);
switch (prop->type) {
- case PROP_BOOLEAN: {
+ case PROP_BOOLEAN:
+ {
BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
if (bprop->defaultarray)
MEM_freeN((void *)bprop->defaultarray);
break;
}
- case PROP_INT: {
+ case PROP_INT:
+ {
IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
if (iprop->defaultarray)
MEM_freeN((void *)iprop->defaultarray);
break;
}
- case PROP_FLOAT: {
+ case PROP_FLOAT:
+ {
FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
if (fprop->defaultarray)
MEM_freeN((void *)fprop->defaultarray);
break;
}
- case PROP_ENUM: {
+ case PROP_ENUM:
+ {
EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
for (a = 0; a < eprop->totitem; a++) {
@@ -2999,7 +3040,8 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
if (eprop->item) MEM_freeN((void *)eprop->item);
break;
}
- case PROP_STRING: {
+ case PROP_STRING:
+ {
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
if (sprop->defaultvalue)
MEM_freeN((void *)sprop->defaultvalue);
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index e84a290acb8..daa661175a1 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -24,15 +24,16 @@
* \ingroup RNA
*/
-
#include <stdlib.h>
+#include "DNA_object_fluidsim.h"
+
+#include "BLI_path_util.h"
+
#include "RNA_define.h"
#include "rna_internal.h"
-#include "DNA_object_fluidsim.h"
-
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index e246c6975b5..eb12a02aa99 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -203,7 +203,7 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_GPencilLayer_active_frame_editable");
/* Drawing Color */
- prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color", "Color for all strokes in this layer");
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 03e446c9d91..62a06888613 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -42,6 +42,13 @@
#include "WM_types.h"
#include "WM_api.h"
+EnumPropertyItem image_generated_type_items[] = {
+ {IMA_GENTYPE_BLANK, "BLANK", 0, "Blank", "Generate a blank image"},
+ {IMA_GENTYPE_GRID, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"},
+ {IMA_GENTYPE_GRID_COLOR, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"},
+ {0, NULL, 0, NULL, NULL}
+};
+
static EnumPropertyItem image_source_items[] = {
{IMA_SRC_FILE, "FILE", 0, "Single Image", "Single image file"},
{IMA_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"},
@@ -436,12 +443,6 @@ static void rna_def_image(BlenderRNA *brna)
{IMA_TYPE_COMPOSITE, "COMPOSITING", 0, "Compositing", ""},
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem prop_generated_type_items[] = {
- {0, "BLANK", 0, "Blank", "Generate a blank image"},
- {1, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"},
- {2, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"},
- {0, NULL, 0, NULL, NULL}
- };
static const EnumPropertyItem prop_mapping_items[] = {
{0, "UV", 0, "UV Coordinates", "Use UV coordinates for mapping the image"},
{IMA_REFLECT, "REFLECTION", 0, "Reflection", "Use reflection mapping for mapping the image"},
@@ -520,7 +521,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");
- RNA_def_property_enum_items(prop, prop_generated_type_items);
+ RNA_def_property_enum_items(prop, image_generated_type_items);
RNA_def_property_ui_text(prop, "Generated Type", "Generated image type");
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_generated_update");
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 17261c2c909..78e0fde5715 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -24,16 +24,15 @@
* \ingroup RNA
*/
-
#include <stdlib.h>
#include <string.h>
+#include "BLI_path_util.h"
+
#include "RNA_define.h"
#include "rna_internal.h"
-#include "BKE_utildefines.h"
-
#ifdef RNA_RUNTIME
#include "BKE_main.h"
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index ae1e8b5548b..2d26fec0d50 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -35,12 +35,13 @@
#include "DNA_ID.h"
+#include "BLI_path_util.h"
+
#include "RNA_define.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
-#include "rna_internal.h"
-#include "BKE_utildefines.h"
+#include "rna_internal.h"
#ifdef RNA_RUNTIME
@@ -556,7 +557,7 @@ Mask *rna_Main_mask_new(Main *UNUSED(bmain), const char *name)
void rna_Main_masks_remove(Main *bmain, Mask *mask)
{
- BKE_mask_unlink(bmain, mask);
+ BKE_mask_free(bmain, mask);
BKE_libblock_free(&bmain->mask, mask);
/* XXX python now has invalid pointer? */
}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 2f763a6ed0e..55dda3fc315 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1526,6 +1526,15 @@ static void def_sh_tex_image(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
+ static const EnumPropertyItem prop_projection_items[] = {
+ {SHD_PROJ_FLAT, "FLAT", 0, "Flat",
+ "Image is projected flat using the X and Y coordinates of the texture vector"},
+ {SHD_PROJ_BOX, "BOX", 0, "Box",
+ "Image is projected using different components for each side of the object space bounding box"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+
PropertyRNA *prop;
prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
@@ -1543,6 +1552,15 @@ static void def_sh_tex_image(StructRNA *srna)
RNA_def_property_ui_text(prop, "Color Space", "Image file color space");
RNA_def_property_update(prop, 0, "rna_Node_update");
+ prop = RNA_def_property(srna, "projection", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_projection_items);
+ RNA_def_property_ui_text(prop, "Projection", "Method to project 2D image on object with a 3D texture vector");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "projection_blend", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_ui_text(prop, "Projection Blend", "For box projection, amount of blend to use between sides");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
@@ -1588,6 +1606,43 @@ static void def_sh_tex_checker(StructRNA *srna)
def_sh_tex(srna);
}
+static void def_sh_tex_brick(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeTexBrick", "storage");
+ def_sh_tex(srna);
+
+ prop = RNA_def_property(srna, "offset_frequency", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "offset_freq");
+ RNA_def_property_int_default(prop, 2);
+ RNA_def_property_range(prop, 1, 99);
+ RNA_def_property_ui_text(prop, "Offset Frequency", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "squash_frequency", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "squash_freq");
+ RNA_def_property_int_default(prop, 2);
+ RNA_def_property_range(prop, 1, 99);
+ RNA_def_property_ui_text(prop, "Squash Frequency", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "offset");
+ RNA_def_property_float_default(prop, 0.5f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Offset Amount", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "squash", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "squash");
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_range(prop, 0.0f, 99.0f);
+ RNA_def_property_ui_text(prop, "Squash Amount", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
+
+}
+
static void def_sh_tex_magic(StructRNA *srna)
{
PropertyRNA *prop;
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 15ad1c557a5..0baa4cc0838 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -91,6 +91,7 @@ DefNode( ShaderNode, SH_NODE_TEX_WAVE, def_sh_tex_wave, "TE
DefNode( ShaderNode, SH_NODE_TEX_MUSGRAVE, def_sh_tex_musgrave, "TEX_MUSGRAVE", TexMusgrave, "Musgrave Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_VORONOI, def_sh_tex_voronoi, "TEX_VORONOI", TexVoronoi, "Voronoi Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_CHECKER, def_sh_tex_checker, "TEX_CHECKER", TexChecker, "Checker Texture", "" )
+DefNode( ShaderNode, SH_NODE_TEX_BRICK, def_sh_tex_brick, "TEX_BRICK", TexBrick, "Brick Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_COORD, 0, "TEX_COORD", TexCoord, "Texture Coordinate","" )
DefNode( CompositorNode, CMP_NODE_VIEWER, def_cmp_viewer, "VIEWER", Viewer, "Viewer", "" )
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 7ab359661c5..5bf1cc281ad 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -84,7 +84,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
switch (ob->type) {
case OB_FONT:
case OB_CURVE:
- case OB_SURF: {
+ case OB_SURF:
+ {
ListBase dispbase = {NULL, NULL};
DerivedMesh *derivedFinal = NULL;
int uv_from_orco;
@@ -163,7 +164,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
break;
}
- case OB_MBALL: {
+ case OB_MBALL:
+ {
/* metaballs don't have modifiers, so just convert to mesh */
Object *basis_ob = BKE_mball_basis_find(sce, ob);
/* todo, re-generatre for render-res */
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index fff16650a93..d2e4e8edbfb 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -24,11 +24,12 @@
* \ingroup RNA
*/
-
#include <stdlib.h>
#include "DNA_scene_types.h"
+#include "BLI_path_util.h"
+
#include "RNA_define.h"
#include "RNA_enum_types.h"
@@ -37,7 +38,6 @@
#include "RE_engine.h"
#include "RE_pipeline.h"
-#include "BKE_utildefines.h"
#ifdef RNA_RUNTIME
@@ -317,6 +317,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_REQUIRED);
prop = RNA_def_int(func, "h", 0, 0, INT_MAX, "Height", "", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
+ RNA_def_string(func, "layer", "", 0, "Layer", "Single layer to get render result for"); /* NULL ok here */
prop = RNA_def_pointer(func, "result", "RenderResult", "Result", "");
RNA_def_function_return(func, prop);
@@ -327,6 +328,8 @@ static void rna_def_render_engine(BlenderRNA *brna)
func = RNA_def_function(srna, "end_result", "RE_engine_end_result");
prop = RNA_def_pointer(func, "result", "RenderResult", "Result", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
+ prop = RNA_def_boolean(func, "cancel", 0, "Cancel", "Don't merge back results");
+ RNA_def_property_flag(prop, PROP_REQUIRED);
func = RNA_def_function(srna, "test_break", "RE_engine_test_break");
prop = RNA_def_boolean(func, "do_break", 0, "Break", "");
@@ -360,6 +363,19 @@ static void rna_def_render_engine(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "camera_override");
RNA_def_property_struct_type(prop, "Object");
+ prop = RNA_def_property(srna, "tile_x", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "tile_x");
+ prop = RNA_def_property(srna, "tile_y", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "tile_y");
+
+ prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "resolution_x");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "resolution_y");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
/* registration */
prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 62631e60e2b..bd4d3e84883 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3990,11 +3990,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environment maps while rendering");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
+
+#if 0
prop = RNA_def_property(srna, "use_radiosity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
RNA_def_property_ui_text(prop, "Radiosity", "Calculate radiosity in a pre-process before rendering");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+#endif
prop = RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 61be48f3f02..69b61b47d8a 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -32,13 +32,13 @@
#include <stdlib.h>
#include <stdio.h>
+#include "BLI_path_util.h"
+
#include "RNA_define.h"
#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "BKE_utildefines.h"
-
#ifdef RNA_RUNTIME
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 00e8ed5289f..314082dfd02 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -417,6 +417,11 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
RNA_def_property_enum_items(prop, mouse_event_items);
RNA_def_property_ui_text(prop, "Mouse Event", "Type of event this mouse sensor should trigger on");
RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop = RNA_def_property(srna, "use_pulse", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_MOUSE_FOCUS_PULSE);
+ RNA_def_property_ui_text(prop, "Pulse", "Moving the mouse over a different object generates a pulse");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
}
static void rna_def_touch_sensor(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index a3884b62ec1..e3e467a9abb 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -56,7 +56,6 @@ typedef struct EffectInfo {
const char *ui_desc;
void (*func)(StructRNA *);
int inputs;
- int supports_mask;
} EffectInfo;
EnumPropertyItem sequence_modifier_type_items[] = {
@@ -244,28 +243,6 @@ static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
BKE_sequencer_sort(scene);
}
-/* properties that need to allocate structs */
-static void rna_Sequence_use_color_balance_set(PointerRNA *ptr, int value)
-{
- Sequence *seq = (Sequence *)ptr->data;
- int c;
-
- if (value) {
- seq->flag |= SEQ_USE_COLOR_BALANCE;
- if (seq->strip->color_balance == NULL) {
- seq->strip->color_balance = MEM_callocN(sizeof(struct StripColorBalance), "StripColorBalance");
- for (c = 0; c < 3; c++) {
- seq->strip->color_balance->lift[c] = 1.0f;
- seq->strip->color_balance->gamma[c] = 1.0f;
- seq->strip->color_balance->gain[c] = 1.0f;
- }
- }
- }
- else {
- seq->flag ^= SEQ_USE_COLOR_BALANCE;
- }
-}
-
static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
{
Sequence *seq = (Sequence *)ptr->data;
@@ -608,13 +585,6 @@ static int rna_Sequence_input_count_get(PointerRNA *ptr)
return BKE_sequence_effect_get_num_inputs(seq->type);
}
-static int rna_Sequence_supports_mask_get(PointerRNA *ptr)
-{
- Sequence *seq = (Sequence *)(ptr->data);
-
- return BKE_sequence_effect_get_supports_mask(seq->type);
-}
-
#if 0
static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
{
@@ -642,26 +612,12 @@ static void rna_Sequence_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point
}
}
-static int rna_Sequence_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
-{
- Sequence *seq = (Sequence *) ptr->data;
- Sequence *cur = (Sequence *) value.data;
-
- if (seq == cur)
- return FALSE;
-
- if (BKE_sequence_check_depend(seq, cur))
- return FALSE;
-
- return TRUE;
-}
-
static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
- BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE, FALSE);
+ BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE);
if (RNA_struct_is_a(ptr->type, &RNA_SoundSequence))
BKE_sequencer_update_sound_bounds(scene, ptr->data);
@@ -1631,16 +1587,6 @@ static void rna_def_filter_video(StructRNA *srna)
RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
- prop = RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_COLOR_BALANCE);
- RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input");
- RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_color_balance_set");
- RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
-
- prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "strip->color_balance");
- RNA_def_property_ui_text(prop, "Color Balance", "");
-
prop = RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM);
RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing");
@@ -1706,7 +1652,7 @@ static void rna_def_input(StructRNA *srna)
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
-static void rna_def_effect_inputs(StructRNA *srna, int count, int supports_mask)
+static void rna_def_effect_inputs(StructRNA *srna, int count)
{
PropertyRNA *prop;
@@ -1714,10 +1660,6 @@ static void rna_def_effect_inputs(StructRNA *srna, int count, int supports_mask)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
- prop = RNA_def_property(srna, "is_supports_mask", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_int_funcs(prop, "rna_Sequence_supports_mask_get", NULL, NULL);
-
if (count >= 1) {
prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "seq1");
@@ -1740,15 +1682,6 @@ static void rna_def_effect_inputs(StructRNA *srna, int count, int supports_mask)
RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
}
*/
-
- if (supports_mask) {
- prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence");
- RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Sequence_otherSequence_poll");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Mask", "Mask input for the effect strip");
- RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
- }
}
static void rna_def_image(BlenderRNA *brna)
@@ -2189,28 +2122,28 @@ static void rna_def_speed_control(StructRNA *srna)
}
static EffectInfo def_effects[] = {
- {"AddSequence", "Add Sequence", "Add Sequence", NULL, 2, FALSE},
+ {"AddSequence", "Add Sequence", "Add Sequence", NULL, 2},
{"AdjustmentSequence", "Adjustment Layer Sequence",
- "Sequence strip to perform filter adjustments to layers below", rna_def_input, 0, TRUE},
- {"AlphaOverSequence", "Alpha Over Sequence", "Alpha Over Sequence", NULL, 2, FALSE},
- {"AlphaUnderSequence", "Alpha Under Sequence", "Alpha Under Sequence", NULL, 2, FALSE},
+ "Sequence strip to perform filter adjustments to layers below", rna_def_input, 0},
+ {"AlphaOverSequence", "Alpha Over Sequence", "Alpha Over Sequence", NULL, 2},
+ {"AlphaUnderSequence", "Alpha Under Sequence", "Alpha Under Sequence", NULL, 2},
{"ColorSequence", "Color Sequence",
- "Sequence strip creating an image filled with a single color", rna_def_solid_color, 0, FALSE},
- {"CrossSequence", "Cross Sequence", "Cross Sequence", NULL, 2, FALSE},
- {"GammaCrossSequence", "Gamma Cross Sequence", "Gamma Cross Sequence", NULL, 2, FALSE},
- {"GlowSequence", "Glow Sequence", "Sequence strip creating a glow effect", rna_def_glow, 1, FALSE},
+ "Sequence strip creating an image filled with a single color", rna_def_solid_color, 0},
+ {"CrossSequence", "Cross Sequence", "Cross Sequence", NULL, 2},
+ {"GammaCrossSequence", "Gamma Cross Sequence", "Gamma Cross Sequence", NULL, 2},
+ {"GlowSequence", "Glow Sequence", "Sequence strip creating a glow effect", rna_def_glow, 1},
{"MulticamSequence", "Multicam Select Sequence", "Sequence strip to perform multicam editing",
- rna_def_multicam, 0, FALSE},
- {"MultiplySequence", "Multiply Sequence", "Multiply Sequence", NULL, 2, FALSE},
- {"OverDropSequence", "Over Drop Sequence", "Over Drop Sequence", NULL, 2, FALSE},
+ rna_def_multicam, 0},
+ {"MultiplySequence", "Multiply Sequence", "Multiply Sequence", NULL, 2},
+ {"OverDropSequence", "Over Drop Sequence", "Over Drop Sequence", NULL, 2},
{"SpeedControlSequence", "SpeedControl Sequence",
- "Sequence strip to control the speed of other strips", rna_def_speed_control, 1, FALSE},
- {"SubtractSequence", "Subtract Sequence", "Subtract Sequence", NULL, 2, FALSE},
+ "Sequence strip to control the speed of other strips", rna_def_speed_control, 1},
+ {"SubtractSequence", "Subtract Sequence", "Subtract Sequence", NULL, 2},
{"TransformSequence", "Transform Sequence",
- "Sequence strip applying affine transformations to other strips", rna_def_transform, 1, FALSE},
+ "Sequence strip applying affine transformations to other strips", rna_def_transform, 1},
{"WipeSequence", "Wipe Sequence", "Sequence strip creating a wipe transition",
- rna_def_wipe, 1, FALSE},
- {"", "", "", NULL, 0, FALSE}
+ rna_def_wipe, 1},
+ {"", "", "", NULL, 0}
};
static void rna_def_effects(BlenderRNA *brna)
@@ -2223,7 +2156,7 @@ static void rna_def_effects(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, effect->ui_name, effect->ui_desc);
RNA_def_struct_sdna(srna, "Sequence");
- rna_def_effect_inputs(srna, effect->inputs, effect->supports_mask);
+ rna_def_effect_inputs(srna, effect->inputs);
if (effect->func)
effect->func(srna);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index ad14c60e532..a00e8bfea2d 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -531,12 +531,7 @@ static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr)
static void rna_SpaceImageEditor_mode_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- SpaceImage *sima = (SpaceImage *)(ptr->data);
- if (sima->mode == SI_MODE_PAINT) {
- BKE_paint_init(&scene->toolsettings->imapaint.paint, PAINT_CURSOR_TEXTURE_PAINT);
-
- ED_space_image_paint_update(bmain->wm.first, scene->toolsettings);
- }
+ ED_space_image_paint_update(bmain->wm.first, scene->toolsettings);
}
static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
@@ -1560,7 +1555,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "near");
RNA_def_property_range(prop, 0.001f, FLT_MAX);
RNA_def_property_float_default(prop, 0.1f);
- RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance");
+ RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance (perspective view only)");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index ff8940129a1..e62b3ecd804 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -24,14 +24,13 @@
* \ingroup RNA
*/
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include "BLI_path_util.h"
#include "RNA_define.h"
-#include "BKE_utildefines.h"
#ifdef RNA_RUNTIME
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index ed057235f0d..018022fdde9 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2992,11 +2992,12 @@ static void rna_def_userdef_system(BlenderRNA *brna)
/* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */
/* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */
/* Note: As this list is in alphabetical order, and not defined order,
- * here is the highest define currently in use: 31 (Hungarian). */
+ * here is the highest define currently in use: 33 (Hebrew). */
static EnumPropertyItem language_items[] = {
{ 0, "", 0, N_("Nearly done"), ""},
{ 0, "DEFAULT", 0, "Default (Default)", ""},
{21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"},
+ {32, "BRAZILIANPORTUGUESE", 0, "Brazilian Portuguese (Português do Brasil)", "pt_BR"},
{ 1, "ENGLISH", 0, "English (English)", "en_US"},
{ 8, "FRENCH", 0, "French (Français)", "fr_FR"},
{ 4, "ITALIAN", 0, "Italian (Italiano)", "it_IT"},
@@ -3017,6 +3018,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{ 6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
{ 5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
{23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
+ {33, "HEBREW", 0, "Hebrew (עִבְרִית)", "he_IL"},
{31, "HUNGARIAN", 0, "Hungarian (magyar)", "hu_HU"},
{27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
{29, "KYRGYZ", 0, "Kyrgyz (Кыргыз тили)", "ky_KG"},
@@ -3273,6 +3275,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_enum_items(prop, compute_device_type_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_userdef_compute_device_type_itemf");
RNA_def_property_ui_text(prop, "Compute Device Type", "Device to use for computation (rendering with Cycles)");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_PROPERTIES, NULL);
prop = RNA_def_property(srna, "compute_device", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index d910ed7900c..ae4d5dc493e 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -83,9 +83,10 @@ void rna_event_timer_remove(struct wmWindowManager *wm, wmTimer *timer)
}
static wmKeyMapItem *rna_KeyMap_item_new(wmKeyMap *km, ReportList *reports, const char *idname, int type, int value,
- int any, int shift, int ctrl, int alt, int oskey, int keymodifier)
+ int any, int shift, int ctrl, int alt, int oskey, int keymodifier, int head)
{
/* wmWindowManager *wm = CTX_wm_manager(C); */
+ wmKeyMapItem *kmi = NULL;
char idname_bl[OP_MAX_TYPENAME];
int modifier = 0;
@@ -103,8 +104,19 @@ static wmKeyMapItem *rna_KeyMap_item_new(wmKeyMap *km, ReportList *reports, cons
if (oskey) modifier |= KM_OSKEY;
if (any) modifier = KM_ANY;
-
- return WM_keymap_add_item(km, idname_bl, type, value, modifier, keymodifier);
+
+ /* create keymap item */
+ kmi = WM_keymap_add_item(km, idname_bl, type, value, modifier, keymodifier);
+
+ /* [#32437] allow scripts to define hotkeys that get added to start of keymap
+ * so that they stand a chance against catch-all defines later on
+ */
+ if (head) {
+ BLI_remlink(&km->items, kmi);
+ BLI_addhead(&km->items, kmi);
+ }
+
+ return kmi;
}
static wmKeyMapItem *rna_KeyMap_item_new_modal(wmKeyMap *km, ReportList *reports, const char *propvalue_str,
@@ -425,6 +437,9 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_boolean(func, "alt", 0, "Alt", "");
RNA_def_boolean(func, "oskey", 0, "OS Key", "");
RNA_def_enum(func, "key_modifier", event_type_items, 0, "Key Modifier", "");
+ RNA_def_boolean(func, "head", 0, "At Head",
+ "Force item to be added at start (not end) of key map so that "
+ "it doesn't get blocked by an existing key map item");
parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/rna_cleanup/rna_cleaner.py b/source/blender/makesrna/rna_cleanup/rna_cleaner.py
index b75d177d809..e3359fbae59 100755
--- a/source/blender/makesrna/rna_cleanup/rna_cleaner.py
+++ b/source/blender/makesrna/rna_cleanup/rna_cleaner.py
@@ -60,7 +60,7 @@ def check_commandline():
usage()
if sys.argv[1] == '-h':
help()
- elif not (sys.argv[1].endswith(".txt") or sys.argv[1].endswith(".py")):
+ elif not sys.argv[1].endswith((".txt", ".py")):
print ('\nBad input file extension... exiting.')
usage()
else: