diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_lattice.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_lattice.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index b017bc830c9..c5132844016 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -25,7 +25,6 @@ #include <stdlib.h> #include "RNA_define.h" -#include "RNA_types.h" #include "rna_internal.h" @@ -42,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" @@ -158,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) @@ -246,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"); |