Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-08-12 17:52:13 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-08-12 17:52:13 +0400
commit3497b2241e793764c2d57f7b26984957f2300d60 (patch)
treecff657183ce7fec560c361e05935f8fe435926db /source/blender/blenkernel/intern/armature.c
parent004fa8e72973efab77a849fbd44bc46079b7e7aa (diff)
Followup for r58992, fixing user decrement error
Some places like proxy rebuild didn't increent custom shape user counter which lead to user decrement errors later when freeing pose channels. Try to keep custom object counter relevent, but some corner cases might still be missing.
Diffstat (limited to 'source/blender/blenkernel/intern/armature.c')
-rw-r--r--source/blender/blenkernel/intern/armature.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index d37ccae3089..eca607c08df 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1652,10 +1652,16 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
/* copy data in temp back over to the cleaned-out (but still allocated) original channel */
*pchan = pchanw;
+ if (pchan->custom) {
+ id_us_plus(&pchan->custom->id);
+ }
}
else {
/* always copy custom shape */
pchan->custom = pchanp->custom;
+ if (pchan->custom) {
+ id_us_plus(&pchan->custom->id);
+ }
if (pchanp->custom_tx)
pchan->custom_tx = BKE_pose_channel_find_name(pose, pchanp->custom_tx->name);