diff options
author | Ton Roosendaal <ton@blender.org> | 2011-01-06 14:16:35 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-01-06 14:16:35 +0300 |
commit | 5cef085f770056b9f35ee6d203dc62b5db6cde23 (patch) | |
tree | 0d56e743a73c1332ce0c70e096e733019fb3189d /source/blender/makesrna/intern/rna_mesh.c | |
parent | a4c0d644c9f55c39955e43bdccbf523064c0add4 (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_mesh.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 1eaf3d599db..192825e3afa 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -229,6 +229,15 @@ static void rna_MeshColor_color4_set(PointerRNA *ptr, const float *values) (&mcol[3].r)[0]= (char)(CLAMPIS(values[2]*255.0f, 0, 255)); } +static void rna_Mesh_texspace_set(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + Mesh *me= (Mesh*)ptr->data; + + if (me->texflag & AUTOSPACE) + tex_space_mesh(me); +} + + static int rna_Mesh_texspace_editable(PointerRNA *ptr) { Mesh *me= (Mesh*)ptr->data; @@ -1903,6 +1912,7 @@ static void rna_def_mesh(BlenderRNA *brna) prop= RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", 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_Mesh_texspace_set"); prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_array(prop, 3); |