[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11029] trunk/blender/source/blender/src/ editaction.c: == Action Editor ==
Joshua Leung
aligorith at gmail.com
Sat Jun 23 09:12:09 CEST 2007
Revision: 11029
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11029
Author: aligorith
Date: 2007-06-23 09:12:09 +0200 (Sat, 23 Jun 2007)
Log Message:
-----------
== Action Editor ==
Fixed a few little memory leaks introduced during my recode. They were only likely to occur in a few cases that don't happen very often.
Modified Paths:
--------------
trunk/blender/source/blender/src/editaction.c
Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c 2007-06-23 06:56:16 UTC (rev 11028)
+++ trunk/blender/source/blender/src/editaction.c 2007-06-23 07:12:09 UTC (rev 11029)
@@ -767,7 +767,11 @@
count += fullselect_ipo_keys(ale->key_data);
/* stop if trying to build list if nothing selected */
- if (count == 0) return NULL;
+ if (count == 0) {
+ /* cleanup temp list */
+ BLI_freelistN(&act_data);
+ return NULL;
+ }
/* Build the transvert structure */
tv = MEM_callocN (sizeof(TransVert) * count, "transVert");
@@ -1152,11 +1156,7 @@
/* get data */
data= get_action_context(&datatype);
if (data == NULL) return;
-
- /* filter data */
- filter= (ACTFILTER_VISIBLE | ACTFILTER_FOREDIT | ACTFILTER_IPOKEYS);
- actdata_filter(&act_data, filter, data, datatype);
-
+
/* determine mode */
switch (mode) {
case 1:
@@ -1172,6 +1172,10 @@
return;
}
+ /* filter data */
+ filter= (ACTFILTER_VISIBLE | ACTFILTER_FOREDIT | ACTFILTER_IPOKEYS);
+ actdata_filter(&act_data, filter, data, datatype);
+
/* snap to frame */
for (ale= act_data.first; ale; ale= ale->next) {
if (datatype==ACTCONT_ACTION && G.saction->pin==0 && OBACT) {
@@ -1207,11 +1211,7 @@
/* get data */
data= get_action_context(&datatype);
if (data == NULL) return;
-
- /* filter data */
- filter= (ACTFILTER_VISIBLE | ACTFILTER_FOREDIT | ACTFILTER_IPOKEYS);
- actdata_filter(&act_data, filter, data, datatype);
-
+
/* determine mode */
switch (mode) {
case 1:
@@ -1230,6 +1230,10 @@
return;
}
+ /* filter data */
+ filter= (ACTFILTER_VISIBLE | ACTFILTER_FOREDIT | ACTFILTER_IPOKEYS);
+ actdata_filter(&act_data, filter, data, datatype);
+
/* mirror */
for (ale= act_data.first; ale; ale= ale->next) {
if (datatype==ACTCONT_ACTION && G.saction->pin==0 && OBACT) {
@@ -1554,8 +1558,7 @@
allqueue(REDRAWNLA, 0);
}
-/* this function sets the handles on keyframes
- */
+/* this function sets the handles on keyframes */
void sethandles_action_keys (int code)
{
ListBase act_data = {NULL, NULL};
More information about the Bf-blender-cvs
mailing list