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:
authorCampbell Barton <ideasman42@gmail.com>2010-04-21 01:38:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-21 01:38:55 +0400
commit24eedb2175896dd5d7e145486f3f3c6455511fca (patch)
treeea516ee8892908cd45e5276d82425ce93c016d75 /source/blender/makesrna/intern/rna_lattice.c
parent37542017209bf831235fb1645d31b0275642da87 (diff)
vertex group option for lattice, needed for applying a lattice to a beard/moustache without moving the roots about.
Diffstat (limited to 'source/blender/makesrna/intern/rna_lattice.c')
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index e56cb2659f7..c5132844016 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -41,6 +41,7 @@
#include "BKE_depsgraph.h"
#include "BKE_lattice.h"
#include "BKE_main.h"
+#include "BKE_deform.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -157,6 +158,16 @@ static void rna_Lattice_points_w_set(PointerRNA *ptr, int value)
((Lattice*)ptr->data)->opntsw= CLAMPIS(value, 1, 64);
}
+static void rna_Lattice_vg_name_set(PointerRNA *ptr, const char *value)
+{
+ Lattice *lt= ptr->data;
+ strcpy(lt->vgroup, value);
+
+ if(lt->editlatt)
+ strcpy(lt->editlatt->vgroup, value);
+}
+
+
#else
static void rna_def_latticepoint(BlenderRNA *brna)
@@ -245,6 +256,12 @@ static void rna_def_lattice(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, NULL, "rna_Lattice_outside_set");
RNA_def_property_ui_text(prop, "Outside", "Only draw, and take into account, the outer vertices");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
+
+ prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "vgroup");
+ RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group to apply the influence of the lattice");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Lattice_vg_name_set");
+ RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "key");