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>2012-01-11 12:51:06 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-01-11 12:51:06 +0400
commit51bada696f77de9d7f673884cec9560218654fae (patch)
treed2434eac2fb74377592ee7c8c86d68b55733960c /source/blender/makesdna/DNA_actuator_types.h
parent782f0b63829a2c257a6e2942c49882f7fe04c33c (diff)
Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning characters and 1 for zero-terminator). CustomData layers names are also extended. Changed DNA structures and all places where length constants were hardcoded. All names which are "generating" from ID block should be limited by MAX_ID_NAME-2, all non-id names now has got own define called MAX_NAME which should be used all over for non-id names to make further name migration stuff easier. All name fields in DNA now have comment with constant which corresponds to hardcoded numeric value which should make it easier to further update this limits or even switch to non-hardcoded values in DNA. Special thanks to Campbell who helped figuring out some issues and helped a lot in finding all cases where hardcoded valued were still used in code. Both of forwards and backwards compatibility is stored with blender versions newer than January 5, 2011. Older versions had issue with placing null-terminator to DNA strings on file load which will lead to some unpredictable behavior or even crashes.
Diffstat (limited to 'source/blender/makesdna/DNA_actuator_types.h')
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 076910ade1f..3be46538c22 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -50,8 +50,8 @@ typedef struct bActionActuator {
struct bAction *act; /* Pointer to action */
short type, flag; /* Playback type */ // not in use
float sta, end; /* Start & End frames */
- char name[32]; /* For property-driven playback */
- char frameProp[32]; /* Set this property to the actions current frame */
+ char name[64]; /* For property-driven playback, MAX_NAME */
+ char frameProp[64]; /* Set this property to the actions current frame, MAX_NAME */
short blendin; /* Number of frames of blending */
short priority; /* Execution priority */
short layer; /* Animation layer */
@@ -90,7 +90,7 @@ typedef struct bEditObjectActuator {
short type, flag;
struct Object *ob;
struct Mesh *me;
- char name[32];
+ char name[64]; /* MAX_NAME */
float linVelocity[3]; /* initial lin. velocity on creation */
float angVelocity[3]; /* initial ang. velocity on creation */
float mass;
@@ -107,7 +107,7 @@ typedef struct bSceneActuator {
typedef struct bPropertyActuator {
int pad, type;
- char name[32], value[32];
+ char name[64], value[64]; /* MAX_NAME */
struct Object *ob;
} bPropertyActuator;
@@ -125,8 +125,8 @@ typedef struct bObjectActuator {
typedef struct bIpoActuator {
short flag, type;
float sta, end;
- char name[32];
- char frameProp[32]; /* Set this property to the actions current frame */
+ char name[64]; /* MAX_NAME */
+ char frameProp[64]; /* Set this property to the actions current frame, MAX_NAME */
short pad1, pad2, pad3, pad4;
@@ -147,13 +147,13 @@ typedef struct bConstraintActuator {
int pad;
float minloc[3], maxloc[3];
float minrot[3], maxrot[3];
- char matprop[32];
+ char matprop[64]; /* MAX_NAME */
} bConstraintActuator;
typedef struct bGroupActuator {
short flag, type;
int sta, end;
- char name[32]; /* property or groupkey */
+ char name[64]; /* property or groupkey, MAX_NAME */
short pad[3], cur, butsta, butend;/* not referenced, can remove? */
/* struct Group *group; not used, remove */
@@ -168,16 +168,16 @@ typedef struct bRandomActuator {
int int_arg_2;
float float_arg_1;
float float_arg_2;
- char propname[32];
+ char propname[64]; /* MAX_NAME */
} bRandomActuator;
typedef struct bMessageActuator {
- char toPropName[32]; /* Send to all objects with this propertyname. Empty to broadcast. */
+ char toPropName[64]; /* Send to all objects with this propertyname. Empty to broadcast. MAX_NAME. */
struct Object *toObject;/* (Possible future use) pointer to a single destination object. */
- char subject[32]; /* Message Subject to send. */
+ char subject[64]; /* Message Subject to send. MAX_NAME. */
short bodyType, pad1; /* bodyType is either 'User defined text' or PropName */
int pad2;
- char body[32]; /* Either User Defined Text or our PropName to send value of */
+ char body[64]; /* Either User Defined Text or our PropName to send value of, MAX_NAME */
} bMessageActuator;
typedef struct bGameActuator {
@@ -220,8 +220,8 @@ typedef struct bStateActuator {
} bStateActuator;
typedef struct bArmatureActuator {
- char posechannel[32];
- char constraint[32];
+ char posechannel[64]; /* MAX_NAME */
+ char constraint[64]; /* MAX_NAME */
int type; /* 0=run, 1=enable, 2=disable, 3=set target, 4=set weight */
float weight;
struct Object *target;
@@ -250,7 +250,7 @@ typedef struct bActuator {
*/
short flag;
short otype, go;
- char name[32];
+ char name[64]; /* MAX_NAME */
/**
* data must point to an object actuator type struct.