From 232049dd9408e15d2082181e60ddd775b375ff19 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 23 Aug 2019 11:53:45 +1000 Subject: Armature: use BKE_armature_transform when applying transformation Keep ED_armature_transform for RNA Armature.transform since it operates on edit-bones in edit-mode. Rename ED_armature_transform_bones to ED_armature_edit_transform since it wasn't obviously an edit-mode function. --- source/blender/makesrna/intern/rna_armature.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index bc6d3b6e743..c0e3404f78c 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -604,9 +604,9 @@ static bool rna_Armature_is_editmode_get(PointerRNA *ptr) return (arm->edbo != NULL); } -static void rna_Armature_transform(struct bArmature *arm, Main *bmain, float *mat) +static void rna_Armature_transform(bArmature *arm, float *mat) { - ED_armature_transform(bmain, arm, (float(*)[4])mat, true); + ED_armature_transform(arm, (const float(*)[4])mat, true); } #else @@ -1320,7 +1320,6 @@ static void rna_def_armature(BlenderRNA *brna) RNA_def_struct_sdna(srna, "bArmature"); func = RNA_def_function(srna, "transform", "rna_Armature_transform"); - RNA_def_function_flag(func, FUNC_USE_MAIN); RNA_def_function_ui_description(func, "Transform armature bones by a matrix"); parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); -- cgit v1.2.3