diff options
author | Geoffroy Krantz <kgeogeo@hotmail.com> | 2014-01-14 00:57:05 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-14 01:18:31 +0400 |
commit | ff98be83a977e54039bfdae405df5a79abafeea7 (patch) | |
tree | 284f4e61bca5a26f8b1a0fbc7af03be7fc4e6857 /source/blender/makesrna/intern/rna_object.c | |
parent | e9984653a827f1f5de8e1a1d019854b77afb1ea5 (diff) |
Empties with Images draw type: add support for movies and image sequences
This adds an ImageUser to such empties with all the typical settings.
Reviewed By: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D108
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 19aefc480d0..4c3bdd0398e 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -486,6 +486,13 @@ static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), Point return item; } +static void rna_Object_empty_draw_type_set(PointerRNA *ptr, int value) +{ + Object *ob = (Object *)ptr->data; + + BKE_object_empty_draw_type_set(ob, value); +} + static EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { @@ -2441,6 +2448,7 @@ static void rna_def_object(BlenderRNA *brna) prop = RNA_def_property(srna, "empty_draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "empty_drawtype"); RNA_def_property_enum_items(prop, object_empty_drawtype_items); + RNA_def_property_enum_funcs(prop, NULL, "rna_Object_empty_draw_type_set", NULL); RNA_def_property_ui_text(prop, "Empty Display Type", "Viewport display style for empties"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); @@ -2457,6 +2465,13 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 0.1f, 2); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "iuser"); + RNA_def_property_ui_text(prop, "Image User", + "Parameters defining which layer, pass and frame of the image is displayed"); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + /* render */ prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "index"); |