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:
authorCampbell Barton <ideasman42@gmail.com>2009-11-21 14:26:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-21 14:26:09 +0300
commit684405e0fb80216dbafbe4dcea3cd21cc18c17c9 (patch)
tree0c5e5f92db6d123d38dcd3827fc37d3050807edf /source/blender/blenkernel/intern/action.c
parent6073bc9bc3f935e4018fd0cc1fc3d2b1db6fc0b6 (diff)
id properties for editbones and pose channels were not being freed in a number of cases,
added free_pose_channel(pchan) and use this in all places that free pose bones
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r--source/blender/blenkernel/intern/action.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 33f3658c53b..b359ab6ee87 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -62,6 +62,8 @@
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_utildefines.h"
+#include "BKE_idprop.h"
+
#include "BIK_api.h"
#include "BLI_math.h"
@@ -564,16 +566,27 @@ void init_pose_ikparam(bPose *pose)
}
}
+void free_pose_channel(bPoseChannel *pchan)
+{
+ if (pchan->path)
+ MEM_freeN(pchan->path);
+
+ free_constraints(&pchan->constraints);
+
+ if(pchan->prop) {
+ IDP_FreeProperty(pchan->prop);
+ MEM_freeN(pchan->prop);
+ }
+}
+
void free_pose_channels(bPose *pose)
{
bPoseChannel *pchan;
if (pose->chanbase.first) {
- for (pchan = pose->chanbase.first; pchan; pchan=pchan->next){
- if (pchan->path)
- MEM_freeN(pchan->path);
- free_constraints(&pchan->constraints);
- }
+ for (pchan = pose->chanbase.first; pchan; pchan=pchan->next)
+ free_pose_channel(pchan);
+
BLI_freelistN(&pose->chanbase);
}
}