[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45617] trunk/blender/source/blender: code cleanup: when extending name length Key. elemstr was incorrectly extended to 64 chars, added comment and set back to original length.
Campbell Barton
ideasman42 at gmail.com
Sat Apr 14 04:49:01 CEST 2012
Revision: 45617
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45617
Author: campbellbarton
Date: 2012-04-14 02:48:56 +0000 (Sat, 14 Apr 2012)
Log Message:
-----------
code cleanup: when extending name length Key.elemstr was incorrectly extended to 64 chars, added comment and set back to original length.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/key.c
trunk/blender/source/blender/makesdna/DNA_key_types.h
Modified: trunk/blender/source/blender/blenkernel/intern/key.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/key.c 2012-04-14 02:32:32 UTC (rev 45616)
+++ trunk/blender/source/blender/blenkernel/intern/key.c 2012-04-14 02:48:56 UTC (rev 45617)
@@ -69,7 +69,7 @@
#define KEY_MODE_BPOINT 1
#define KEY_MODE_BEZTRIPLE 2
-// old defines from DNA_ipo_types.h for data-type
+/* old defines from DNA_ipo_types.h for data-type, stored in DNA - don't modify! */
#define IPO_FLOAT 4
#define IPO_BEZTRIPLE 100
#define IPO_BPOINT 101
@@ -660,7 +660,7 @@
return;
}
- poin += ofsp[0];
+ poin += *ofsp;
cp += 2; ofsp++;
}
@@ -796,7 +796,7 @@
return;
}
- poin += ofsp[0];
+ poin += *ofsp;
cp += 2;
ofsp++;
@@ -963,7 +963,7 @@
return;
}
- poin += ofsp[0];
+ poin += *ofsp;
cp += 2;
ofsp++;
}
Modified: trunk/blender/source/blender/makesdna/DNA_key_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_key_types.h 2012-04-14 02:32:32 UTC (rev 45616)
+++ trunk/blender/source/blender/makesdna/DNA_key_types.h 2012-04-14 02:48:56 UTC (rev 45617)
@@ -61,7 +61,10 @@
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
KeyBlock *refkey;
- char elemstr[64]; /* MAX_NAME */
+ /* this is not a regular string, although it is \0 terminated
+ * this is an array of (element_array_size, element_type) pairs
+ * (each one char) used for calculating shape key-blocks */
+ char elemstr[32];
int elemsize;
float curval DNA_DEPRECATED;
More information about the Bf-blender-cvs
mailing list