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:
authorTon Roosendaal <ton@blender.org>2011-01-06 14:16:35 +0300
committerTon Roosendaal <ton@blender.org>2011-01-06 14:16:35 +0300
commit5cef085f770056b9f35ee6d203dc62b5db6cde23 (patch)
tree0d56e743a73c1332ce0c70e096e733019fb3189d /source/blender/makesrna/intern/rna_curve.c
parenta4c0d644c9f55c39955e43bdccbf523064c0add4 (diff)
Todo item:
Auto-texture space now is more responsive and correct. - on transforming it, the buttons get redrawn to show option was reset - on enabling option, texture space is recalculated/reset
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve.c')
-rw-r--r--source/blender/makesrna/intern/rna_curve.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index e61ac34b0aa..8b9166b919f 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -175,6 +175,14 @@ static void rna_BezTriple_ctrlpoint_set(PointerRNA *ptr, const float *values)
bt->vec[1][2]= values[2];
}
+static void rna_Curve_texspace_set(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ Curve *cu= (Curve*)ptr->data;
+
+ if (cu->texflag & CU_AUTOSPACE)
+ tex_space_curve(cu);
+}
+
static int rna_Curve_texspace_editable(PointerRNA *ptr)
{
Curve *cu= (Curve*)ptr->data;
@@ -1355,7 +1363,8 @@ static void rna_def_curve(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", CU_AUTOSPACE);
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Curve_texspace_set");
+
prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Texture Space Location", "Texture space location");