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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-06-04 23:38:33 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-06-04 23:38:33 +0400
commit4e338e894f9fb0fa18e5594c2648b05c8f92d4c5 (patch)
treed5a6c1897d9697fc2599316c54c2b53d3b7d6b21 /source/blender/makesrna/intern/rna_nodetree.c
parentd9589bf0dd7a5bbaa0560704c8fbf1b11ec0166d (diff)
Cycles: support for image sequences in image/environment texture node.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c63
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 30c705fb7fa..562684799b4 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;
@@ -3454,7 +3473,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);