diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-21 01:38:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-21 01:38:55 +0400 |
commit | 24eedb2175896dd5d7e145486f3f3c6455511fca (patch) | |
tree | ea516ee8892908cd45e5276d82425ce93c016d75 /source/blender/makesrna/intern/rna_lattice.c | |
parent | 37542017209bf831235fb1645d31b0275642da87 (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.c | 17 |
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"); |