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-12 02:48:41 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-05-12 02:48:41 +0400
commit8925ed1420ea2557abc7867cf12f89730ef77718 (patch)
tree67a95fd12253de438e1bdb30bf6c90af2ff12d7f /source/blender/makesrna
parentbf2fac79d407a1d8c0e5727cc644d98eef60a965 (diff)
parent1c0c2f4d0bd6556a3dd7293ddbd419a066e745f4 (diff)
Merged changes in the trunk up to revision 46557.
Conflicts resolved: source/blender/blenkernel/intern/material.c source/blender/blenkernel/intern/subsurf_ccg.c source/blender/blenloader/intern/readfile.c source/blender/editors/animation/anim_channels_defines.c source/blender/makesrna/intern/rna_scene.c Additional changes: * Fix for recent changes of BKE_* function renaming. * Fix for an "attempt to free NULL pointer" in BlenderStrokeRenderer::RenderStrokeRepBasic().
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h5
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_access.c20
-rw-r--r--source/blender/makesrna/intern/rna_animation.c6
-rw-r--r--source/blender/makesrna/intern/rna_armature.c26
-rw-r--r--source/blender/makesrna/intern/rna_brush.c209
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c4
-rw-r--r--source/blender/makesrna/intern/rna_curve.c6
-rw-r--r--source/blender/makesrna/intern/rna_image.c2
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal.h6
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c4
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c10
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c82
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c24
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_meta.c4
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c1
-rw-r--r--source/blender/makesrna/intern/rna_nla.c2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c151
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_object.c36
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c36
-rw-r--r--source/blender/makesrna/intern/rna_pose.c14
-rw-r--r--source/blender/makesrna/intern/rna_scene.c882
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c17
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c633
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c466
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
-rw-r--r--source/blender/makesrna/intern/rna_text_api.c4
30 files changed, 1668 insertions, 993 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index acd375d15a9..cf4c8a4c394 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -384,10 +384,10 @@ extern StructRNA RNA_NlaTrack;
extern StructRNA RNA_Node;
extern StructRNA RNA_NodeForLoop;
extern StructRNA RNA_NodeGroup;
-extern StructRNA RNA_NodeImageFileSocket;
+extern StructRNA RNA_NodeOutputFileSlotFile;
+extern StructRNA RNA_NodeOutputFileSlotLayer;
extern StructRNA RNA_NodeLink;
extern StructRNA RNA_NodeSocket;
-extern StructRNA RNA_NodeSocketPanel;
extern StructRNA RNA_NodeTree;
extern StructRNA RNA_NodeWhileLoop;
extern StructRNA RNA_NoiseTexture;
@@ -916,6 +916,7 @@ int RNA_enum_is_equal(struct bContext *C, PointerRNA *ptr, const char *name, con
int RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value);
int RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **identifier);
int RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *icon);
+int RNA_enum_name_from_value(EnumPropertyItem *item, int value, const char **name);
void RNA_string_get(PointerRNA *ptr, const char *name, char *value);
char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen);
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 1669972320d..e5b2d38de53 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -272,7 +272,7 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag)
if (ob->type == OB_FONT) {
Curve *cu = ob->data;
freedisplist(&cu->disp);
- BKE_text_to_curve(sce, ob, CU_LEFT);
+ BKE_vfont_to_curve(sce, ob, CU_LEFT);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 73e046f0d63..573d7216114 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1853,6 +1853,8 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
IDPropertyTemplate val = {0};
IDProperty *group;
+ RNA_property_int_clamp(ptr, prop, &value);
+
val.i = value;
group = RNA_struct_idprops(ptr, 1);
@@ -1970,6 +1972,8 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
IDPropertyTemplate val = {0};
IDProperty *group;
+ /* TODO: RNA_property_int_clamp_array(ptr, prop, &value); */
+
val.array.len = prop->totarraylength;
val.array.type = IDP_INT;
@@ -2093,6 +2097,8 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
IDPropertyTemplate val = {0};
IDProperty *group;
+ RNA_property_float_clamp(ptr, prop, &value);
+
val.f = value;
group = RNA_struct_idprops(ptr, 1);
@@ -2228,6 +2234,8 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
IDPropertyTemplate val = {0};
IDProperty *group;
+ /* TODO: RNA_property_float_clamp_array(ptr, prop, &value); */
+
val.array.len = prop->totarraylength;
val.array.type = IDP_FLOAT;
@@ -4332,6 +4340,18 @@ int RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *icon)
return 0;
}
+int RNA_enum_name_from_value(EnumPropertyItem *item, int value, const char **name)
+{
+ for( ; item->identifier; item++) {
+ if(item->value==value) {
+ *name = item->name;
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
{
PropertyRNA *prop = RNA_struct_find_property(ptr, name);
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 94ea79099c2..7f52456355c 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -201,7 +201,7 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain, ReportList *reports, v
}
/* check if we have registered this info before, and remove it */
- ksi = ANIM_keyingset_info_find_named(dummyksi.idname);
+ ksi = ANIM_keyingset_info_find_name(dummyksi.idname);
if (ksi && ksi->ext.srna)
rna_KeyingSetInfo_unregister(bmain, ksi->ext.srna);
@@ -337,7 +337,7 @@ static PointerRNA rna_KeyingSet_typeinfo_get(PointerRNA *ptr)
/* keying set info is only for builtin Keying Sets */
if ((ks->flag & KEYINGSET_ABSOLUTE) == 0)
- ksi = ANIM_keyingset_info_find_named(ks->typeinfo);
+ ksi = ANIM_keyingset_info_find_name(ks->typeinfo);
return rna_pointer_inherit_refine(ptr, &RNA_KeyingSetInfo, ksi);
}
@@ -837,7 +837,7 @@ void rna_def_animdata(BlenderRNA *brna)
/* Active Action */
prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
/* this flag as well as the dynamic test must be defined for this to be editable... */
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_REFCOUNT);
RNA_def_property_pointer_funcs(prop, NULL, "rna_AnimData_action_set", NULL, "rna_Action_id_poll");
RNA_def_property_editable_func(prop, "rna_AnimData_action_editable");
RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock");
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 79b776572cf..c97a4751135 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -894,7 +894,7 @@ static void rna_def_armature(BlenderRNA *brna)
prop = RNA_def_property(srna, "deform_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gevertdeformer");
RNA_def_property_enum_items(prop, prop_vdeformer);
- RNA_def_property_ui_text(prop, "Vertex Deformer", "");
+ RNA_def_property_ui_text(prop, "Vertex Deformer", "Vertex Deformer Method (Game Engine only)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
@@ -973,30 +973,6 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* XXX depreceated ....... old animviz for armatures only */
-
- /* deformflag */
- prop = RNA_def_property(srna, "use_deform_vertex_groups", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
- RNA_def_property_ui_text(prop, "Deform Vertex Groups", "Enable Vertex Groups when defining deform");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
- prop = RNA_def_property(srna, "use_deform_envelopes", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
- RNA_def_property_ui_text(prop, "Deform Envelopes", "Enable Bone Envelopes when defining deform");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
- prop = RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
- RNA_def_property_ui_text(prop, "Use Dual Quaternion Deformation", "Enable deform rotation with Quaternions");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
-#if 0
- prop = RNA_def_property(srna, "deform_invert_vertexgroups", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
- RNA_def_property_ui_text(prop, "Invert Vertex Group Influence",
- "Invert Vertex Group influence (only for Modifiers)");
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-#endif
/* Number fields */
/* XXX depreceated ....... old animviz for armatures only */
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index ee4b34508d1..893dd7a9707 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -46,7 +46,8 @@
static EnumPropertyItem prop_direction_items[] = {
{0, "ADD", 0, "Add", "Add effect of brush"},
{BRUSH_DIR_IN, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""},
@@ -59,6 +60,7 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_GRAB, "GRAB", ICON_BRUSH_GRAB, "Grab", ""},
{SCULPT_TOOL_INFLATE, "INFLATE", ICON_BRUSH_INFLATE, "Inflate", ""},
{SCULPT_TOOL_LAYER, "LAYER", ICON_BRUSH_LAYER, "Layer", ""},
+ {SCULPT_TOOL_MASK, "MASK", ICON_BRUSH_MASK, "Mask", ""},
{SCULPT_TOOL_NUDGE, "NUDGE", ICON_BRUSH_NUDGE, "Nudge", ""},
{SCULPT_TOOL_PINCH, "PINCH", ICON_BRUSH_PINCH, "Pinch", ""},
{SCULPT_TOOL_ROTATE, "ROTATE", ICON_BRUSH_ROTATE, "Rotate", ""},
@@ -66,7 +68,8 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_SMOOTH, "SMOOTH", ICON_BRUSH_SMOOTH, "Smooth", ""},
{SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", ICON_BRUSH_SNAKE_HOOK, "Snake Hook", ""},
{SCULPT_TOOL_THUMB, "THUMB", ICON_BRUSH_THUMB, "Thumb", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem brush_vertex_tool_items[] = {
@@ -77,14 +80,16 @@ EnumPropertyItem brush_vertex_tool_items[] = {
{PAINT_BLEND_BLUR, "BLUR", ICON_BRUSH_BLUR, "Blur", "Blur the color with surrounding values"},
{PAINT_BLEND_LIGHTEN, "LIGHTEN", ICON_BRUSH_LIGHTEN, "Lighten", "Use lighten blending mode while painting"},
{PAINT_BLEND_DARKEN, "DARKEN", ICON_BRUSH_DARKEN, "Darken", "Use darken blending mode while painting"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem brush_image_tool_items[] = {
{PAINT_TOOL_DRAW, "DRAW", ICON_BRUSH_TEXDRAW, "Draw", ""},
{PAINT_TOOL_SOFTEN, "SOFTEN", ICON_BRUSH_SOFTEN, "Soften", ""},
{PAINT_TOOL_SMEAR, "SMEAR", ICON_BRUSH_SMEAR, "Smear", ""},
{PAINT_TOOL_CLONE, "CLONE", ICON_BRUSH_CLONE, "Clone", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
#ifdef RNA_RUNTIME
@@ -103,116 +108,117 @@ EnumPropertyItem brush_image_tool_items[] = {
static int rna_SculptCapabilities_has_accumulate_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return ELEM6(br->sculpt_tool,
- SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CREASE,
- SCULPT_TOOL_DRAW, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER);
+ SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CREASE,
+ SCULPT_TOOL_DRAW, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER);
}
static int rna_SculptCapabilities_has_auto_smooth_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
- return br->sculpt_tool != SCULPT_TOOL_SMOOTH;
+ Brush *br = (Brush *)ptr->data;
+ return !ELEM(br->sculpt_tool, SCULPT_TOOL_MASK, SCULPT_TOOL_SMOOTH);
}
static int rna_SculptCapabilities_has_height_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return br->sculpt_tool == SCULPT_TOOL_LAYER;
}
static int rna_SculptCapabilities_has_jitter_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return (!(br->flag & BRUSH_ANCHORED) &&
- !(br->flag & BRUSH_RESTORE_MESH) &&
- !ELEM4(br->sculpt_tool,
- SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
- SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
+ !(br->flag & BRUSH_RESTORE_MESH) &&
+ !ELEM4(br->sculpt_tool,
+ SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
+ SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
}
static int rna_SculptCapabilities_has_normal_weight_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return ELEM(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK);
}
static int rna_SculptCapabilities_has_persistence_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return br->sculpt_tool == SCULPT_TOOL_LAYER;
}
static int rna_SculptCapabilities_has_pinch_factor_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return ELEM(br->sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_CREASE);
}
static int rna_SculptCapabilities_has_plane_offset_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return ELEM5(br->sculpt_tool, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS,
- SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_SCRAPE);
+ SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_SCRAPE);
}
static int rna_SculptCapabilities_has_random_texture_angle_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return ((br->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) &&
- !(br->flag & BRUSH_ANCHORED) &&
- !ELEM4(br->sculpt_tool,
- SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
- SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
+ !(br->flag & BRUSH_ANCHORED) &&
+ !ELEM4(br->sculpt_tool,
+ SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
+ SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
}
static int rna_SculptCapabilities_has_sculpt_plane_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
- return !ELEM3(br->sculpt_tool, SCULPT_TOOL_INFLATE, SCULPT_TOOL_PINCH,
- SCULPT_TOOL_SMOOTH);
+ Brush *br = (Brush *)ptr->data;
+ return !ELEM4(br->sculpt_tool, SCULPT_TOOL_INFLATE,
+ SCULPT_TOOL_MASK, SCULPT_TOOL_PINCH,
+ SCULPT_TOOL_SMOOTH);
}
static int rna_SculptCapabilities_has_secondary_color_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return ELEM10(br->sculpt_tool,
- SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS,
- SCULPT_TOOL_CREASE, SCULPT_TOOL_DRAW, SCULPT_TOOL_FILL,
- SCULPT_TOOL_FLATTEN, SCULPT_TOOL_INFLATE, SCULPT_TOOL_PINCH,
- SCULPT_TOOL_SCRAPE);
+ SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS,
+ SCULPT_TOOL_CREASE, SCULPT_TOOL_DRAW, SCULPT_TOOL_FILL,
+ SCULPT_TOOL_FLATTEN, SCULPT_TOOL_INFLATE, SCULPT_TOOL_PINCH,
+ SCULPT_TOOL_SCRAPE);
}
static int rna_SculptCapabilities_has_smooth_stroke_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return (!(br->flag & BRUSH_ANCHORED) &&
- !(br->flag & BRUSH_RESTORE_MESH) &&
- !ELEM4(br->sculpt_tool,
- SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
- SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
+ !(br->flag & BRUSH_RESTORE_MESH) &&
+ !ELEM4(br->sculpt_tool,
+ SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
+ SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
}
static int rna_SculptCapabilities_has_space_attenuation_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return ((br->flag & BRUSH_SPACE) &&
- !ELEM4(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
- SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK));
+ !ELEM4(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
+ SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK));
}
static int rna_SculptCapabilities_has_spacing_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return (!(br->flag & BRUSH_ANCHORED) &&
- !ELEM4(br->sculpt_tool,
- SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
- SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
+ !ELEM4(br->sculpt_tool,
+ SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
+ SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
}
static int rna_SculptCapabilities_has_strength_get(PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
return !ELEM(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK);
}
@@ -238,35 +244,35 @@ static void rna_Brush_reset_icon(Brush *br, const char *UNUSED(type))
static void rna_Brush_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
- WM_main_add_notifier(NC_BRUSH|NA_EDITED, br);
+ Brush *br = (Brush *)ptr->data;
+ WM_main_add_notifier(NC_BRUSH | NA_EDITED, br);
/*WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, NULL); */
}
static void rna_Brush_sculpt_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
rna_Brush_reset_icon(br, "sculpt");
rna_Brush_update(bmain, scene, ptr);
}
static void rna_Brush_vertex_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
rna_Brush_reset_icon(br, "vertex_paint");
rna_Brush_update(bmain, scene, ptr);
}
static void rna_Brush_imagepaint_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
rna_Brush_reset_icon(br, "image_paint");
rna_Brush_update(bmain, scene, ptr);
}
static void rna_Brush_icon_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Brush *br = (Brush*)ptr->data;
+ Brush *br = (Brush *)ptr->data;
if (br->icon_imbuf) {
IMB_freeImBuf(br->icon_imbuf);
@@ -280,22 +286,22 @@ static void rna_Brush_icon_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
BKE_icon_changed(BKE_icon_getid(&br->id));
}
- WM_main_add_notifier(NC_BRUSH|NA_EDITED, br);
+ WM_main_add_notifier(NC_BRUSH | NA_EDITED, br);
}
static void rna_Brush_set_size(PointerRNA *ptr, int value)
{
- Brush* brush = ptr->data;
+ Brush *brush = ptr->data;
/* scale unprojected radius so it stays consistent with brush size */
BKE_brush_scale_unprojected_radius(&brush->unprojected_radius,
- value, brush->size);
+ value, brush->size);
brush->size = value;
}
static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value)
{
- Brush* brush = ptr->data;
+ Brush *brush = ptr->data;
/* scale brush size so it stays consistent with unprojected_radius */
BKE_brush_scale_size(&brush->size, value, brush->unprojected_radius);
@@ -306,34 +312,40 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *UNUSED(C), PointerR
PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
static EnumPropertyItem prop_default_items[] = {
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem prop_flatten_contrast_items[] = {
{0, "FLATTEN", 0, "Flatten", "Add effect of brush"},
{BRUSH_DIR_IN, "CONTRAST", 0, "Contrast", "Subtract effect of brush"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem prop_fill_deepen_items[] = {
{0, "FILL", 0, "Fill", "Add effect of brush"},
{BRUSH_DIR_IN, "DEEPEN", 0, "Deepen", "Subtract effect of brush"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem prop_scrape_peaks_items[] = {
{0, "SCRAPE", 0, "Scrape", "Add effect of brush"},
{BRUSH_DIR_IN, "PEAKS", 0, "Peaks", "Subtract effect of brush"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem prop_pinch_magnify_items[] = {
{0, "PINCH", 0, "Pinch", "Add effect of brush"},
{BRUSH_DIR_IN, "MAGNIFY", 0, "Magnify", "Subtract effect of brush"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem prop_inflate_deflate_items[] = {
{0, "INFLATE", 0, "Inflate", "Add effect of brush"},
{BRUSH_DIR_IN, "DEFLATE", 0, "Deflate", "Subtract effect of brush"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
- Brush *me = (Brush*)(ptr->data);
+ Brush *me = (Brush *)(ptr->data);
switch (me->sculpt_tool) {
case SCULPT_TOOL_DRAW:
@@ -343,6 +355,16 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *UNUSED(C), PointerR
case SCULPT_TOOL_CLAY:
return prop_direction_items;
+ case SCULPT_TOOL_MASK:
+ switch ((BrushMaskTool)me->mask_tool) {
+ case BRUSH_MASK_DRAW:
+ return prop_direction_items;
+ break;
+ case BRUSH_MASK_SMOOTH:
+ return prop_default_items;
+ break;
+ }
+
case SCULPT_TOOL_FLATTEN:
return prop_flatten_contrast_items;
@@ -374,7 +396,8 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
{MTEX_MAP_MODE_FIXED, "FIXED", 0, "Fixed", ""},
{MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
{MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "BrushTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
@@ -382,7 +405,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "rot");
- RNA_def_property_range(prop, 0, M_PI*2);
+ RNA_def_property_range(prop, 0, M_PI * 2);
RNA_def_property_ui_text(prop, "Angle", "Brush texture rotation");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
@@ -402,15 +425,15 @@ static void rna_def_sculpt_capabilities(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "Brush");
RNA_def_struct_nested(brna, srna, "Brush");
RNA_def_struct_ui_text(srna, "Sculpt Capabilities",
- "Read-only indications of which brush operations "
- "are supported by the current sculpt tool");
-
-#define BRUSH_CAPABILITY(prop_name_, ui_name_) \
- prop = RNA_def_property(srna, #prop_name_, \
- PROP_BOOLEAN, PROP_NONE); \
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
- RNA_def_property_boolean_funcs(prop, "rna_SculptCapabilities_" \
- #prop_name_ "_get", NULL); \
+ "Read-only indications of which brush operations "
+ "are supported by the current sculpt tool");
+
+#define BRUSH_CAPABILITY(prop_name_, ui_name_) \
+ prop = RNA_def_property(srna, #prop_name_, \
+ PROP_BOOLEAN, PROP_NONE); \
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
+ RNA_def_property_boolean_funcs(prop, "rna_SculptCapabilities_" \
+ #prop_name_ "_get", NULL); \
RNA_def_property_ui_text(prop, ui_name_, NULL)
BRUSH_CAPABILITY(has_accumulate, "Has Accumulate");
@@ -446,7 +469,8 @@ static void rna_def_brush(BlenderRNA *brna)
{IMB_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use darken blending mode while painting"},
{IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting"},
{IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem brush_stroke_method_items[] = {
{0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
@@ -454,18 +478,21 @@ static void rna_def_brush(BlenderRNA *brna)
{BRUSH_SPACE, "SPACE", 0, "Space", "Limit brush application to the distance specified by spacing"},
{BRUSH_ANCHORED, "ANCHORED", 0, "Anchored", "Keep the brush anchored to the initial location"},
{BRUSH_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", "Keep applying paint effect while holding mouse (spray)"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem texture_angle_source_items[] = {
{0, "USER", 0, "User", "Rotate the brush texture by given angle"},
{BRUSH_RAKE, "RAKE", 0, "Rake", "Rotate the brush texture to match the stroke direction"},
{BRUSH_RANDOM_ROTATION, "RANDOM", 0, "Random", "Rotate the brush texture at random"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem texture_angle_source_no_random_items[] = {
{0, "USER", 0, "User", "Rotate the brush texture by given angle"},
{BRUSH_RAKE, "RAKE", 0, "Rake", "Rotate the brush texture to match the stroke direction"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem brush_sculpt_plane_items[] = {
{SCULPT_DISP_DIR_AREA, "AREA", 0, "Area Plane", ""},
@@ -473,7 +500,14 @@ static void rna_def_brush(BlenderRNA *brna)
{SCULPT_DISP_DIR_X, "X", 0, "X Plane", ""},
{SCULPT_DISP_DIR_Y, "Y", 0, "Y Plane", ""},
{SCULPT_DISP_DIR_Z, "Z", 0, "Z Plane", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ static EnumPropertyItem brush_mask_tool_items[] = {
+ {BRUSH_MASK_DRAW, "DRAW", 0, "Draw", ""},
+ {BRUSH_MASK_SMOOTH, "SMOOTH", 0, "Smooth", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "Brush", "ID");
RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting");
@@ -500,7 +534,7 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "imagepaint_tool");
RNA_def_property_enum_items(prop, brush_image_tool_items);
RNA_def_property_ui_text(prop, "Image Paint Tool", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_imagepaint_tool_update");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_Brush_imagepaint_tool_update");
prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
@@ -531,11 +565,16 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_enum_items(prop, brush_sculpt_plane_items);
RNA_def_property_ui_text(prop, "Sculpt Plane", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+
+ prop = RNA_def_property(srna, "mask_tool", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, brush_mask_tool_items);
+ RNA_def_property_ui_text(prop, "Mask Tool", "");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
/* number values */
prop = RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
RNA_def_property_int_funcs(prop, NULL, "rna_Brush_set_size", NULL);
- RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS*10);
+ RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS * 10);
RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, 0);
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
RNA_def_property_update(prop, 0, "rna_Brush_update");
@@ -638,7 +677,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "crease_pinch_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_pinch_factor");
- RNA_def_property_float_default(prop, 2.0f/3.0f);
+ RNA_def_property_float_default(prop, 2.0f / 3.0f);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Crease Brush Pinch Factor", "How much the crease brush pinches");
RNA_def_property_update(prop, 0, "rna_Brush_update");
@@ -863,19 +902,19 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "clone.image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Clone Image", "Image for clone tool");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_Brush_update");
prop = RNA_def_property(srna, "clone_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clone.alpha");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clone Alpha", "Opacity of clone image display");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_Brush_update");
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_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_Brush_update");
/* brush capabilities (mode-dependent) */
prop = RNA_def_property(srna, "sculpt_capabilities", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index e321e83dd61..b812c574a01 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -562,7 +562,7 @@ static void rna_def_constraint_python(BlenderRNA *brna)
prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Script", "The text object that contains the Python script");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_REFCOUNT);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "use_targets", PROP_BOOLEAN, PROP_NONE);
@@ -1097,7 +1097,7 @@ static void rna_def_constraint_action(BlenderRNA *brna)
prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_ui_text(prop, "Action", "The constraining action");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_REFCOUNT);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index a62ee6d78d1..96ec37d8fa0 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -205,7 +205,7 @@ static void rna_Curve_texspace_set(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
Curve *cu = (Curve*)ptr->data;
if (cu->texflag & CU_AUTOSPACE)
- BKE_curve_tex_space_calc(cu);
+ BKE_curve_texspace_calc(cu);
}
static int rna_Curve_texspace_editable(PointerRNA *ptr)
@@ -219,7 +219,7 @@ static void rna_Curve_texspace_loc_get(PointerRNA *ptr, float *values)
Curve *cu = (Curve *)ptr->data;
if (!cu->bb)
- BKE_curve_tex_space_calc(cu);
+ BKE_curve_texspace_calc(cu);
copy_v3_v3(values, cu->loc);
}
@@ -236,7 +236,7 @@ static void rna_Curve_texspace_size_get(PointerRNA *ptr, float *values)
Curve *cu = (Curve *)ptr->data;
if (!cu->bb)
- BKE_curve_tex_space_calc(cu);
+ BKE_curve_texspace_calc(cu);
copy_v3_v3(values, cu->size);
}
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index f7e7435598b..7052bfa8225 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -134,7 +134,7 @@ static void rna_ImageUser_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *
{
ImageUser *iuser = ptr->data;
- BKE_image_user_calc_frame(iuser, scene->r.cfra, 0);
+ BKE_image_user_frame_calc(iuser, scene->r.cfra, 0);
}
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index ff717635250..84321809ae9 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -85,7 +85,7 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
const float dither_back = ibuf->dither;
ibuf->planes = scene->r.im_format.planes;
ibuf->dither = scene->r.dither_intensity;
- if (!BKE_write_ibuf(ibuf, path, &scene->r.im_format)) {
+ if (!BKE_imbuf_write(ibuf, path, &scene->r.im_format)) {
BKE_reportf(reports, RPT_ERROR, "Couldn't write image: %s", path);
}
ibuf->planes = imb_planes_back;
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 493b246e8d7..62feda4053b 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -205,7 +205,7 @@ void rna_PropertyGroup_unregister(struct Main *bmain, struct StructRNA *type);
struct StructRNA *rna_PropertyGroup_register(struct Main *bmain, struct ReportList *reports, void *data,
const char *identifier, StructValidateFunc validate,
StructCallbackFunc call, StructFreeFunc free);
-struct StructRNA* rna_PropertyGroup_refine(struct PointerRNA *ptr);
+struct StructRNA *rna_PropertyGroup_refine(struct PointerRNA *ptr);
void rna_object_vgroup_name_index_get(struct PointerRNA *ptr, char *value, int index);
int rna_object_vgroup_name_index_length(struct PointerRNA *ptr, int index);
@@ -268,6 +268,8 @@ void RNA_api_controller(struct StructRNA *srna);
void RNA_api_actuator(struct StructRNA *srna);
void RNA_api_texture(struct StructRNA *srna);
void RNA_api_environment_map(struct StructRNA *srna);
+void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop);
+void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop);
/* main collection functions */
void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop);
@@ -343,7 +345,7 @@ PointerRNA rna_listbase_lookup_int(PointerRNA *ptr, StructRNA *type, struct List
typedef struct ArrayIterator {
char *ptr;
- char *endptr; /* past the last valid pointer, only for comparisons, ignores skipped values */
+ char *endptr; /* past the last valid pointer, only for comparisons, ignores skipped values */
void *free_ptr; /* will be freed if set */
int itemsize;
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index fef362c8f10..e1cb714c68d 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -507,8 +507,8 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
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"},
+ {4, "BUFFERS_4", 0, "4", "Render 4 buffers for better AA, this quadruples memory usage"},
+ {9, "BUFFERS_9", 0, "9", "Render 9 buffers for better AA, this uses nine times more memory"},
{0, NULL, 0, NULL, NULL}};
/* GE only */
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 5d8d8c7bd02..d919406a14d 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -109,21 +109,21 @@ static void rna_Lattice_update_size(Main *bmain, Scene *scene, PointerRNA *ptr)
newv = (lt->opntsv > 0)? lt->opntsv: lt->pntsv;
neww = (lt->opntsw > 0)? lt->opntsw: lt->pntsw;
- /* resizelattice needs an object, any object will have the same result */
+ /* BKE_lattice_resize needs an object, any object will have the same result */
for (ob = bmain->object.first; ob; ob = ob->id.next) {
if (ob->data == lt) {
- resizelattice(lt, newu, newv, neww, ob);
+ BKE_lattice_resize(lt, newu, newv, neww, ob);
if (lt->editlatt)
- resizelattice(lt->editlatt->latt, newu, newv, neww, ob);
+ BKE_lattice_resize(lt->editlatt->latt, newu, newv, neww, ob);
break;
}
}
/* otherwise without, means old points are not repositioned */
if (!ob) {
- resizelattice(lt, newu, newv, neww, NULL);
+ BKE_lattice_resize(lt, newu, newv, neww, NULL);
if (lt->editlatt)
- resizelattice(lt->editlatt->latt, newu, newv, neww, NULL);
+ BKE_lattice_resize(lt->editlatt->latt, newu, newv, neww, NULL);
}
rna_Lattice_update_data(bmain, scene, ptr);
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 8faf5823927..fe9ad47a30f 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -100,7 +100,7 @@ Camera *rna_Main_cameras_new(Main *UNUSED(bmain), const char *name)
void rna_Main_cameras_remove(Main *bmain, ReportList *reports, struct Camera *camera)
{
if (ID_REAL_USERS(camera) <= 0)
- free_libblock(&bmain->camera, camera);
+ BKE_libblock_free(&bmain->camera, camera);
else
BKE_reportf(reports, RPT_ERROR, "Camera \"%s\" must have zero users to be removed, found %d",
camera->id.name+2, ID_REAL_USERS(camera));
@@ -110,11 +110,11 @@ void rna_Main_cameras_remove(Main *bmain, ReportList *reports, struct Camera *ca
Scene *rna_Main_scenes_new(Main *UNUSED(bmain), const char *name)
{
- return add_scene(name);
+ return BKE_scene_add(name);
}
void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struct Scene *scene)
{
- /* don't call free_libblock(...) directly */
+ /* don't call BKE_libblock_free(...) directly */
Scene *newscene;
if (scene->id.prev)
@@ -129,7 +129,7 @@ void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struc
if (CTX_wm_screen(C)->scene == scene)
ED_screen_set_scene(C, CTX_wm_screen(C), newscene);
- unlink_scene(bmain, scene, newscene);
+ BKE_scene_unlink(bmain, scene, newscene);
}
Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const char *name, ID *data)
@@ -176,7 +176,7 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha
id_us_plus(data);
}
- ob = add_only_object(type, name);
+ ob = BKE_object_add_only_object(type, name);
id_us_min(&ob->id);
ob->data = data;
@@ -188,8 +188,8 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha
void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *object)
{
if (ID_REAL_USERS(object) <= 0) {
- unlink_object(object); /* needed or ID pointers to this are not cleared */
- free_libblock(&bmain->object, object);
+ BKE_object_unlink(object); /* needed or ID pointers to this are not cleared */
+ BKE_libblock_free(&bmain->object, object);
}
else {
BKE_reportf(reports, RPT_ERROR, "Object \"%s\" must have zero users to be removed, found %d",
@@ -199,14 +199,14 @@ void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *ob
struct Material *rna_Main_materials_new(Main *UNUSED(bmain), const char *name)
{
- ID *id = (ID *)add_material(name);
+ ID *id = (ID *)BKE_material_add(name);
id_us_min(id);
return (Material *)id;
}
void rna_Main_materials_remove(Main *bmain, ReportList *reports, struct Material *material)
{
if (ID_REAL_USERS(material) <= 0)
- free_libblock(&bmain->mat, material);
+ BKE_libblock_free(&bmain->mat, material);
else
BKE_reportf(reports, RPT_ERROR, "Material \"%s\" must have zero users to be removed, found %d",
material->id.name+2, ID_REAL_USERS(material));
@@ -224,7 +224,7 @@ struct bNodeTree *rna_Main_nodetree_new(Main *UNUSED(bmain), const char *name, i
void rna_Main_nodetree_remove(Main *bmain, ReportList *reports, struct bNodeTree *tree)
{
if (ID_REAL_USERS(tree) <= 0)
- free_libblock(&bmain->nodetree, tree);
+ BKE_libblock_free(&bmain->nodetree, tree);
else
BKE_reportf(reports, RPT_ERROR, "Node Tree \"%s\" must have zero users to be removed, found %d",
tree->id.name+2, ID_REAL_USERS(tree));
@@ -234,14 +234,14 @@ void rna_Main_nodetree_remove(Main *bmain, ReportList *reports, struct bNodeTree
Mesh *rna_Main_meshes_new(Main *UNUSED(bmain), const char *name)
{
- Mesh *me = add_mesh(name);
+ Mesh *me = BKE_mesh_add(name);
id_us_min(&me->id);
return me;
}
void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh)
{
if (ID_REAL_USERS(mesh) <= 0)
- free_libblock(&bmain->mesh, mesh);
+ BKE_libblock_free(&bmain->mesh, mesh);
else
BKE_reportf(reports, RPT_ERROR, "Mesh \"%s\" must have zero users to be removed, found %d",
mesh->id.name+2, ID_REAL_USERS(mesh));
@@ -251,7 +251,7 @@ void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh)
Lamp *rna_Main_lamps_new(Main *UNUSED(bmain), const char *name, int type)
{
- Lamp *lamp = add_lamp(name);
+ Lamp *lamp = BKE_lamp_add(name);
lamp->type = type;
id_us_min(&lamp->id);
return lamp;
@@ -259,7 +259,7 @@ Lamp *rna_Main_lamps_new(Main *UNUSED(bmain), const char *name, int type)
void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp)
{
if (ID_REAL_USERS(lamp) <= 0)
- free_libblock(&bmain->lamp, lamp);
+ BKE_libblock_free(&bmain->lamp, lamp);
else
BKE_reportf(reports, RPT_ERROR, "Lamp \"%s\" must have zero users to be removed, found %d",
lamp->id.name+2, ID_REAL_USERS(lamp));
@@ -270,7 +270,7 @@ void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp)
Image *rna_Main_images_new(Main *UNUSED(bmain), const char *name, int width, int height, int alpha, int float_buffer)
{
float color[4] = {0.0, 0.0, 0.0, 1.0};
- Image *image = BKE_add_image_size(width, height, name, alpha ? 32:24, float_buffer, 0, color);
+ Image *image = BKE_image_add_generated(width, height, name, alpha ? 32:24, float_buffer, 0, color);
id_us_min(&image->id);
return image;
}
@@ -279,7 +279,7 @@ Image *rna_Main_images_load(Main *UNUSED(bmain), ReportList *reports, const char
Image *ima;
errno = 0;
- ima = BKE_add_image_file(filepath);
+ ima = BKE_image_load(filepath);
if (!ima)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
@@ -290,7 +290,7 @@ Image *rna_Main_images_load(Main *UNUSED(bmain), ReportList *reports, const char
void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image)
{
if (ID_REAL_USERS(image) <= 0)
- free_libblock(&bmain->image, image);
+ BKE_libblock_free(&bmain->image, image);
else
BKE_reportf(reports, RPT_ERROR, "Image \"%s\" must have zero users to be removed, found %d",
image->id.name+2, ID_REAL_USERS(image));
@@ -300,14 +300,14 @@ void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image)
Lattice *rna_Main_lattices_new(Main *UNUSED(bmain), const char *name)
{
- Lattice *lt = add_lattice(name);
+ Lattice *lt = BKE_lattice_add(name);
id_us_min(&lt->id);
return lt;
}
void rna_Main_lattices_remove(Main *bmain, ReportList *reports, struct Lattice *lt)
{
if (ID_REAL_USERS(lt) <= 0)
- free_libblock(&bmain->latt, lt);
+ BKE_libblock_free(&bmain->latt, lt);
else
BKE_reportf(reports, RPT_ERROR, "Lattice \"%s\" must have zero users to be removed, found %d",
lt->id.name+2, ID_REAL_USERS(lt));
@@ -322,7 +322,7 @@ Curve *rna_Main_curves_new(Main *UNUSED(bmain), const char *name, int type)
void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu)
{
if (ID_REAL_USERS(cu) <= 0)
- free_libblock(&bmain->curve, cu);
+ BKE_libblock_free(&bmain->curve, cu);
else
BKE_reportf(reports, RPT_ERROR, "Curve \"%s\" must have zero users to be removed, found %d",
cu->id.name+2, ID_REAL_USERS(cu));
@@ -330,14 +330,14 @@ void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu)
MetaBall *rna_Main_metaballs_new(Main *UNUSED(bmain), const char *name)
{
- MetaBall *mb = BKE_metaball_add(name);
+ MetaBall *mb = BKE_mball_add(name);
id_us_min(&mb->id);
return mb;
}
void rna_Main_metaballs_remove(Main *bmain, ReportList *reports, struct MetaBall *mb)
{
if (ID_REAL_USERS(mb) <= 0)
- free_libblock(&bmain->mball, mb);
+ BKE_libblock_free(&bmain->mball, mb);
else
BKE_reportf(reports, RPT_ERROR, "Metaball \"%s\" must have zero users to be removed, found %d",
mb->id.name+2, ID_REAL_USERS(mb));
@@ -348,7 +348,7 @@ VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *filepat
VFont *font;
errno = 0;
- font = load_vfont(bmain, filepath);
+ font = BKE_vfont_load(bmain, filepath);
if (!font)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
@@ -360,7 +360,7 @@ VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *filepat
void rna_Main_fonts_remove(Main *bmain, ReportList *reports, VFont *vfont)
{
if (ID_REAL_USERS(vfont) <= 0)
- free_libblock(&bmain->vfont, vfont);
+ BKE_libblock_free(&bmain->vfont, vfont);
else
BKE_reportf(reports, RPT_ERROR, "Font \"%s\" must have zero users to be removed, found %d",
vfont->id.name+2, ID_REAL_USERS(vfont));
@@ -378,7 +378,7 @@ Tex *rna_Main_textures_new(Main *UNUSED(bmain), const char *name, int type)
void rna_Main_textures_remove(Main *bmain, ReportList *reports, struct Tex *tex)
{
if (ID_REAL_USERS(tex) <= 0)
- free_libblock(&bmain->tex, tex);
+ BKE_libblock_free(&bmain->tex, tex);
else
BKE_reportf(reports, RPT_ERROR, "Texture \"%s\" must have zero users to be removed, found %d",
tex->id.name+2, ID_REAL_USERS(tex));
@@ -393,7 +393,7 @@ Brush *rna_Main_brushes_new(Main *UNUSED(bmain), const char *name)
void rna_Main_brushes_remove(Main *bmain, ReportList *reports, struct Brush *brush)
{
if (ID_REAL_USERS(brush) <= 0)
- free_libblock(&bmain->brush, brush);
+ BKE_libblock_free(&bmain->brush, brush);
else
BKE_reportf(reports, RPT_ERROR, "Brush \"%s\" must have zero users to be removed, found %d",
brush->id.name+2, ID_REAL_USERS(brush));
@@ -408,7 +408,7 @@ World *rna_Main_worlds_new(Main *UNUSED(bmain), const char *name)
void rna_Main_worlds_remove(Main *bmain, ReportList *reports, struct World *world)
{
if (ID_REAL_USERS(world) <= 0)
- free_libblock(&bmain->world, world);
+ BKE_libblock_free(&bmain->world, world);
else
BKE_reportf(reports, RPT_ERROR, "World \"%s\" must have zero users to be removed, found %d",
world->id.name+2, ID_REAL_USERS(world));
@@ -420,21 +420,21 @@ Group *rna_Main_groups_new(Main *UNUSED(bmain), const char *name)
}
void rna_Main_groups_remove(Main *bmain, Group *group)
{
- unlink_group(group);
- free_libblock(&bmain->group, group);
+ BKE_group_unlink(group);
+ BKE_libblock_free(&bmain->group, group);
/* XXX python now has invalid pointer? */
}
Speaker *rna_Main_speakers_new(Main *UNUSED(bmain), const char *name)
{
- Speaker *speaker = add_speaker(name);
+ Speaker *speaker = BKE_speaker_add(name);
id_us_min(&speaker->id);
return speaker;
}
void rna_Main_speakers_remove(Main *bmain, ReportList *reports, Speaker *speaker)
{
if (ID_REAL_USERS(speaker) <= 0)
- free_libblock(&bmain->speaker, speaker);
+ BKE_libblock_free(&bmain->speaker, speaker);
else
BKE_reportf(reports, RPT_ERROR, "Speaker \"%s\" must have zero users to be removed, found %d",
speaker->id.name+2, ID_REAL_USERS(speaker));
@@ -444,12 +444,12 @@ void rna_Main_speakers_remove(Main *bmain, ReportList *reports, Speaker *speaker
Text *rna_Main_texts_new(Main *UNUSED(bmain), const char *name)
{
- return add_empty_text(name);
+ return BKE_text_add(name);
}
void rna_Main_texts_remove(Main *bmain, Text *text)
{
- unlink_text(bmain, text);
- free_libblock(&bmain->text, text);
+ BKE_text_unlink(bmain, text);
+ BKE_libblock_free(&bmain->text, text);
/* XXX python now has invalid pointer? */
}
@@ -458,7 +458,7 @@ Text *rna_Main_texts_load(Main *bmain, ReportList *reports, const char *filepath
Text *txt;
errno = 0;
- txt = add_text(filepath, bmain->name);
+ txt = BKE_text_load(filepath, bmain->name);
if (!txt)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
@@ -469,14 +469,14 @@ Text *rna_Main_texts_load(Main *bmain, ReportList *reports, const char *filepath
bArmature *rna_Main_armatures_new(Main *UNUSED(bmain), const char *name)
{
- bArmature *arm = add_armature(name);
+ bArmature *arm = BKE_armature_add(name);
id_us_min(&arm->id);
return arm;
}
void rna_Main_armatures_remove(Main *bmain, ReportList *reports, bArmature *arm)
{
if (ID_REAL_USERS(arm) <= 0)
- free_libblock(&bmain->armature, arm);
+ BKE_libblock_free(&bmain->armature, arm);
else
BKE_reportf(reports, RPT_ERROR, "Armature \"%s\" must have zero users to be removed, found %d",
arm->id.name+2, ID_REAL_USERS(arm));
@@ -494,7 +494,7 @@ bAction *rna_Main_actions_new(Main *UNUSED(bmain), const char *name)
void rna_Main_actions_remove(Main *bmain, ReportList *reports, bAction *act)
{
if (ID_REAL_USERS(act) <= 0)
- free_libblock(&bmain->action, act);
+ BKE_libblock_free(&bmain->action, act);
else
BKE_reportf(reports, RPT_ERROR, "Action \"%s\" must have zero users to be removed, found %d",
act->id.name+2, ID_REAL_USERS(act));
@@ -511,7 +511,7 @@ ParticleSettings *rna_Main_particles_new(Main *bmain, const char *name)
void rna_Main_particles_remove(Main *bmain, ReportList *reports, ParticleSettings *part)
{
if (ID_REAL_USERS(part) <= 0)
- free_libblock(&bmain->particle, part);
+ BKE_libblock_free(&bmain->particle, part);
else
BKE_reportf(reports, RPT_ERROR, "Particle Settings \"%s\" must have zero users to be removed, found %d",
part->id.name+2, ID_REAL_USERS(part));
@@ -536,7 +536,7 @@ MovieClip *rna_Main_movieclip_load(Main *UNUSED(bmain), ReportList *reports, con
void rna_Main_movieclips_remove(Main *bmain, MovieClip *clip)
{
BKE_movieclip_unlink(bmain, clip);
- free_libblock(&bmain->movieclip, clip);
+ BKE_libblock_free(&bmain->movieclip, clip);
/* XXX python now has invalid pointer? */
}
@@ -550,7 +550,7 @@ FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char* name)
void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineStyle *linestyle)
{
if(ID_REAL_USERS(linestyle) <= 0)
- free_libblock(&bmain->linestyle, linestyle);
+ BKE_libblock_free(&bmain->linestyle, linestyle);
else
BKE_reportf(reports, RPT_ERROR, "Line style \"%s\" must have zero users to be removed, found %d.", linestyle->id.name+2, ID_REAL_USERS(linestyle));
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index f29fe01b227..530f7d91561 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -222,7 +222,7 @@ static float rna_MeshPolygon_area_get(PointerRNA *ptr)
Mesh *me = (Mesh*)ptr->id.data;
MPoly *mp = (MPoly*)ptr->data;
- return mesh_calc_poly_area(mp, me->mloop+mp->loopstart, me->mvert, NULL);
+ return BKE_mesh_calc_poly_area(mp, me->mloop+mp->loopstart, me->mvert, NULL);
}
static void rna_MeshTessFace_normal_get(PointerRNA *ptr, float *values)
@@ -452,6 +452,26 @@ static int rna_Mesh_texspace_editable(PointerRNA *ptr)
return (me->texflag & ME_AUTOSPACE)? 0: PROP_EDITABLE;
}
+static void rna_Mesh_texspace_size_get(PointerRNA *ptr, float values[3])
+{
+ Mesh *me= (Mesh*)ptr->data;
+
+ if(!me->bb)
+ BKE_mesh_texspace_calc(me);
+
+ copy_v3_v3(values, me->size);
+}
+
+static void rna_Mesh_texspace_loc_get(PointerRNA *ptr, float values[3])
+{
+ Mesh *me= (Mesh*)ptr->data;
+
+ if(!me->bb)
+ BKE_mesh_texspace_calc(me);
+
+ copy_v3_v3(values, me->loc);
+}
+
static void rna_MeshVertex_groups_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me = rna_mesh(ptr);
@@ -2081,12 +2101,14 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
prop = RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Texure Space Location", "Texture space location");
+ RNA_def_property_float_funcs(prop, "rna_Mesh_texspace_loc_get", NULL, NULL);
RNA_def_property_editable_func(prop, texspace_editable);
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop = RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size");
+ RNA_def_property_float_funcs(prop, "rna_Mesh_texspace_size_get", NULL, NULL);
RNA_def_property_editable_func(prop, texspace_editable);
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 41b232fdf8b..c0a9d19360d 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -42,7 +42,7 @@
#ifdef RNA_RUNTIME
const char *rna_Mesh_unit_test_compare(struct Mesh *mesh, bContext *C, struct Mesh *mesh2)
{
- const char *ret = mesh_cmp(mesh, mesh2, FLT_EPSILON*60);
+ const char *ret = BKE_mesh_cmp(mesh, mesh2, FLT_EPSILON*60);
if (!ret)
ret = "Same";
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index f7ef0c5c89a..eda38a43d54 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -99,7 +99,7 @@ static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
if (mb->id.us > 0) {
for (ob = bmain->object.first; ob; ob = ob->id.next)
if (ob->data == mb)
- BKE_metaball_properties_copy(scene, ob);
+ BKE_mball_properties_copy(scene, ob);
DAG_id_tag_update(&mb->id, 0);
WM_main_add_notifier(NC_GEOM|ND_DATA, mb);
@@ -115,7 +115,7 @@ static void rna_MetaBall_update_rotation(Main *bmain, Scene *scene, PointerRNA *
static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type)
{
- MetaElem *ml = BKE_metaball_element_add(mb, type);
+ MetaElem *ml = BKE_mball_element_add(mb, type);
/* cheating way for importers to avoid slow updates */
if (mb->id.us > 0) {
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 8c000e522ba..4f045788561 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -282,6 +282,7 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
part->sta = 1.0f;
part->end = 250.0f;
part->ren_as = PART_DRAW_NOT;
+ part->flag |= PART_UNBORN;
part->draw_as = PART_DRAW_DOT;
BLI_strncpy(psys->name, "SmokeParticles", sizeof(psys->name));
psys->recalc |= (PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 8d262c58f9b..7ad13b8a6d1 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -459,7 +459,7 @@ static void rna_def_nlastrip(BlenderRNA *brna)
prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Action_id_poll");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_REFCOUNT);
RNA_def_property_editable_func(prop, "rna_NlaStrip_action_editable");
RNA_def_property_ui_text(prop, "Action", "Action referenced by this strip");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index cffcca177b3..bb1c50d8c13 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -487,18 +487,6 @@ static void rna_NodeSocketVector_range(PointerRNA *ptr, float *min, float *max,
*softmax = val->max;
}
-static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
-{
- bNode *node = (bNode*)ptr->data;
- Image *ima = (Image *)node->id;
- ImageUser *iuser = node->storage;
-
- BKE_image_multilayer_index(ima->rr, iuser);
- BKE_image_signal(ima, iuser, IMA_SIGNAL_SRC_CHANGE);
-
- rna_Node_update(bmain, scene, ptr);
-}
-
static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
{
EnumPropertyItem *item = NULL;
@@ -518,24 +506,6 @@ static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
return item;
}
-static EnumPropertyItem *rna_Node_image_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), int *free)
-{
- bNode *node = (bNode*)ptr->data;
- Image *ima = (Image *)node->id;
- EnumPropertyItem *item = NULL;
- RenderLayer *rl;
-
- if (!ima || !(ima->rr)) return NULL;
-
- rl = ima->rr->layers.first;
- item = renderresult_layers_add_enum(rl);
-
- *free = 1;
-
- return item;
-}
-
static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
@@ -736,7 +706,8 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports,
ret = nodeAddLink(ntree, fromnode, fromsock, tonode, tosock);
if (ret) {
- nodeUpdate(ntree, tonode);
+ if (tonode)
+ nodeUpdate(ntree, tonode);
ntreeUpdateTree(ntree);
@@ -852,25 +823,74 @@ static void rna_Mapping_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr)
rna_Node_update(bmain, scene, ptr);
}
-static void rna_NodeOutputFile_file_inputs_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+static void rna_NodeOutputFile_slots_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
bNode *node = ptr->data;
rna_iterator_listbase_begin(iter, &node->inputs, NULL);
}
-static PointerRNA rna_NodeOutputFile_file_inputs_get(CollectionPropertyIterator *iter)
+static PointerRNA rna_NodeOutputFile_slot_file_get(CollectionPropertyIterator *iter)
{
PointerRNA ptr;
bNodeSocket *sock = rna_iterator_listbase_get(iter);
- RNA_pointer_create(iter->ptr.id.data, &RNA_NodeImageFileSocket, sock->storage, &ptr);
+ RNA_pointer_create(iter->ptr.id.data, &RNA_NodeOutputFileSlotFile, sock->storage, &ptr);
return ptr;
}
-#else
+static PointerRNA rna_NodeOutputFile_slot_layer_get(CollectionPropertyIterator *iter)
+{
+ PointerRNA ptr;
+ bNodeSocket *sock = rna_iterator_listbase_get(iter);
+ RNA_pointer_create(iter->ptr.id.data, &RNA_NodeOutputFileSlotLayer, sock->storage, &ptr);
+ return ptr;
+}
-static EnumPropertyItem prop_image_layer_items[] = {
-{ 0, "PLACEHOLDER", 0, "Placeholder", ""},
-{0, NULL, 0, NULL, NULL}};
+static int rna_NodeOutputFileSocket_find_node(bNodeTree *ntree, NodeImageMultiFileSocket *data, bNode **nodep, bNodeSocket **sockp)
+{
+ bNode *node;
+ bNodeSocket *sock;
+
+ for (node= ntree->nodes.first; node; node= node->next) {
+ for (sock= node->inputs.first; sock; sock= sock->next) {
+ NodeImageMultiFileSocket *sockdata = sock->storage;
+ if (sockdata==data) {
+ *nodep = node;
+ *sockp = sock;
+ return 1;
+ }
+ }
+ }
+
+ *nodep= NULL;
+ *sockp= NULL;
+ return 0;
+}
+
+static void rna_NodeOutputFileSlotFile_path_set(PointerRNA *ptr, const char *value)
+{
+ bNodeTree *ntree = ptr->id.data;
+ NodeImageMultiFileSocket *sockdata = ptr->data;
+ bNode *node;
+ bNodeSocket *sock;
+
+ if (rna_NodeOutputFileSocket_find_node(ntree, sockdata, &node, &sock)) {
+ ntreeCompositOutputFileSetPath(node, sock, value);
+ }
+}
+
+static void rna_NodeOutputFileSlotLayer_name_set(PointerRNA *ptr, const char *value)
+{
+ bNodeTree *ntree = ptr->id.data;
+ NodeImageMultiFileSocket *sockdata = ptr->data;
+ bNode *node;
+ bNodeSocket *sock;
+
+ if (rna_NodeOutputFileSocket_find_node(ntree, sockdata, &node, &sock)) {
+ ntreeCompositOutputFileSetLayer(node, sock, value);
+ }
+}
+
+#else
static EnumPropertyItem prop_scene_layer_items[] = {
{ 0, "PLACEHOLDER", 0, "Placeholder", ""},
@@ -1791,13 +1811,6 @@ static void def_cmp_image(StructRNA *srna)
/* copied from the rna_image.c */
RNA_def_property_ui_text(prop, "Auto-Refresh", "Always refresh image on frame changes");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "layer", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "layer");
- RNA_def_property_enum_items(prop, prop_image_layer_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Node_image_layer_itemf");
- RNA_def_property_ui_text(prop, "Layer", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_image_layer_update");
}
static void def_cmp_render_layers(StructRNA *srna)
@@ -1820,14 +1833,14 @@ static void def_cmp_render_layers(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
-static void rna_def_cmp_output_file_socket(BlenderRNA *brna)
+static void rna_def_cmp_output_file_slot_file(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "NodeImageFileSocket", NULL);
+ srna = RNA_def_struct(brna, "NodeOutputFileSlotFile", 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_text(srna, "Output File Slot", "Single layer file slot of the file output node");
prop = RNA_def_property(srna, "use_node_format", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_node_format", 1);
@@ -1839,8 +1852,25 @@ static void rna_def_cmp_output_file_socket(BlenderRNA *brna)
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_property_string_funcs(prop, NULL, NULL, "rna_NodeOutputFileSlotFile_path_set");
+ RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_ui_text(prop, "Path", "Subpath used for this slot");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, NULL);
+}
+static void rna_def_cmp_output_file_slot_layer(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "NodeOutputFileSlotLayer", NULL);
+ RNA_def_struct_sdna(srna, "NodeImageMultiFileSocket");
+ RNA_def_struct_ui_text(srna, "Output File Layer Slot", "Multilayer slot of the file output node");
+
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "layer");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_NodeOutputFileSlotLayer_name_set");
RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_ui_text(prop, "Name", "OpenEXR layer name used for this slot");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, NULL);
}
static void def_cmp_output_file(StructRNA *srna)
@@ -1862,11 +1892,21 @@ 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", "");
+ /* XXX using two different collections here for the same basic DNA list!
+ * Details of the output slots depend on whether the node is in Multilayer EXR mode.
+ */
+
+ prop = RNA_def_property(srna, "file_slots", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_funcs(prop, "rna_NodeOutputFile_slots_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end",
+ "rna_NodeOutputFile_slot_file_get", NULL, NULL, NULL, NULL);
+ RNA_def_property_struct_type(prop, "NodeOutputFileSlotFile");
+ RNA_def_property_ui_text(prop, "File Slots", "");
+
+ prop = RNA_def_property(srna, "layer_slots", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_funcs(prop, "rna_NodeOutputFile_slots_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end",
+ "rna_NodeOutputFile_slot_layer_get", NULL, NULL, NULL, NULL);
+ RNA_def_property_struct_type(prop, "NodeOutputFileSlotLayer");
+ RNA_def_property_ui_text(prop, "EXR Layer Slots", "");
}
static void def_cmp_dilate_erode(StructRNA *srna)
@@ -3535,7 +3575,8 @@ void RNA_def_nodetree(BlenderRNA *brna)
define_specific_node(brna, NODE_FRAME, def_frame);
/* special socket types */
- rna_def_cmp_output_file_socket(brna);
+ rna_def_cmp_output_file_slot_file(brna);
+ rna_def_cmp_output_file_slot_layer(brna);
}
/* clean up macro definition */
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 5352bbd0e0f..d7e55ae27df 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -77,7 +77,8 @@ DefNode( ShaderNode, SH_NODE_VOLUME_TRANSPARENT, 0, "VO
DefNode( ShaderNode, SH_NODE_VOLUME_ISOTROPIC, 0, "VOLUME_ISOTROPIC", VolumeIsotropic, "Isotropic Volume", "" )
DefNode( ShaderNode, SH_NODE_EMISSION, 0, "EMISSION", Emission, "Emission", "" )
DefNode( ShaderNode, SH_NODE_NEW_GEOMETRY, 0, "NEW_GEOMETRY", NewGeometry, "Geometry", "" )
-DefNode( ShaderNode, SH_NODE_LIGHT_PATH, 0, "LIGHT_PATH", Light_path, "Light Path", "" )
+DefNode( ShaderNode, SH_NODE_LIGHT_PATH, 0, "LIGHT_PATH", LightPath, "Light Path", "" )
+DefNode( ShaderNode, SH_NODE_LIGHT_FALLOFF, 0, "LIGHT_FALLOFF", LightFalloff, "Light Falloff", "" )
DefNode( ShaderNode, SH_NODE_TEX_IMAGE, def_sh_tex_image, "TEX_IMAGE", TexImage, "Image Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_ENVIRONMENT, def_sh_tex_environment, "TEX_ENVIRONMENT", TexEnvironment, "Environment Texture","" )
DefNode( ShaderNode, SH_NODE_TEX_SKY, def_sh_tex_sky, "TEX_SKY", TexSky, "Sky Texture", "" )
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 6a4809e54e5..2472e7613ad 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -164,7 +164,7 @@ static void rna_Object_internal_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
/* don't use compat so we get predictable rotation */
- object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, FALSE, TRUE);
+ BKE_object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, FALSE, TRUE);
rna_Object_internal_update(bmain, scene, ptr);
}
@@ -199,19 +199,19 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16])
}
/* don't use compat so we get predictable rotation */
- object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
}
static void rna_Object_matrix_basis_get(PointerRNA *ptr, float values[16])
{
Object *ob = ptr->id.data;
- object_to_mat4(ob, (float(*)[4])values);
+ BKE_object_to_mat4(ob, (float(*)[4])values);
}
static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16])
{
Object *ob = ptr->id.data;
- object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE);
}
void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -263,7 +263,7 @@ static void rna_Object_select_update(Main *UNUSED(bmain), Scene *scene, PointerR
if (scene) {
Object *ob = (Object*)ptr->id.data;
short mode = ob->flag & SELECT ? BA_SELECT : BA_DESELECT;
- ED_base_object_select(object_in_scene(ob, scene), mode);
+ ED_base_object_select(BKE_scene_base_find(scene, ob), mode);
}
}
@@ -298,7 +298,7 @@ static void rna_Object_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
Object *ob = (Object*)ptr->id.data;
Base *base;
- base = scene ? object_in_scene(ob, scene) : NULL;
+ base = scene ? BKE_scene_base_find(scene, ob) : NULL;
if (!base)
return;
@@ -355,7 +355,7 @@ static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value)
if (GS(id->name) == ID_CU)
BKE_curve_type_test(ob);
else if (ob->type == OB_ARMATURE)
- armature_rebuild_pose(ob, ob->data);
+ BKE_pose_rebuild(ob, ob->data);
}
}
@@ -383,8 +383,14 @@ static void rna_Object_parent_set(PointerRNA *ptr, PointerRNA value)
{
Object *ob = (Object*)ptr->data;
Object *par = (Object*)value.data;
-
- ED_object_parent(ob, par, ob->partype, ob->parsubstr);
+
+#ifdef FREE_WINDOWS
+ /* NOTE: this dummy check here prevents this method causing weird runtime errors on mingw 4.6.2 */
+ if (ob)
+#endif
+ {
+ ED_object_parent(ob, par, ob->partype, ob->parsubstr);
+ }
}
static void rna_Object_parent_type_set(PointerRNA *ptr, int value)
@@ -708,13 +714,13 @@ static void rna_Object_rotation_mode_set(PointerRNA *ptr, int value)
static void rna_Object_dimensions_get(PointerRNA *ptr, float *value)
{
Object *ob = ptr->data;
- object_get_dimensions(ob, value);
+ BKE_object_dimensions_get(ob, value);
}
static void rna_Object_dimensions_set(PointerRNA *ptr, const float *value)
{
Object *ob = ptr->data;
- object_set_dimensions(ob, value);
+ BKE_object_dimensions_set(ob, value);
}
static int rna_Object_location_editable(PointerRNA *ptr, int index)
@@ -909,9 +915,9 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
switch (ob->body_type) {
case OB_BODY_TYPE_SENSOR:
- ob->gameflag |= OB_SENSOR|OB_COLLISION|OB_GHOST;
- ob->gameflag &= ~(OB_OCCLUDER|OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_ACTOR|OB_ANISOTROPIC_FRICTION
- |OB_DO_FH|OB_ROT_FH|OB_COLLISION_RESPONSE|OB_NAVMESH);
+ ob->gameflag |= OB_SENSOR | OB_COLLISION | OB_GHOST;
+ ob->gameflag &= ~(OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR |
+ OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH);
break;
case OB_BODY_TYPE_OCCLUDER:
ob->gameflag |= OB_OCCLUDER;
@@ -1202,7 +1208,7 @@ static void rna_Object_modifier_clear(Object *object, bContext *C)
static void rna_Object_boundbox_get(PointerRNA *ptr, float *values)
{
Object *ob = (Object*)ptr->id.data;
- BoundBox *bb = object_get_boundbox(ob);
+ BoundBox *bb = BKE_object_boundbox_get(ob);
if (bb) {
memcpy(values, bb->vec, sizeof(bb->vec));
}
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index cb0f1d307aa..7ed0304ebb4 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -87,13 +87,13 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
case OB_SURF:
/* copies object and modifiers (but not the data) */
- tmpobj = copy_object(ob);
+ tmpobj = BKE_object_copy(ob);
tmpcu = (Curve *)tmpobj->data;
tmpcu->id.us--;
/* if getting the original caged mesh, delete object modifiers */
if ( cage )
- object_free_modifiers(tmpobj);
+ BKE_object_free_modifiers(tmpobj);
/* copies the data */
copycu = tmpobj->data = BKE_curve_copy((Curve *) ob->data );
@@ -105,42 +105,42 @@ 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);
+ BKE_displist_make_curveTypes(sce, tmpobj, 0);
copycu->editfont = NULL;
copycu->editnurb = NULL;
- nurbs_to_mesh(tmpobj);
+ BKE_mesh_from_nurbs(tmpobj);
- /* nurbs_to_mesh changes the type to a mesh, check it worked */
+ /* BKE_mesh_from_nurbs changes the type to a mesh, check it worked */
if (tmpobj->type != OB_MESH) {
- free_libblock_us(&(G.main->object), tmpobj);
+ BKE_libblock_free_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);
+ BKE_libblock_free_us(&G.main->object, tmpobj);
break;
case OB_MBALL: {
/* metaballs don't have modifiers, so just convert to mesh */
- Object *basis_ob = BKE_metaball_basis_find(sce, ob);
+ Object *basis_ob = BKE_mball_basis_find(sce, ob);
/* todo, re-generatre for render-res */
/* metaball_polygonize(scene, ob) */
if (ob != basis_ob)
return NULL; /* only do basis metaball */
- tmpmesh = add_mesh("Mesh");
+ tmpmesh = BKE_mesh_add("Mesh");
if (render) {
ListBase disp = {NULL, NULL};
- makeDispListMBall_forRender(sce, ob, &disp);
- mball_to_mesh(&disp, tmpmesh);
- freedisplist(&disp);
+ BKE_displist_make_mball_forRender(sce, ob, &disp);
+ BKE_mesh_from_metaball(&disp, tmpmesh);
+ BKE_displist_free(&disp);
}
else
- mball_to_mesh(&ob->disp, tmpmesh);
+ BKE_mesh_from_metaball(&ob->disp, tmpmesh);
break;
}
@@ -148,7 +148,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
/* copies object and modifiers (but not the data) */
if (cage) {
/* copies the data */
- tmpmesh = copy_mesh( ob->data );
+ tmpmesh = BKE_mesh_copy( ob->data );
/* if not getting the original caged mesh, get final derived mesh */
}
else {
@@ -164,7 +164,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
else
dm = mesh_create_derived_view(sce, ob, mask);
- tmpmesh = add_mesh("Mesh");
+ tmpmesh = BKE_mesh_add("Mesh");
DM_to_mesh(dm, tmpmesh, ob);
dm->release(dm);
}
@@ -328,7 +328,7 @@ static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList *
Scene *scene = CTX_data_scene(C);
KeyBlock *kb = NULL;
- if ((kb = object_insert_shape_key(scene, ob, name, from_mix))) {
+ if ((kb = BKE_object_insert_shape_key(scene, ob, name, from_mix))) {
PointerRNA keyptr;
RNA_pointer_create((ID *)ob->data, &RNA_ShapeKey, kb, &keyptr);
@@ -473,12 +473,12 @@ void rna_ObjectBase_layers_from_view(Base *base, View3D *v3d)
int rna_Object_is_modified(Object *ob, Scene *scene, int settings)
{
- return object_is_modified(scene, ob) & settings;
+ return BKE_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;
+ return BKE_object_is_deform_modified(scene, ob) & settings;
}
#ifndef NDEBUG
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index ceace424f35..c87dabf46ca 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -173,7 +173,7 @@ static void rna_Pose_ik_solver_set(struct PointerRNA *ptr, int value)
pose->ikparam = NULL;
}
pose->iksolver = value;
- init_pose_ikparam(pose);
+ BKE_pose_ikparam_init(pose);
}
}
@@ -185,7 +185,7 @@ static void rna_Pose_ik_solver_update(Main *bmain, Scene *scene, PointerRNA *ptr
pose->flag |= POSE_RECALC; /* checks & sorts pose channels */
DAG_scene_sort(bmain, scene);
- update_pose_constraint_flags(pose);
+ BKE_pose_update_constraint_flags(pose);
object_test_constraints(ob);
@@ -586,7 +586,7 @@ static int rna_PoseChannel_rotation_4d_editable(PointerRNA *ptr, int index)
int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
bPose *pose = (bPose*)ptr->data;
- bPoseChannel *pchan = get_pose_channel(pose, key);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(pose, key);
if (pchan) {
RNA_pointer_create(ptr->id.data, &RNA_PoseBone, pchan, r_ptr);
return TRUE;
@@ -599,13 +599,13 @@ int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_
static void rna_PoseChannel_matrix_basis_get(PointerRNA *ptr, float *values)
{
bPoseChannel *pchan = (bPoseChannel*)ptr->data;
- pchan_to_mat4(pchan, (float (*)[4])values);
+ BKE_pchan_to_mat4(pchan, (float (*)[4])values);
}
static void rna_PoseChannel_matrix_basis_set(PointerRNA *ptr, const float *values)
{
bPoseChannel *pchan = (bPoseChannel*)ptr->data;
- pchan_apply_mat4(pchan, (float (*)[4])values, FALSE); /* no compat for predictable result */
+ BKE_pchan_apply_mat4(pchan, (float (*)[4])values, FALSE); /* no compat for predictable result */
}
static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values)
@@ -614,9 +614,9 @@ static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values)
Object *ob = (Object*)ptr->id.data;
float tmat[4][4];
- armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat);
+ BKE_armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat);
- pchan_apply_mat4(pchan, tmat, FALSE); /* no compat for predictable result */
+ BKE_pchan_apply_mat4(pchan, tmat, FALSE); /* no compat for predictable result */
}
#else
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 7247ee6f0e0..c26620168ff 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -72,13 +72,15 @@
EnumPropertyItem uv_sculpt_relaxation_items[] = {
{UV_SCULPT_TOOL_RELAX_LAPLACIAN, "LAPLACIAN", 0, "Laplacian", "Use Laplacian method for relaxation"},
{UV_SCULPT_TOOL_RELAX_HC, "HC", 0, "HC", "Use HC method for relaxation"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem uv_sculpt_tool_items[] = {
{UV_SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", "Pinch UVs"},
{UV_SCULPT_TOOL_RELAX, "RELAX", 0, "Relax", "Relax UVs"},
{UV_SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", "Grab UVs"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem snap_target_items[] = {
@@ -86,7 +88,8 @@ EnumPropertyItem snap_target_items[] = {
{SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target"},
{SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target"},
{SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem proportional_falloff_items[] = {
{PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
@@ -96,22 +99,24 @@ EnumPropertyItem proportional_falloff_items[] = {
{PROP_LIN, "LINEAR", ICON_LINCURVE, "Linear", "Linear falloff"},
{PROP_CONST, "CONSTANT", ICON_NOCURVE, "Constant", "Constant falloff"},
{PROP_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", "Random falloff"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem proportional_editing_items[] = {
{PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", "Proportional Editing disabled"},
{PROP_EDIT_ON, "ENABLED", ICON_PROP_ON, "Enable", "Proportional Editing enabled"},
- {PROP_EDIT_CONNECTED, "CONNECTED", ICON_PROP_CON, "Connected",
- "Proportional Editing using connected geometry only"},
- {0, NULL, 0, NULL, NULL}};
+ {PROP_EDIT_CONNECTED, "CONNECTED", ICON_PROP_CON, "Connected", "Proportional Editing using connected geometry only"},
+ {0, NULL, 0, NULL, NULL}
+};
/* keep for operators, not used here */
EnumPropertyItem mesh_select_mode_items[] = {
{SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"},
{SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode"},
{SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem snap_element_items[] = {
{SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"},
@@ -119,7 +124,8 @@ EnumPropertyItem snap_element_items[] = {
{SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"},
{SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces"},
{SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
/* workaround for duplice enums,
@@ -205,7 +211,8 @@ EnumPropertyItem image_only_type_items[] = {
IMAGE_TYPE_ITEMS_IMAGE_ONLY
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem image_type_items[] = {
{0, "", 0, N_("Image"), NULL},
@@ -214,7 +221,7 @@ EnumPropertyItem image_type_items[] = {
{0, "", 0, N_("Movie"), NULL},
#ifdef _WIN32
- /* XXX Missing codec menu */
+ /* XXX Missing codec menu */
{R_IMF_IMTYPE_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"},
#endif
{R_IMF_IMTYPE_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"},
@@ -237,13 +244,15 @@ EnumPropertyItem image_type_items[] = {
#ifdef WITH_FFMPEG
{R_IMF_IMTYPE_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"},
#endif
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
EnumPropertyItem image_color_mode_items[] = {
{R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
{R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
{R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
#define IMAGE_COLOR_MODE_BW image_color_mode_items[0]
#define IMAGE_COLOR_MODE_RGB image_color_mode_items[1]
@@ -256,7 +265,8 @@ EnumPropertyItem image_color_depth_items[] = {
{R_IMF_CHAN_DEPTH_16, "16", 0, "16", "16 bit color channels"},
/* 24 not used */
{R_IMF_CHAN_DEPTH_32, "32", 0, "32", "32 bit color channels"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
#ifdef RNA_RUNTIME
@@ -307,11 +317,11 @@ static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, Poi
static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
Base *base;
for (base = scene->base.first; base; base = base->next) {
- if (strncmp(base->object->id.name+2, key, sizeof(base->object->id.name)-2) == 0) {
+ if (strncmp(base->object->id.name + 2, key, sizeof(base->object->id.name) - 2) == 0) {
*r_ptr = rna_pointer_inherit_refine(ptr, &RNA_ObjectBase, base);
return TRUE;
}
@@ -325,7 +335,7 @@ static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
ListBaseIterator *internal = iter->internal;
/* we are actually iterating a Base list, so override get */
- return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
+ return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base *)internal->link)->object);
}
static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *reports, Object *ob)
@@ -333,40 +343,40 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report
Scene *scene_act = CTX_data_scene(C);
Base *base;
- if (object_in_scene(ob, scene)) {
- BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is already in scene \"%s\"", ob->id.name+2, scene->id.name+2);
+ if (BKE_scene_base_find(scene, ob)) {
+ BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is already in scene \"%s\"", ob->id.name + 2, scene->id.name + 2);
return NULL;
}
- base = scene_add_base(scene, ob);
+ base = BKE_scene_base_add(scene, ob);
id_us_plus(&ob->id);
- /* this is similar to what object_add_type and add_object do */
+ /* this is similar to what object_add_type and BKE_object_add do */
base->lay = scene->lay;
/* when linking to an inactive scene don't touch the layer */
if (scene == scene_act)
ob->lay = base->lay;
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
+ ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
/* slows down importers too much, run scene.update() */
/* DAG_scene_sort(G.main, scene); */
- WM_main_add_notifier(NC_SCENE|ND_OB_ACTIVE, scene);
+ WM_main_add_notifier(NC_SCENE | ND_OB_ACTIVE, scene);
return base;
}
static void rna_Scene_object_unlink(Scene *scene, ReportList *reports, Object *ob)
{
- Base *base = object_in_scene(ob, scene);
+ Base *base = BKE_scene_base_find(scene, ob);
if (!base) {
- BKE_reportf(reports, RPT_ERROR, "Object '%s' is not in this scene '%s'", ob->id.name+2, scene->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Object '%s' is not in this scene '%s'", ob->id.name + 2, scene->id.name + 2);
return;
}
if (base == scene->basact && ob->mode != OB_MODE_OBJECT) {
- BKE_reportf(reports, RPT_ERROR, "Object '%s' must be in 'Object Mode' to unlink", ob->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Object '%s' must be in 'Object Mode' to unlink", ob->id.name + 2);
return;
}
if (scene->basact == base) {
@@ -382,13 +392,13 @@ static void rna_Scene_object_unlink(Scene *scene, ReportList *reports, Object *o
DAG_scene_sort(G.main, scene);
DAG_ids_flush_update(G.main, 0);
- WM_main_add_notifier(NC_SCENE|ND_OB_ACTIVE, scene);
+ WM_main_add_notifier(NC_SCENE | ND_OB_ACTIVE, scene);
}
static void rna_Scene_skgen_etch_template_set(PointerRNA *ptr, PointerRNA value)
{
- ToolSettings *ts = (ToolSettings*)ptr->data;
- if (value.data && ((Object*)value.data)->type == OB_ARMATURE)
+ ToolSettings *ts = (ToolSettings *)ptr->data;
+ if (value.data && ((Object *)value.data)->type == OB_ARMATURE)
ts->skgen_template = value.data;
else
ts->skgen_template = NULL;
@@ -396,23 +406,23 @@ static void rna_Scene_skgen_etch_template_set(PointerRNA *ptr, PointerRNA value)
static PointerRNA rna_Scene_active_object_get(PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_Object, scene->basact ? scene->basact->object : NULL);
}
static void rna_Scene_active_object_set(PointerRNA *ptr, PointerRNA value)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
if (value.data)
- scene->basact = object_in_scene((Object*)value.data, scene);
+ scene->basact = BKE_scene_base_find(scene, (Object *)value.data);
else
scene->basact = NULL;
}
static void rna_Scene_set_set(PointerRNA *ptr, PointerRNA value)
{
- Scene *scene = (Scene*)ptr->data;
- Scene *set = (Scene*)value.data;
+ Scene *scene = (Scene *)ptr->data;
+ Scene *set = (Scene *)value.data;
Scene *nested_set;
for (nested_set = set; nested_set; nested_set = nested_set->set) {
@@ -425,21 +435,21 @@ static void rna_Scene_set_set(PointerRNA *ptr, PointerRNA value)
static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
scene->lay = ED_view3d_scene_layer_set(scene->lay, values, &scene->layact);
}
static int rna_Scene_active_layer_get(PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
- return (int)(log(scene->layact)/M_LN2);
+ return (int)(log(scene->layact) / M_LN2);
}
static void rna_Scene_view3d_update(Main *bmain, Scene *UNUSED(scene_unused), PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
BKE_screen_view3d_main_sync(&bmain->screen, scene);
}
@@ -463,7 +473,7 @@ static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, Pointer
static void rna_Scene_volume_set(PointerRNA *ptr, float value)
{
- Scene *scene = (Scene*)(ptr->data);
+ Scene *scene = (Scene *)(ptr->data);
scene->audio.volume = value;
if (scene->sound_scene)
@@ -472,13 +482,13 @@ static void rna_Scene_volume_set(PointerRNA *ptr, float value)
static void rna_Scene_framelen_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- scene->r.framelen = (float)scene->r.framapto/(float)scene->r.images;
+ scene->r.framelen = (float)scene->r.framapto / (float)scene->r.images;
}
static void rna_Scene_current_frame_set(PointerRNA *ptr, int value)
{
- Scene *data = (Scene*)ptr->data;
+ Scene *data = (Scene *)ptr->data;
/* if negative frames aren't allowed, then we can't use them */
FRAMENUMBER_MIN_CLAMP(value);
@@ -487,7 +497,7 @@ static void rna_Scene_current_frame_set(PointerRNA *ptr, int value)
static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
{
- Scene *data = (Scene*)ptr->data;
+ Scene *data = (Scene *)ptr->data;
/* MINFRAME not MINAFRAME, since some output formats can't taken negative frames */
CLAMP(value, MINFRAME, MAXFRAME);
data->r.sfra = value;
@@ -499,7 +509,7 @@ static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
{
- Scene *data = (Scene*)ptr->data;
+ Scene *data = (Scene *)ptr->data;
CLAMP(value, MINFRAME, MAXFRAME);
data->r.efra = value;
@@ -510,7 +520,7 @@ static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
{
- Scene *data = (Scene*)ptr->data;
+ Scene *data = (Scene *)ptr->data;
if (value) {
/* copy range from scene if not set before */
@@ -528,7 +538,7 @@ static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
{
- Scene *data = (Scene*)ptr->data;
+ Scene *data = (Scene *)ptr->data;
/* check if enabled already */
if ((data->r.flag & SCER_PRV_RANGE) == 0) {
@@ -544,7 +554,7 @@ static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
{
- Scene *data = (Scene*)ptr->data;
+ Scene *data = (Scene *)ptr->data;
/* check if enabled already */
if ((data->r.flag & SCER_PRV_RANGE) == 0) {
@@ -560,7 +570,7 @@ static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
static void rna_Scene_frame_update(Main *bmain, Scene *UNUSED(current_scene), PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->id.data;
+ Scene *scene = (Scene *)ptr->id.data;
sound_seek_scene(bmain, scene);
}
@@ -573,7 +583,7 @@ static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
{
Scene *scene = (Scene *)ptr->data;
- KeyingSet *ks = (KeyingSet*)value.data;
+ KeyingSet *ks = (KeyingSet *)value.data;
scene->active_keyingset = ANIM_scene_get_keyingset_index(scene, ks);
}
@@ -585,7 +595,7 @@ static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
{
Scene *scene = (Scene *)ptr->data;
- return scene->active_keyingset-1;
+ return scene->active_keyingset - 1;
}
/* get KeyingSet index stuff for list of Keying Sets editing UI
@@ -594,7 +604,7 @@ static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
{
Scene *scene = (Scene *)ptr->data;
- scene->active_keyingset = value+1;
+ scene->active_keyingset = value + 1;
}
/* XXX: evil... builtin_keyingsets is defined in keyingsets.c! */
@@ -603,7 +613,7 @@ extern ListBase builtin_keyingsets;
static void rna_Scene_all_keyingsets_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
/* start going over the scene KeyingSets first, while we still have pointer to it
* but only if we have any Keying Sets to use...
@@ -617,18 +627,17 @@ static void rna_Scene_all_keyingsets_begin(CollectionPropertyIterator *iter, Poi
static void rna_Scene_all_keyingsets_next(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal = iter->internal;
- KeyingSet *ks = (KeyingSet*)internal->link;
+ KeyingSet *ks = (KeyingSet *)internal->link;
/* if we've run out of links in Scene list, jump over to the builtins list unless we're there already */
if ((ks->next == NULL) && (ks != builtin_keyingsets.last))
- internal->link = (Link*)builtin_keyingsets.first;
+ internal->link = (Link *)builtin_keyingsets.first;
else
- internal->link = (Link*)ks->next;
+ internal->link = (Link *)ks->next;
iter->valid = (internal->link != NULL);
}
-
static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr))
{
return BLI_sprintfN("render");
@@ -636,7 +645,7 @@ static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr))
static int rna_RenderSettings_threads_get(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
if (rd->mode & R_FIXED_THREADS)
return rd->threads;
@@ -646,22 +655,22 @@ static int rna_RenderSettings_threads_get(PointerRNA *ptr)
static int rna_RenderSettings_is_movie_fomat_get(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
return BKE_imtype_is_movie(rd->im_format.imtype);
}
static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
if (rd->mode & R_BORDER)
return 0;
else
- return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
+ return (rd->scemode & (R_EXR_TILE_FILE | R_FULL_SAMPLE)) != 0;
}
static int rna_RenderSettings_full_sample_get(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
return (rd->scemode & R_FULL_SAMPLE) && !(rd->mode & R_BORDER);
}
@@ -689,12 +698,12 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
if ((imf->depth & depth_ok) == 0) {
/* set first available depth */
char depth_ls[] = {R_IMF_CHAN_DEPTH_32,
- R_IMF_CHAN_DEPTH_24,
- R_IMF_CHAN_DEPTH_16,
- R_IMF_CHAN_DEPTH_12,
- R_IMF_CHAN_DEPTH_8,
- R_IMF_CHAN_DEPTH_1,
- 0};
+ R_IMF_CHAN_DEPTH_24,
+ R_IMF_CHAN_DEPTH_16,
+ R_IMF_CHAN_DEPTH_12,
+ R_IMF_CHAN_DEPTH_8,
+ R_IMF_CHAN_DEPTH_1,
+ 0};
int i;
for (i = 0; depth_ls[i]; i++) {
@@ -710,7 +719,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
Scene *scene = ptr->id.data;
RenderData *rd = &scene->r;
#ifdef WITH_FFMPEG
- ffmpeg_verify_image_type(rd, imf);
+ BKE_ffmpeg_image_type_verify(rd, imf);
#endif
#ifdef WITH_QUICKTIME
quicktime_verify_image_type(rd, imf);
@@ -753,12 +762,12 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
Scene *scene = ptr->id.data;
RenderData *rd = &scene->r;
- if (ffmpeg_alpha_channel_supported(rd))
+ if (BKE_ffmpeg_alpha_channel_is_supported(rd))
chan_flag |= IMA_CHAN_FLAG_ALPHA;
}
#endif
- if (chan_flag == (IMA_CHAN_FLAG_BW|IMA_CHAN_FLAG_RGB|IMA_CHAN_FLAG_ALPHA)) {
+ if (chan_flag == (IMA_CHAN_FLAG_BW | IMA_CHAN_FLAG_RGB | IMA_CHAN_FLAG_ALPHA)) {
return image_color_mode_items;
}
else {
@@ -777,7 +786,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
}
static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C, PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), int *free)
+ PropertyRNA *UNUSED(prop), int *free)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
@@ -836,7 +845,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C,
static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
char ext[8];
ext[0] = '\0';
BKE_add_image_extension(ext, rd->im_format.imtype);
@@ -845,7 +854,7 @@ static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
str[0] = '\0';
BKE_add_image_extension(str, rd->im_format.imtype);
}
@@ -853,14 +862,14 @@ static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
#ifdef WITH_QUICKTIME
static int rna_RenderSettings_qtcodecsettings_codecType_get(PointerRNA *ptr)
{
- QuicktimeCodecSettings *settings = (QuicktimeCodecSettings*)ptr->data;
+ QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data;
return quicktime_rnatmpvalue_from_videocodectype(settings->codecType);
}
static void rna_RenderSettings_qtcodecsettings_codecType_set(PointerRNA *ptr, int value)
{
- QuicktimeCodecSettings *settings = (QuicktimeCodecSettings*)ptr->data;
+ QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data;
settings->codecType = quicktime_videocodecType_from_rnatmpvalue(value);
}
@@ -874,12 +883,12 @@ static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bCon
int i = 1, totitem = 0;
char id[5];
- for (i = 0;i<quicktime_get_num_videocodecs();i++) {
+ for (i = 0; i < quicktime_get_num_videocodecs(); i++) {
codecTypeDesc = quicktime_get_videocodecType_desc(i);
if (!codecTypeDesc) break;
tmp.value = codecTypeDesc->rnatmpvalue;
- *((int*)id) = codecTypeDesc->codecType;
+ *((int *)id) = codecTypeDesc->codecType;
id[4] = 0;
tmp.identifier = id;
tmp.name = codecTypeDesc->codecName;
@@ -895,14 +904,14 @@ static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bCon
#ifdef USE_QTKIT
static int rna_RenderSettings_qtcodecsettings_audiocodecType_get(PointerRNA *ptr)
{
- QuicktimeCodecSettings *settings = (QuicktimeCodecSettings*)ptr->data;
+ QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data;
return quicktime_rnatmpvalue_from_audiocodectype(settings->audiocodecType);
}
static void rna_RenderSettings_qtcodecsettings_audiocodecType_set(PointerRNA *ptr, int value)
{
- QuicktimeCodecSettings *settings = (QuicktimeCodecSettings*)ptr->data;
+ QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data;
settings->audiocodecType = quicktime_audiocodecType_from_rnatmpvalue(value);
}
@@ -915,7 +924,7 @@ static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf
QuicktimeCodecTypeDesc *codecTypeDesc;
int i = 1, totitem = 0;
- for (i = 0;i<quicktime_get_num_audiocodecs();i++) {
+ for (i = 0; i < quicktime_get_num_audiocodecs(); i++) {
codecTypeDesc = quicktime_get_audiocodecType_desc(i);
if (!codecTypeDesc) break;
@@ -944,7 +953,7 @@ static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, int value)
else
rd->ffcodecdata.flags &= ~FFMPEG_LOSSLESS_OUTPUT;
- ffmpeg_verify_codec_settings(rd);
+ BKE_ffmpeg_codec_settings_verify(rd);
}
static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain), Scene *UNUSED(scene_unused), PointerRNA *ptr)
@@ -952,34 +961,34 @@ static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain), Scene
Scene *scene = (Scene *) ptr->id.data;
RenderData *rd = &scene->r;
- ffmpeg_verify_codec_settings(rd);
+ BKE_ffmpeg_codec_settings_verify(rd);
}
#endif
static int rna_RenderSettings_active_layer_index_get(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
return rd->actlay;
}
static void rna_RenderSettings_active_layer_index_set(PointerRNA *ptr, int value)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
rd->actlay = value;
}
static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
*min = 0;
- *max = BLI_countlist(&rd->layers)-1;
+ *max = BLI_countlist(&rd->layers) - 1;
*max = MAX2(0, *max);
}
static PointerRNA rna_RenderSettings_active_layer_get(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
SceneRenderLayer *srl = BLI_findlink(&rd->layers, rd->actlay);
return rna_pointer_inherit_refine(ptr, &RNA_SceneRenderLayer, srl);
@@ -987,8 +996,8 @@ static PointerRNA rna_RenderSettings_active_layer_get(PointerRNA *ptr)
static void rna_RenderSettings_active_layer_set(PointerRNA *ptr, PointerRNA value)
{
- RenderData *rd = (RenderData*)ptr->data;
- SceneRenderLayer *srl = (SceneRenderLayer*)value.data;
+ RenderData *rd = (RenderData *)ptr->data;
+ SceneRenderLayer *srl = (SceneRenderLayer *)value.data;
const int index = BLI_findindex(&rd->layers, srl);
if (index != -1) rd->actlay = index;
}
@@ -996,9 +1005,9 @@ static void rna_RenderSettings_active_layer_set(PointerRNA *ptr, PointerRNA valu
static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), const char *name)
{
Scene *scene = (Scene *)id;
- SceneRenderLayer *srl = scene_add_render_layer(scene, name);
+ SceneRenderLayer *srl = BKE_scene_add_render_layer(scene, name);
- WM_main_add_notifier(NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
return srl;
}
@@ -1008,18 +1017,18 @@ static void rna_RenderLayer_remove(ID *id, RenderData *UNUSED(rd), Main *bmain,
{
Scene *scene = (Scene *)id;
- if (!scene_remove_render_layer(bmain, scene, srl)) {
+ if (!BKE_scene_remove_render_layer(bmain, scene, srl)) {
BKE_reportf(reports, RPT_ERROR, "RenderLayer '%s' could not be removed from scene '%s'",
- srl->name, scene->id.name+2);
+ srl->name, scene->id.name + 2);
}
else {
- WM_main_add_notifier(NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
}
}
static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
RenderEngineType *type = BLI_findlink(&R_engines, value);
if (type)
@@ -1049,7 +1058,7 @@ static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *UNUSED(C), Po
static int rna_RenderSettings_engine_get(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
RenderEngineType *type;
int a = 0;
@@ -1067,7 +1076,7 @@ static void rna_RenderSettings_engine_update(Main *bmain, Scene *UNUSED(unused),
static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->id.data;
+ Scene *scene = (Scene *)ptr->id.data;
DAG_id_tag_update(&scene->id, 0);
}
@@ -1075,7 +1084,7 @@ static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
/* reset image nodes */
- Scene *scene = (Scene*)ptr->id.data;
+ Scene *scene = (Scene *)ptr->id.data;
bNodeTree *ntree = scene->nodetree;
bNode *node;
@@ -1083,13 +1092,13 @@ static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSE
/* 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())
+ 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)) {
ED_node_changed_update(&scene->id, node);
- WM_main_add_notifier(NC_NODE|NA_EDITED, node);
+ WM_main_add_notifier(NC_NODE | NA_EDITED, node);
if (node->type == CMP_NODE_IMAGE)
BKE_image_signal((Image *)node->id, NULL, IMA_SIGNAL_FREE);
@@ -1102,8 +1111,8 @@ static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSE
static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
{
- Scene *scene = (Scene*)ptr->id.data;
- SceneRenderLayer *rl = (SceneRenderLayer*)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
+ SceneRenderLayer *rl = (SceneRenderLayer *)ptr->data;
BLI_strncpy_utf8(rl->name, value, sizeof(rl->name));
BLI_uniquename(&scene->r.layers, rl, "RenderLayer", '.', offsetof(SceneRenderLayer, name), sizeof(rl->name));
@@ -1127,13 +1136,13 @@ static int rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr))
static int rna_RenderSettings_use_shading_nodes_get(PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->id.data;
- return scene_use_new_shading_nodes(scene);
+ Scene *scene = (Scene *)ptr->id.data;
+ return BKE_scene_use_new_shading_nodes(scene);
}
static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr)
{
- RenderData *rd = (RenderData*)ptr->data;
+ RenderData *rd = (RenderData *)ptr->data;
RenderEngineType *type;
for (type = R_engines.first; type; type = type->next)
@@ -1145,13 +1154,13 @@ static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr)
static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
{
- SceneRenderLayer *rl = (SceneRenderLayer*)ptr->data;
+ SceneRenderLayer *rl = (SceneRenderLayer *)ptr->data;
rl->lay = ED_view3d_scene_layer_set(rl->lay, values, NULL);
}
static void rna_SceneRenderLayer_pass_update(Main *bmain, Scene *activescene, PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->id.data;
+ Scene *scene = (Scene *)ptr->id.data;
if (scene->nodetree)
ntreeCompositForceHidden(scene->nodetree, scene);
@@ -1161,7 +1170,7 @@ static void rna_SceneRenderLayer_pass_update(Main *bmain, Scene *activescene, Po
static void rna_Scene_use_nodes_set(PointerRNA *ptr, int value)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
scene->use_nodes = value;
if (scene->use_nodes && scene->nodetree == NULL)
@@ -1170,7 +1179,7 @@ static void rna_Scene_use_nodes_set(PointerRNA *ptr, int value)
static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->id.data;
+ Scene *scene = (Scene *)ptr->id.data;
Base *base;
for (base = scene->base.first; base; base = base->next)
@@ -1179,15 +1188,15 @@ static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value)
{
- Scene *scene = (Scene*)ptr->id.data;
- ToolSettings *ts = (ToolSettings*)ptr->data;
- int flag = (value[0] ? SCE_SELECT_VERTEX:0) | (value[1] ? SCE_SELECT_EDGE:0) | (value[2] ? SCE_SELECT_FACE : 0);
+ Scene *scene = (Scene *)ptr->id.data;
+ ToolSettings *ts = (ToolSettings *)ptr->data;
+ int flag = (value[0] ? SCE_SELECT_VERTEX : 0) | (value[1] ? SCE_SELECT_EDGE : 0) | (value[2] ? SCE_SELECT_FACE : 0);
if (flag) {
ts->selectmode = flag;
if (scene->basact) {
- Mesh *me = get_mesh(scene->basact->object);
+ Mesh *me = BKE_mesh_from_object(scene->basact->object);
if (me && me->edit_btmesh && me->edit_btmesh->selectmode != flag) {
me->edit_btmesh->selectmode = flag;
EDBM_selectmode_set(me->edit_btmesh);
@@ -1201,13 +1210,13 @@ static void rna_Scene_editmesh_select_mode_update(Main *UNUSED(bmain), Scene *sc
Mesh *me = NULL;
if (scene->basact) {
- me = get_mesh(scene->basact->object);
+ me = BKE_mesh_from_object(scene->basact->object);
if (me && me->edit_btmesh == NULL)
me = NULL;
}
- WM_main_add_notifier(NC_GEOM|ND_SELECT, me);
- WM_main_add_notifier(NC_SCENE|ND_TOOLSETTINGS, NULL);
+ WM_main_add_notifier(NC_GEOM | ND_SELECT, me);
+ WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL);
}
static void object_simplify_update(Object *ob)
@@ -1217,7 +1226,7 @@ static void object_simplify_update(Object *ob)
for (md = ob->modifiers.first; md; md = md->next)
if (ELEM3(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem))
- ob->recalc |= OB_RECALC_DATA|PSYS_RECALC_CHILD;
+ ob->recalc |= OB_RECALC_DATA | PSYS_RECALC_CHILD;
for (psys = ob->particlesystem.first; psys; psys = psys->next)
psys->recalc |= PSYS_RECALC_CHILD;
@@ -1239,7 +1248,7 @@ static void rna_Scene_use_simplify_update(Main *bmain, Scene *scene, PointerRNA
object_simplify_update(base->object);
DAG_ids_flush_update(bmain, 0);
- WM_main_add_notifier(NC_GEOM|ND_DATA, NULL);
+ WM_main_add_notifier(NC_GEOM | ND_DATA, NULL);
}
static void rna_Scene_simplify_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -1250,13 +1259,13 @@ static void rna_Scene_simplify_update(Main *bmain, Scene *scene, PointerRNA *ptr
static int rna_Scene_use_audio_get(PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
return scene->audio.flag & AUDIO_MUTE;
}
static void rna_Scene_use_audio_set(PointerRNA *ptr, int value)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
if (value)
scene->audio.flag |= AUDIO_MUTE;
@@ -1268,7 +1277,7 @@ static void rna_Scene_use_audio_set(PointerRNA *ptr, int value)
static int rna_Scene_sync_mode_get(PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
if (scene->audio.flag & AUDIO_SYNC)
return AUDIO_SYNC;
return scene->flag & SCE_FRAME_DROP;
@@ -1276,7 +1285,7 @@ static int rna_Scene_sync_mode_get(PointerRNA *ptr)
static void rna_Scene_sync_mode_set(PointerRNA *ptr, int value)
{
- Scene *scene = (Scene*)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
if (value == AUDIO_SYNC) {
scene->audio.flag |= AUDIO_SYNC;
@@ -1309,7 +1318,7 @@ static void rna_GameSettings_auto_start_set(PointerRNA *UNUSED(ptr), int value)
static void rna_GameSettings_exit_key_set(PointerRNA *ptr, int value)
{
- GameData *gm = (GameData*)ptr->data;
+ GameData *gm = (GameData *)ptr->data;
if (ISKEYBOARD(value))
gm->exitkey = value;
@@ -1323,8 +1332,8 @@ static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[])
BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
BLI_addtail(&scene->markers, marker);
- WM_main_add_notifier(NC_SCENE|ND_MARKERS, NULL);
- WM_main_add_notifier(NC_ANIMATION|ND_MARKERS, NULL);
+ WM_main_add_notifier(NC_SCENE | ND_MARKERS, NULL);
+ WM_main_add_notifier(NC_ANIMATION | ND_MARKERS, NULL);
return marker;
}
@@ -1332,23 +1341,23 @@ static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[])
static void rna_TimeLine_remove(Scene *scene, ReportList *reports, TimeMarker *marker)
{
if (!BLI_remlink_safe(&scene->markers, marker)) {
- BKE_reportf(reports, RPT_ERROR, "TimelineMarker '%s' not found in scene '%s'", marker->name, scene->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "TimelineMarker '%s' not found in scene '%s'", marker->name, scene->id.name + 2);
return;
}
/* XXX, invalidates PyObject */
MEM_freeN(marker);
- WM_main_add_notifier(NC_SCENE|ND_MARKERS, NULL);
- WM_main_add_notifier(NC_ANIMATION|ND_MARKERS, NULL);
+ WM_main_add_notifier(NC_SCENE | ND_MARKERS, NULL);
+ WM_main_add_notifier(NC_ANIMATION | ND_MARKERS, NULL);
}
static void rna_TimeLine_clear(Scene *scene)
{
BLI_freelistN(&scene->markers);
- WM_main_add_notifier(NC_SCENE|ND_MARKERS, NULL);
- WM_main_add_notifier(NC_ANIMATION|ND_MARKERS, NULL);
+ WM_main_add_notifier(NC_SCENE | ND_MARKERS, NULL);
+ WM_main_add_notifier(NC_ANIMATION | ND_MARKERS, NULL);
}
static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, const char idname[], const char name[])
@@ -1370,17 +1379,17 @@ static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, cons
static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value)
{
- UnifiedPaintSettings* ups = ptr->data;
+ UnifiedPaintSettings *ups = ptr->data;
/* scale unprojected radius so it stays consistent with brush size */
BKE_brush_scale_unprojected_radius(&ups->unprojected_radius,
- value, ups->size);
+ value, ups->size);
ups->size = value;
}
static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, float value)
{
- UnifiedPaintSettings* ups = ptr->data;
+ UnifiedPaintSettings *ups = ptr->data;
/* scale brush size so it stays consistent with unprojected_radius */
BKE_brush_scale_size(&ups->size, value, ups->unprojected_radius);
@@ -1397,13 +1406,13 @@ static void rna_Scene_update_active_object_data(Main *UNUSED(bmain), Scene *scen
Object *ob = OBACT;
if (ob) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_main_add_notifier(NC_OBJECT|ND_DRAW, &ob->id);
+ WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id);
}
}
static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->id.data;
+ Scene *scene = (Scene *)ptr->id.data;
Object *camera = scene->camera;
if (camera)
@@ -1467,12 +1476,12 @@ static void rna_def_transform_orientation(BlenderRNA *brna)
prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "mat");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "Name of the custom transform orientation");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
}
static void rna_def_tool_settings(BlenderRNA *brna)
@@ -1485,7 +1494,8 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode"},
{UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode"},
{UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
/* the construction of this enum is quite special - everything is stored as bitflags,
* with 1st position only for for on/off (and exposed as boolean), while others are mutually
@@ -1494,21 +1504,24 @@ static void rna_def_tool_settings(BlenderRNA *brna)
static EnumPropertyItem auto_key_items[] = {
{AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
{AUTOKEY_MODE_EDITKEYS & ~AUTOKEY_ON, "REPLACE_KEYS", 0, "Replace", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem retarget_roll_items[] = {
{SK_RETARGET_ROLL_NONE, "NONE", 0, "None", "Don't adjust roll"},
{SK_RETARGET_ROLL_VIEW, "VIEW", 0, "View", "Roll bones to face the view"},
{SK_RETARGET_ROLL_JOINT, "JOINT", 0, "Joint", "Roll bone to original joint plane offset"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem sketch_convert_items[] = {
{SK_CONVERT_CUT_FIXED, "FIXED", 0, "Fixed", "Subdivide stroke in fixed number of bones"},
{SK_CONVERT_CUT_LENGTH, "LENGTH", 0, "Length", "Subdivide stroke in bones of specific length"},
{SK_CONVERT_CUT_ADAPTATIVE, "ADAPTIVE", 0, "Adaptive",
- "Subdivide stroke adaptively, with more subdivision in curvier parts"},
+ "Subdivide stroke adaptively, with more subdivision in curvier parts"},
{SK_CONVERT_RETARGET, "RETARGET", 0, "Retarget", "Retarget template bone chain to stroke"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem edge_tag_items[] = {
{EDGE_MODE_SELECT, "SELECT", 0, "Select", ""},
@@ -1517,7 +1530,8 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{EDGE_MODE_TAG_CREASE, "CREASE", 0, "Tag Crease", ""},
{EDGE_MODE_TAG_BEVEL, "BEVEL", 0, "Tag Bevel", ""},
{EDGE_MODE_TAG_FREESTYLE, "FREESTYLE", 0, "Tag Freestyle Edge Mark", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "ToolSettings", NULL);
RNA_def_struct_ui_text(srna, "Tool Settings", "");
@@ -1564,7 +1578,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "use_uv_sculpt", 1);
RNA_def_property_ui_text(prop, "UV Sculpt", "Enable brush for UV sculpting");
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_uv_sculpt_update");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_uv_sculpt_update");
prop = RNA_def_property(srna, "uv_sculpt_lock_borders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_sculpt_settings", UV_SCULPT_LOCK_BORDERS);
@@ -1590,19 +1604,19 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_enum_items(prop, proportional_editing_items);
RNA_def_property_ui_text(prop, "Proportional Editing",
"Proportional Editing mode, allows transforms with distance fall-off");
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "use_proportional_edit_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proportional_objects", 0);
RNA_def_property_ui_text(prop, "Proportional Editing Objects", "Proportional editing object mode");
RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "proportional_edit_falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
RNA_def_property_enum_items(prop, proportional_falloff_items);
RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode");
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "proportional_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "proportional_size");
@@ -1614,7 +1628,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view");
RNA_def_property_range(prop, 0.00001, 1000.0);
RNA_def_property_ui_range(prop, 0.01, 10.0, 10.0, 2);
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
+ RNA_def_property_update(prop, NC_GEOM | ND_DATA, NULL);
prop = RNA_def_property(srna, "double_threshold", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "doublimit");
@@ -1630,51 +1644,51 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
RNA_def_property_ui_text(prop, "Snap", "Snap during transform");
RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "use_snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target");
RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
RNA_def_property_enum_items(prop, snap_element_items);
RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to");
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_target");
RNA_def_property_enum_items(prop, snap_target_items);
RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto the target");
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "use_snap_peel_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center");
RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "use_snap_project", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
RNA_def_property_ui_text(prop, "Project Individual Elements",
"Project individual elements on the surface of other objects");
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
prop = RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_NO_SELF);
RNA_def_property_ui_text(prop, "Project to Self", "Snap onto itself (editmode)");
RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
/* Grease Pencil */
prop = RNA_def_property(srna, "use_grease_pencil_sessions", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINTSESSIONS_ON);
RNA_def_property_ui_text(prop, "Use Sketching Sessions",
"Allow drawing multiple strokes at a time with Grease Pencil");
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* xxx: need toolbar to be redrawn... */
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* xxx: need toolbar to be redrawn... */
/* Auto Keying */
prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE);
@@ -1704,18 +1718,18 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
RNA_def_property_enum_items(prop, uv_select_mode_items);
RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
prop = RNA_def_property(srna, "use_uv_select_sync", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync");
RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
prop = RNA_def_property(srna, "show_uv_local_view", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
/* Mesh */
prop = RNA_def_property(srna, "mesh_select_mode", PROP_BOOLEAN, PROP_NONE);
@@ -1776,21 +1790,21 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "skgen_subdivision_number");
RNA_def_property_range(prop, 1, 255);
RNA_def_property_ui_text(prop, "Subdivisions", "Number of bones in the subdivided stroke");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "etch_adaptive_limit", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "skgen_correlation_limit");
RNA_def_property_range(prop, 0.00001, 1.0);
RNA_def_property_ui_range(prop, 0.01, 1.0, 0.01, 2);
RNA_def_property_ui_text(prop, "Limit", "Number of bones in the subdivided stroke");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "etch_length_limit", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "skgen_length_limit");
RNA_def_property_range(prop, 0.00001, 100000.0);
RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Length", "Number of bones in the subdivided stroke");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "etch_roll_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "skgen_retarget_roll");
@@ -1801,7 +1815,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bone_sketching_convert");
RNA_def_property_enum_items(prop, sketch_convert_items);
RNA_def_property_ui_text(prop, "Stroke conversion method", "Method used to convert stroke to bones");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
/* Unified Paint Settings */
prop = RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE);
@@ -1838,7 +1852,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
* from the active brush */
prop = RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
RNA_def_property_int_funcs(prop, NULL, "rna_UnifiedPaintSettings_size_set", NULL);
- RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS*10);
+ RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS * 10);
RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, 0);
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
@@ -1888,12 +1902,14 @@ static void rna_def_unit_settings(BlenderRNA *brna)
{USER_UNIT_NONE, "NONE", 0, "None", ""},
{USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
{USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem rotation_units[] = {
{0, "DEGREES", 0, "Degrees", "Use degrees for measuring angles and rotations"},
{USER_UNIT_ROT_RADIANS, "RADIANS", 0, "Radians", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "UnitSettings", NULL);
RNA_def_struct_ui_text(srna, "Unit Settings", "");
@@ -1930,7 +1946,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
else RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Name", "Render layer name");
RNA_def_struct_name_property(srna, prop);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
@@ -1939,7 +1955,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Material Override",
"Material to override all other materials in this render layer");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
@@ -1947,7 +1963,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* layers */
@@ -1957,89 +1973,89 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer");
if (scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ 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);
prop = RNA_def_property(srna, "layers_zmask", PROP_BOOLEAN, PROP_LAYER);
RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers for solid faces");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ 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);
prop = RNA_def_property(srna, "layers_exclude", PROP_BOOLEAN, PROP_LAYER);
RNA_def_property_boolean_sdna(prop, NULL, "lay_exclude", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Exclude Layers", "Exclude scene layers from having any influence");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ 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) {
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);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
}
/* layer options */
prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ 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);
prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ 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);
prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
RNA_def_property_ui_text(prop, "Zmask Negate",
"For Zmask, only render what is behind solid z values instead of in front");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ 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);
prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (on top of Solid and Halos)");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ 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);
prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces)");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop= RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
@@ -2052,219 +2068,219 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0)");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA);
RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
RNA_def_property_ui_text(prop, "AO", "Deliver AO pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT);
RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_ENVIRONMENT);
RNA_def_property_ui_text(prop, "Environment", "Deliver environment lighting pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDIRECT);
RNA_def_property_ui_text(prop, "Indirect", "Deliver indirect lighting pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT);
RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONMENT);
RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environment pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT);
RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_DIRECT);
RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_INDIRECT);
RNA_def_property_ui_text(prop, "Diffuse Indirect", "Deliver diffuse indirect pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_COLOR);
RNA_def_property_ui_text(prop, "Diffuse Color", "Deliver diffuse color pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_DIRECT);
RNA_def_property_ui_text(prop, "Glossy Direct", "Deliver glossy direct pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_INDIRECT);
RNA_def_property_ui_text(prop, "Glossy Indirect", "Deliver glossy indirect pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_COLOR);
RNA_def_property_ui_text(prop, "Glossy Color", "Deliver glossy color pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_DIRECT);
RNA_def_property_ui_text(prop, "Transmission Direct", "Deliver transmission direct pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_INDIRECT);
RNA_def_property_ui_text(prop, "Transmission Indirect", "Deliver transmission indirect pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_COLOR);
RNA_def_property_ui_text(prop, "Transmission Color", "Deliver transmission color pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
@@ -2678,7 +2694,7 @@ static void rna_def_scene_game_recast_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "slope_max", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "agentmaxslope");
- RNA_def_property_range(prop, 0, M_PI/2);
+ RNA_def_property_range(prop, 0, M_PI / 2);
RNA_def_property_ui_text(prop, "Max Slope", "Maximum walkable slope angle in degrees");
RNA_def_property_update(prop, NC_SCENE, NULL);
@@ -2737,7 +2753,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{4, "SAMPLES_4", 0, "4x", ""},
{8, "SAMPLES_8", 0, "8x", ""},
{16, "SAMPLES_16", 0, "16x", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem framing_types_items[] = {
{SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox",
@@ -2746,7 +2763,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
"Show the entire viewport in the display window, viewing more horizontally "
"or vertically"},
{SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem dome_modes_items[] = {
{DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""},
@@ -2754,22 +2772,25 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""},
{DOME_ENVMAP, "ENVMAP", 0, "Cube Map", ""},
{DOME_PANORAM_SPH, "PANORAM_SPH", 0, "Spherical Panoramic", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
- static EnumPropertyItem stereo_modes_items[] = {
+ static EnumPropertyItem stereo_modes_items[] = {
{STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
{STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
{STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
{STEREO_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", ""},
{STEREO_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-side", ""},
{STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
- static EnumPropertyItem stereo_items[] = {
+ static EnumPropertyItem stereo_items[] = {
{STEREO_NOSTEREO, "NONE", 0, "None", "Disable Stereo and Dome environments"},
{STEREO_ENABLED, "STEREO", 0, "Stereo", "Enable Stereo environment"},
{STEREO_DOME, "DOME", 0, "Dome", "Enable Dome environment"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem physics_engine_items[] = {
{WOPHY_NONE, "NONE", 0, "None", "Don't use a physics engine"},
@@ -2778,19 +2799,22 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
/*{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""}, */
/*{WOPHY_ODE, "ODE", 0, "ODE", ""}, */
{WOPHY_BULLET, "BULLET", 0, "Bullet", "Use the Bullet physics engine"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem material_items[] = {
{GAME_MAT_TEXFACE, "SINGLETEXTURE", 0, "Singletexture", "Singletexture face materials"},
{GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials"},
{GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem obstacle_simulation_items[] = {
{OBSTSIMULATION_NONE, "NONE", 0, "None", ""},
{OBSTSIMULATION_TOI_rays, "RVO_RAYS", 0, "RVO (rays)", ""},
{OBSTSIMULATION_TOI_cells, "RVO_CELLS", 0, "RVO (cells)", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "SceneGameData", NULL);
RNA_def_struct_sdna(srna, "GameData");
@@ -3047,43 +3071,43 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "matmode");
RNA_def_property_enum_items(prop, material_items);
RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, NULL);
prop = RNA_def_property(srna, "use_glsl_lights", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS);
RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "use_glsl_shaders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS);
RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "use_glsl_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS);
RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "use_glsl_ramps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS);
RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "use_glsl_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES);
RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "use_glsl_color_management", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_COLOR_MANAGEMENT);
RNA_def_property_ui_text(prop, "GLSL Color Management", "Use color management for GLSL rendering");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "use_glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
RNA_def_property_ui_text(prop, "GLSL Extra Textures",
"Use extra textures like normal or specular maps for GLSL rendering");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
/* obstacle simulation */
prop = RNA_def_property(srna, "obstacle_simulation", PROP_ENUM, PROP_NONE);
@@ -3156,15 +3180,15 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
"rna_RenderSettings_active_layer_index_set",
"rna_RenderSettings_active_layer_index_range");
RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "SceneRenderLayer");
RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_get",
"rna_RenderSettings_active_layer_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Layer");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
func = RNA_def_function(srna, "new", "rna_RenderLayer_new");
RNA_def_function_ui_description(func, "Add a render layer to scene");
@@ -3176,9 +3200,9 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "remove", "rna_RenderLayer_remove");
RNA_def_function_ui_description(func, "Remove a render layer");
- RNA_def_function_flag(func, FUNC_USE_MAIN|FUNC_USE_REPORTS|FUNC_USE_SELF_ID);
+ RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
parm = RNA_def_pointer(func, "layer", "SceneRenderLayer", "", "Timeline marker to remove");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
}
/* use for render output and image save operator,
@@ -3195,7 +3219,8 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
{R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""},
{R_IMF_EXR_CODEC_PIZ, "PIZ", 0, "PIZ (lossless)", ""},
{R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE (lossless)", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
#endif
StructRNA *srna;
@@ -3213,7 +3238,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set",
"rna_ImageFormatSettings_file_format_itemf");
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
@@ -3222,39 +3247,39 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Color Mode",
"Choose BW for saving greyscale images, RGB for saving red, green and blue channels, "
"and RGBA for saving red, green, blue and alpha channels");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "depth");
RNA_def_property_enum_items(prop, image_color_depth_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_depth_itemf");
RNA_def_property_ui_text(prop, "Color Depth", "Bit depth per channel");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* was 'file_quality' */
prop = RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
RNA_def_property_ui_text(prop, "Quality", "Quality for image formats that support lossy compression");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* was shared with file_quality */
prop = RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "compress");
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
RNA_def_property_ui_text(prop, "Compression", "Compression level for formats that support lossless compression");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* flag */
prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_ZBUF);
RNA_def_property_ui_text(prop, "Z Buffer", "Save the z-depth per pixel (32 bit unsigned int z-buffer)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_PREVIEW_JPG);
RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* format specific */
@@ -3265,7 +3290,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "exr_codec");
RNA_def_property_enum_items(prop, exr_codec_items);
RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
#endif
@@ -3275,17 +3300,17 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_YCC);
RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_PRESET);
RNA_def_property_ui_text(prop, "Cinema", "Use Openjpeg Cinema Preset");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_48);
RNA_def_property_ui_text(prop, "Cinema (48)", "Use Openjpeg Cinema Preset (48fps)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
#endif
/* Cineon and DPX */
@@ -3293,25 +3318,25 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cineon_flag", R_CINEON_LOG);
RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cineon_black");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cineon_white");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cineon_gamma");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
}
static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
@@ -3334,7 +3359,8 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{FFMPEG_FLV, "FLASH", 0, "Flash", ""},
{FFMPEG_WAV, "WAV", 0, "Wav", ""},
{FFMPEG_MP3, "MP3", 0, "Mp3", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem ffmpeg_codec_items[] = {
{CODEC_ID_NONE, "NONE", 0, "None", ""},
@@ -3349,7 +3375,8 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{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 */
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem ffmpeg_audio_codec_items[] = {
{CODEC_ID_NONE, "NONE", 0, "None", ""},
@@ -3360,7 +3387,8 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
{CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""},
{CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
#endif
static EnumPropertyItem audio_channel_items[] = {
@@ -3369,7 +3397,8 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
{6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
{8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "FFmpegSettings", NULL);
RNA_def_struct_sdna(srna, "FFMpegCodecData");
@@ -3381,76 +3410,76 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, ffmpeg_format_items);
RNA_def_property_ui_text(prop, "Format", "Output file format");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, ffmpeg_codec_items);
RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "video_bitrate");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 14000);
RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kb/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "minrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rc_min_rate");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 9000);
RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate (kb/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "maxrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rc_max_rate");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 14000);
RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate (kb/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "muxrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mux_rate");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 100000000);
RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "gopsize", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gop_size");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "buffersize", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rc_buffer_size");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 2000);
RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "packetsize", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mux_packet_size");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 16384);
RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_AUTOSPLIT_OUTPUT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_lossless_output", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_LOSSLESS_OUTPUT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_FFmpegSettings_lossless_output_set");
RNA_def_property_ui_text(prop, "Lossless Output", "Use lossless output for video streams");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* FFMPEG Audio*/
prop = RNA_def_property(srna, "audio_codec", PROP_ENUM, PROP_NONE);
@@ -3458,21 +3487,21 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
RNA_def_property_ui_text(prop, "Audio Codec", "FFmpeg audio codec to use");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "audio_bitrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "audio_bitrate");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 32, 384);
RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate (kb/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "audio_volume");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Volume", "Audio volume");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
#endif
/* the following two "ffmpeg" settings are general audio settings */
@@ -3481,7 +3510,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 8000, 192000);
RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audio_channels");
@@ -3498,7 +3527,8 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna)
static EnumPropertyItem quicktime_codec_type_items[] = {
{0, "codec", 0, "codec", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
#ifdef USE_QTKIT
static EnumPropertyItem quicktime_audio_samplerate_items[] = {
@@ -3508,7 +3538,8 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna)
{88200, "88200", 0, "88.2kHz", ""},
{96000, "96000", 0, "96kHz", ""},
{192000, "192000", 0, "192kHz", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem quicktime_audio_bitdepth_items[] = {
{AUD_FORMAT_U8, "8BIT", 0, "8bit", ""},
@@ -3517,7 +3548,8 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna)
{AUD_FORMAT_S32, "32BIT", 0, "32bit", ""},
{AUD_FORMAT_FLOAT32, "FLOAT32", 0, "float32", ""},
{AUD_FORMAT_FLOAT64, "FLOAT64", 0, "float64", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem quicktime_audio_bitrate_items[] = {
{64000, "64000", 0, "64kbps", ""},
@@ -3526,7 +3558,8 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna)
{192000, "192000", 0, "192kbps", ""},
{256000, "256000", 0, "256kbps", ""},
{320000, "320000", 0, "320kbps", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
#endif
/* QuickTime */
@@ -3538,54 +3571,54 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna)
RNA_def_property_enum_bitflag_sdna(prop, NULL, "codecType");
RNA_def_property_enum_items(prop, quicktime_codec_type_items);
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_codecType_get",
- "rna_RenderSettings_qtcodecsettings_codecType_set",
- "rna_RenderSettings_qtcodecsettings_codecType_itemf");
+ "rna_RenderSettings_qtcodecsettings_codecType_set",
+ "rna_RenderSettings_qtcodecsettings_codecType_itemf");
RNA_def_property_ui_text(prop, "Codec", "QuickTime codec type");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "codec_spatial_quality", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "codecSpatialQuality");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Spatial quality", "Intra-frame spatial quality level");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
#ifdef USE_QTKIT
prop = RNA_def_property(srna, "audiocodec_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audiocodecType");
RNA_def_property_enum_items(prop, quicktime_codec_type_items);
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_audiocodecType_get",
- "rna_RenderSettings_qtcodecsettings_audiocodecType_set",
- "rna_RenderSettings_qtcodecsettings_audiocodecType_itemf");
+ "rna_RenderSettings_qtcodecsettings_audiocodecType_set",
+ "rna_RenderSettings_qtcodecsettings_audiocodecType_itemf");
RNA_def_property_ui_text(prop, "Audio Codec", "QuickTime audio codec type");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "audio_samplerate", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioSampleRate");
RNA_def_property_enum_items(prop, quicktime_audio_samplerate_items);
RNA_def_property_ui_text(prop, "Smp Rate", "Sample Rate");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "audio_bitdepth", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitDepth");
RNA_def_property_enum_items(prop, quicktime_audio_bitdepth_items);
RNA_def_property_ui_text(prop, "Bit Depth", "Bit Depth");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "audio_resampling_hq", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QTAUDIO_FLAG_RESAMPLE_NOHQ);
RNA_def_property_ui_text(prop, "HQ", "Use High Quality resampling algorithm");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "audio_codec_isvbr", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QTAUDIO_FLAG_CODEC_ISCBR);
RNA_def_property_ui_text(prop, "VBR", "Use Variable Bit Rate compression (improves quality at same bitrate)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "audio_bitrate", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitRate");
RNA_def_property_enum_items(prop, quicktime_audio_bitrate_items);
RNA_def_property_ui_text(prop, "Bitrate", "Compressed audio bitrate");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
#endif
}
#endif
@@ -3603,20 +3636,23 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", "Use a Catmull-Rom filter for anti-aliasing"},
{R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", "Use a Gaussian filter for anti-aliasing"},
{R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", "Use a Mitchell-Netravali filter for anti-aliasing"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem alpha_mode_items[] = {
{R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
{R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
{R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem display_mode_items[] = {
{R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
{R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
{R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
{R_OUTPUT_NONE, "NONE", 0, "Keep UI", "Images are rendered without forcing UI changes"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
/* Bake */
static EnumPropertyItem bake_mode_items[] = {
@@ -3632,27 +3668,31 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{RE_BAKE_MIRROR_COLOR, "MIRROR_COLOR", 0, "Mirror Colors", "Bake Mirror colors"},
{RE_BAKE_SPEC_INTENSITY, "SPEC_INTENSITY", 0, "Specular Intensity", "Bake Specular values"},
{RE_BAKE_SPEC_COLOR, "SPEC_COLOR", 0, "Specular Colors", "Bake Specular colors"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem bake_normal_space_items[] = {
{R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", "Bake the normals in camera space"},
{R_BAKE_SPACE_WORLD, "WORLD", 0, "World", "Bake the normals in world space"},
{R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"},
{R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem bake_qyad_split_items[] = {
{0, "AUTO", 0, "Automatic", "Split quads to give the least distortion while baking"},
{1, "FIXED", 0, "Fixed", "Split quads predictably (0,1,2) (0,2,3)"},
{2, "FIXED_ALT", 0, "Fixed Alternate", "Split quads predictably (1,2,3) (1,3,0)"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem octree_resolution_items[] = {
{64, "64", 0, "64", ""},
{128, "128", 0, "128", ""},
{256, "256", 0, "256", ""},
{512, "512", 0, "512", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem raytrace_structure_items[] = {
{R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", "Automatically select acceleration structure"},
@@ -3662,28 +3702,32 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", "Use SIMD SVBVH"},
{R_RAYSTRUCTURE_SIMD_QBVH, "SIMD_QBVH", 0, "SIMD QBVH", "Use SIMD QBVH"},
{0, NULL, 0, NULL, NULL}
- };
+ };
static EnumPropertyItem fixed_oversample_items[] = {
{5, "5", 0, "5", ""},
{8, "8", 0, "8", ""},
{11, "11", 0, "11", ""},
{16, "16", 0, "16", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem field_order_items[] = {
{0, "EVEN_FIRST", 0, "Upper First", "Upper field first"},
{R_ODDFIELD, "ODD_FIRST", 0, "Lower First", "Lower field first"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem threads_mode_items[] = {
{0, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
{R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem engine_items[] = {
{0, "BLENDER_RENDER", 0, "Blender Render", "Use the Blender internal rendering engine for rendering"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem freestyle_thickness_items[] = {
{R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify unit line thickness in pixels"},
@@ -3713,14 +3757,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 4, 10000);
RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ysch");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 4, 10000);
RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
prop = RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "size");
@@ -3728,19 +3772,19 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 100, 10, 1);
RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xparts");
RNA_def_property_range(prop, 1, 512);
RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yparts");
RNA_def_property_range(prop, 1, 512);
RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xasp");
@@ -3748,7 +3792,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0f, 200.0f);
RNA_def_property_ui_text(prop, "Pixel Aspect X",
"Horizontal aspect ratio - for anamorphic or non-square pixel output");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
prop = RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yasp");
@@ -3756,7 +3800,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0f, 200.0f);
RNA_def_property_ui_text(prop, "Pixel Aspect Y",
"Vertical aspect ratio - for anamorphic or non-square pixel output");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
#ifdef WITH_QUICKTIME
prop = RNA_def_property(srna, "quicktime", PROP_POINTER, PROP_NONE);
@@ -3777,14 +3821,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 120);
RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_fps_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_fps_update");
prop = RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.1f, 120.0f);
RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_fps_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_fps_update");
/* frame mapping */
prop = RNA_def_property(srna, "frame_map_old", PROP_INT, PROP_NONE);
@@ -3792,14 +3836,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 900);
RNA_def_property_ui_text(prop, "Frame Map Old", "Old mapping value in frames");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_update");
prop = RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "images");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 900);
RNA_def_property_ui_text(prop, "Frame Map New", "How many frames the Map Old will last");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_update");
prop = RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
@@ -3807,68 +3851,68 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Dither Intensity",
"Amount of dithering noise added to the rendered image to break up banding");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, pixel_filter_items);
RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gauss");
RNA_def_property_range(prop, 0.5f, 1.5f);
RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "alphamode");
RNA_def_property_enum_items(prop, alpha_mode_items);
RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ocres");
RNA_def_property_enum_items(prop, octree_resolution_items);
RNA_def_property_ui_text(prop, "Octree Resolution",
"Resolution of raytrace accelerator, use higher resolutions for larger scenes");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "raytrace_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure");
RNA_def_property_enum_items(prop, raytrace_structure_items);
RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES);
RNA_def_property_ui_text(prop, "Use Instances",
"Instance support leads to effective memory reduction when using duplicates");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS);
RNA_def_property_ui_text(prop, "Use Local Coords",
"Vertex coordinates are stored locally on each primitive "
"(increases memory usage, but may have impact on speed)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
RNA_def_property_ui_text(prop, "Anti-Aliasing",
"Render and combine multiple samples per pixel to prevent jagged edges");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "osa");
RNA_def_property_enum_items(prop, fixed_oversample_items);
RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
@@ -3876,61 +3920,61 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Field Order",
"Order of video fields (select which lines get rendered first, "
"to create smooth motion for TV output)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* rendering features */
prop = RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
RNA_def_property_ui_text(prop, "Shadows", "Calculate shadows while rendering");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environment maps while rendering");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_radiosity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
RNA_def_property_ui_text(prop, "Radiosity", "Calculate radiosity in a pre-process before rendering");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
RNA_def_property_ui_text(prop, "Subsurface Scattering", "Calculate sub-surface scattering in materials rendering");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
RNA_def_property_ui_text(prop, "Raytracing",
"Pre-calculate the raytrace accelerator and render raytracing effects");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
RNA_def_property_ui_text(prop, "Textures", "Use textures to affect material properties");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "edgeint");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "edgeR");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Color", "Edge color");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS);
@@ -3945,27 +3989,27 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Threads",
"Number of CPU threads to use simultaneously while rendering "
"(for multi-core/CPU systems)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, threads_mode_items);
RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* motion blur */
prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mblur_samples");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blurfac");
@@ -3973,7 +4017,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.01, 2.0f, 1, 0);
RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* border */
prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
@@ -3982,80 +4026,80 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Border",
"Render a user-defined border region, within the frame size "
"(note that this disables save_buffers and full_sample)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.xmin");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Border Minimum X", "Minimum X value to for the render border");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.ymin");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Border Minimum Y", "Minimum Y value for the render border");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.xmax");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Border Maximum X", "Maximum X value for the render border");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.ymax");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Border Maximum Y", "Maximum Y value for the render border");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
RNA_def_property_ui_text(prop, "Placeholders",
"Create empty placeholder files while rendering frames (similar to Unix 'touch')");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
RNA_def_property_ui_text(prop, "Compositing",
"Process the render result through the compositing pipeline, "
"if compositing nodes are enabled");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
RNA_def_property_ui_text(prop, "Sequencer",
"Process the render (and composited) result through the video sequence "
"editor pipeline, if sequencer strips exist");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_color_management", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT);
RNA_def_property_ui_text(prop, "Color Management", "Use linear workflow - gamma corrected imaging pipeline");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_RenderSettings_color_management_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_RenderSettings_color_management_update");
prop = RNA_def_property(srna, "use_color_unpremultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT_PREDIVIDE);
RNA_def_property_ui_text(prop, "Color Unpremultiply",
"For premultiplied alpha render output, do color space conversion on "
"colors without alpha, to avoid fringing on light backgrounds");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
RNA_def_property_ui_text(prop, "File Extensions",
"Add the file format extensions to the rendered file name (eg: filename + .jpg)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
#if 0 /* moved */
prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
@@ -4063,7 +4107,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_enum_items(prop, image_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL);
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
#endif
prop = RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE);
@@ -4080,13 +4124,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
RNA_def_property_ui_text(prop, "Free Image Textures",
"Free all image textures from memory after render, to save memory before compositing");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_COMP_FREE);
RNA_def_property_ui_text(prop, "Free Unused Nodes",
"Free Nodes that are not used while compositing, to save memory");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
@@ -4094,7 +4138,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Save Buffers",
"Save tiles for all RenderLayers and SceneNodes to files in the temp directory "
"(saves memory, required for Full Sample)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
@@ -4102,20 +4146,20 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Full Sample",
"Save for every anti-aliasing sample the entire RenderLayer results "
"(this solves anti-aliasing issues with compositing)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "pic");
RNA_def_property_ui_text(prop, "Output Path",
"Directory/name to save animations, # characters defines the position "
"and length of frame numbers");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* Bake */
@@ -4189,88 +4233,88 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
RNA_def_property_ui_text(prop, "Stamp Time",
"Include the rendered frame timecode as HH:MM:SS.FF in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_frame", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_camera", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERALENS);
RNA_def_property_ui_text(prop, "Stamp Lens", "Include the active camera's lens in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_note", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_marker", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
RNA_def_property_ui_text(prop, "Stamp Filename", "Include the .blend filename in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
RNA_def_property_ui_text(prop, "Stamp Sequence Strip",
"Include the name of the foreground sequence strip in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_RENDERTIME);
RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in image metadata");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_stamp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "stamp_font_id");
RNA_def_property_range(prop, 8, 64);
RNA_def_property_ui_text(prop, "Font Size", "Size of the font used when rendering stamp text");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
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_ui_text(prop, "Text Color", "Color to use for stamp text");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ 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_ui_text(prop, "Background", "Color to use behind stamp text");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* sequencer draw options */
@@ -4305,7 +4349,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* engine */
prop = RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
@@ -4393,9 +4437,9 @@ static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "link", "rna_Scene_object_link");
RNA_def_function_ui_description(func, "Link object to scene, run scene.update() after");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "object", "Object", "", "Object to add to scene");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
parm = RNA_def_pointer(func, "base", "ObjectBase", "", "The newly created base");
RNA_def_function_return(func, parm);
@@ -4403,16 +4447,16 @@ static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Unlink object from scene");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Object", "Active object for this scene");
/* Could call: ED_base_object_activate(C, scene->basact);
* but would be a bad level call and it seems the notifier is enough */
- RNA_def_property_update(prop, NC_SCENE|ND_OB_ACTIVE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL);
}
@@ -4435,7 +4479,7 @@ static void rna_def_scene_bases(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_pointer_sdna(prop, NULL, "basact");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active Base", "Active object base in the scene");
- RNA_def_property_update(prop, NC_SCENE|ND_OB_ACTIVE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL);
}
/* scene.timeline_markers */
@@ -4464,7 +4508,7 @@ static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Remove a timeline marker");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
func = RNA_def_function(srna, "clear", "rna_TimeLine_clear");
RNA_def_function_ui_description(func, "Remove all timeline markers");
@@ -4502,7 +4546,7 @@ static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get",
"rna_Scene_active_keying_set_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
@@ -4510,7 +4554,7 @@ static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop)
"rna_Scene_active_keying_set_index_set", NULL);
RNA_def_property_ui_text(prop, "Active Keying Set Index",
"Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
}
static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop)
@@ -4531,7 +4575,7 @@ static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get",
"rna_Scene_active_keying_set_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
@@ -4539,7 +4583,7 @@ static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop)
"rna_Scene_active_keying_set_index_set", NULL);
RNA_def_property_ui_text(prop, "Active Keying Set Index",
"Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
}
/* Runtime property, used to remember uv indices, used only in UV stitch for now.
@@ -4568,7 +4612,9 @@ void RNA_def_scene(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
+
FunctionRNA *func;
+ PropertyRNA *parm;
static EnumPropertyItem audio_distance_model_items[] = {
{0, "NONE", 0, "None", "No distance attenuation"},
@@ -4578,13 +4624,15 @@ void RNA_def_scene(BlenderRNA *brna)
{4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping"},
{5, "EXPONENT", 0, "Exponent", "Exponent distance model"},
{6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
static EnumPropertyItem sync_mode_items[] = {
{0, "NONE", 0, "No Sync", "Do not sync, play every frame"},
{SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames if playback is too slow"},
{AUDIO_SYNC, "AUDIO_SYNC", 0, "AV-sync", "Sync to audio playback, dropping frames"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
/* Struct definition */
srna = RNA_def_struct(brna, "Scene", "ID");
@@ -4598,20 +4646,20 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
RNA_def_property_ui_text(prop, "Camera", "Active camera, used for rendering the scene");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_view3d_update");
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_view3d_update");
prop = RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "set");
RNA_def_property_struct_type(prop, "Scene");
- RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Background Scene", "Background set scene");
- RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, NULL);
prop = RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "World", "World used for rendering the scene");
- RNA_def_property_update(prop, NC_SCENE|ND_WORLD, "rna_Scene_glsl_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_WORLD, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "cursor");
@@ -4637,17 +4685,17 @@ void RNA_def_scene(BlenderRNA *brna)
/* Layers */
prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
- /* this seems to be too much trouble with depsgraph updates/etc. currently (20110420) */
+ /* this seems to be too much trouble with depsgraph updates/etc. currently (20110420) */
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
RNA_def_property_ui_text(prop, "Layers", "Visible layers - Shift-Click to select multiple layers");
- RNA_def_property_update(prop, NC_SCENE|ND_LAYER, "rna_Scene_layer_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_LAYER, "rna_Scene_layer_update");
/* active layer */
prop = RNA_def_property(srna, "active_layer", PROP_INT, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_Scene_active_layer_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Layer", "Active scene layer index");
@@ -4659,12 +4707,12 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_current_frame_set", NULL);
RNA_def_property_ui_text(prop, "Current Frame",
"Current Frame, to update animation data from python frame_set() instead");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_frame_update");
prop = RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "r.subframe");
RNA_def_property_ui_text(prop, "Current Sub-Frame", "");
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -4672,7 +4720,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, NULL);
prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -4680,7 +4728,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, NULL);
prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -4689,7 +4737,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 1, 100, 1, 0);
RNA_def_property_ui_text(prop, "Frame Step",
"Number of frames to skip forward while rendering/playing back each frame");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
/* Preview Range (frame-range for UI playback) */
prop = RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE);
@@ -4699,7 +4747,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Preview Range",
"Use an alternative start/end frame for UI playback, "
"rather than the scene start/end frame");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
RNA_def_property_ui_icon(prop, ICON_PREVIEW_RANGE, 0);
prop = RNA_def_property(srna, "frame_preview_start", PROP_INT, PROP_TIME);
@@ -4707,20 +4755,20 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "r.psfra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Preview Range Start Frame", "Alternative start frame for UI playback");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
prop = RNA_def_property(srna, "frame_preview_end", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.pefra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "Preview Range End Frame", "Alternative end frame for UI playback");
- RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
/* Stamp */
prop = RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
RNA_def_property_ui_text(prop, "Stamp Note", "User defined note for the render stamping");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* Animation Data (for Scene) */
rna_def_animdata_common(srna);
@@ -4731,7 +4779,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */
RNA_def_property_ui_text(prop, "NLA TweakMode",
"Whether there is any action referenced by NLA being edited (strictly read-only)");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
/* Frame dropping flag for playback and sync enum */
prop = RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE);
@@ -4755,7 +4803,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set");
RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* Sequencer */
prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
@@ -4763,12 +4811,20 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "SequenceEditor");
RNA_def_property_ui_text(prop, "Sequence Editor", "");
+ func = RNA_def_function(srna, "sequence_editor_create", "BKE_sequencer_editing_ensure");
+ RNA_def_function_ui_description(func, "Ensure sequence editor is valid in this scene");
+ parm = RNA_def_pointer(func, "sequence_editor", "SequenceEditor", "", "New sequence editor data or NULL");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "sequence_editor_clear", "BKE_sequencer_editing_free");
+ RNA_def_function_ui_description(func, "Clear sequence editor in this scene");
+
/* Keying Sets */
prop = RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying Sets for this Scene");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
rna_def_scene_keying_sets(brna, prop);
prop = RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE);
@@ -4778,7 +4834,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_ui_text(prop, "All Keying Sets",
"All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
rna_def_scene_keying_sets_all(brna, prop);
/* Tool Settings */
@@ -4899,7 +4955,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "MovieClip");
RNA_def_property_ui_text(prop, "Active Movie Clip", "Active movie clip used for constraints and viewport drawing");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
/* Nestled Data */
rna_def_tool_settings(brna);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index c92a29cec3c..ca01d61f630 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -56,11 +56,11 @@ void rna_Scene_frame_set(Scene *scene, int frame, float subframe)
scene->r.subframe = subframe;
CLAMP(scene->r.cfra, MINAFRAME, MAXFRAME);
- scene_update_for_newframe(G.main, scene, (1<<20) - 1);
- scene_camera_switch_update(scene);
+ BKE_scene_update_for_newframe(G.main, scene, (1<<20) - 1);
+ BKE_scene_camera_switch_update(scene);
/* cant use NC_SCENE|ND_FRAME because this casues wm_event_do_notifiers to call
- * scene_update_for_newframe which will loose any un-keyed changes [#24690] */
+ * BKE_scene_update_for_newframe which will loose any un-keyed changes [#24690] */
/* WM_main_add_notifier(NC_SCENE|ND_FRAME, scene); */
/* instead just redraw the views */
@@ -69,13 +69,13 @@ void rna_Scene_frame_set(Scene *scene, int frame, float subframe)
static void rna_Scene_update_tagged(Scene *scene)
{
- scene_update_tagged(G.main, scene);
+ BKE_scene_update_tagged(G.main, scene);
}
static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name)
{
if (BKE_imtype_is_movie(rd->im_format.imtype))
- BKE_makeanimstring(name, rd);
+ BKE_movie_filepath_get(name, rd);
else
BKE_makepicstring(name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, rd->im_format.imtype,
rd->scemode & R_EXTENSION, TRUE);
@@ -85,9 +85,9 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
#include "../../collada/collada.h"
-static void rna_Scene_collada_export(Scene *scene, const char *filepath, int selected, int second_life)
+static void rna_Scene_collada_export(Scene *scene, const char *filepath, int selected, int apply_modifiers, int second_life)
{
- collada_export(scene, filepath, selected, second_life);
+ collada_export(scene, filepath, selected, apply_modifiers, second_life);
}
#endif
@@ -115,7 +115,8 @@ void RNA_api_scene(StructRNA *srna)
parm = RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */
- parm = RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
+ parm = RNA_def_boolean(func, "selected", 0, "Selection Only", "Export only selected elements");
+ parm = RNA_def_boolean(func, "apply_modifiers", 0, "Apply Modifiers", "Apply modifiers (in Preview resolution)");
parm = RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
RNA_def_function_ui_description(func, "Export to collada file");
#endif
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 775e943b9a2..d64dd1a626e 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -49,6 +49,14 @@
#include "WM_types.h"
#include "BLI_math.h"
+typedef struct EffectInfo {
+ const char *struct_name;
+ const char *ui_name;
+ const char *ui_desc;
+ void (*func)(StructRNA *);
+ int inputs;
+} EffectInfo;
+
#ifdef RNA_RUNTIME
/* build a temp referene to the parent */
@@ -64,8 +72,8 @@ static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Scene *scene = (Scene*)ptr->id.data;
- Editing *ed = seq_give_editing(scene, FALSE);
+ Scene *scene = (Scene *)ptr->id.data;
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
meta_tmp_ref(NULL, ed->seqbase.first);
@@ -75,19 +83,19 @@ static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *i
static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal = iter->internal;
- Sequence *seq = (Sequence*)internal->link;
+ Sequence *seq = (Sequence *)internal->link;
if (seq->seqbase.first)
- internal->link = (Link*)seq->seqbase.first;
+ internal->link = (Link *)seq->seqbase.first;
else if (seq->next)
- internal->link = (Link*)seq->next;
+ internal->link = (Link *)seq->next;
else {
internal->link = NULL;
do {
seq = seq->tmp; /* XXX - seq's don't reference their parents! */
if (seq && seq->next) {
- internal->link = (Link*)seq->next;
+ internal->link = (Link *)seq->next;
break;
}
} while (seq);
@@ -99,10 +107,10 @@ static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *it
/* internal use */
static int rna_SequenceEditor_elements_length(PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)ptr->data;
+ Sequence *seq = (Sequence *)ptr->data;
/* Hack? copied from sequencer.c::reload_sequence_new_file() */
- size_t olen = MEM_allocN_len(seq->strip->stripdata)/sizeof(struct StripElem);
+ size_t olen = MEM_allocN_len(seq->strip->stripdata) / sizeof(struct StripElem);
/* the problem with seq->strip->len and seq->len is that it's discounted from the offset (hard cut trim) */
return (int) olen;
@@ -110,27 +118,27 @@ static int rna_SequenceEditor_elements_length(PointerRNA *ptr)
static void rna_SequenceEditor_elements_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)ptr->data;
- rna_iterator_array_begin(iter, (void*)seq->strip->stripdata, sizeof(StripElem),
+ Sequence *seq = (Sequence *)ptr->data;
+ rna_iterator_array_begin(iter, (void *)seq->strip->stripdata, sizeof(StripElem),
rna_SequenceEditor_elements_length(ptr), 0, NULL);
}
static void rna_Sequence_frame_change_update(Scene *scene, Sequence *seq)
{
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
ListBase *seqbase = seq_seqbase(&ed->seqbase, seq);
calc_sequence_disp(scene, seq);
if (seq_test_overlap(seqbase, seq)) {
shuffle_seq(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */
}
- sort_seq(scene);
+ BKE_sequencer_sort(scene);
}
static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
- Scene *scene = (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
seq_translate(scene, seq, value - seq->start);
rna_Sequence_frame_change_update(scene, seq);
@@ -138,8 +146,8 @@ static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
- Scene *scene = (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
seq_tx_set_final_left(seq, value);
seq_single_fix(seq);
@@ -148,8 +156,8 @@ static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value)
static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
- Scene *scene = (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
seq_tx_set_final_right(seq, value);
seq_single_fix(seq);
@@ -158,8 +166,8 @@ static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
- Scene *scene = (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
@@ -169,8 +177,8 @@ static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
- Scene *scene = (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
@@ -180,52 +188,52 @@ static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
- Scene *scene = (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
- seq_tx_set_final_right(seq, seq->start+value);
+ seq_tx_set_final_right(seq, seq->start + value);
rna_Sequence_frame_change_update(scene, seq);
}
static int rna_Sequence_frame_length_get(PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)ptr->data;
- return seq_tx_get_final_right(seq, 0)-seq_tx_get_final_left(seq, 0);
+ Sequence *seq = (Sequence *)ptr->data;
+ return seq_tx_get_final_right(seq, 0) - seq_tx_get_final_left(seq, 0);
}
static int rna_Sequence_frame_editable(PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)ptr->data;
+ Sequence *seq = (Sequence *)ptr->data;
/* Effect sequences' start frame and length must be readonly! */
- return (get_sequence_effect_num_inputs(seq->type))? 0: PROP_EDITABLE;
+ return (get_sequence_effect_num_inputs(seq->type)) ? 0 : PROP_EDITABLE;
}
static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
- Scene *scene = (Scene*)ptr->id.data;
- Editing *ed = seq_give_editing(scene, FALSE);
+ Sequence *seq = (Sequence *)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
ListBase *seqbase = seq_seqbase(&ed->seqbase, seq);
seq->machine = value;
- if ( seq_test_overlap(seqbase, seq) ) {
+ if (seq_test_overlap(seqbase, seq) ) {
shuffle_seq(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */
}
- sort_seq(scene);
+ BKE_sequencer_sort(scene);
}
/* properties that need to allocate structs */
static void rna_Sequence_use_color_balance_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
+ Sequence *seq = (Sequence *)ptr->data;
int c;
if (value) {
seq->flag |= SEQ_USE_COLOR_BALANCE;
if (seq->strip->color_balance == NULL) {
seq->strip->color_balance = MEM_callocN(sizeof(struct StripColorBalance), "StripColorBalance");
- for (c = 0; c<3; c++) {
+ for (c = 0; c < 3; c++) {
seq->strip->color_balance->lift[c] = 1.0f;
seq->strip->color_balance->gamma[c] = 1.0f;
seq->strip->color_balance->gain[c] = 1.0f;
@@ -239,15 +247,14 @@ static void rna_Sequence_use_color_balance_set(PointerRNA *ptr, int value)
static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
+ Sequence *seq = (Sequence *)ptr->data;
if (value) {
seq->flag |= SEQ_USE_PROXY;
if (seq->strip->proxy == NULL) {
seq->strip->proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy");
seq->strip->proxy->quality = 90;
seq->strip->proxy->build_tc_flags = SEQ_PROXY_TC_ALL;
- seq->strip->proxy->build_size_flags
- = SEQ_PROXY_IMAGE_SIZE_25;
+ seq->strip->proxy->build_size_flags = SEQ_PROXY_IMAGE_SIZE_25;
}
}
else {
@@ -257,7 +264,7 @@ static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
+ Sequence *seq = (Sequence *)ptr->data;
if (value) {
seq->flag |= SEQ_USE_TRANSFORM;
if (seq->strip->transform == NULL) {
@@ -271,7 +278,7 @@ static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value)
static void rna_Sequence_use_crop_set(PointerRNA *ptr, int value)
{
- Sequence *seq = (Sequence*)ptr->data;
+ Sequence *seq = (Sequence *)ptr->data;
if (value) {
seq->flag |= SEQ_USE_CROP;
if (seq->strip->crop == NULL) {
@@ -297,7 +304,7 @@ static int transform_seq_cmp_cb(Sequence *seq, void *arg_pt)
static char *rna_SequenceTransform_path(PointerRNA *ptr)
{
Scene *scene = ptr->id.data;
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq;
struct { Sequence *seq; void *transform; } data;
@@ -308,8 +315,8 @@ static char *rna_SequenceTransform_path(PointerRNA *ptr)
seqbase_recursive_apply(&ed->seqbase, transform_seq_cmp_cb, &data);
seq = data.seq;
- if (seq && seq->name+2)
- return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform", seq->name+2);
+ if (seq && seq->name + 2)
+ return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform", seq->name + 2);
else
return BLI_strdup("");
}
@@ -328,7 +335,7 @@ static int crop_seq_cmp_cb(Sequence *seq, void *arg_pt)
static char *rna_SequenceCrop_path(PointerRNA *ptr)
{
Scene *scene = ptr->id.data;
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq;
struct { Sequence *seq; void *crop; } data;
@@ -339,8 +346,8 @@ static char *rna_SequenceCrop_path(PointerRNA *ptr)
seqbase_recursive_apply(&ed->seqbase, crop_seq_cmp_cb, &data);
seq = data.seq;
- if (seq && seq->name+2)
- return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].crop", seq->name+2);
+ if (seq && seq->name + 2)
+ return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].crop", seq->name + 2);
else
return BLI_strdup("");
}
@@ -349,28 +356,28 @@ static char *rna_SequenceCrop_path(PointerRNA *ptr)
/* name functions that ignore the first two characters */
static void rna_Sequence_name_get(PointerRNA *ptr, char *value)
{
- Sequence *seq = (Sequence*)ptr->data;
- BLI_strncpy(value, seq->name+2, sizeof(seq->name)-2);
+ Sequence *seq = (Sequence *)ptr->data;
+ BLI_strncpy(value, seq->name + 2, sizeof(seq->name) - 2);
}
static int rna_Sequence_name_length(PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)ptr->data;
- return strlen(seq->name+2);
+ Sequence *seq = (Sequence *)ptr->data;
+ return strlen(seq->name + 2);
}
static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
{
- Scene *scene = (Scene*)ptr->id.data;
- Sequence *seq = (Sequence*)ptr->data;
+ Scene *scene = (Scene *)ptr->id.data;
+ Sequence *seq = (Sequence *)ptr->data;
char oldname[sizeof(seq->name)];
AnimData *adt;
/* make a copy of the old name first */
- BLI_strncpy(oldname, seq->name+2, sizeof(seq->name)-2);
+ BLI_strncpy(oldname, seq->name + 2, sizeof(seq->name) - 2);
/* copy the new name into the name slot */
- BLI_strncpy_utf8(seq->name+2, value, sizeof(seq->name)-2);
+ BLI_strncpy_utf8(seq->name + 2, value, sizeof(seq->name) - 2);
/* make sure the name is unique */
seqbase_unique_name_recursive(&scene->ed->seqbase, seq);
@@ -381,12 +388,12 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
/* BKE_all_animdata_fix_paths_rename(NULL, "sequence_editor.sequences_all", oldname, seq->name+2); */
adt = BKE_animdata_from_id(&scene->id);
if (adt)
- BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name+2, 0, 0, 1);
+ BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name + 2, 0, 0, 1);
}
-static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
+static StructRNA *rna_Sequence_refine(struct PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)ptr->data;
+ Sequence *seq = (Sequence *)ptr->data;
switch (seq->type) {
case SEQ_IMAGE:
@@ -402,14 +409,21 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
case SEQ_SOUND:
return &RNA_SoundSequence;
case SEQ_CROSS:
+ return &RNA_CrossSequence;
case SEQ_ADD:
+ return &RNA_AddSequence;
case SEQ_SUB:
+ return &RNA_SubtractSequence;
case SEQ_ALPHAOVER:
+ return &RNA_AlphaOverSequence;
case SEQ_ALPHAUNDER:
+ return &RNA_AlphaUnderSequence;
case SEQ_GAMCROSS:
+ return &RNA_GammaCrossSequence;
case SEQ_MUL:
+ return &RNA_MultiplySequence;
case SEQ_OVERDROP:
- return &RNA_EffectSequence;
+ return &RNA_OverDropSequence;
case SEQ_MULTICAM:
return &RNA_MulticamSequence;
case SEQ_ADJUSTMENT:
@@ -431,13 +445,13 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
static char *rna_Sequence_path(PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)ptr->data;
+ Sequence *seq = (Sequence *)ptr->data;
/* sequencer data comes from scene...
* TODO: would be nice to make SequenceEditor data a datablock of its own (for shorter paths)
*/
- if (seq->name+2)
- return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"]", seq->name+2);
+ if (seq->name + 2)
+ return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"]", seq->name + 2);
else
return BLI_strdup("");
}
@@ -445,7 +459,7 @@ static char *rna_Sequence_path(PointerRNA *ptr)
static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal = iter->internal;
- MetaStack *ms = (MetaStack*)internal->link;
+ MetaStack *ms = (MetaStack *)internal->link;
return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
}
@@ -453,7 +467,7 @@ static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *
/* TODO, expose seq path setting as a higher level sequencer BKE function */
static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
if (seq->type == SEQ_SOUND && seq->sound) {
/* for sound strips we need to update the sound as well.
@@ -473,14 +487,14 @@ static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
BLI_join_dirfile(value, FILE_MAX, seq->strip->dir, seq->strip->stripdata->name);
}
static int rna_Sequence_filepath_length(PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
char path[FILE_MAX];
BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name);
@@ -489,20 +503,20 @@ static int rna_Sequence_filepath_length(PointerRNA *ptr)
static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
{
- StripProxy *proxy = (StripProxy*)(ptr->data);
+ StripProxy *proxy = (StripProxy *)(ptr->data);
BLI_split_dirfile(value, proxy->dir, proxy->file, sizeof(proxy->dir), sizeof(proxy->file));
}
static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
{
- StripProxy *proxy = (StripProxy*)(ptr->data);
+ StripProxy *proxy = (StripProxy *)(ptr->data);
BLI_join_dirfile(value, FILE_MAX, proxy->dir, proxy->file);
}
static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
{
- StripProxy *proxy = (StripProxy*)(ptr->data);
+ StripProxy *proxy = (StripProxy *)(ptr->data);
char path[FILE_MAX];
BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file);
@@ -511,7 +525,7 @@ static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
static void rna_Sequence_volume_set(PointerRNA *ptr, float value)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
seq->volume = value;
if (seq->scene_sound)
@@ -520,7 +534,7 @@ static void rna_Sequence_volume_set(PointerRNA *ptr, float value)
static void rna_Sequence_pitch_set(PointerRNA *ptr, float value)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
seq->pitch = value;
if (seq->scene_sound)
@@ -529,7 +543,7 @@ static void rna_Sequence_pitch_set(PointerRNA *ptr, float value)
static void rna_Sequence_pan_set(PointerRNA *ptr, float value)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
seq->pan = value;
if (seq->scene_sound)
@@ -539,11 +553,13 @@ static void rna_Sequence_pan_set(PointerRNA *ptr, float value)
static int rna_Sequence_input_count_get(PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
return get_sequence_effect_num_inputs(seq->type);
}
-/*static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
+
+#if 0
+static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
{
Sequence *seq= (Sequence*)(ptr->data);
BLI_split_dirfile(value, seq->strip->dir, seq->strip->stripdata->name, sizeof(seq->strip->dir),
@@ -554,11 +570,12 @@ static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
{
StripElem *elem= (StripElem*)(ptr->data);
BLI_split_file_part(value, elem->name, sizeof(elem->name));
-}*/
+}
+#endif
static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
if (ed)
free_imbuf_seq(scene, &ed->seqbase, FALSE, TRUE);
@@ -566,7 +583,7 @@ static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *U
static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE);
@@ -576,7 +593,7 @@ static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene,
static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
seq_update_muting(ed);
rna_Sequence_update(bmain, scene, ptr);
@@ -584,7 +601,7 @@ static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
reload_sequence_new_file(scene, seq, TRUE);
calc_sequence(scene, seq);
rna_Sequence_update(bmain, scene, ptr);
@@ -603,7 +620,7 @@ static int seqproxy_seq_cmp_cb(Sequence *seq, void *arg_pt)
static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq;
struct { Sequence *seq; void *seq_proxy; } data;
@@ -621,12 +638,12 @@ static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *p
/* do_versions? */
static float rna_Sequence_opacity_get(PointerRNA *ptr)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
return seq->blend_opacity / 100.0f;
}
static void rna_Sequence_opacity_set(PointerRNA *ptr, float value)
{
- Sequence *seq = (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
CLAMP(value, 0.0f, 1.0f);
seq->blend_opacity = value * 100.0f;
}
@@ -645,7 +662,7 @@ static int colbalance_seq_cmp_cb(Sequence *seq, void *arg_pt)
static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
{
Scene *scene = ptr->id.data;
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq;
struct { Sequence *seq; void *color_balance; } data;
@@ -656,8 +673,8 @@ static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
seqbase_recursive_apply(&ed->seqbase, colbalance_seq_cmp_cb, &data);
seq = data.seq;
- if (seq && seq->name+2)
- return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", seq->name+2);
+ if (seq && seq->name + 2)
+ return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", seq->name + 2);
else
return BLI_strdup("");
}
@@ -665,7 +682,7 @@ static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value)
{
Scene *scene = ptr->id.data;
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
if (ed == NULL)
return;
@@ -684,7 +701,7 @@ static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value)
static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
{
Scene *scene = (Scene *)ptr->id.data;
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
if (ed == NULL)
return scene->r.cfra;
@@ -699,7 +716,7 @@ static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
{
Scene *scene = (Scene *)ptr->id.data;
- Editing *ed = seq_give_editing(scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
if (ed == NULL)
return;
@@ -742,7 +759,7 @@ static void rna_def_strip_element(BlenderRNA *brna)
prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orig_width");
@@ -768,25 +785,25 @@ static void rna_def_strip_crop(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "top");
RNA_def_property_ui_text(prop, "Top", "");
RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "min_y", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "bottom");
RNA_def_property_ui_text(prop, "Bottom", "");
RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "min_x", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "left");
RNA_def_property_ui_text(prop, "Left", "");
RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "max_x", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "right");
RNA_def_property_ui_text(prop, "Right", "");
RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
RNA_def_struct_path_func(srna, "rna_SequenceCrop_path");
}
@@ -804,13 +821,13 @@ static void rna_def_strip_transform(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "xofs");
RNA_def_property_ui_text(prop, "Offset X", "");
RNA_def_property_ui_range(prop, -4096, 4096, 1, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "offset_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yofs");
RNA_def_property_ui_text(prop, "Offset Y", "");
RNA_def_property_ui_range(prop, -4096, 4096, 1, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
RNA_def_struct_path_func(srna, "rna_SequenceTransform_path");
@@ -833,7 +850,8 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
{SEQ_PROXY_TC_RECORD_RUN_NO_GAPS, "RECORD_RUN_NO_GAPS", 0, "Record Run No Gaps",
"Like record run, but ignore timecode, "
"changes in framerate or dropouts"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "SequenceProxy", NULL);
RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip");
@@ -842,14 +860,14 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "dir");
RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
RNA_def_property_string_funcs(prop, "rna_Sequence_proxy_filepath_get", "rna_Sequence_proxy_filepath_length",
"rna_Sequence_proxy_filepath_set");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_25);
@@ -888,7 +906,7 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "tc");
RNA_def_property_enum_items(prop, seq_tc_items);
RNA_def_property_ui_text(prop, "Timecode", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_tcindex_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_tcindex_update");
}
@@ -904,36 +922,37 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAIN);
RNA_def_property_ui_text(prop, "Inverse Gain", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "invert_gamma", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAMMA);
RNA_def_property_ui_text(prop, "Inverse Gamma", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "invert_lift", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_LIFT);
RNA_def_property_ui_text(prop, "Inverse Lift", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
- /* not yet used
+ /* not yet used */
+#if 0
prop= RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Exposure", "");
@@ -942,9 +961,23 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
prop= RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Saturation", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); */
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+#endif
}
+EnumPropertyItem blend_mode_items[] = {
+ {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
+ {SEQ_CROSS, "CROSS", 0, "Cross", ""},
+ {SEQ_ADD, "ADD", 0, "Add", ""},
+ {SEQ_SUB, "SUBTRACT", 0, "Subtract", ""},
+ {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
+ {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
+ {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
+ {SEQ_MUL, "MULTIPLY", 0, "Multiply", ""},
+ {SEQ_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
static void rna_def_sequence(BlenderRNA *brna)
{
StructRNA *srna;
@@ -973,19 +1006,8 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_SPEED, "SPEED", 0, "Speed", ""},
{SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
{SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static const EnumPropertyItem blend_mode_items[] = {
- {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
- {SEQ_CROSS, "CROSS", 0, "Cross", ""},
- {SEQ_ADD, "ADD", 0, "Add", ""},
- {SEQ_SUB, "SUBTRACT", 0, "Subtract", ""},
- {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
- {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
- {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
- {SEQ_MUL, "MULTIPLY", 0, "Multiply", ""},
- {SEQ_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "Sequence", NULL);
RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor");
@@ -994,65 +1016,56 @@ static void rna_def_sequence(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
- RNA_def_property_string_maxlength(prop, sizeof(((Sequence*)NULL)->name)-2);
+ RNA_def_property_string_maxlength(prop, sizeof(((Sequence *)NULL)->name) - 2);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, seq_type_items);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
- /*prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); */
- /*RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by this sequence"); */
/* flags */
-
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Select", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LEFTSEL);
RNA_def_property_ui_text(prop, "Left Handle Selected", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_RIGHTSEL);
RNA_def_property_ui_text(prop, "Right Handle Selected", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE);
RNA_def_property_ui_text(prop, "Mute", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_mute_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_mute_update");
prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
-
- prop = RNA_def_property(srna, "waveform", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_AUDIO_DRAW_WAVEFORM);
- RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
/* strip positioning */
-
prop = RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME);
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_editable_func(prop, "rna_Sequence_frame_editable");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "len");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE|PROP_ANIMATABLE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE | PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_text(prop, "Length",
"The length of the contents of this strip before the handles are applied");
@@ -1063,7 +1076,7 @@ static void rna_def_sequence(BlenderRNA *brna)
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_editable_func(prop, "rna_Sequence_frame_editable");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startdisp");
@@ -1071,53 +1084,53 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Start Frame",
"Start frame displayed in the sequence editor after offsets are applied, setting this is "
"equivalent to moving the handle, not the actual start frame");
- /* overlap tests and calc_seq_disp */
+ /* overlap tests and calc_seq_disp */
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL);
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "enddisp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "End Frame",
"End frame displayed in the sequence editor after offsets are applied");
- /* overlap tests and calc_seq_disp */
+ /* overlap tests and calc_seq_disp */
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL);
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_ui_text(prop, "Start Offset", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_ui_text(prop, "End Offset", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startstill");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Still", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endstill");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "End Still", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "machine");
- RNA_def_property_range(prop, 0, MAXSEQ-1);
+ 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_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
/* blending */
@@ -1125,27 +1138,27 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "blend_mode");
RNA_def_property_enum_items(prop, blend_mode_items);
RNA_def_property_ui_text(prop, "Blend Mode", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "blend_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Blend Opacity", "");
- /* stupid 0-100 -> 0-1 */
+ /* stupid 0-100 -> 0-1 */
RNA_def_property_float_funcs(prop, "rna_Sequence_opacity_get", "rna_Sequence_opacity_set", NULL);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_sdna(prop, NULL, "effect_fader");
RNA_def_property_ui_text(prop, "Effect fader position", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_default_fade", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_EFFECT_DEFAULT_FADE);
RNA_def_property_ui_text(prop, "Use Default Fade",
"Fade effect using the built-in default (usually make transition as long as "
"effect strip)");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
@@ -1153,25 +1166,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Speed factor",
"Multiply the current speed of the sequence with this number or remap current frame "
"to this frame");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
-
- /* effect strip inputs */
-
- prop = RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
-
- prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "seq1");
- RNA_def_property_ui_text(prop, "Input 1", "First input for the effect strip");
-
- prop = RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "seq2");
- RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
-
- prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "seq1");
- RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
RNA_api_sequence_strip(srna);
}
@@ -1190,6 +1185,7 @@ static void rna_def_editor(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Sequences", "");
+ RNA_api_sequences(brna, prop);
prop = RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
@@ -1208,25 +1204,25 @@ static void rna_def_editor(BlenderRNA *brna)
prop = RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Active Strip", "Sequencer's active strip");
prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW);
RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay on top of the sequencer");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
prop = RNA_def_property(srna, "overlay_lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_ABS);
RNA_def_property_ui_text(prop, "Overlay Lock", "");
RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_overlay_lock_set");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
/* access to fixed and relative frame */
prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Overlay Offset", "");
RNA_def_property_int_funcs(prop, "rna_SequenceEditor_overlay_frame_get",
"rna_SequenceEditor_overlay_frame_set", NULL);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- RNA_def_property_ui_text(prop, "Active Strip", "Sequencer's active strip");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
}
static void rna_def_filter_video(StructRNA *srna)
@@ -1236,56 +1232,56 @@ static void rna_def_filter_video(StructRNA *srna)
prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FILTERY);
RNA_def_property_ui_text(prop, "De-Interlace", "For video movies to remove fields");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update_reopen_files");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update_reopen_files");
prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_PREMUL);
RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPX);
RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPY);
RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_float", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_FLOAT);
RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES);
RNA_def_property_ui_text(prop, "Flip Time", "Reverse frame order");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "mul");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Multiply Colors", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "sat");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3);
RNA_def_property_ui_text(prop, "Saturation", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f, 30.0f);
RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_COLOR_BALANCE);
RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_color_balance_set");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->color_balance");
@@ -1295,7 +1291,7 @@ static void rna_def_filter_video(StructRNA *srna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM);
RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_translation_set");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->transform");
@@ -1305,7 +1301,7 @@ static void rna_def_filter_video(StructRNA *srna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP);
RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_crop_set");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");
@@ -1328,12 +1324,12 @@ static void rna_def_proxy(StructRNA *srna)
prop = RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_DIR);
RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_FILE);
RNA_def_property_ui_text(prop, "Proxy Custom File", "Use a custom file to read proxy data from");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
static void rna_def_input(StructRNA *srna)
@@ -1346,14 +1342,44 @@ static void rna_def_input(StructRNA *srna)
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_startofs_final_set", NULL); /* overlap tests */
RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); /* overlap tests */
RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+}
+
+static void rna_def_effect_inputs(StructRNA *srna, int count)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
+
+ if (count >= 1) {
+ prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "seq1");
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
+ RNA_def_property_ui_text(prop, "Input 1", "First input for the effect strip");
+ }
+
+ if (count >= 2) {
+ prop = RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "seq2");
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
+ RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
+ }
+
+ if (count == 3) { /* not used by any effects ...except maybe plugins? */
+ prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "seq3");
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
+ RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
+ }
}
static void rna_def_image(BlenderRNA *brna)
@@ -1368,7 +1394,7 @@ static void rna_def_image(BlenderRNA *brna)
prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "strip->dir");
RNA_def_property_ui_text(prop, "Directory", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
@@ -1377,6 +1403,7 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_SequenceEditor_elements_length", NULL, NULL, NULL);
+ RNA_api_sequence_elements(brna, prop);
rna_def_filter_video(srna);
rna_def_proxy(srna);
@@ -1414,13 +1441,13 @@ static void rna_def_scene(BlenderRNA *brna)
prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
RNA_def_property_ui_text(prop, "Camera Override", "Override the scenes active camera");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
rna_def_filter_video(srna);
rna_def_proxy(srna);
@@ -1440,14 +1467,14 @@ static void rna_def_movie(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "anim_preseek");
RNA_def_property_range(prop, 0, 50);
RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "streamindex");
RNA_def_property_range(prop, 0, 20);
RNA_def_property_ui_text(prop, "Streamindex",
"For files with several movie streams, use the stream with the given index");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update_reopen_files");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update_reopen_files");
prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
@@ -1460,8 +1487,8 @@ static void rna_def_movie(BlenderRNA *brna)
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "File", "");
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
- "rna_Sequence_filepath_set");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_filepath_update");
+ "rna_Sequence_filepath_set");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
rna_def_filter_video(srna);
rna_def_proxy(srna);
@@ -1480,12 +1507,12 @@ static void rna_def_movieclip(BlenderRNA *brna)
prop = RNA_def_property(srna, "undistort", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "clip_flag", SEQ_MOVIECLIP_RENDER_UNDISTORTED);
RNA_def_property_ui_text(prop, "Undistort Clip", "Use the undistorted version of the clip");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "stabilize2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "clip_flag", SEQ_MOVIECLIP_RENDER_STABILIZED);
RNA_def_property_ui_text(prop, "Stabilize 2D Clip", "Use the 2D stabilized version of the clip");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
rna_def_filter_video(srna);
rna_def_input(srna);
@@ -1505,34 +1532,39 @@ static void rna_def_sound(BlenderRNA *brna)
prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Sound");
RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this sequence");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "volume");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_volume_set", NULL);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pitch");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound");
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pitch_set", NULL);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "pan", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pan");
RNA_def_property_range(prop, -2.0f, 2.0f);
RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)");
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pan_set", NULL);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "File", "");
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
- "rna_Sequence_filepath_set");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_filepath_update");
+ "rna_Sequence_filepath_set");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
+
+ prop = RNA_def_property(srna, "show_waveform", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_AUDIO_DRAW_WAVEFORM);
+ RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
rna_def_input(srna);
}
@@ -1550,45 +1582,21 @@ static void rna_def_effect(BlenderRNA *brna)
rna_def_proxy(srna);
}
-static void rna_def_multicam(BlenderRNA *brna)
+static void rna_def_multicam(StructRNA *srna)
{
- StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "MulticamSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Multicam Select Sequence",
- "Sequence strip to perform multicam editing: select channel from below");
- RNA_def_struct_sdna(srna, "Sequence");
-
prop = RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "multicam_source");
- RNA_def_property_range(prop, 0, MAXSEQ-1);
+ RNA_def_property_range(prop, 0, MAXSEQ - 1);
RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
-
- rna_def_filter_video(srna);
- rna_def_proxy(srna);
- rna_def_input(srna);
-}
-
-static void rna_def_adjustment(BlenderRNA *brna)
-{
- StructRNA *srna;
-/* PropertyRNA *prop; */
-
- srna = RNA_def_struct(brna, "AdjustmentSequence", "Sequence");
- RNA_def_struct_ui_text(srna, "Adjustment Layer Sequence",
- "Sequence strip to perform filter adjustments to layers below");
- RNA_def_struct_sdna(srna, "Sequence");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
- rna_def_filter_video(srna);
- rna_def_proxy(srna);
rna_def_input(srna);
}
-static void rna_def_wipe(BlenderRNA *brna)
+static void rna_def_wipe(StructRNA *srna)
{
- StructRNA *srna;
PropertyRNA *prop;
static const EnumPropertyItem wipe_type_items[] = {
@@ -1607,8 +1615,6 @@ static void rna_def_wipe(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna = RNA_def_struct(brna, "WipeSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Wipe Sequence", "Sequence strip creating a wipe transition");
RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
prop = RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_UNSIGNED);
@@ -1616,7 +1622,7 @@ static void rna_def_wipe(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Blur Width",
"Width of the blur edge, in percentage relative to the image size");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
#if 1 /* expose as radians */
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
@@ -1628,69 +1634,65 @@ static void rna_def_wipe(BlenderRNA *brna)
RNA_def_property_range(prop, -90.0f, 90.0f);
#endif
RNA_def_property_ui_text(prop, "Angle", "Edge angle");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "forward");
RNA_def_property_enum_items(prop, wipe_direction_items);
RNA_def_property_ui_text(prop, "Direction", "Wipe direction");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "wipetype");
RNA_def_property_enum_items(prop, wipe_type_items);
RNA_def_property_ui_text(prop, "Transition Type", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
-static void rna_def_glow(BlenderRNA *brna)
+static void rna_def_glow(StructRNA *srna)
{
- StructRNA *srna;
PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "GlowSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Glow Sequence", "Sequence strip creating a glow effect");
+
RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fMini");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fClamp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clamp", "Brightness limit of intensity");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fBoost");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "blur_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dDist");
RNA_def_property_range(prop, 0.5f, 20.0f);
RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dQuality");
RNA_def_property_range(prop, 1, 5);
RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_only_boost", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0);
RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
-static void rna_def_transform(BlenderRNA *brna)
+static void rna_def_transform(StructRNA *srna)
{
- StructRNA *srna;
PropertyRNA *prop;
static const EnumPropertyItem interpolation_items[] = {
@@ -1706,105 +1708,162 @@ static void rna_def_transform(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna = RNA_def_struct(brna, "TransformSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Transform Sequence",
- "Sequence strip applying affine transformations to other strips");
RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
-
+
prop = RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
RNA_def_property_ui_text(prop, "Scale X", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
RNA_def_property_ui_text(prop, "Scale Y", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xIni");
RNA_def_property_ui_text(prop, "Translate X", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yIni");
RNA_def_property_ui_text(prop, "Translate Y", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rotIni");
RNA_def_property_range(prop, -360.0f, 360.0f);
RNA_def_property_ui_text(prop, "Rotation", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "percent");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
RNA_def_property_enum_items(prop, translation_unit_items);
RNA_def_property_ui_text(prop, "Translation Unit", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, interpolation_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
RNA_def_property_ui_text(prop, "Interpolation", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
-static void rna_def_solid_color(BlenderRNA *brna)
+static void rna_def_solid_color(StructRNA *srna)
{
- StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "ColorSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color");
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
-
+
prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");
RNA_def_property_ui_text(prop, "Color", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
-static void rna_def_speed_control(BlenderRNA *brna)
+static void rna_def_speed_control(StructRNA *srna)
{
- StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "SpeedControlSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "SpeedControl Sequence", "Sequence strip to control the speed of other strips");
RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
-
+
prop = RNA_def_property(srna, "multiply_speed", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "globalSpeed");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Multiply Speed", "Multiply the resulting speed after the speed factor");
RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 0);
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_as_speed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_INTEGRATE);
RNA_def_property_ui_text(prop, "Use as speed", "Interpret the value as speed instead of a frame number");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_frame_blend", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_BLEND);
RNA_def_property_ui_text(prop, "Frame Blending", "Blend two frames into the target for a smoother result");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "scale_to_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_COMPRESS_IPO_Y);
RNA_def_property_ui_text(prop, "Scale to length", "Scale values from 0.0 to 1.0 to target sequence length");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+}
+
+static EffectInfo def_effects[] = {
+ {"AddSequence", "Add Sequence",
+ "Add Sequence",
+ NULL, 2},
+ {"AdjustmentSequence", "Adjustment Layer Sequence",
+ "Sequence strip to perform filter adjustments to layers below",
+ rna_def_input, 0},
+ {"AlphaOverSequence", "Alpha Over Sequence",
+ "Alpha Over Sequence",
+ NULL, 2},
+ {"AlphaUnderSequence", "Alpha Under Sequence",
+ "Alpha Under Sequence",
+ NULL, 2},
+ {"ColorSequence", "Color Sequence",
+ "Sequence strip creating an image filled with a single color",
+ rna_def_solid_color, 0},
+ {"CrossSequence", "Cross Sequence",
+ "Cross Sequence",
+ NULL, 2},
+ {"GammaCrossSequence", "Gamma Cross Sequence",
+ "Gamma Cross Sequence",
+ NULL, 2},
+ {"GlowSequence", "Glow Sequence",
+ "Sequence strip creating a glow effect",
+ rna_def_glow, 1},
+ {"MulticamSequence", "Multicam Select Sequence",
+ "Sequence strip to perform multicam editing",
+ rna_def_multicam, 0},
+ {"MultiplySequence", "Multiply Sequence",
+ "Multiply Sequence",
+ NULL, 2},
+ {"OverDropSequence", "Over Drop Sequence",
+ "Over Drop Sequence",
+ NULL, 2},
+ {"SpeedControlSequence", "SpeedControl Sequence",
+ "Sequence strip to control the speed of other strips",
+ rna_def_speed_control, 1},
+ {"SubtractSequence", "Subtract Sequence",
+ "Subtract Sequence",
+ NULL, 2},
+ {"TransformSequence", "Transform Sequence",
+ "Sequence strip applying affine transformations to other strips",
+ rna_def_transform, 1},
+ {"WipeSequence", "Wipe Sequence",
+ "Sequence strip creating a wipe transition",
+ rna_def_wipe, 1},
+ {"", "", "", NULL, 0}
+};
+
+static void rna_def_effects(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ EffectInfo *effect;
+
+ for (effect = def_effects; effect->struct_name[0] != '\0'; effect++) {
+ srna = RNA_def_struct(brna, effect->struct_name, "EffectSequence");
+ RNA_def_struct_ui_text(srna, effect->ui_name, effect->ui_desc);
+ RNA_def_struct_sdna(srna, "Sequence");
+
+ rna_def_effect_inputs(srna, effect->inputs);
+
+ if (effect->func)
+ effect->func(srna);
+ }
}
void RNA_def_sequencer(BlenderRNA *brna)
@@ -1825,13 +1884,7 @@ void RNA_def_sequencer(BlenderRNA *brna)
rna_def_movieclip(brna);
rna_def_sound(brna);
rna_def_effect(brna);
- rna_def_multicam(brna);
- rna_def_adjustment(brna);
- rna_def_wipe(brna);
- rna_def_glow(brna);
- rna_def_transform(brna);
- rna_def_solid_color(brna);
- rna_def_speed_control(brna);
+ rna_def_effects(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 20ceaec8974..38a923f87e5 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -24,8 +24,6 @@
* \ingroup RNA
*/
-
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -39,10 +37,30 @@
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
+extern EnumPropertyItem blend_mode_items[];
+
#ifdef RNA_RUNTIME
+//#include "DNA_anim_types.h"
+#include "DNA_image_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_sequence_types.h"
+#include "DNA_sound_types.h"
+
+#include "BLI_path_util.h" /* BLI_split_dirfile */
+
+#include "BKE_image.h"
+#include "BKE_library.h" /* id_us_plus */
+#include "BKE_movieclip.h"
+
#include "BKE_report.h"
#include "BKE_sequencer.h"
+#include "BKE_sound.h"
+
+#include "IMB_imbuf.h"
+#include "IMB_imbuf_types.h"
+
+#include "WM_api.h"
static void rna_Sequence_swap_internal(Sequence *seq_self, ReportList *reports, Sequence *seq_other)
{
@@ -52,6 +70,271 @@ static void rna_Sequence_swap_internal(Sequence *seq_self, ReportList *reports,
BKE_report(reports, RPT_ERROR, error_msg);
}
+static Sequence *alloc_generic_sequence(Editing *ed, const char *name, int start_frame,
+ int channel, int type, const char *file)
+{
+ Sequence *seq;
+ Strip *strip;
+ StripElem *se;
+
+ seq = alloc_sequence(ed->seqbasep, start_frame, channel);
+ seq->type = type;
+
+ BLI_strncpy(seq->name + 2, name, sizeof(seq->name) - 2);
+ seqbase_unique_name_recursive(&ed->seqbase, seq);
+
+ seq->strip = strip = MEM_callocN(sizeof(Strip), "strip");
+ seq->strip->us = 1;
+
+ if (file) {
+ strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem");
+ BLI_split_dirfile(file, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name));
+ }
+ else {
+ strip->stripdata = NULL;
+ }
+
+ return seq;
+}
+
+static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed, ReportList *reports,
+ const char *name, MovieClip *clip, int channel,
+ int start_frame)
+{
+ Scene *scene = (Scene *)id;
+ Sequence *seq;
+
+ seq = alloc_generic_sequence(ed, name, start_frame, channel, SEQ_MOVIECLIP, clip->name);
+ seq->clip = clip;
+ seq->len = BKE_movieclip_get_duration(clip);
+ id_us_plus((ID *)clip);
+
+ calc_sequence_disp(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+
+ return seq;
+}
+
+static Sequence *rna_Sequences_new_scene(ID *id, Editing *ed, ReportList *reports,
+ const char *name, Scene *sce_seq, int channel,
+ int start_frame)
+{
+ Scene *scene = (Scene *)id;
+ Sequence *seq;
+
+ seq = alloc_generic_sequence(ed, name, start_frame, channel, SEQ_SCENE, NULL);
+ seq->scene = sce_seq;
+ seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1;
+ seq->scene_sound = sound_scene_add_scene_sound(scene, seq, start_frame, start_frame + seq->len, 0);
+ id_us_plus((ID *)sce_seq);
+
+ calc_sequence_disp(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+
+ return seq;
+}
+
+static Sequence *rna_Sequences_new_image(ID *id, Editing *ed, ReportList *reports,
+ const char *name, const char *file, int channel,
+ int start_frame)
+{
+ Scene *scene = (Scene *)id;
+ Sequence *seq;
+
+ seq = alloc_generic_sequence(ed, name, start_frame, channel, SEQ_IMAGE, file);
+ seq->len = 1;
+
+ if (seq->strip->stripdata->name[0] == '\0') {
+ BKE_report(reports, RPT_ERROR, "Sequences.new_image: unable to open image file");
+ BLI_remlink(&ed->seqbase, seq);
+ seq_free_sequence(scene, seq);
+ return NULL;
+ }
+
+ calc_sequence_disp(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+
+ return seq;
+}
+
+static Sequence *rna_Sequences_new_movie(ID *id, Editing *ed, ReportList *reports,
+ const char *name, const char *file, int channel,
+ int start_frame)
+{
+ Scene *scene = (Scene *)id;
+ Sequence *seq;
+
+ struct anim *an = openanim(file, IB_rect, 0);
+
+ if (an == NULL) {
+ BKE_report(reports, RPT_ERROR, "Sequences.new_movie: unable to open movie file");
+ return NULL;
+ }
+
+ seq = alloc_generic_sequence(ed, name, start_frame, channel, SEQ_MOVIE, file);
+ seq->anim = an;
+ seq->anim_preseek = IMB_anim_get_preseek(an);
+ seq->len = IMB_anim_get_duration(an, IMB_TC_RECORD_RUN);
+
+ calc_sequence_disp(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+
+ return seq;
+}
+
+#ifdef WITH_AUDASPACE
+static Sequence *rna_Sequences_new_sound(ID *id, Editing *ed, Main *bmain, ReportList *reports,
+ const char *name, const char *file, int channel, int start_frame)
+{
+ Scene *scene = (Scene *)id;
+ Sequence *seq;
+
+ bSound *sound = sound_new_file(bmain, file);
+
+ if (sound == NULL || sound->playback_handle == NULL) {
+ BKE_report(reports, RPT_ERROR, "Sequences.new_sound: unable to open sound file");
+ return NULL;
+ }
+
+ seq = alloc_generic_sequence(ed, name, start_frame, channel, SEQ_SOUND, sound->name);
+ seq->sound = sound;
+ seq->len = ceil(sound_get_length(sound) * FPS);
+
+ seq->scene_sound = sound_add_scene_sound(scene, seq, start_frame, start_frame + seq->len, 0);
+
+ calc_sequence_disp(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+
+ return seq;
+}
+#else /* WITH_AUDASPACE */
+static Sequence *rna_Sequences_new_sound(ID *UNUSED(id), Editing *UNUSED(ed), bMain *UNUSED(main), ReportList *UNUSED(reports),
+ const char *UNUSED(name), bSound *UNUSED(sound), int UNUSED(channel), int UNUSED(start_frame))
+{
+ BKE_report(reports, RPT_ERROR, "Blender compiled without Audaspace support.");
+ return NULL;
+}
+#endif /* WITH_AUDASPACE */
+
+static Sequence *rna_Sequences_new_effect(ID *id, Editing *ed, ReportList *reports,
+ const char *name, int type, int channel,
+ int start_frame, int end_frame,
+ Sequence *seq1, Sequence *seq2, Sequence *seq3)
+{
+ Scene *scene = (Scene *)id;
+ Sequence *seq;
+ struct SeqEffectHandle sh;
+
+ switch (get_sequence_effect_num_inputs(type)) {
+ case 0:
+ if (end_frame <= start_frame) {
+ BKE_report(reports, RPT_ERROR,
+ "Sequences.new_effect: End frame not set");
+ return NULL;
+ }
+ break;
+ case 1:
+ if (seq1 == NULL) {
+ BKE_report(reports, RPT_ERROR,
+ "Sequences.new_effect: Effect takes 1 input sequence");
+ return NULL;
+ }
+ break;
+ case 2:
+ if (seq1 == NULL || seq2 == NULL) {
+ BKE_report(reports, RPT_ERROR,
+ "Sequences.new_effect: Effect takes 2 input sequences");
+ return NULL;
+ }
+ break;
+ case 3:
+ if (seq1 == NULL || seq2 == NULL || seq3 == NULL) {
+ BKE_report(reports, RPT_ERROR,
+ "Sequences.new_effect: Effect takes 3 input sequences");
+ return NULL;
+ }
+ break;
+ default:
+ BKE_report(reports, RPT_ERROR,
+ "Sequences.new_effect: get_sequence_effect_num_inputs() > 3 (should never happen)");
+ return NULL;
+ }
+
+ seq = alloc_generic_sequence(ed, name, start_frame, channel, type, NULL);
+
+ sh = get_sequence_effect(seq);
+
+ seq->seq1 = seq1;
+ seq->seq2 = seq2;
+ seq->seq3 = seq3;
+
+ sh.init(seq);
+
+ if (!seq1) { /* effect has no deps */
+ seq->len = 1;
+ seq_tx_set_final_right(seq, end_frame);
+ }
+
+ seq->flag |= SEQ_USE_EFFECT_DEFAULT_FADE;
+
+ calc_sequence(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+
+ return seq;
+}
+
+static void rna_Sequences_remove(ID *id, Editing *ed, Sequence *seq)
+{
+ Scene *scene = (Scene *)id;
+
+ BLI_remlink(&ed->seqbase, seq);
+ seq_free_sequence(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+}
+
+static StripElem *rna_SequenceElements_push(ID *id, Sequence *seq, const char *filename)
+{
+ Scene *scene = (Scene *)id;
+ StripElem *se;
+
+ seq->strip->stripdata = se = MEM_reallocN(seq->strip->stripdata, sizeof(StripElem) * (seq->len + 1));
+ se += seq->len;
+ BLI_strncpy(se->name, filename, sizeof(se->name));
+ seq->len++;
+
+ calc_sequence_disp(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+
+ return se;
+}
+
+static void rna_SequenceElements_pop(ID *id, Sequence *seq, ReportList *reports)
+{
+ Scene *scene = (Scene *)id;
+
+ if (seq->len == 1) {
+ BKE_report(reports, RPT_ERROR, "SequenceElements.pop: can not pop the last element");
+ return;
+ }
+
+ /* just chop off the end ...what could possibly go wrong? */
+ seq->strip->stripdata = MEM_reallocN(seq->strip->stripdata, sizeof(StripElem) * (seq->len - 1));
+ seq->len--;
+
+ calc_sequence_disp(scene, seq);
+
+ WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
+}
+
+
#else
void RNA_api_sequence_strip(StructRNA *srna)
@@ -62,15 +345,188 @@ void RNA_api_sequence_strip(StructRNA *srna)
func = RNA_def_function(srna, "getStripElem", "give_stripelem");
RNA_def_function_ui_description(func, "Return the strip element from a given frame or None");
parm = RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame",
- "The frame to get the strip element from", -MAXFRAME, MAXFRAME);
+ "The frame to get the strip element from", -MAXFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_function_return(func, RNA_def_pointer(func, "elem", "SequenceElement", "",
- "strip element of the current frame"));
+ "strip element of the current frame"));
func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "other", "Sequence", "Other", "");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
+}
+
+void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
+{
+ StructRNA *srna;
+ PropertyRNA *parm;
+ FunctionRNA *func;
+
+ RNA_def_property_srna(cprop, "SequenceElements");
+ srna = RNA_def_struct(brna, "SequenceElements", NULL);
+ RNA_def_struct_sdna(srna, "Sequence");
+ RNA_def_struct_ui_text(srna, "SequenceElements", "Collection of SequenceElement");
+
+ func = RNA_def_function(srna, "push", "rna_SequenceElements_push");
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Push an image from ImageSequence.directory");
+ parm = RNA_def_string(func, "filename", "File", 0, "", "Filepath to image");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm = RNA_def_pointer(func, "elem", "SequenceElement", "", "New SequenceElement");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "pop", "rna_SequenceElements_pop");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Pop an image off the collection");
+}
+
+void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
+{
+ StructRNA *srna;
+ PropertyRNA *parm;
+ FunctionRNA *func;
+
+ static EnumPropertyItem seq_effect_items[] = {
+ {SEQ_CROSS, "CROSS", 0, "Cross", ""},
+ {SEQ_ADD, "ADD", 0, "Add", ""},
+ {SEQ_SUB, "SUBTRACT", 0, "Subtract", ""},
+ {SEQ_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
+ {SEQ_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
+ {SEQ_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
+ {SEQ_MUL, "MULTIPLY", 0, "Multiply", ""},
+ {SEQ_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
+ // {SEQ_PLUGIN, "PLUGIN", 0, "Plugin", ""},
+ {SEQ_WIPE, "WIPE", 0, "Wipe", ""},
+ {SEQ_GLOW, "GLOW", 0, "Glow", ""},
+ {SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
+ {SEQ_COLOR, "COLOR", 0, "Color", ""},
+ {SEQ_SPEED, "SPEED", 0, "Speed", ""},
+ {SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
+ {SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ RNA_def_property_srna(cprop, "Sequences");
+ srna = RNA_def_struct(brna, "Sequences", NULL);
+ RNA_def_struct_sdna(srna, "Editing");
+ RNA_def_struct_ui_text(srna, "Sequences", "Collection of Sequences");
+
+ func = RNA_def_function(srna, "new_clip", "rna_Sequences_new_clip");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Add a new movie clip sequence");
+ parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to add");
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
+ parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
+ "The channel for the new sequence", 0, MAXSEQ - 1);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "start_frame", 0, -MAXFRAME, MAXFRAME, "",
+ "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "new_scene", "rna_Sequences_new_scene");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Add a new scene sequence");
+ parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to add");
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
+ parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
+ "The channel for the new sequence", 0, MAXSEQ - 1);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "start_frame", 0, -MAXFRAME, MAXFRAME, "",
+ "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "new_image", "rna_Sequences_new_image");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Add a new image sequence");
+ parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to image");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
+ "The channel for the new sequence", 0, MAXSEQ - 1);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "start_frame", 0, -MAXFRAME, MAXFRAME, "",
+ "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "new_movie", "rna_Sequences_new_movie");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Add a new movie sequence");
+ parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to movie");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
+ "The channel for the new sequence", 0, MAXSEQ - 1);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "start_frame", 0, -MAXFRAME, MAXFRAME, "",
+ "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "new_sound", "rna_Sequences_new_sound");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID | FUNC_USE_MAIN);
+ RNA_def_function_ui_description(func, "Add a new movie clip sequence");
+ parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to movie");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
+ "The channel for the new sequence", 0, MAXSEQ - 1);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "start_frame", 0, -MAXFRAME, MAXFRAME, "",
+ "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return type */
+ parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "new_effect", "rna_Sequences_new_effect");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Add a new effect sequence");
+ parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_enum(func, "type", seq_effect_items, 0, "Type",
+ "type for the new sequence");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
+ "The channel for the new sequence", 0, MAXSEQ - 1);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "start_frame", 0, -MAXFRAME, MAXFRAME, "",
+ "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "end_frame", 0, -MAXFRAME, MAXFRAME, "",
+ "The end frame for the new sequence", -MAXFRAME, MAXFRAME);
+ parm = RNA_def_pointer(func, "seq1", "Sequence", "", "Sequence 1 for effect");
+ parm = RNA_def_pointer(func, "seq2", "Sequence", "", "Sequence 2 for effect");
+ parm = RNA_def_pointer(func, "seq3", "Sequence", "", "Sequence 3 for effect");
+ /* return type */
+ parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
+ RNA_def_function_return(func, parm);
+
+
+ func = RNA_def_function(srna, "remove", "rna_Sequences_remove");
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID);
+ RNA_def_function_ui_description(func, "Remove a Sequence");
+ parm = RNA_def_pointer(func, "sequence", "Sequence", "", "Sequence to remove");
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
}
+
#endif
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 51f5cdcda85..aafcc381c51 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -494,7 +494,7 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_SOLID);
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_TEXTURE);
- if (scene_use_new_shading_nodes(scene))
+ if (BKE_scene_use_new_shading_nodes(scene))
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_MATERIAL);
if (type->view_draw)
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c
index 3f511858332..338d0c7c52c 100644
--- a/source/blender/makesrna/intern/rna_text_api.c
+++ b/source/blender/makesrna/intern/rna_text_api.c
@@ -37,13 +37,13 @@
static void rna_Text_clear(Text *text)
{
- clear_text(text);
+ BKE_text_clear(text);
WM_main_add_notifier(NC_TEXT|NA_EDITED, text);
}
static void rna_Text_write(Text *text, const char *str)
{
- write_text(text, str);
+ BKE_text_write(text, str);
WM_main_add_notifier(NC_TEXT|NA_EDITED, text);
}