diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-19 01:52:17 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-19 01:52:29 +0300 |
commit | 19cc516f5122d99d3de246502c74882153699a0b (patch) | |
tree | 89d29ec12be4fbb3d9b7c26950373b49d5a1219b /source/blender/makesrna/intern/rna_object.c | |
parent | d06b1a5d8bb219c0935373cd5758a9bdacd6ec36 (diff) |
Refactor: Move part of vgroup handling code from ED_mesh/object_vgroup.c to BKE_object_deform.
Along with some minor cleanup and simplifications.
Reviewers: campbellbarton
Subscribers: sergey
Differential Revision: https://developer.blender.org/D903
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index e6714bbe433..5f39f0c3d73 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -46,6 +46,8 @@ #include "BKE_editmesh.h" #include "BKE_group.h" /* needed for BKE_group_object_exists() */ #include "BKE_object.h" /* Needed for BKE_object_matrix_local_get() */ +#include "BKE_object_deform.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -1389,7 +1391,7 @@ static void rna_Object_boundbox_get(PointerRNA *ptr, float *values) static bDeformGroup *rna_Object_vgroup_new(Object *ob, const char *name) { - bDeformGroup *defgroup = ED_vgroup_add_name(ob, name); + bDeformGroup *defgroup = BKE_object_defgroup_add_name(ob, name); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); @@ -1404,7 +1406,7 @@ static void rna_Object_vgroup_remove(Object *ob, ReportList *reports, PointerRNA return; } - ED_vgroup_delete(ob, defgroup); + BKE_object_defgroup_remove(ob, defgroup); RNA_POINTER_INVALIDATE(defgroup_ptr); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); @@ -1412,7 +1414,7 @@ static void rna_Object_vgroup_remove(Object *ob, ReportList *reports, PointerRNA static void rna_Object_vgroup_clear(Object *ob) { - ED_vgroup_clear(ob); + BKE_object_defgroup_remove_all(ob); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); } |