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-10-05 01:40:39 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-05 01:40:39 +0400
commitfedc8e17223cc5490d465788cac211328a712e5f (patch)
tree78fa4eb2ab6a50cc29dcb411272c71b24d971568 /source/blender/makesrna/intern/rna_object.c
parent984e9f9cc8eee131c6602b326e588d2903eda90a (diff)
Cycles: add "From Dupli" option for texture coordinate node. This gets the
Generated and UV coordinates from the duplicator of instance instead of the object itself. This was used in e.g. Big Buck Bunny for texturing instanced feathers with a UV map on the bird. Many files changed, mainly to do some refactoring to get rid of G.rendering global in duplilist code.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r--source/blender/makesrna/intern/rna_object.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index a10c153515a..758b433b1cb 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2572,7 +2572,16 @@ static void rna_def_dupli_object(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Particle Index", "Index in the lowest-level particle dupli list");
- /* TODO: DupliObject has more properties that can be wrapped */
+ prop = RNA_def_property(srna, "orco", PROP_FLOAT, PROP_TRANSLATION);
+ RNA_def_property_float_sdna(prop, NULL, "orco");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Generated Coordinates", "Generated coordinates in parent object space");
+
+ prop = RNA_def_property(srna, "uv", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "uv");
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "UV Coordinates", "UV coordinates in parent object space");
}
static void rna_def_object_base(BlenderRNA *brna)