diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mask.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 41 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 25 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 465 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 13 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 11 |
14 files changed, 550 insertions, 43 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 32ca1bca107..62a09e65191 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -2865,7 +2865,7 @@ static const char *cpp_classes = "" "\n" "class Pointer {\n" "public:\n" -" Pointer(const PointerRNA& p) : ptr(p) { }\n" +" Pointer(const PointerRNA &p) : ptr(p) { }\n" " operator const PointerRNA&() { return ptr; }\n" " bool is_a(StructRNA *type) { return RNA_struct_is_a(ptr.type, type)? true: false; }\n" " operator void*() { return ptr.data; }\n" @@ -2909,7 +2909,7 @@ static const char *cpp_classes = "" " bool operator!=(const CollectionIterator<T, Tbegin, Tnext, Tend>& other) " "{ return iter.valid != other.iter.valid; }\n" "\n" -" void begin(const Pointer& ptr)\n" +" void begin(const Pointer &ptr)\n" " { if (init) Tend(&iter); Tbegin(&iter, (PointerRNA*)&ptr.ptr); t = T(iter.ptr); init = true; }\n" "\n" "private:\n" @@ -2924,7 +2924,7 @@ static const char *cpp_classes = "" "template<typename Tp, typename T, TBeginFunc Tbegin, TNextFunc Tnext, TEndFunc Tend>\n" "class Collection {\n" "public:\n" -" Collection(const PointerRNA& p) : ptr(p) {}\n" +" Collection(const PointerRNA &p) : ptr(p) {}\n" "\n" " void begin(CollectionIterator<T, Tbegin, Tnext, Tend>& iter)\n" " { iter.begin(ptr); }\n" @@ -2968,7 +2968,7 @@ static void rna_generate_header_cpp(BlenderRNA *UNUSED(brna), FILE *f) fprintf(f, "class %s : public %s {\n", srna->identifier, (srna->base) ? srna->base->identifier : "Pointer"); fprintf(f, "public:\n"); - fprintf(f, "\t%s(const PointerRNA& ptr_arg) :\n\t\t%s(ptr_arg)", srna->identifier, + fprintf(f, "\t%s(const PointerRNA &ptr_arg) :\n\t\t%s(ptr_arg)", srna->identifier, (srna->base) ? srna->base->identifier : "Pointer"); for (dp = ds->cont.properties.first; dp; dp = dp->next) if (!(dp->prop->flag & (PROP_IDPROPERTY | PROP_BUILTIN))) diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 15fdce09d83..0bd42c2f5a0 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -79,7 +79,7 @@ static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value) if (value) cumap->flag |= CUMA_DO_CLIP; else cumap->flag &= ~CUMA_DO_CLIP; - curvemapping_changed(cumap, 0); + curvemapping_changed(cumap, FALSE); } static void rna_CurveMapping_black_level_set(PointerRNA *ptr, const float *values) @@ -337,6 +337,12 @@ static void rna_Scopes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointer s->ok = 0; } +/* this function only exists because #curvemap_evaluateF uses a 'const' qualifier */ +float rna_CurveMap_evaluateF(struct CurveMap *cuma, float value) +{ + return curvemap_evaluateF(cuma, value); +} + #else static void rna_def_curvemappoint(BlenderRNA *brna) @@ -419,7 +425,7 @@ static void rna_def_curvemap(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Points", ""); rna_def_curvemap_points_api(brna, prop); - func = RNA_def_function(srna, "evaluate", "curvemap_evaluateF"); + func = RNA_def_function(srna, "evaluate", "rna_CurveMap_evaluateF"); RNA_def_function_ui_description(func, "Evaluate curve at given location"); parm = RNA_def_float(func, "position", 0.0f, -FLT_MAX, FLT_MAX, "Position", "Position to evaluate curve at", -FLT_MAX, FLT_MAX); RNA_def_property_flag(parm, PROP_REQUIRED); diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index f197bf8391d..a6571a2db4f 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -580,7 +580,8 @@ static void rna_def_maskSpline(BlenderRNA *brna) static void rna_def_mask_layer(BlenderRNA *brna) { static EnumPropertyItem masklay_blend_mode_items[] = { - {MASK_BLEND_MERGE, "MERGE", 0, "Merge", ""}, + {MASK_BLEND_MERGE_ADD, "MERGE_ADD", 0, "Merge Add", ""}, + {MASK_BLEND_MERGE_SUBTRACT, "MERGE_SUBTRACT", 0, "Merge Subtract", ""}, {MASK_BLEND_ADD, "ADD", 0, "Add", ""}, {MASK_BLEND_SUBTRACT, "SUBTRACT", 0, "Subtract", ""}, {MASK_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", ""}, diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 4f3e6081fcc..fe5f8e574a0 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1393,6 +1393,46 @@ static PointerRNA rna_Mesh_tessface_uv_texture_new(struct Mesh *me, struct bCont return ptr; } +/* only to quiet warnings */ +static void UNUSED_FUNCTION(rna_mesh_unused)(void) +{ + /* unused functions made by macros */ + (void)rna_Mesh_skin_vertice_index_range; + (void)rna_Mesh_tessface_uv_texture_active_set; + (void)rna_Mesh_tessface_uv_texture_clone_get; + (void)rna_Mesh_tessface_uv_texture_clone_index_get; + (void)rna_Mesh_tessface_uv_texture_clone_index_set; + (void)rna_Mesh_tessface_uv_texture_clone_set; + (void)rna_Mesh_tessface_uv_texture_index_range; + (void)rna_Mesh_tessface_uv_texture_render_get; + (void)rna_Mesh_tessface_uv_texture_render_index_get; + (void)rna_Mesh_tessface_uv_texture_render_index_set; + (void)rna_Mesh_tessface_uv_texture_render_set; + (void)rna_Mesh_tessface_uv_texture_stencil_get; + (void)rna_Mesh_tessface_uv_texture_stencil_index_get; + (void)rna_Mesh_tessface_uv_texture_stencil_index_set; + (void)rna_Mesh_tessface_uv_texture_stencil_set; + (void)rna_Mesh_tessface_vertex_color_active_set; + (void)rna_Mesh_tessface_vertex_color_index_range; + (void)rna_Mesh_tessface_vertex_color_render_get; + (void)rna_Mesh_tessface_vertex_color_render_index_get; + (void)rna_Mesh_tessface_vertex_color_render_index_set; + (void)rna_Mesh_tessface_vertex_color_render_set; + (void)rna_Mesh_uv_layer_render_get; + (void)rna_Mesh_uv_layer_render_index_get; + (void)rna_Mesh_uv_layer_render_index_set; + (void)rna_Mesh_uv_layer_render_set; + (void)rna_Mesh_uv_texture_render_get; + (void)rna_Mesh_uv_texture_render_index_get; + (void)rna_Mesh_uv_texture_render_index_set; + (void)rna_Mesh_uv_texture_render_set; + (void)rna_Mesh_vertex_color_render_get; + (void)rna_Mesh_vertex_color_render_index_get; + (void)rna_Mesh_vertex_color_render_index_set; + (void)rna_Mesh_vertex_color_render_set; + /* end unused function block */ +} + #else static void rna_def_mvert_group(BlenderRNA *brna) @@ -3003,4 +3043,3 @@ void RNA_def_mesh(BlenderRNA *brna) } #endif - diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 27201ea6389..2013fd7318e 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2148,6 +2148,23 @@ static void def_cmp_inpaint(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +static void def_cmp_despeckle(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "custom3"); + RNA_def_property_range(prop, 0.0, 1.0f); + RNA_def_property_ui_text(prop, "Threshold", "Threshold for detecting pixels to despeckle"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "threshold_neighbour", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "custom4"); + RNA_def_property_range(prop, 0.0, 1.0f); + RNA_def_property_ui_text(prop, "Neighbour", "Threshold for the number of neighbour pixels that must match"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); +} + static void def_cmp_scale(StructRNA *srna) { PropertyRNA *prop; @@ -3711,7 +3728,7 @@ static void def_cmp_keying(StructRNA *srna) RNA_def_property_float_sdna(prop, NULL, "clip_white"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Clip White", "Value of non-scaled matte pixel which considers as fully foreground pixel"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "blur_pre", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "blur_pre"); @@ -3790,12 +3807,12 @@ static void def_cmp_trackpos(StructRNA *srna) prop = RNA_def_property(srna, "tracking_object", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "tracking_object"); RNA_def_property_ui_text(prop, "Tracking Object", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "track_name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "track_name"); RNA_def_property_ui_text(prop, "Track", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } /* -- Texture Nodes --------------------------------------------------------- */ @@ -4124,7 +4141,7 @@ static void rna_def_node_socket(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", SOCK_HIDDEN); RNA_def_property_boolean_funcs(prop, NULL, "rna_NodeSocket_hide_set"); RNA_def_property_ui_text(prop, "Hide", "Hide the socket"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, NULL); + RNA_def_property_update(prop, NC_NODE | ND_DISPLAY, NULL); prop = RNA_def_property(srna, "is_linked", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SOCK_IN_USE); diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h index c70dd01cd57..15ad1c557a5 100644 --- a/source/blender/makesrna/intern/rna_nodetree_types.h +++ b/source/blender/makesrna/intern/rna_nodetree_types.h @@ -122,6 +122,7 @@ DefNode( CompositorNode, CMP_NODE_ZCOMBINE, def_cmp_zcombine, "ZCOMB DefNode( CompositorNode, CMP_NODE_COMBRGBA, 0, "COMBRGBA", CombRGBA, "Combine RGBA", "" ) DefNode( CompositorNode, CMP_NODE_DILATEERODE, def_cmp_dilate_erode, "DILATEERODE", DilateErode, "Dilate/Erode", "" ) DefNode( CompositorNode, CMP_NODE_INPAINT, def_cmp_inpaint, "INPAINT", Inpaint, "Inpaint", "" ) +DefNode( CompositorNode, CMP_NODE_DESPECKLE, def_cmp_despeckle, "DESPECKLE", Despeckle, "Despeckle", "" ) DefNode( CompositorNode, CMP_NODE_ROTATE, def_cmp_rotate, "ROTATE", Rotate, "Rotate", "" ) DefNode( CompositorNode, CMP_NODE_SCALE, def_cmp_scale, "SCALE", Scale, "Scale", "" ) DefNode( CompositorNode, CMP_NODE_SEPYCCA, def_cmp_ycc, "SEPYCCA", SepYCCA, "Separate YCCA", "" ) diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index e1f45e4de17..e69d313b23b 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -313,7 +313,7 @@ static void rna_Object_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr) if (!base) return; - SWAP(int, base->lay, ob->lay); + SWAP(unsigned int, base->lay, ob->lay); rna_Object_layer_update__internal(bmain, scene, base, ob); ob->lay = base->lay; @@ -1768,7 +1768,7 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_Object_modifier_new"); RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); RNA_def_function_ui_description(func, "Add a new modifier"); - parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the bone"); + parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the modifier"); RNA_def_property_flag(parm, PROP_REQUIRED); /* modifier to add */ parm = RNA_def_enum(func, "type", modifier_type_items, 1, "", "Modifier type to add"); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 8cf3b718c30..fc3dfafe133 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1846,6 +1846,11 @@ static void rna_def_particle_settings(BlenderRNA *brna) "particle rotation axis)"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); + prop = RNA_def_property(srna, "use_scale_dupli", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "draw", PART_DRAW_NO_SCALE_OB); + RNA_def_property_ui_text(prop, "Scale", "Use object's scale for duplication"); + RNA_def_property_update(prop, 0, "rna_Particle_redo"); + prop = RNA_def_property(srna, "use_render_adaptive", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_ADAPT); RNA_def_property_ui_text(prop, "Adaptive render", "Draw steps of the particle path"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 09099ca5d93..597c2294ade 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -209,7 +209,7 @@ EnumPropertyItem snap_node_element_items[] = { #define IMAGE_TYPE_ITEMS_IMAGE_ONLY \ R_IMF_ENUM_BMP \ - R_IMF_ENUM_DDS \ + /* DDS save not supported yet R_IMF_ENUM_DDS */ \ R_IMF_ENUM_IRIS \ R_IMF_ENUM_PNG \ R_IMF_ENUM_JPEG \ @@ -2995,7 +2995,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""}, {CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""}, {CODEC_ID_QTRLE, "QTRLE", 0, "QTRLE", ""}, - /* {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""}, */ /* disabled for after release */ + {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 6fc304e6bbb..a3884b62ec1 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -30,6 +30,7 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "rna_internal.h" @@ -58,11 +59,25 @@ typedef struct EffectInfo { int supports_mask; } EffectInfo; +EnumPropertyItem sequence_modifier_type_items[] = { + {seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""}, + {seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""}, + {seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""}, + {seqModifierType_BrightContrast, "BRIGHT_CONTRAST", ICON_NONE, "Bright/Contrast", ""}, + {0, NULL, 0, NULL, NULL} +}; + #ifdef RNA_RUNTIME +#include "BKE_report.h" + +#include "WM_api.h" +#include "WM_types.h" + typedef struct SequenceSearchData { Sequence *seq; void *data; + SequenceModifierData *smd; } SequenceSearchData; /* build a temp reference to the parent */ @@ -332,8 +347,9 @@ static char *rna_SequenceTransform_path(PointerRNA *ptr) return BLI_strdup(""); } -static void rna_SequenceTransform_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) +static void rna_SequenceTransform_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); Sequence *seq = sequence_get_by_transform(ed, ptr->data); @@ -376,8 +392,9 @@ static char *rna_SequenceCrop_path(PointerRNA *ptr) return BLI_strdup(""); } -static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) +static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); Sequence *seq = sequence_get_by_crop(ed, ptr->data); @@ -613,8 +630,9 @@ static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value) } #endif -static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) +static void rna_Sequence_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); if (ed) { @@ -638,8 +656,9 @@ static int rna_Sequence_otherSequence_poll(PointerRNA *ptr, PointerRNA value) return TRUE; } -static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) +static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE, FALSE); @@ -648,16 +667,18 @@ static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene, BKE_sequencer_update_sound_bounds(scene, ptr->data); } -static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Sequence_mute_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); BKE_sequencer_update_muting(ed); rna_Sequence_update(bmain, scene, ptr); } -static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Sequence *seq = (Sequence *)(ptr->data); BKE_sequence_reload_new_file(scene, seq, TRUE); BKE_sequence_calc(scene, seq); @@ -686,8 +707,9 @@ static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy) return data.seq; } -static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); Sequence *seq = sequence_get_by_proxy(ed, ptr->data); @@ -695,8 +717,9 @@ static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *p rna_Sequence_frame_change_update(scene, seq); } -static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) +static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); Sequence *seq = sequence_get_by_proxy(ed, ptr->data); @@ -722,42 +745,77 @@ static int colbalance_seq_cmp_cb(Sequence *seq, void *arg_pt) if (seq->strip && seq->strip->color_balance == data->data) { data->seq = seq; + data->smd = NULL; return -1; /* done so bail out */ } + + if (seq->modifiers.first) { + SequenceModifierData *smd = seq->modifiers.first; + + for (smd = seq->modifiers.first; smd; smd = smd->next) { + if (smd->type == seqModifierType_ColorBalance) { + ColorBalanceModifierData *cbmd = (ColorBalanceModifierData *) smd; + + if (&cbmd->color_balance == data->data) { + data->seq = seq; + data->smd = smd; + return -1; /* done so bail out */ + } + } + } + } + return 1; } -static Sequence *sequence_get_by_colorbalance(Editing *ed, StripColorBalance *cb) +static Sequence *sequence_get_by_colorbalance(Editing *ed, StripColorBalance *cb, SequenceModifierData **smd_r) { SequenceSearchData data; data.seq = NULL; + data.smd = NULL; data.data = cb; /* irritating we need to search for our sequence! */ BKE_sequencer_base_recursive_apply(&ed->seqbase, colbalance_seq_cmp_cb, &data); + *smd_r = data.smd; + return data.seq; } static char *rna_SequenceColorBalance_path(PointerRNA *ptr) { Scene *scene = ptr->id.data; + SequenceModifierData *smd; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); - Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data); + Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd); - if (seq && seq->name + 2) - return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", seq->name + 2); + if (seq && seq->name + 2) { + if (!smd) { + /* path to old filter color balance */ + return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", seq->name + 2); + } + else { + /* path to modifier */ + return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"].color_balance", seq->name + 2, smd->name); + } + } else return BLI_strdup(""); } -static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) +static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { + Scene *scene = (Scene *) ptr->id.data; Editing *ed = BKE_sequencer_editing_get(scene, FALSE); - Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data); + SequenceModifierData *smd; + Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd); - BKE_sequence_invalidate_cache(scene, seq); + if (smd == NULL) + BKE_sequence_invalidate_cache(scene, seq); + else + BKE_sequence_invalidate_cache_for_modifier(scene, seq); } static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value) @@ -825,6 +883,161 @@ static float rna_WipeSequence_angle_get(PointerRNA *ptr) return DEG2RADF(((WipeVars *)seq->effectdata)->angle); } +static int modifier_seq_cmp_cb(Sequence *seq, void *arg_pt) +{ + SequenceSearchData *data = arg_pt; + + if (BLI_findindex(&seq->modifiers, data->data) != -1) { + data->seq = seq; + return -1; /* done so bail out */ + } + + return 1; +} + +static Sequence *sequence_get_by_modifier(Editing *ed, SequenceModifierData *smd) +{ + SequenceSearchData data; + + data.seq = NULL; + data.data = smd; + + /* irritating we need to search for our sequence! */ + BKE_sequencer_base_recursive_apply(&ed->seqbase, modifier_seq_cmp_cb, &data); + + return data.seq; +} + +static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr) +{ + SequenceModifierData *smd = (SequenceModifierData *) ptr->data; + + switch (smd->type) { + case seqModifierType_ColorBalance: + return &RNA_ColorBalanceModifier; + case seqModifierType_Curves: + return &RNA_CurvesModifier; + case seqModifierType_HueCorrect: + return &RNA_HueCorrectModifier; + case seqModifierType_BrightContrast: + return &RNA_BrightContrastModifier; + default: + return &RNA_SequenceModifier; + } +} + +static char *rna_SequenceModifier_path(PointerRNA *ptr) +{ + Scene *scene = ptr->id.data; + Editing *ed = BKE_sequencer_editing_get(scene, FALSE); + SequenceModifierData *smd = ptr->data; + Sequence *seq = sequence_get_by_modifier(ed, smd); + + if (seq && seq->name + 2) + return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"]", seq->name + 2, smd->name); + else + return BLI_strdup(""); +} + +static void rna_SequenceModifier_name_set(PointerRNA *ptr, const char *value) +{ + SequenceModifierData *smd = ptr->data; + Scene *scene = (Scene *) ptr->id.data; + Editing *ed = BKE_sequencer_editing_get(scene, FALSE); + Sequence *seq = sequence_get_by_modifier(ed, smd); + AnimData *adt; + char oldname[sizeof(smd->name)]; + + /* make a copy of the old name first */ + BLI_strncpy(oldname, smd->name, sizeof(smd->name)); + + /* copy the new name into the name slot */ + BLI_strncpy_utf8(smd->name, value, sizeof(smd->name)); + + /* make sure the name is truly unique */ + BKE_sequence_modifier_unique_name(seq, smd); + + /* fix all the animation data which may link to this */ + adt = BKE_animdata_from_id(&scene->id); + if (adt) { + char path[1024]; + + BLI_snprintf(path, sizeof(path), "sequence_editor.sequences_all[\"%s\"].modifiers", seq->name + 2); + BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, path, oldname, smd->name, 0, 0, 1); + } +} + +static void rna_SequenceModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ + /* strip from other scenes could be modified, so using active scene is not reliable */ + Scene *scene = (Scene *) ptr->id.data; + Editing *ed = BKE_sequencer_editing_get(scene, FALSE); + Sequence *seq = sequence_get_by_modifier(ed, ptr->data); + + BKE_sequence_invalidate_cache_for_modifier(scene, seq); +} + +static int rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value) +{ + Scene *scene = (Scene *) ptr->id.data; + Editing *ed = BKE_sequencer_editing_get(scene, FALSE); + Sequence *seq = sequence_get_by_modifier(ed, ptr->data); + Sequence *cur = (Sequence *) value.data; + + if (seq == cur) + return FALSE; + + if (BKE_sequence_check_depend(seq, cur)) + return FALSE; + + return TRUE; +} + +static SequenceModifierData *rna_Sequence_modifier_new(Sequence *seq, bContext *C, ReportList *reports, const char *name, int type) +{ + if (!BKE_sequence_supports_modifiers(seq)) { + BKE_report(reports, RPT_ERROR, "Sequence type does not support modifiers"); + + return NULL; + } + else { + Scene *scene = CTX_data_scene(C); + SequenceModifierData *smd; + + smd = BKE_sequence_modifier_new(seq, name, type); + + BKE_sequence_invalidate_cache_for_modifier(scene, seq); + + WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); + + return smd; + } +} + +static void rna_Sequence_modifier_remove(Sequence *seq, bContext *C, ReportList *reports, SequenceModifierData *smd) +{ + Scene *scene = CTX_data_scene(C); + + if (BKE_sequence_modifier_remove(seq, smd)) { + BKE_sequence_invalidate_cache_for_modifier(scene, seq); + + WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); + } + else { + BKE_report(reports, RPT_ERROR, "Modifier was not found in the stack"); + } +} + +static void rna_Sequence_modifier_clear(Sequence *seq, bContext *C) +{ + Scene *scene = CTX_data_scene(C); + + BKE_sequence_modifier_clear(seq); + + BKE_sequence_invalidate_cache_for_modifier(scene, seq); + + WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); +} #else @@ -991,13 +1204,13 @@ static void rna_def_strip_proxy(BlenderRNA *brna) } -static void rna_def_strip_color_balance(BlenderRNA *brna) +static void rna_def_color_balance(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - srna = RNA_def_struct(brna, "SequenceColorBalance", NULL); - RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip"); + srna = RNA_def_struct(brna, "SequenceColorBalanceData", NULL); + RNA_def_struct_ui_text(srna, "Sequence Color Balance Data", "Color balance parameters for a sequence strip and it's modifiers"); RNA_def_struct_sdna(srna, "StripColorBalance"); prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR); @@ -1005,19 +1218,19 @@ static void rna_def_strip_color_balance(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0, 2, 0.1, 3); RNA_def_property_float_default(prop, 1.0f); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_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_float_default(prop, 1.0f); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_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_float_default(prop, 1.0f); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_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", ""); @@ -1033,20 +1246,29 @@ static void rna_def_strip_color_balance(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Inverse Lift", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update"); - RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path"); - /* 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", ""); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update"); - + 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_ColorBabalnce_update"); #endif + + RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path"); +} + +static void rna_def_strip_color_balance(BlenderRNA *brna) +{ + StructRNA *srna; + + srna = RNA_def_struct(brna, "SequenceColorBalance", "SequenceColorBalanceData"); + RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip"); + RNA_def_struct_sdna(srna, "StripColorBalance"); } EnumPropertyItem blend_mode_items[] = { @@ -1062,6 +1284,45 @@ EnumPropertyItem blend_mode_items[] = { {0, NULL, 0, NULL, NULL} }; +static void rna_def_sequence_modifiers(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + + FunctionRNA *func; + PropertyRNA *parm; + + RNA_def_property_srna(cprop, "SequenceModifiers"); + srna = RNA_def_struct(brna, "SequenceModifiers", NULL); + RNA_def_struct_sdna(srna, "Sequence"); + RNA_def_struct_ui_text(srna, "Strip Modifiers", "Collection of strip modifiers"); + + /* add modifier */ + func = RNA_def_function(srna, "new", "rna_Sequence_modifier_new"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); + RNA_def_function_ui_description(func, "Add a new modifier"); + parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the modifier"); + RNA_def_property_flag(parm, PROP_REQUIRED); + /* modifier to add */ + parm = RNA_def_enum(func, "type", sequence_modifier_type_items, seqModifierType_ColorBalance, "", "Modifier type to add"); + RNA_def_property_flag(parm, PROP_REQUIRED); + /* return type */ + parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Newly created modifier"); + RNA_def_function_return(func, parm); + + /* remove modifier */ + func = RNA_def_function(srna, "remove", "rna_Sequence_modifier_remove"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); + RNA_def_function_ui_description(func, "Remove an existing modifier from the sequence"); + /* modifier to remove */ + parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Modifier to remove"); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); + + /* clear all modifiers */ + func = RNA_def_function(srna, "clear", "rna_Sequence_modifier_clear"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT); + RNA_def_function_ui_description(func, "Remove all modifiers from the sequence"); +} + static void rna_def_sequence(BlenderRNA *brna) { StructRNA *srna; @@ -1253,6 +1514,12 @@ static void rna_def_sequence(BlenderRNA *brna) "to this frame"); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); + /* modifiers */ + prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE); + RNA_def_property_struct_type(prop, "SequenceModifier"); + RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting this strip"); + rna_def_sequence_modifiers(brna, prop); + RNA_api_sequence_strip(srna); } @@ -1475,7 +1742,7 @@ static void rna_def_effect_inputs(StructRNA *srna, int count, int supports_mask) */ if (supports_mask) { - prop = RNA_def_property(srna, "input_mask", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence"); RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Sequence_otherSequence_poll"); RNA_def_property_flag(prop, PROP_EDITABLE); @@ -1963,8 +2230,155 @@ static void rna_def_effects(BlenderRNA *brna) } } +static void rna_def_modifier(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + static const EnumPropertyItem mask_input_type_items[] = { + {SEQUENCE_MASK_INPUT_STRIP, "STRIP", 0, "Strip", "Use sequencer strip as mask input"}, + {SEQUENCE_MASK_INPUT_ID, "ID", 0, "Mask", "Use mask ID as mask input"}, + {0, NULL, 0, NULL, NULL} + }; + + srna = RNA_def_struct(brna, "SequenceModifier", NULL); + RNA_def_struct_sdna(srna, "SequenceModifierData"); + RNA_def_struct_ui_text(srna, "SequenceModifier", "Modifier for sequence strip"); + RNA_def_struct_refine_func(srna, "rna_SequenceModifier_refine"); + RNA_def_struct_path_func(srna, "rna_SequenceModifier_path"); + + prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceModifier_name_set"); + RNA_def_property_ui_text(prop, "Name", ""); + RNA_def_struct_name_property(srna, prop); + 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, sequence_modifier_type_items); + RNA_def_property_ui_text(prop, "Type", ""); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL); + + prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQUENCE_MODIFIER_MUTE); + RNA_def_property_ui_text(prop, "Mute", "Mute this modifier"); + RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); + + prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQUENCE_MODIFIER_EXPANDED); + RNA_def_property_ui_text(prop, "Expanded", "Mute expanded settings for the modifier"); + RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL); + + prop = RNA_def_property(srna, "input_mask_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "mask_input_type"); + RNA_def_property_enum_items(prop, mask_input_type_items); + RNA_def_property_ui_text(prop, "Mask Input Type", "Type of input data used for mask"); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); + + prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence"); + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_SequenceModifier_otherSequence_poll"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Mask Strip", "Strip used as mask input for the modifier"); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); + + prop = RNA_def_property(srna, "input_mask_id", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "mask_id"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Mask", "Mask ID used as mask input for the modifier"); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); +} + +static void rna_def_colorbalance_modifier(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "ColorBalanceModifier", "SequenceModifier"); + RNA_def_struct_sdna(srna, "ColorBalanceModifierData"); + RNA_def_struct_ui_text(srna, "ColorBalanceModifier", "Color balance modifier for sequence strip"); + + prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "SequenceColorBalanceData"); + + prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED); + RNA_def_property_float_sdna(prop, NULL, "color_multiply"); + RNA_def_property_range(prop, 0.0f, 20.0f); + RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_ui_text(prop, "Multiply Colors", ""); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); +} + +static void rna_def_curves_modifier(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "CurvesModifier", "SequenceModifier"); + RNA_def_struct_sdna(srna, "CurvesModifierData"); + RNA_def_struct_ui_text(srna, "CurvesModifier", "RGB curves modifier for sequence strip"); + + prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping"); + RNA_def_property_struct_type(prop, "CurveMapping"); + RNA_def_property_ui_text(prop, "Curve Mapping", ""); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); +} + +static void rna_def_hue_modifier(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "HueCorrectModifier", "SequenceModifier"); + RNA_def_struct_sdna(srna, "HueCorrectModifierData"); + RNA_def_struct_ui_text(srna, "HueCorrectModifier", "Hue correction modifier for sequence strip"); + + prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping"); + RNA_def_property_struct_type(prop, "CurveMapping"); + RNA_def_property_ui_text(prop, "Curve Mapping", ""); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); +} + +static void rna_def_brightcontrast_modifier(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "BrightContrastModifier", "SequenceModifier"); + RNA_def_struct_sdna(srna, "BrightContrastModifierData"); + RNA_def_struct_ui_text(srna, "BrightContrastModifier", "Bright/contrast modifier data for sequence strip"); + + prop = RNA_def_property(srna, "bright", PROP_FLOAT, PROP_UNSIGNED); + RNA_def_property_float_sdna(prop, NULL, "bright"); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_text(prop, "Bright", ""); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); + + prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_UNSIGNED); + RNA_def_property_float_sdna(prop, NULL, "contrast"); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_text(prop, "Contrast", ""); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); +} + +static void rna_def_modifiers(BlenderRNA *brna) +{ + rna_def_modifier(brna); + + rna_def_colorbalance_modifier(brna); + rna_def_curves_modifier(brna); + rna_def_hue_modifier(brna); + rna_def_brightcontrast_modifier(brna); +} + void RNA_def_sequencer(BlenderRNA *brna) { + rna_def_color_balance(brna); + rna_def_strip_element(brna); rna_def_strip_proxy(brna); rna_def_strip_color_balance(brna); @@ -1983,6 +2397,7 @@ void RNA_def_sequencer(BlenderRNA *brna) rna_def_sound(brna); rna_def_effect(brna); rna_def_effects(brna); + rna_def_modifiers(brna); } #endif diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 456df187fff..ad14c60e532 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2656,6 +2656,14 @@ static void rna_def_space_time(BlenderRNA *brna) static void rna_def_console_line(BlenderRNA *brna) { + static EnumPropertyItem console_line_type_items[] = { + {CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""}, + {CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""}, + {CONSOLE_LINE_INFO, "INFO", 0, "Info", ""}, + {CONSOLE_LINE_ERROR, "ERROR", 0, "Error", ""}, + {0, NULL, 0, NULL, NULL} + }; + StructRNA *srna; PropertyRNA *prop; @@ -2673,6 +2681,11 @@ static void rna_def_console_line(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "cursor"); RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CONSOLE, NULL); + + prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "type"); + RNA_def_property_enum_items(prop, console_line_type_items); + RNA_def_property_ui_text(prop, "Type", "Console line type when used in scrollback"); } static void rna_def_space_console(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 0898ba5608f..172a79970b5 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -910,7 +910,7 @@ static void rna_def_trackingMarkers(BlenderRNA *brna, PropertyRNA *cprop) "Frame number to find marker for", MINFRAME, MAXFRAME); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_boolean(func, "exact", TRUE, "Exact", - "Get marker at exact frame number rather than get estimated marker"); + "Get marker at exact frame number rather than get estimated marker"); parm = RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Marker for specified frame"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 96ddcce6004..cf43bd74d72 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -125,6 +125,7 @@ void RNA_api_ui_layout(StructRNA *srna) {0, "NONE", 0, "None", ""}, {'v', "VECTOR", 0, "Vector", ""}, {'c', "COLOR", 0, "Color", ""}, + {'h', "HUE", 0, "Hue", ""}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index e3cd236a8e3..7cebbe5a895 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -3358,7 +3358,11 @@ static void rna_def_userdef_input(BlenderRNA *brna) /* global options */ prop = RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.25f, 4.0f); - RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of the 3D Mouse"); + RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of the 3D Mouse for panning"); + + prop = RNA_def_property(srna, "ndof_orbit_sensitivity", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.25f, 4.0f); + RNA_def_property_ui_text(prop, "Orbit Sensitivity", "Overall sensitivity of the 3D Mouse for orbiting"); prop = RNA_def_property(srna, "ndof_zoom_updown", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_UPDOWN); @@ -3375,6 +3379,11 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Navigation Guide", "Display the center and axis during rotation"); /* TODO: update description when fly-mode visuals are in place ("projected position in fly mode")*/ + /* 3D view */ + prop = RNA_def_property(srna, "ndof_turntable", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_TURNTABLE); + RNA_def_property_ui_text(prop, "Turntable", "Turntable for ndof rotation"); + /* 3D view: roll */ prop = RNA_def_property(srna, "ndof_roll_invert_axis", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROLL_INVERT_AXIS); |