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-11-18 15:17:43 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-11-18 15:19:15 +0400
commit2b0162b6226df9dcb9b6819ce93f2d434afc69c4 (patch)
tree77e5637bd19f115df5fa4850dc2a3c39fe3f7135 /source/gameengine
parentea79dcebe2303b0b58a0791cd8b531ecc45a2394 (diff)
Fix T37289: ID User decrement error for Shapes on Bones when playing in BGE
GE was copying the pose channels without increasing user counter for a custom bone shape object. Freeing copied pose will for give decrement errors. The same increment issue seems to happen in BKE_pose_copy_data, which is also solved now.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp
index d8ddb33ddc4..7ce1c7c815a 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.cpp
+++ b/source/gameengine/Converter/BL_ArmatureObject.cpp
@@ -42,6 +42,7 @@
#include "BIK_api.h"
#include "BKE_action.h"
#include "BKE_armature.h"
+#include "BKE_library.h"
#include "BKE_constraint.h"
#include "CTR_Map.h"
@@ -120,6 +121,10 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
pchan->constraints.last = NULL;
}
+ if (pchan->custom) {
+ id_us_plus(&pchan->custom->id);
+ }
+
// fails to link, props are not used in the BGE yet.
#if 0
if (pchan->prop)