[Bf-blender-cvs] [0ff05daee04] blender2.8: Fix handling of B-Bone custom handle references in Edit mode undo.
Alexander Gavrilov
noreply at git.blender.org
Mon Nov 19 18:40:43 CET 2018
Commit: 0ff05daee04d3ccc01b3c3980fdfc65951cdea9b
Author: Alexander Gavrilov
Date: Mon Nov 19 20:34:25 2018 +0300
Branches: blender2.8
https://developer.blender.org/rB0ff05daee04d3ccc01b3c3980fdfc65951cdea9b
Fix handling of B-Bone custom handle references in Edit mode undo.
Correct a couple of places that should process the handle pointers.
===================================================================
M source/blender/editors/armature/armature_relations.c
M source/blender/editors/armature/armature_utils.c
===================================================================
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 0e95b6c3467..28bab00e665 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -549,8 +549,15 @@ static void separate_armature_bones(Main *bmain, Object *ob, short sel)
/* clear the pchan->parent var of any pchan that had this as its parent */
for (pchn = ob->pose->chanbase.first; pchn; pchn = pchn->next) {
- if (pchn->parent == pchan)
+ if (pchn->parent == pchan) {
pchn->parent = NULL;
+ }
+ if (pchn->bbone_next == pchan) {
+ pchn->bbone_next = NULL;
+ }
+ if (pchn->bbone_prev == pchan) {
+ pchn->bbone_prev = NULL;
+ }
}
/* free any of the extra-data this pchan might have */
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index 339f0306779..53b07c59973 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -816,6 +816,12 @@ void ED_armature_ebone_listbase_copy(ListBase *lb_dst, ListBase *lb_src)
if (ebone_dst->parent) {
ebone_dst->parent = ebone_dst->parent->temp.ebone;
}
+ if (ebone_dst->bbone_next) {
+ ebone_dst->bbone_next = ebone_dst->bbone_next->temp.ebone;
+ }
+ if (ebone_dst->bbone_prev) {
+ ebone_dst->bbone_prev = ebone_dst->bbone_prev->temp.ebone;
+ }
}
}
More information about the Bf-blender-cvs
mailing list