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-05-05 15:40:42 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-05-05 15:40:42 +0400
commitbb1f8d9586220446c4df6339554b6cb0af02f030 (patch)
tree8b0778b7f5e8eb18b7ce817e150efc949adcab22 /source/blender/makesrna
parent19e27ce15b213bc7c888e4a57ad97faa5dbb4220 (diff)
parentf1e3c31d4ffa86b695fddd45d9ccc6ce9ac62ea7 (diff)
Merged changes in the trunk up to revision 46309.
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/editors/interface/resources.c source/blender/editors/mesh/editmesh_tools.c
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/RNA_enum_types.h2
-rw-r--r--source/blender/makesrna/RNA_types.h54
-rw-r--r--source/blender/makesrna/intern/makesrna.c4
-rw-r--r--source/blender/makesrna/intern/rna_access.c18
-rw-r--r--source/blender/makesrna/intern/rna_action.c8
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c2
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c14
-rw-r--r--source/blender/makesrna/intern/rna_boid.c2
-rw-r--r--source/blender/makesrna/intern/rna_brush.c17
-rw-r--r--source/blender/makesrna/intern/rna_camera.c11
-rw-r--r--source/blender/makesrna/intern/rna_camera_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c4
-rw-r--r--source/blender/makesrna/intern/rna_curve.c14
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c2
-rw-r--r--source/blender/makesrna/intern/rna_image.c18
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c250
-rw-r--r--source/blender/makesrna/intern/rna_main.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_material.c6
-rw-r--r--source/blender/makesrna/intern/rna_material_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c4
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c6
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c138
-rw-r--r--source/blender/makesrna/intern/rna_object.c6
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c25
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c4
-rw-r--r--source/blender/makesrna/intern/rna_particle.c2
-rw-r--r--source/blender/makesrna/intern/rna_pose.c28
-rw-r--r--source/blender/makesrna/intern/rna_pose_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_property.c6
-rw-r--r--source/blender/makesrna/intern/rna_scene.c33
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_screen.c25
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c2
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c6
-rw-r--r--source/blender/makesrna/intern/rna_space.c33
-rw-r--r--source/blender/makesrna/intern/rna_test.c4
-rw-r--r--source/blender/makesrna/intern/rna_texture.c8
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c26
-rwxr-xr-xsource/blender/makesrna/rna_cleanup/rna_cleaner.py2
-rwxr-xr-xsource/blender/makesrna/rna_cleanup/rna_cleaner_merge.py2
45 files changed, 516 insertions, 294 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index c99cbe8cdbf..acd375d15a9 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -372,6 +372,7 @@ extern StructRNA RNA_MotionPathVert;
extern StructRNA RNA_MouseSensor;
extern StructRNA RNA_MovieSequence;
extern StructRNA RNA_MovieClipSequence;
+extern StructRNA RNA_MovieTrackingTrack;
extern StructRNA RNA_MovieTrackingObject;
extern StructRNA RNA_MulticamSequence;
extern StructRNA RNA_MultiresModifier;
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index cb567ac5873..ff9929aea9a 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -70,6 +70,8 @@ extern EnumPropertyItem fmodifier_type_items[];
extern EnumPropertyItem nla_mode_extend_items[];
extern EnumPropertyItem nla_mode_blend_items[];
+extern EnumPropertyItem motionpath_bake_location_items[];
+
extern EnumPropertyItem event_value_items[];
extern EnumPropertyItem event_type_items[];
extern EnumPropertyItem operator_return_items[];
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index c3beffbe223..47b25720373 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -147,49 +147,49 @@ typedef enum PropertyFlag {
/* editable means the property is editable in the user
* interface, properties are editable by default except
* for pointers and collections. */
- PROP_EDITABLE = 1<<0,
+ PROP_EDITABLE = (1<<0),
/* this property is editable even if it is lib linked,
* meaning it will get lost on reload, but it's useful
* for editing. */
- PROP_LIB_EXCEPTION = 1<<16,
+ PROP_LIB_EXCEPTION = (1<<16),
/* animatable means the property can be driven by some
* other input, be it animation curves, expressions, ..
* properties are animatable by default except for pointers
* and collections */
- PROP_ANIMATABLE = 1<<1,
+ PROP_ANIMATABLE = (1<<1),
/* icon */
- PROP_ICONS_CONSECUTIVE = 1<<12,
+ PROP_ICONS_CONSECUTIVE = (1<<12),
/* hidden in the user interface */
- PROP_HIDDEN = 1<<19,
+ PROP_HIDDEN = (1<<19),
/* do not write in presets */
- PROP_SKIP_SAVE = 1<<28,
+ PROP_SKIP_SAVE = (1<<28),
/* function paramater flags */
- PROP_REQUIRED = 1<<2,
- PROP_OUTPUT = 1<<3,
- PROP_RNAPTR = 1<<11,
+ PROP_REQUIRED = (1<<2),
+ PROP_OUTPUT = (1<<3),
+ PROP_RNAPTR = (1<<11),
/* registering */
- PROP_REGISTER = 1<<4,
+ PROP_REGISTER = (1<<4),
PROP_REGISTER_OPTIONAL = (1<<4)|(1<<5),
/* pointers */
- PROP_ID_REFCOUNT = 1<<6,
+ PROP_ID_REFCOUNT = (1<<6),
/* disallow assigning a variable to its self, eg an object tracking its self
* only apply this to types that are derived from an ID ()*/
- PROP_ID_SELF_CHECK = 1<<20,
+ PROP_ID_SELF_CHECK = (1<<20),
/* use for...
* - pointers: in the UI and python so unsetting or setting to None won't work
* - strings: so our internal generated get/length/set functions know to do NULL checks before access [#30865] */
- PROP_NEVER_NULL = 1<<18,
+ PROP_NEVER_NULL = (1<<18),
/* currently only used for UI, this is similar to PROP_NEVER_NULL
* except that the value may be NULL at times, used for ObData, where an Empty's will be NULL
* but setting NULL on a mesh object is not possible. So, if its not NULL, setting NULL cant be done! */
- PROP_NEVER_UNLINK = 1<<25,
+ PROP_NEVER_UNLINK = (1<<25),
/* flag contains multiple enums.
* note: not to be confused with prop->enumbitflags
@@ -197,32 +197,32 @@ typedef enum PropertyFlag {
*
* note: these can't be animated so use with care.
*/
- PROP_ENUM_FLAG = 1<<21,
+ PROP_ENUM_FLAG = (1<<21),
/* need context for update function */
- PROP_CONTEXT_UPDATE = 1<<22,
+ PROP_CONTEXT_UPDATE = (1<<22),
PROP_CONTEXT_PROPERTY_UPDATE = (1<<22)|(1<<27),
/* Use for arrays or for any data that should not have a referene kept
* most common case is functions that return arrays where the array */
- PROP_THICK_WRAP = 1<<23,
+ PROP_THICK_WRAP = (1<<23),
/* Reject values outside limits, use for python api only so far
* this is for use when silently clamping string length will give
* bad behavior later. Could also enforce this for INT's and other types.
* note: currently no support for function arguments or non utf8 paths (filepaths) */
- PROP_NEVER_CLAMP = 1<<26,
+ PROP_NEVER_CLAMP = (1<<26),
/* internal flags */
- PROP_BUILTIN = 1<<7,
- PROP_EXPORT = 1<<8,
- PROP_RUNTIME = 1<<9,
- PROP_IDPROPERTY = 1<<10,
- PROP_RAW_ACCESS = 1<<13,
- PROP_RAW_ARRAY = 1<<14,
- PROP_FREE_POINTERS = 1<<15,
- PROP_DYNAMIC = 1<<17, /* for dynamic arrays, and retvals of type string */
- PROP_ENUM_NO_CONTEXT = 1<<24 /* for enum that shouldn't be contextual */
+ PROP_BUILTIN = (1<<7),
+ PROP_EXPORT = (1<<8),
+ PROP_RUNTIME = (1<<9),
+ PROP_IDPROPERTY = (1<<10),
+ PROP_RAW_ACCESS = (1<<13),
+ PROP_RAW_ARRAY = (1<<14),
+ PROP_FREE_POINTERS = (1<<15),
+ PROP_DYNAMIC = (1<<17), /* for dynamic arrays, and retvals of type string */
+ PROP_ENUM_NO_CONTEXT = (1<<24) /* for enum that shouldn't be contextual */
} PropertyFlag;
typedef struct CollectionPropertyIterator {
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index de569134123..0e47a680553 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -281,7 +281,7 @@ static void rna_sortlist(ListBase *listbase, int(*cmp)(const void*, const void*)
static void rna_print_c_string(FILE *f, const char *str)
{
- static const char *escape[] = {"\''", "\"\"", "\??", "\\\\","\aa", "\bb", "\ff", "\nn", "\rr", "\tt", "\vv", NULL};
+ static const char *escape[] = {"\''", "\"\"", "\??", "\\\\", "\aa", "\bb", "\ff", "\nn", "\rr", "\tt", "\vv", NULL};
int i, j;
if (!str) {
@@ -3127,7 +3127,7 @@ int main(int argc, char **argv)
totblock = MEM_get_memory_blocks_in_use();
if (totblock != 0) {
- fprintf(stderr, "Error Totblock: %d\n",totblock);
+ fprintf(stderr, "Error Totblock: %d\n", totblock);
MEM_set_error_callback(mem_error_cb);
MEM_printmemlist();
}
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 18edcf1344f..73e046f0d63 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -615,7 +615,8 @@ PropertyRNA *RNA_struct_find_nested(PointerRNA *ptr, StructRNA *srna)
{
PropertyRNA *prop = NULL;
- RNA_STRUCT_BEGIN (ptr, iprop) {
+ RNA_STRUCT_BEGIN (ptr, iprop)
+ {
/* This assumes that there can only be one user of this nested struct */
if (RNA_property_pointer_type(ptr, iprop) == srna) {
prop = iprop;
@@ -637,7 +638,8 @@ int RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test)
iterprop = RNA_struct_iterator_property(ptr->type);
- RNA_PROP_BEGIN (ptr, itemptr, iterprop) {
+ RNA_PROP_BEGIN (ptr, itemptr, iterprop)
+ {
/* PropertyRNA *prop= itemptr.data; */
if (prop_test == (PropertyRNA *)itemptr.data) {
found = TRUE;
@@ -684,7 +686,8 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
func = NULL;
- RNA_PROP_BEGIN (&tptr, funcptr, iterprop) {
+ RNA_PROP_BEGIN (&tptr, funcptr, iterprop)
+ {
if (strcmp(identifier, RNA_function_identifier(funcptr.data)) == 0) {
func = funcptr.data;
break;
@@ -3128,7 +3131,8 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
/* no item property pointer, can still be id property, or
* property of a type derived from the collection pointer type */
- RNA_PROP_BEGIN (ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (ptr, itemptr, prop)
+ {
if (itemptr.data) {
if (itemprop) {
/* we got the property already */
@@ -4499,7 +4503,8 @@ char *RNA_pointer_as_string(bContext *C, PointerRNA *ptr)
BLI_dynstr_append(dynstr, "{");
- RNA_STRUCT_BEGIN (ptr, prop) {
+ RNA_STRUCT_BEGIN (ptr, prop)
+ {
propname = RNA_property_identifier(prop);
if (strcmp(propname, "rna_type") == 0)
@@ -4542,7 +4547,8 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
PropertyRNA *prop_default;
char *buf_default;
- RNA_PROP_BEGIN (ptr, propptr, iterprop) {
+ RNA_PROP_BEGIN (ptr, propptr, iterprop)
+ {
prop = propptr.data;
flag = RNA_property_flag(prop);
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 76af6309ecf..299e1671394 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -191,7 +191,7 @@ static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min,
-static void rna_Action_frame_range_get(PointerRNA *ptr,float *values)
+static void rna_Action_frame_range_get(PointerRNA *ptr, float *values)
{ /* don't include modifiers because they too easily can have very large
* ranges: MINAFRAMEF to MAXFRAMEF. */
calc_action_range(ptr->id.data, values, values+1, FALSE);
@@ -623,9 +623,9 @@ static void rna_def_action(BlenderRNA *brna)
rna_def_action_pose_markers(brna, prop);
/* properties */
- prop = RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, "Frame Range" ,
- "The final frame range of all F-Curves within this action" , 0 , 0);
- RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get" , NULL, NULL);
+ prop = RNA_def_float_vector(srna, "frame_range", 2, NULL, 0, 0, "Frame Range",
+ "The final frame range of all F-Curves within this action", 0, 0);
+ RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get", NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* special "type" limiter - should not really be edited in general,
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index e8eed526a7c..3b89899702d 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -141,7 +141,7 @@ static void rna_ConstraintActuator_type_set(struct PointerRNA *ptr, int value)
switch (ca->type) {
case ACT_CONST_TYPE_ORI:
/* negative axis not supported in the orientation mode */
- if (ELEM3(ca->mode, ACT_CONST_DIRNX,ACT_CONST_DIRNY, ACT_CONST_DIRNZ))
+ if (ELEM3(ca->mode, ACT_CONST_DIRNX, ACT_CONST_DIRNY, ACT_CONST_DIRNZ))
ca->mode = ACT_CONST_NONE;
break;
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index f7065307d87..167eb23c023 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -39,6 +39,14 @@
#include "WM_types.h"
+/* Which part of bone(s) get baked */
+// TODO: icons?
+EnumPropertyItem motionpath_bake_location_items[] = {
+ {MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
+ {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
+ //{MOTIONPATH_BAKE_CENTERS, "CENTROID", 0, "Centers", "Calculate bone paths from center of mass"},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
static PointerRNA rna_AnimViz_onion_skinning_get(PointerRNA *ptr)
@@ -241,10 +249,6 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
"Display Paths of poses within a fixed number of frames around the current frame"},
{MOTIONPATH_TYPE_RANGE, "RANGE", 0, "In Range", "Display Paths of poses within specified range"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_location_items[] = {
- {MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
- {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
- {0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "AnimVizMotionPaths", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
@@ -260,7 +264,7 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
prop = RNA_def_property(srna, "bake_location", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "path_bakeflag");
- RNA_def_property_enum_items(prop, prop_location_items);
+ RNA_def_property_enum_items(prop, motionpath_bake_location_items);
RNA_def_property_ui_text(prop, "Bake Location", "When calculating Bone Paths, use Head or Tips");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index ce9edc17999..2f27c7a1e84 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -407,7 +407,7 @@ static void rna_def_boidrule(BlenderRNA *brna)
/* data */
srna = RNA_def_struct(brna, "BoidRule", NULL);
- RNA_def_struct_ui_text(srna , "Boid Rule", "");
+ RNA_def_struct_ui_text(srna, "Boid Rule", "");
RNA_def_struct_refine_func(srna, "rna_BoidRule_refine");
RNA_def_struct_path_func(srna, "rna_BoidRule_path");
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 5093c1a6eee..ee4b34508d1 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -52,7 +52,7 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""},
{SCULPT_TOOL_CLAY, "CLAY", ICON_BRUSH_CLAY, "Clay", ""},
{SCULPT_TOOL_CLAY_STRIPS, "CLAY_STRIPS", ICON_BRUSH_CLAY_STRIPS, "Clay Strips", ""},
- {SCULPT_TOOL_CREASE, "CREASE",ICON_BRUSH_CREASE, "Crease", ""},
+ {SCULPT_TOOL_CREASE, "CREASE", ICON_BRUSH_CREASE, "Crease", ""},
{SCULPT_TOOL_DRAW, "DRAW", ICON_BRUSH_SCULPT_DRAW, "Draw", ""},
{SCULPT_TOOL_FILL, "FILL", ICON_BRUSH_FILL, "Fill", ""},
{SCULPT_TOOL_FLATTEN, "FLATTEN", ICON_BRUSH_FLATTEN, "Flatten", ""},
@@ -288,7 +288,7 @@ static void rna_Brush_set_size(PointerRNA *ptr, int value)
Brush* brush = ptr->data;
/* scale unprojected radius so it stays consistent with brush size */
- brush_scale_unprojected_radius(&brush->unprojected_radius,
+ BKE_brush_scale_unprojected_radius(&brush->unprojected_radius,
value, brush->size);
brush->size = value;
}
@@ -298,7 +298,7 @@ static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value)
Brush* brush = ptr->data;
/* scale brush size so it stays consistent with unprojected_radius */
- brush_scale_size(&brush->size, value, brush->unprojected_radius);
+ BKE_brush_scale_size(&brush->size, value, brush->unprojected_radius);
brush->unprojected_radius = value;
}
@@ -572,7 +572,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rate");
- RNA_def_property_range(prop, 0.0001f , 10000.0f);
+ RNA_def_property_range(prop, 0.0001f, 10000.0f);
RNA_def_property_ui_range(prop, 0.01f, 1.0f, 1, 3);
RNA_def_property_ui_text(prop, "Rate", "Interval between paints for Airbrush");
RNA_def_property_update(prop, 0, "rna_Brush_update");
@@ -583,6 +583,13 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Color", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
+ RNA_def_property_ui_text(prop, "Weight", "Vertex weight when brush is applied");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_float_default(prop, 0.5f);
@@ -867,7 +874,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "clone.offset");
RNA_def_property_ui_text(prop, "Clone Offset", "");
- RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3);
+ RNA_def_property_ui_range(prop, -1.0f, 1.0f, 10.0f, 3);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
/* brush capabilities (mode-dependent) */
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 180479d6f63..70a33734c3f 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -46,14 +46,14 @@
static float rna_Camera_angle_get(PointerRNA *ptr)
{
Camera *cam = ptr->id.data;
- float sensor = camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
+ float sensor = BKE_camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
return focallength_to_fov(cam->lens, sensor);
}
static void rna_Camera_angle_set(PointerRNA *ptr, float value)
{
Camera *cam = ptr->id.data;
- float sensor = camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
+ float sensor = BKE_camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
cam->lens = fov_to_focallength(value, sensor);
}
@@ -97,6 +97,7 @@ void RNA_def_camera(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = {
{CAM_PERSP, "PERSP", 0, "Perspective", ""},
{CAM_ORTHO, "ORTHO", 0, "Orthographic", ""},
+ {CAM_PANO, "PANO", 0, "Panoramic", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_draw_type_extra_items[] = {
{CAM_DTX_CENTER, "CENTER", 0, "Center", ""},
@@ -271,12 +272,6 @@ void RNA_def_camera(BlenderRNA *brna)
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");
- prop = RNA_def_property(srna, "use_panorama", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_PANORAMA);
- RNA_def_property_ui_text(prop, "Panorama",
- "Render the scene with a cylindrical camera for pseudo-fisheye lens effects");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
-
/* pointers */
rna_def_animdata_common(srna);
diff --git a/source/blender/makesrna/intern/rna_camera_api.c b/source/blender/makesrna/intern/rna_camera_api.c
index 14391e74239..2d19047ef89 100644
--- a/source/blender/makesrna/intern/rna_camera_api.c
+++ b/source/blender/makesrna/intern/rna_camera_api.c
@@ -46,7 +46,7 @@ void rna_camera_view_frame(struct Camera *camera, struct Scene *scene,
{
float vec[4][3];
- camera_view_frame(scene, camera, vec);
+ BKE_camera_view_frame(scene, camera, vec);
copy_v3_v3(vec1_r, vec[0]);
copy_v3_v3(vec2_r, vec[1]);
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 6d67f0c00dd..e321e83dd61 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -68,7 +68,7 @@ EnumPropertyItem constraint_type_items[] = {
{CONSTRAINT_TYPE_LOCKTRACK, "LOCKED_TRACK", ICON_CONSTRAINT_DATA, "Locked Track",
"Tracking along a single axis"},
{CONSTRAINT_TYPE_SPLINEIK, "SPLINE_IK", ICON_CONSTRAINT_DATA, "Spline IK", ""},
- {CONSTRAINT_TYPE_STRETCHTO, "STRETCH_TO",ICON_CONSTRAINT_DATA, "Stretch To", ""},
+ {CONSTRAINT_TYPE_STRETCHTO, "STRETCH_TO", ICON_CONSTRAINT_DATA, "Stretch To", ""},
{CONSTRAINT_TYPE_TRACKTO, "TRACK_TO", ICON_CONSTRAINT_DATA, "Track To",
"Legacy tracking constraint prone to twisting artifacts"},
{0, "", 0, N_("Relationship"), ""},
@@ -1020,7 +1020,7 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
srna = RNA_def_struct(brna, "FloorConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Floor Constraint", "Use the target object for location limitation");
- RNA_def_struct_sdna_from(srna, "bMinMaxConstraint","data");
+ RNA_def_struct_sdna_from(srna, "bMinMaxConstraint", "data");
prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 86a2d6c9a46..a62ee6d78d1 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -558,7 +558,7 @@ static void rna_Curve_spline_bezpoints_add(ID *id, Nurb *nu, ReportList *reports
static Nurb *rna_Curve_spline_new(Curve *cu, int type)
{
- Nurb *nu = (Nurb *) MEM_callocN( sizeof( Nurb ), "spline.new" );
+ Nurb *nu = (Nurb *) MEM_callocN(sizeof( Nurb ), "spline.new" );
if (type == CU_BEZIER) {
BezTriple *bezt = (BezTriple *)MEM_callocN(sizeof(BezTriple), "spline.new.bezt");
@@ -1470,6 +1470,18 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+
+ prop = RNA_def_property(srna, "bevel_factor_start", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "bevfac1");
+ RNA_def_property_range(prop, 0, 1.0);
+ RNA_def_property_ui_text(prop, "Start Bevel Factor", "Factor that defines from where beveling of spline happens (0=from the very beginning, 1=from the very end)");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+
+ prop = RNA_def_property(srna, "bevel_factor_end", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "bevfac2");
+ RNA_def_property_range(prop, 0, 1.0);
+ RNA_def_property_ui_text(prop, "End Bevel Factor", "Factor that defines to where beveling of spline happens (0=to the very beginning, 1=to the very end)");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_curve_nurb(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index a4aac6f345c..003b4ae4fbc 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -141,7 +141,7 @@ static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA
psys->pointcache = BKE_ptcache_add(&psys->ptcaches);
psys->flag |= PSYS_ENABLED;
BLI_strncpy(psys->name, "FluidParticles", sizeof(psys->name));
- BLI_addtail(&ob->particlesystem,psys);
+ BLI_addtail(&ob->particlesystem, psys);
/* add modifier */
psmd = (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index e5939296f5a..f7e7435598b 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -212,13 +212,13 @@ static int rna_Image_has_data_get(PointerRNA *ptr)
return 0;
}
-static void rna_Image_size_get(PointerRNA *ptr,int *values)
+static void rna_Image_size_get(PointerRNA *ptr, int *values)
{
Image *im = (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
- ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
+ ibuf = BKE_image_acquire_ibuf(im, NULL, &lock);
if (ibuf) {
values[0] = ibuf->x;
values[1] = ibuf->y;
@@ -237,7 +237,7 @@ static void rna_Image_resolution_get(PointerRNA *ptr, float *values)
ImBuf *ibuf;
void *lock;
- ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
+ ibuf = BKE_image_acquire_ibuf(im, NULL, &lock);
if (ibuf) {
values[0] = ibuf->ppm[0];
values[1] = ibuf->ppm[1];
@@ -256,7 +256,7 @@ static void rna_Image_resolution_set(PointerRNA *ptr, const float *values)
ImBuf *ibuf;
void *lock;
- ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
+ ibuf = BKE_image_acquire_ibuf(im, NULL, &lock);
if (ibuf) {
ibuf->ppm[0] = values[0];
ibuf->ppm[1] = values[1];
@@ -616,13 +616,13 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Depth", "Image bit depth");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop = RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size" ,
- "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
- RNA_def_property_int_funcs(prop, "rna_Image_size_get" , NULL, NULL);
+ prop = RNA_def_int_vector(srna, "size", 2, NULL, 0, 0, "Size",
+ "Width and height in pixels, zero when image data cant be loaded", 0, 0);
+ RNA_def_property_int_funcs(prop, "rna_Image_size_get", NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop = RNA_def_float_vector(srna, "resolution" , 2 , NULL , 0, 0, "Resolution" , "X/Y pixels per meter" , 0 , 0);
- RNA_def_property_float_funcs(prop, "rna_Image_resolution_get" , "rna_Image_resolution_set", NULL);
+ prop = RNA_def_float_vector(srna, "resolution", 2, NULL, 0, 0, "Resolution", "X/Y pixels per meter", 0, 0);
+ RNA_def_property_float_funcs(prop, "rna_Image_resolution_get", "rna_Image_resolution_set", NULL);
prop = RNA_def_property(srna, "pixels", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_DYNAMIC);
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 8594bda96d1..ff717635250 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 671bee80523..fef362c8f10 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -86,6 +86,29 @@ static void rna_Lamp_active_texture_set(PointerRNA *ptr, PointerRNA value)
set_current_lamp_texture(la, value.data);
}
+static int rna_use_shadow_get(PointerRNA *ptr)
+{
+ Lamp *la = (Lamp*)ptr->data;
+
+ if(la->type == LA_SPOT)
+ return la->mode & LA_SHAD_BUF;
+ else
+ return la->mode & LA_SHAD_RAY;
+}
+
+static void rna_use_shadow_set(PointerRNA *ptr, int value)
+{
+ Lamp *la = (Lamp*)ptr->data;
+ if (value) {
+ if(la->type == LA_SPOT)
+ la->mode |= LA_SHAD_BUF;
+ else
+ la->mode |= LA_SHAD_RAY;
+ }
+ else
+ la->mode &= ~(LA_SHAD_BUF|LA_SHAD_RAY);
+}
+
static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
{
Lamp *la = (Lamp*)ptr->data;
@@ -464,12 +487,135 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
{LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
{0, NULL, 0, NULL, NULL}};
- prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
+ static EnumPropertyItem prop_shadbuftype_items[] = {
+ {LA_SHADBUF_REGULAR, "REGULAR", 0, "Classical", "Classic shadow buffer"},
+ {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway",
+ "Regular buffer, averaging the closest and 2nd closest Z value to reducing "
+ "bias artifacts"},
+ {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular",
+ "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"},
+ {LA_SHADBUF_DEEP, "DEEP", 0, "Deep",
+ "Deep shadow buffer supports transparency and better filtering, at the cost of "
+ "more memory usage and processing time"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem prop_shadbuffiltertype_items[] = {
+ {LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
+ {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"},
+ {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem prop_numbuffer_items[] = {
+ {1, "BUFFERS_1", 0, "1", "Only one buffer rendered"},
+ {4, "BUFFERS_4", 0, "4", "Renders 4 buffers for better AA, this quadruples memory usage"},
+ {9, "BUFFERS_9", 0, "9", "Renders 9 buffers for better AA, this uses nine times more memory"},
+ {0, NULL, 0, NULL, NULL}};
+
+ /* GE only */
+ static EnumPropertyItem prop_ge_shadowbuffer_type_items[] = {
+ {LA_SHADMAP_SIMPLE, "SIMPLE", 0, "Simple", "Simple shadow maps"},
+ {LA_SHADMAP_VARIANCE, "VARIANCE", 0, "Variance", "Variance shadow maps"},
+ {0, NULL, 0, NULL, NULL}};
+
+ prop= RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_use_shadow_get", "rna_use_shadow_set");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop= RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, (spot)? prop_spot_shadow_items: prop_shadow_items);
- RNA_def_property_ui_text(prop, "Shadow Method", "Method to compute lamp shadow with");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "bufsize");
+ RNA_def_property_range(prop, 512, 10240);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Size",
+ "Resolution of the shadow buffer, higher values give crisper shadows "
+ "but use more memory");
+ RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "filtertype");
+ RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
+ RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "buffers");
+ RNA_def_property_enum_items(prop, prop_numbuffer_items);
+ RNA_def_property_ui_text(prop, "Shadow Sample Buffers",
+ "Number of shadow buffers to render for better AA, this increases memory usage");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "clipsta");
+ RNA_def_property_range(prop, 0.0f, 9999.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start",
+ "Shadow map clip start, below which objects will not generate shadows");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ prop= RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "clipend");
+ RNA_def_property_range(prop, 0.0f, 9999.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Clip End",
+ "Shadow map clip end, beyond which objects will not generate shadows");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "bias");
+ RNA_def_property_range(prop, 0.001f, 5.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_bleed_bias", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "bleedbias");
+ RNA_def_property_range(prop, 0.f, 1.f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Bleed Bias", "Bias for reducing light-bleed on variance shadow maps");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "soft");
+ RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "samp");
+ RNA_def_property_range(prop, 1, 16);
+ RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "buftype");
+ RNA_def_property_enum_items(prop, prop_shadbuftype_items);
+ RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+ prop = RNA_def_property(srna, "ge_shadow_buffer_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "shadowmap_type");
+ RNA_def_property_enum_items(prop, prop_ge_shadowbuffer_type_items);
+ RNA_def_property_ui_text(prop, "Shadow Map Type", "The shadow mapping algorithm used");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
+
+ prop = RNA_def_property(srna, "use_auto_clip_start", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
+ RNA_def_property_ui_text(prop, "Autoclip Start",
+ "Automatic calculation of clipping-start, based on visible vertices");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop = RNA_def_property(srna, "use_auto_clip_end", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
+ RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+
+ prop = RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "compressthresh");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold");
+ RNA_def_property_update(prop, 0, "rna_Lamp_update");
+
prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
@@ -599,20 +745,8 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_shadbuftype_items[] = {
- {LA_SHADBUF_REGULAR , "REGULAR", 0, "Classical", "Classic shadow buffer"},
- {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway",
- "Regular buffer, averaging the closest and 2nd closest Z value to reducing "
- "bias artifacts"},
- {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular",
- "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"},
- {LA_SHADBUF_DEEP, "DEEP", 0, "Deep",
- "Deep shadow buffer supports transparency and better filtering, at the cost of "
- "more memory usage and processing time"},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem prop_shadbuffiltertype_items[] = {
- {LA_SHADBUF_BOX , "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
+ {LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
{LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"},
{LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"},
{0, NULL, 0, NULL, NULL}};
@@ -653,31 +787,9 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Halo Step", "Volumetric halo sampling frequency");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "bufsize");
- RNA_def_property_range(prop, 512, 10240);
- RNA_def_property_ui_text(prop, "Shadow Buffer Size",
- "Resolution of the shadow buffer, higher values give crisper shadows "
- "but use more memory");
- RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "filtertype");
- RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
- RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "buffers");
- RNA_def_property_enum_items(prop, prop_numbuffer_items);
- RNA_def_property_ui_text(prop, "Shadow Sample Buffers",
- "Number of shadow buffers to render for better AA, this increases memory usage");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
prop = RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotblend");
- RNA_def_property_range(prop, 0.0f ,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
@@ -694,61 +806,6 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Cone",
"Draw transparent cone in 3D view to visualize which objects are contained in it");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "clipsta");
- RNA_def_property_range(prop, 0.0f, 9999.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start",
- "Shadow map clip start, below which objects will not generate shadows");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "clipend");
- RNA_def_property_range(prop, 0.0f, 9999.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Clip End",
- "Shadow map clip end, beyond which objects will not generate shadows");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "bias");
- RNA_def_property_range(prop, 0.001f, 5.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "soft");
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "samp");
- RNA_def_property_range(prop, 1, 16);
- RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "buftype");
- RNA_def_property_enum_items(prop, prop_shadbuftype_items);
- RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "use_auto_clip_start", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
- RNA_def_property_ui_text(prop, "Autoclip Start",
- "Automatic calculation of clipping-start, based on visible vertices");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "use_auto_clip_end", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
- RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "compressthresh");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
static void rna_def_sun_lamp(BlenderRNA *brna)
@@ -771,6 +828,13 @@ static void rna_def_sun_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps");
rna_def_lamp_sky_settings(brna);
+
+ /* BGE Only */
+ prop= RNA_def_property(srna, "shadow_frustum_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "shadow_frustum_size");
+ RNA_def_property_ui_range(prop, 0.001, 100.0, 2, 1);
+ RNA_def_property_ui_text(prop, "Frustum Size", "Size of the frustum used for creating the shadow map");
+ RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
static void rna_def_hemi_lamp(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 09310560631..cfdf57efbea 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -307,7 +307,7 @@ void RNA_def_main(BlenderRNA *brna)
RNA_def_main_window_managers},
{"images", "Image", "rna_Main_image_begin", "Images", "Image datablocks", RNA_def_main_images},
{"lattices", "Lattice", "rna_Main_latt_begin", "Lattices", "Lattice datablocks", RNA_def_main_lattices},
- {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks", RNA_def_main_curves} ,
+ {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks", RNA_def_main_curves},
{"metaballs", "MetaBall", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks", RNA_def_main_metaballs},
{"fonts", "VectorFont", "rna_Main_font_begin", "Vector Fonts", "Vector font datablocks", RNA_def_main_fonts},
{"textures", "Texture", "rna_Main_tex_begin", "Textures", "Texture datablocks", RNA_def_main_textures},
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 6f0de4321f4..8faf5823927 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -93,7 +93,7 @@
Camera *rna_Main_cameras_new(Main *UNUSED(bmain), const char *name)
{
- ID *id = add_camera(name);
+ ID *id = BKE_camera_add(name);
id_us_min(id);
return (Camera *)id;
}
@@ -386,7 +386,7 @@ void rna_Main_textures_remove(Main *bmain, ReportList *reports, struct Tex *tex)
Brush *rna_Main_brushes_new(Main *UNUSED(bmain), const char *name)
{
- Brush *brush = add_brush(name);
+ Brush *brush = BKE_brush_add(name);
id_us_min(&brush->id);
return brush;
}
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 7802241a25b..8aabc515dcb 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -766,7 +766,7 @@ static void rna_def_material_gamesettings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_face_orientation_items[] = {
- {GEMAT_NORMAL,"NORMAL",0,"Normal","No tranformation"},
+ {GEMAT_NORMAL, "NORMAL", 0, "Normal", "No tranformation"},
{GEMAT_HALO, "HALO", 0, "Halo", "Screen aligned billboard"},
{GEMAT_BILLBOARD, "BILLBOARD", 0, "Billboard", "Billboard with Z-axis constraint"},
{GEMAT_SHADOW, "SHADOW", 0, "Shadow", "Faces are used for shadow"},
@@ -1244,7 +1244,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
prop = RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scattering");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1 ,3);
+ RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_ui_text(prop, "Scattering",
"Amount of light that gets scattered out by the volume - "
"the more out-scattering, the shallower the light will penetrate");
@@ -1267,7 +1267,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
prop = RNA_def_property(srna, "reflection", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reflection");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1 ,3);
+ RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 3);
RNA_def_property_ui_text(prop, "Reflection",
"Multiplier to make out-scattered light brighter or darker (non-physically correct)");
RNA_def_property_update(prop, 0, "rna_Material_update");
diff --git a/source/blender/makesrna/intern/rna_material_api.c b/source/blender/makesrna/intern/rna_material_api.c
index e6118f6c527..538a4c99df4 100644
--- a/source/blender/makesrna/intern/rna_material_api.c
+++ b/source/blender/makesrna/intern/rna_material_api.c
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -30,7 +28,6 @@
* \ingroup RNA
*/
-
#include <stdlib.h>
#include <stdio.h>
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index ca1b3a86087..8c000e522ba 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1444,7 +1444,7 @@ static void rna_def_modifier_array(BlenderRNA *brna)
/* Offset parameters */
prop = RNA_def_property(srna, "use_constant_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
- RNA_def_property_ui_text(prop, "Constant Offset", "Add a constant offset");;
+ RNA_def_property_ui_text(prop, "Constant Offset", "Add a constant offset");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "constant_offset_displace", PROP_FLOAT, PROP_TRANSLATION);
@@ -3162,7 +3162,7 @@ void RNA_def_modifier(BlenderRNA *brna)
/* data */
srna = RNA_def_struct(brna, "Modifier", NULL);
- RNA_def_struct_ui_text(srna , "Modifier", "Modifier affecting the geometry data of an object");
+ RNA_def_struct_ui_text(srna, "Modifier", "Modifier affecting the geometry data of an object");
RNA_def_struct_refine_func(srna, "rna_Modifier_refine");
RNA_def_struct_path_func(srna, "rna_Modifier_path");
RNA_def_struct_sdna(srna, "ModifierData");
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index ca06793cd49..96da24b3392 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -248,9 +248,9 @@ static void rna_def_movieclip(BlenderRNA *brna)
"Use a preview proxy and/or timecode index for this clip");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
- prop = RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size",
- "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
- RNA_def_property_int_funcs(prop, "rna_MovieClip_size_get" , NULL, NULL);
+ prop = RNA_def_int_vector(srna, "size", 2, NULL, 0, 0, "Size",
+ "Width and height in pixels, zero when image data cant be loaded", 0, 0);
+ RNA_def_property_int_funcs(prop, "rna_MovieClip_size_get", NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index a101bcaec12..cffcca177b3 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -245,28 +245,22 @@ static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr)
return &RNA_NodeSocket##stypename##idname; \
}
- switch (sock->struct_type) {
- case SOCK_STRUCT_NONE:
- switch (sock->type) {
- case SOCK_FLOAT:
- NODE_DEFINE_SUBTYPES_FLOAT
- break;
- case SOCK_INT:
- NODE_DEFINE_SUBTYPES_INT
- break;
- case SOCK_BOOLEAN:
- return &RNA_NodeSocketBoolean;
- case SOCK_VECTOR:
- NODE_DEFINE_SUBTYPES_VECTOR
- break;
- case SOCK_RGBA:
- return &RNA_NodeSocketRGBA;
- case SOCK_SHADER:
- return &RNA_NodeSocketShader;
- }
- break;
- case SOCK_STRUCT_OUTPUT_FILE:
- return &RNA_NodeImageFileSocket;
+ switch (sock->type) {
+ case SOCK_FLOAT:
+ NODE_DEFINE_SUBTYPES_FLOAT
+ break;
+ case SOCK_INT:
+ NODE_DEFINE_SUBTYPES_INT
+ break;
+ case SOCK_BOOLEAN:
+ return &RNA_NodeSocketBoolean;
+ case SOCK_VECTOR:
+ NODE_DEFINE_SUBTYPES_VECTOR
+ break;
+ case SOCK_RGBA:
+ return &RNA_NodeSocketRGBA;
+ case SOCK_SHADER:
+ return &RNA_NodeSocketShader;
}
#undef SUBTYPE
@@ -328,6 +322,39 @@ static void rna_Matte_t2_set(PointerRNA *ptr, float value)
chroma->t2 = value;
}
+static void rna_distance_matte_t1_set(PointerRNA *ptr, float value)
+{
+ bNode *node = (bNode*)ptr->data;
+ NodeChroma *chroma = node->storage;
+
+ chroma->t1 = value;
+}
+
+static void rna_distance_matte_t2_set(PointerRNA *ptr, float value)
+{
+ bNode *node = (bNode*)ptr->data;
+ NodeChroma *chroma = node->storage;
+
+ chroma->t2 = value;
+}
+
+static void rna_difference_matte_t1_set(PointerRNA *ptr, float value)
+{
+ bNode *node = (bNode*)ptr->data;
+ NodeChroma *chroma = node->storage;
+
+ chroma->t1 = value;
+}
+
+static void rna_difference_matte_t2_set(PointerRNA *ptr, float value)
+{
+ bNode *node = (bNode*)ptr->data;
+ NodeChroma *chroma = node->storage;
+
+ chroma->t2 = value;
+}
+
+
static void rna_Node_scene_set(PointerRNA *ptr, PointerRNA value)
{
bNode *node = (bNode*)ptr->data;
@@ -825,14 +852,18 @@ static void rna_Mapping_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr)
rna_Node_update(bmain, scene, ptr);
}
-static PointerRNA rna_CompositNodeOutputMultiFile_active_input_get(PointerRNA *ptr)
+static void rna_NodeOutputFile_file_inputs_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
bNode *node = ptr->data;
- NodeImageMultiFile *nimf = node->storage;
- bNodeSocket *sock = BLI_findlink(&node->inputs, nimf->active_input);
- PointerRNA sock_ptr;
- RNA_pointer_create((ID*)ptr->id.data, &RNA_NodeSocket, sock, &sock_ptr);
- return sock_ptr;
+ rna_iterator_listbase_begin(iter, &node->inputs, NULL);
+}
+
+static PointerRNA rna_NodeOutputFile_file_inputs_get(CollectionPropertyIterator *iter)
+{
+ PointerRNA ptr;
+ bNodeSocket *sock = rna_iterator_listbase_get(iter);
+ RNA_pointer_create(iter->ptr.id.data, &RNA_NodeImageFileSocket, sock->storage, &ptr);
+ return ptr;
}
#else
@@ -1794,22 +1825,23 @@ static void rna_def_cmp_output_file_socket(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "NodeImageFileSocket", "NodeSocketRGBA");
- RNA_def_struct_sdna(srna, "bNodeSocket");
- RNA_def_struct_path_func(srna, "rna_NodeSocket_path");
+ srna = RNA_def_struct(brna, "NodeImageFileSocket", NULL);
+ RNA_def_struct_sdna(srna, "NodeImageMultiFileSocket");
RNA_def_struct_ui_text(srna, "Node Image File Socket", "Socket data of file output node");
- RNA_def_struct_ui_icon(srna, ICON_PLUG);
- RNA_def_struct_sdna_from(srna, "bNodeSocket", NULL);
-
- RNA_def_struct_sdna_from(srna, "NodeImageMultiFileSocket", "storage");
prop = RNA_def_property(srna, "use_node_format", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_node_format", 1);
RNA_def_property_ui_text(prop, "Use Node Format", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, NULL);
prop = RNA_def_property(srna, "format", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ImageFormatSettings");
+
+ prop = RNA_def_property(srna, "path", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_string_sdna(prop, NULL, "path");
+ RNA_def_property_ui_text(prop, "Path", "Subpath used for this input");
+ RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, NULL);
}
static void def_cmp_output_file(StructRNA *srna)
{
@@ -1822,12 +1854,6 @@ static void def_cmp_output_file(StructRNA *srna)
RNA_def_property_ui_text(prop, "Base Path", "Base output path for the image");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop = RNA_def_property(srna, "active_input", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_funcs(prop, "rna_CompositNodeOutputMultiFile_active_input_get", NULL, NULL, NULL);
- RNA_def_property_struct_type(prop, "NodeSocket");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Input", "Active input in details view list");
-
prop = RNA_def_property(srna, "active_input_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_input");
RNA_def_property_ui_text(prop, "Active Input Index", "Active input index in details view list");
@@ -1835,6 +1861,12 @@ static void def_cmp_output_file(StructRNA *srna)
prop = RNA_def_property(srna, "format", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ImageFormatSettings");
+
+ prop = RNA_def_property(srna, "file_inputs", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_funcs(prop, "rna_NodeOutputFile_file_inputs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end",
+ "rna_NodeOutputFile_file_inputs_get", NULL, NULL, NULL, NULL);
+ RNA_def_property_struct_type(prop, "NodeImageFileSocket");
+ RNA_def_property_ui_text(prop, "File Inputs", "");
}
static void def_cmp_dilate_erode(StructRNA *srna)
@@ -1891,14 +1923,14 @@ static void def_cmp_diff_matte(StructRNA *srna)
prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_difference_matte_t1_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_difference_matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
@@ -1933,18 +1965,30 @@ static void def_cmp_distance_matte(StructRNA *srna)
{
PropertyRNA *prop;
+ static EnumPropertyItem color_space_items[] = {
+ {1, "RGB", 0, "RGB", "RGB color space"},
+ {2, "YCC", 0, "YCC", "YCbCr Suppression"},
+ {0, NULL, 0, NULL, NULL}};
+
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
+
+ prop = RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "channel");
+ RNA_def_property_enum_items(prop, color_space_items);
+ RNA_def_property_ui_text(prop, "Channel", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_distance_matte_t1_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
+ RNA_def_property_float_funcs(prop, NULL, "rna_distance_matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
@@ -2071,7 +2115,7 @@ static void def_cmp_chroma_matte(StructRNA *srna)
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstrength");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gain", "Alpha gain");
+ RNA_def_property_ui_text(prop, "Falloff", "Alpha falloff");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "shadow_adjust", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 140e874eb78..6a4809e54e5 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1888,9 +1888,9 @@ static void rna_def_object(BlenderRNA *brna)
"Axis Angle (W+XYZ), defines a rotation around some axis defined by 3D-Vector"},
{0, NULL, 0, NULL, NULL}};
- static float default_quat[4] = {1,0,0,0}; /* default quaternion values */
- static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */
- static float default_scale[3] = {1,1,1}; /* default scale values */
+ static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */
+ static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */
+ static float default_scale[3] = {1, 1, 1}; /* default scale values */
static int boundbox_dimsize[] = {8, 3};
srna = RNA_def_struct(brna, "Object", "ID");
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 0ac6dcbc518..cb0f1d307aa 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -96,7 +96,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
object_free_modifiers(tmpobj);
/* copies the data */
- copycu = tmpobj->data = BKE_curve_copy( (Curve *) ob->data );
+ copycu = tmpobj->data = BKE_curve_copy((Curve *) ob->data );
/* temporarily set edit so we get updates from edit mode, but
* also because for text datablocks copying it while in edit
@@ -105,21 +105,21 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
copycu->editnurb = tmpcu->editnurb;
/* get updated display list, and convert to a mesh */
- makeDispListCurveTypes( sce, tmpobj, 0 );
+ makeDispListCurveTypes(sce, tmpobj, 0);
copycu->editfont = NULL;
copycu->editnurb = NULL;
- nurbs_to_mesh( tmpobj );
+ nurbs_to_mesh(tmpobj);
/* nurbs_to_mesh changes the type to a mesh, check it worked */
if (tmpobj->type != OB_MESH) {
- free_libblock_us( &(G.main->object), tmpobj );
+ free_libblock_us(&(G.main->object), tmpobj);
BKE_report(reports, RPT_ERROR, "cant convert curve to mesh. Does the curve have any segments?");
return NULL;
}
tmpmesh = tmpobj->data;
- free_libblock_us( &G.main->object, tmpobj );
+ free_libblock_us(&G.main->object, tmpobj);
break;
case OB_MBALL: {
@@ -364,7 +364,7 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int
}
if (assignmode != WEIGHT_REPLACE && assignmode != WEIGHT_ADD && assignmode != WEIGHT_SUBTRACT) {
- BKE_report(reports, RPT_ERROR, "Bad assignment mode" );
+ BKE_report(reports, RPT_ERROR, "Bad assignment mode");
return;
}
@@ -476,6 +476,11 @@ int rna_Object_is_modified(Object *ob, Scene *scene, int settings)
return object_is_modified(scene, ob) & settings;
}
+int rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings)
+{
+ return object_is_deform_modified(scene, ob) & settings;
+}
+
#ifndef NDEBUG
void rna_Object_dm_info(struct Object *ob, int type, char *result)
{
@@ -644,6 +649,14 @@ void RNA_api_object(StructRNA *srna)
parm = RNA_def_boolean(func, "result", 0, "", "Object visibility");
RNA_def_function_return(func, parm);
+ func = RNA_def_function(srna, "is_deform_modified", "rna_Object_is_deform_modified");
+ RNA_def_function_ui_description(func, "Determine if this object is modified by a deformation from the base mesh data");
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_boolean(func, "result", 0, "", "Object visibility");
+ RNA_def_function_return(func, parm);
#ifndef NDEBUG
/* mesh */
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index c52b6251223..2e8e597ad35 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -187,7 +187,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
for (pid = pidlist.first; pid; pid = pid->next) {
if (pid->cache == cache)
pid2 = pid;
- else if (cache->name[0] != '\0' && strcmp(cache->name,pid->cache->name) == 0) {
+ else if (cache->name[0] != '\0' && strcmp(cache->name, pid->cache->name) == 0) {
/*TODO: report "name exists" to user */
BLI_strncpy(cache->name, cache->prev_name, sizeof(cache->name));
new_name = 0;
@@ -513,7 +513,7 @@ static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA
/* add/remove modifier as needed */
if (!md) {
- if (pd && (pd->shape == PFIELD_SHAPE_SURFACE) && ELEM(pd->forcefield,PFIELD_GUIDE,PFIELD_TEXTURE) == 0)
+ if (pd && (pd->shape == PFIELD_SHAPE_SURFACE) && ELEM(pd->forcefield, PFIELD_GUIDE, PFIELD_TEXTURE) == 0)
if (ELEM4(ob->type, OB_MESH, OB_SURF, OB_FONT, OB_CURVE))
ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Surface);
}
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index dd591ea7343..52c41c869bb 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1516,7 +1516,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{PART_AVE_GLOBAL_X, "GLOBAL_X", 0, "Global X", ""},
{PART_AVE_GLOBAL_Y, "GLOBAL_Y", 0, "Global Y", ""},
{PART_AVE_GLOBAL_Z, "GLOBAL_Z", 0, "Global Z", ""},
- {PART_AVE_RAND, "RAND", 0, "Random", ""} ,
+ {PART_AVE_RAND, "RAND", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index b65924057cd..ceace424f35 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -736,9 +736,9 @@ static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cpro
static void rna_def_pose_channel(BlenderRNA *brna)
{
- static float default_quat[4] = {1,0,0,0}; /* default quaternion values */
- static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */
- static float default_scale[3] = {1,1,1}; /* default scale values */
+ static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */
+ static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */
+ static float default_scale[3] = {1, 1, 1}; /* default scale values */
const int matrix_dimsize[] = {4, 4};
@@ -1002,21 +1002,21 @@ static void rna_def_pose_channel(BlenderRNA *brna)
prop = RNA_def_property(srna, "ik_stretch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikstretch");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
prop = RNA_def_property(srna, "ik_rotation_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikrotweight");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "IK Rot Weight", "Weight of rotation constraint for IK");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop = RNA_def_property(srna, "ik_linear_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "iklinweight");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "IK Lin Weight", "Weight of scale constraint for IK");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
@@ -1133,13 +1133,13 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "precision", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "precision");
- RNA_def_property_range(prop, 0.0f,0.1f);
+ RNA_def_property_range(prop, 0.0f, 0.1f);
RNA_def_property_ui_text(prop, "Precision", "Precision of convergence in case of reiteration");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "numiter");
- RNA_def_property_range(prop, 1.f,1000.f);
+ RNA_def_property_range(prop, 1.f, 1000.f);
RNA_def_property_ui_text(prop, "Iterations",
"Maximum number of iterations for convergence in case of reiteration");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
@@ -1173,19 +1173,19 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "step_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minstep");
- RNA_def_property_range(prop, 0.0f,0.1f);
+ RNA_def_property_range(prop, 0.0f, 0.1f);
RNA_def_property_ui_text(prop, "Min step", "Lower bound for timestep in second in case of automatic substeps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop = RNA_def_property(srna, "step_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxstep");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Max step", "Higher bound for timestep in second in case of automatic substeps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
prop = RNA_def_property(srna, "feedback", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "feedback");
- RNA_def_property_range(prop, 0.0f,100.0f);
+ RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Feedback",
"Feedback coefficient for error correction, average response time is 1/feedback "
"(default=20)");
@@ -1193,7 +1193,7 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxvel");
- RNA_def_property_range(prop, 0.0f,100.0f);
+ RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Max Velocity", "Maximum joint velocity in rad/s (default=50)");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
@@ -1205,7 +1205,7 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "damping_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampmax");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damp",
"Maximum damping coefficient when singular value is nearly 0 "
"(higher values=more stability, less reactivity - default=0.5)");
@@ -1213,7 +1213,7 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
prop = RNA_def_property(srna, "damping_epsilon", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampeps");
- RNA_def_property_range(prop, 0.0f,1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Epsilon",
"Singular value under which damping is progressively applied "
"(higher values=more stability, less reactivity - default=0.1)");
diff --git a/source/blender/makesrna/intern/rna_pose_api.c b/source/blender/makesrna/intern/rna_pose_api.c
index 14f7b7c74f5..531a85edeea 100644
--- a/source/blender/makesrna/intern/rna_pose_api.c
+++ b/source/blender/makesrna/intern/rna_pose_api.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 3eac129a195..637e21cf6c5 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -109,7 +109,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* Base Struct for GameProperty */
srna = RNA_def_struct(brna, "GameProperty", NULL);
- RNA_def_struct_ui_text(srna , "Game Property", "Game engine user defined object property");
+ RNA_def_struct_ui_text(srna, "Game Property", "Game engine user defined object property");
RNA_def_struct_sdna(srna, "bProperty");
RNA_def_struct_refine_func(srna, "rna_GameProperty_refine");
@@ -132,7 +132,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameBooleanProperty */
srna = RNA_def_struct(brna, "GameBooleanProperty", "GameProperty");
- RNA_def_struct_ui_text(srna , "Game Boolean Property", "Game engine user defined Boolean property");
+ RNA_def_struct_ui_text(srna, "Game Boolean Property", "Game engine user defined Boolean property");
RNA_def_struct_sdna(srna, "bProperty");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -143,7 +143,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameIntProperty */
srna = RNA_def_struct(brna, "GameIntProperty", "GameProperty");
- RNA_def_struct_ui_text(srna , "Game Integer Property", "Game engine user defined integer number property");
+ RNA_def_struct_ui_text(srna, "Game Integer Property", "Game engine user defined integer number property");
RNA_def_struct_sdna(srna, "bProperty");
prop = RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 9ecbab76cbb..7247ee6f0e0 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -152,7 +152,7 @@ EnumPropertyItem snap_element_items[] = {
#ifdef WITH_CINEON
# define R_IMF_ENUM_CINEON {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", \
"Output image in Cineon format"},
-# define R_IMF_ENUM_DPX {R_IMF_IMTYPE_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
+# define R_IMF_ENUM_DPX {R_IMF_IMTYPE_DPX, "DPX", ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
#else
# define R_IMF_ENUM_CINEON
# define R_IMF_ENUM_DPX
@@ -1080,8 +1080,11 @@ static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSE
bNode *node;
if (ntree && scene->use_nodes) {
- /* XXX images are freed here, stop render and preview threads, until Image is threadsafe */
- WM_jobs_stop_all(bmain->wm.first);
+ /* images are freed here, stop render and preview threads, until
+ * Image is threadsafe. when we are changing this propery from a
+ * python script in the render thread, don't stop own thread */
+ if(BLI_thread_is_main())
+ WM_jobs_stop_all(bmain->wm.first);
for (node = ntree->nodes.first; node; node = node->next) {
if (ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_IMAGE)) {
@@ -1370,7 +1373,7 @@ static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value)
UnifiedPaintSettings* ups = ptr->data;
/* scale unprojected radius so it stays consistent with brush size */
- brush_scale_unprojected_radius(&ups->unprojected_radius,
+ BKE_brush_scale_unprojected_radius(&ups->unprojected_radius,
value, ups->size);
ups->size = value;
}
@@ -1380,7 +1383,7 @@ static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, flo
UnifiedPaintSettings* ups = ptr->data;
/* scale brush size so it stays consistent with unprojected_radius */
- brush_scale_size(&ups->size, value, ups->unprojected_radius);
+ BKE_brush_scale_size(&ups->size, value, ups->unprojected_radius);
ups->unprojected_radius = value;
}
@@ -1826,6 +1829,11 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Unified Strength",
"Instead of per-brush strength, the strength is shared across brushes");
+ prop = RNA_def_property(srna, "use_unified_weight", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_WEIGHT);
+ RNA_def_property_ui_text(prop, "Use Unified Weight",
+ "Instead of per-brush weight, the weight is shared across brushes");
+
/* unified paint settings that override the equivalent settings
* from the active brush */
prop = RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
@@ -1847,6 +1855,13 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied");
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "weight");
+ RNA_def_property_float_default(prop, 0.5f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
+ RNA_def_property_ui_text(prop, "Weight", "Weight to assign in vertex groups");
+
prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
@@ -1959,7 +1974,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- if(scene) {
+ if (scene) {
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Samples", "Override number of render samples for this render layer, 0 will use the scene setting");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -3333,7 +3348,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
{CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
{CODEC_ID_QTRLE, "QTRLE", 0, "QTRLE", ""},
- /* {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""},*/ /* disabled for after release */
+ /* {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""}, */ /* disabled for after release */
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem ffmpeg_audio_codec_items[] = {
@@ -4246,14 +4261,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
RNA_def_property_array(prop, 4);
- RNA_def_property_range(prop,0.0,1.0);
+ RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Text Color", "Color to use for stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
RNA_def_property_array(prop, 4);
- RNA_def_property_range(prop,0.0,1.0);
+ RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Background", "Color to use behind stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 08ed7625a01..c92a29cec3c 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -50,7 +50,7 @@
-static void rna_Scene_frame_set(Scene *scene, int frame, float subframe)
+void rna_Scene_frame_set(Scene *scene, int frame, float subframe)
{
scene->r.cfra = frame;
scene->r.subframe = subframe;
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 67a4bafb8ee..db43db273bd 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -111,10 +111,31 @@ static void rna_Area_type_set(PointerRNA *ptr, int value)
static void rna_Area_type_update(bContext *C, PointerRNA *ptr)
{
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win;
+ bScreen *sc = (bScreen*)ptr->id.data;
ScrArea *sa = (ScrArea*)ptr->data;
- ED_area_newspace(C, sa, sa->butspacetype); /* XXX - this uses the window */
- ED_area_tag_redraw(sa);
+ /* XXX this call still use context, so we trick it to work in the right context */
+ for(win=wm->windows.first; win; win=win->next) {
+ if(sc == win->screen) {
+ wmWindow *prevwin = CTX_wm_window(C);
+ ScrArea *prevsa = CTX_wm_area(C);
+ ARegion *prevar = CTX_wm_region(C);
+
+ CTX_wm_window_set(C, win);
+ CTX_wm_area_set(C, sa);
+ CTX_wm_region_set(C, NULL);
+
+ ED_area_newspace(C, sa, sa->butspacetype);
+ ED_area_tag_redraw(sa);
+
+ CTX_wm_window_set(C, prevwin);
+ CTX_wm_area_set(C, prevsa);
+ CTX_wm_region_set(C, prevar);
+ break;
+ }
+ }
}
#else
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index ff336ba6693..8bed95f88b2 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -369,7 +369,7 @@ static void rna_def_near_sensor(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "NearSensor", "Sensor");
- RNA_def_struct_ui_text(srna , "Near Sensor", "Sensor to detect nearby objects");
+ RNA_def_struct_ui_text(srna, "Near Sensor", "Sensor to detect nearby objects");
RNA_def_struct_sdna_from(srna, "bNearSensor", "data");
prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 7fecbb83fa5..775e943b9a2 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1046,7 +1046,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip after the handles are applied");
- RNA_def_property_int_funcs(prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set",NULL);
+ RNA_def_property_int_funcs(prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set", NULL);
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -1061,7 +1061,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Start Frame", "");
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set",NULL); /* overlap tests and calc_seq_disp */
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set", NULL); /* overlap tests and calc_seq_disp */
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -1116,7 +1116,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "machine");
RNA_def_property_range(prop, 0, MAXSEQ-1);
RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set",NULL); /* overlap test */
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set", NULL); /* overlap test */
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
/* blending */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 8d4b5a32969..51f5cdcda85 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1024,8 +1024,9 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C,
static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr, PointerRNA value)
{
SpaceClip *sc = (SpaceClip*)(ptr->data);
+ bScreen *screen = (bScreen*)ptr->id.data;
- ED_space_clip_set(NULL, sc, (MovieClip*)value.data);
+ ED_space_clip_set(NULL, screen, sc, (MovieClip*)value.data);
}
static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -2612,7 +2613,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FILE_HIDE_DOT);
RNA_def_property_ui_text(prop, "Show Hidden", "Show hidden dot files");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS , NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
prop = RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sort");
@@ -2930,6 +2931,13 @@ static void rna_def_space_clip(BlenderRNA *brna)
static EnumPropertyItem view_items[] = {
{SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"},
{SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"},
+ {SC_VIEW_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dopesheet", "Dopesheet view for tracking data"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem dope_sort_items[] = {
+ {SC_DOPE_SORT_NAME, "NAME", 0, "Name", "Sort channels by their names"},
+ {SC_DOPE_SORT_LONGEST, "LONGEST", 0, "Longest", "Sort channels by longest tracked segment"},
+ {SC_DOPE_SORT_TOTAL, "TOTAL", 0, "Total", "Sort channels by overall amount of tracked segments"},
{0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "SpaceClipEditor", "Space");
@@ -3104,6 +3112,27 @@ static void rna_def_space_clip(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "postproc_flag", MOVIECLIP_PREVIEW_GRAYSCALE);
RNA_def_property_ui_text(prop, "Grayscale", "Display frame in grayscale mode");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
+
+ /* timeline */
+ prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_SECONDS);
+ RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
+ RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
+
+ /* ** dopesheet ** */
+
+ /* dopesheet sort */
+ prop = RNA_def_property(srna, "dopesheet_sort_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "dope_sort");
+ RNA_def_property_enum_items(prop, dope_sort_items);
+ RNA_def_property_ui_text(prop, "Dopesheet Sort Field", "Method to be used to sort channels in dopesheet view");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
+
+ /* invert_dopesheet_sort */
+ prop = RNA_def_property(srna, "invert_dopesheet_sort", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "dope_flag", SC_DOPE_SORT_INVERSE);
+ RNA_def_property_ui_text(prop, "Invert Dopesheet Sort", "Invert sort order of dopesheet channels");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_test.c b/source/blender/makesrna/intern/rna_test.c
index 8bc545f34b7..1f5a4ff7f92 100644
--- a/source/blender/makesrna/intern/rna_test.c
+++ b/source/blender/makesrna/intern/rna_test.c
@@ -57,7 +57,7 @@
(void)0
#define DEF_GET_SET(type, arr) \
- void rna_Test_ ## arr ## _get(PointerRNA * ptr, type * values) \
+ void rna_Test_ ## arr ## _get(PointerRNA * ptr, type * values) \
{ \
memcpy(values, arr, sizeof(arr)); \
} \
@@ -69,7 +69,7 @@
(void)0
#define DEF_GET_SET_LEN(arr, max) \
- static int rna_Test_ ## arr ## _get_length(PointerRNA * ptr) \
+ static int rna_Test_ ## arr ## _get_length(PointerRNA * ptr) \
{ \
return arr ## _len; \
} \
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index c314e9be0ba..e8253f4b51c 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -92,7 +92,7 @@ EnumPropertyItem blend_type_items[] = {
{MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
{MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
{MTEX_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
- {MTEX_LIN_LIGHT , "LINEAR_LIGHT", 0, "Linear Light", ""},
+ {MTEX_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -1558,19 +1558,19 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
static EnumPropertyItem point_source_items[] = {
{TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"},
{TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"},
- /*{TEX_PD_FILE, "FILE", 0 , "File", ""}, */
+ /*{TEX_PD_FILE, "FILE", 0, "File", ""}, */
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem particle_cache_items[] = {
{TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Emit Object Location", ""},
{TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Emit Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
+ {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem vertice_cache_items[] = {
{TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Object Location", ""},
{TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
+ {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem falloff_items[] = {
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index 034696b43c5..b801dbb4fed 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -103,18 +103,18 @@ void RNA_api_environment_map(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- static const float default_layout[] = { 0,0, 1,0, 2,0, 0,1, 1,1, 2,1 };
+ static const float default_layout[] = {0, 0, 1, 0, 2, 0, 0, 1, 1, 1, 2, 1};
func = RNA_def_function(srna, "clear", "clear_envmap");
RNA_def_function_ui_description(func, "Discard the environment map and free it from memory");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func = RNA_def_function(srna,"save", "save_envmap");
+ func = RNA_def_function(srna, "save", "save_envmap");
RNA_def_function_ui_description(func, "Save the environment map to disc using the scene render settings");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm = RNA_def_string_file_name(func,"filepath","",FILE_MAX,"File path","Location of the output file");
+ parm = RNA_def_string_file_name(func, "filepath", "", FILE_MAX, "File path", "Location of the output file");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken");
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 85adf524717..5eb4e2190e4 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -265,7 +265,7 @@ static void rna_trackingCamera_focal_mm_set(PointerRNA *ptr, float value)
if (clip->lastsize[0])
value = clip->lastsize[0]*value/camera->sensor_width;
- if (value >= 0.0001)
+ if (value >= 0.0001f)
camera->focal = value;
}
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 2066799194f..83424a16b03 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -155,7 +155,7 @@ static void rna_userdef_gl_use_16bit_textures(Main *bmain, Scene *scene, Pointer
rna_userdef_update(bmain, scene, ptr);
}
-static void rna_userdef_select_mouse_set(PointerRNA *ptr,int value)
+static void rna_userdef_select_mouse_set(PointerRNA *ptr, int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -178,7 +178,7 @@ static int rna_userdef_autokeymode_get(PointerRNA *ptr)
return retval;
}
-static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value)
+static void rna_userdef_autokeymode_set(PointerRNA *ptr, int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -2007,6 +2007,7 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for the Movie Clip Editor");
rna_def_userdef_theme_spaces_main(srna);
+ rna_def_userdef_theme_spaces_list_main(srna);
prop = RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "marker_outline");
@@ -2081,6 +2082,18 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "strip");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Strips", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "strip_select");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Strips Selected", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_themes(BlenderRNA *brna)
@@ -2864,7 +2877,7 @@ 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: 30 (turkish). */
+ * here is the highest define currently in use: 31 (Hungarian). */
static EnumPropertyItem language_items[] = {
{ 0, "", 0, N_("Nearly done"), ""},
{ 0, "DEFAULT", 0, "Default (Default)", ""},
@@ -2882,20 +2895,21 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{10, "CATALAN", 0, "Catalan (Català)", "ca_AD"},
{16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"},
{11, "CZECH", 0, "Czech (Český)", "cs_CZ"},
-/* { 3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},*/ /* XXX No po's yet. */
+/* { 3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"}, */ /* XXX No po's yet. */
{ 6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
{ 5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
{23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
+ {31, "HUNGARIAN", 0, "Hungarian (magyar)", "hu_HU"},
{27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
{ 2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"},
{29, "KYRGYZ", 0, "Kyrgyz (Кыргыз тили)", "ky_KG"},
-/* {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},*/ /* XXX No po's yet. */
+/* {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"}, */ /* XXX No po's yet. */
{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},
/* using the utf8 flipped form of Persian (فارسی) */
{26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_IR"},
{19, "POLISH", 0, "Polish (Polski)", "pl_PL"},
{12, "BRAZILIAN_PORTUGUESE", 0, "Portuguese (Português)", "pt"},
-/* {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"},*/ /* XXX No po's yet. */
+/* {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"}, */ /* XXX No po's yet. */
{17, "SERBIAN", 0, "Serbian (Српски)", "sr_RS"},
{28, "SERBIAN_LATIN", 0, "Serbian latin (Srpski latinica)", "sr_RS@latin"},
{ 7, "SWEDISH", 0, "Swedish (Svenska)", "sv_SE"},
diff --git a/source/blender/makesrna/rna_cleanup/rna_cleaner.py b/source/blender/makesrna/rna_cleanup/rna_cleaner.py
index ca610eeb024..b75d177d809 100755
--- a/source/blender/makesrna/rna_cleanup/rna_cleaner.py
+++ b/source/blender/makesrna/rna_cleanup/rna_cleaner.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python3
+#!/usr/bin/env python3.2
"""
This script is used to help cleaning RNA api.
diff --git a/source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py b/source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py
index 89d95b5a627..75851105991 100755
--- a/source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py
+++ b/source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python3
+#!/usr/bin/env python3.2
import sys