diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-06 14:25:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-06 14:25:59 +0400 |
commit | 870ba8aa13c87fdeb1724d0f3ad7b7a4b53a4d32 (patch) | |
tree | b20f227ec19530eab04c9a54e8cf7faaf16f634d /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 2202aaa083b99a4c37c20fbaf34e370d4e78c839 (diff) | |
parent | 8849a789702a9be0c06ecc850845c3bb3af0d0fd (diff) |
svn merge ^/trunk/blender -r47423:47506
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 63 |
1 files changed, 41 insertions, 22 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 1f574ba2473..ae489790825 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1429,6 +1429,12 @@ static void def_sh_tex_environment(StructRNA *srna) RNA_def_property_ui_text(prop, "Projection", "Projection of the input image"); RNA_def_property_update(prop, 0, "rna_Node_update"); + prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "iuser"); + 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, 0, "rna_Node_update"); } static void def_sh_tex_image(StructRNA *srna) @@ -1458,6 +1464,13 @@ static void def_sh_tex_image(StructRNA *srna) RNA_def_property_enum_items(prop, prop_color_space_items); RNA_def_property_ui_text(prop, "Color Space", "Image file color space"); RNA_def_property_update(prop, 0, "rna_Node_update"); + + prop = RNA_def_property(srna, "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, 0, "rna_Node_update"); } static void def_sh_tex_gradient(StructRNA *srna) @@ -1830,29 +1843,10 @@ static void def_cmp_levels(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } -static void def_cmp_image(StructRNA *srna) +static void def_node_image_user(StructRNA *srna) { PropertyRNA *prop; - -#if 0 - static EnumPropertyItem type_items[] = { - {IMA_SRC_FILE, "IMAGE", 0, "Image", ""}, - {IMA_SRC_MOVIE, "MOVIE", "Movie", ""}, - {IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""}, - {IMA_SRC_GENERATED, "GENERATED", "Generated", ""}, - {0, NULL, 0, NULL, NULL} - }; -#endif - - prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_sdna(prop, NULL, "id"); - RNA_def_property_struct_type(prop, "Image"); - RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Image", ""); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); - - RNA_def_struct_sdna_from(srna, "ImageUser", "storage"); - + prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "frames"); RNA_def_property_range(prop, 0, MAXFRAMEF); @@ -1893,6 +1887,31 @@ static void def_cmp_image(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_image_layer_update"); } +static void def_cmp_image(StructRNA *srna) +{ + PropertyRNA *prop; + +#if 0 + static EnumPropertyItem type_items[] = { + {IMA_SRC_FILE, "IMAGE", 0, "Image", ""}, + {IMA_SRC_MOVIE, "MOVIE", "Movie", ""}, + {IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""}, + {IMA_SRC_GENERATED, "GENERATED", "Generated", ""}, + {0, NULL, 0, NULL, NULL} + }; +#endif + + prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "id"); + RNA_def_property_struct_type(prop, "Image"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Image", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + RNA_def_struct_sdna_from(srna, "ImageUser", "storage"); + def_node_image_user(srna); +} + static void def_cmp_render_layers(StructRNA *srna) { PropertyRNA *prop; @@ -3515,7 +3534,7 @@ static void def_tex_image(StructRNA *srna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Image", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); - + /* is this supposed to be exposed? not sure.. */ #if 0 prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE); |