Naming + Style tweaks for newly added flag for Action Constraint
authorJoshua Leung <aligorith@gmail.com>
Tue, 12 Jun 2012 11:54:31 +0000 (11:54 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 12 Jun 2012 11:54:31 +0000 (11:54 +0000)
Old names used could conflict with other things too easily in future

source/blender/blenkernel/intern/constraint.c
source/blender/makesdna/DNA_constraint_types.h
source/blender/makesrna/intern/rna_constraint.c

index 09351f36bdb797bdb321ea368df76a9274dbc2d9..9bb0980ad5c8f99e64f52f304899ee42b0d6d8f2 100644 (file)
@@ -2159,7 +2159,7 @@ static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintT
                        printf("do Action Constraint %s - Ob %s Pchan %s\n", con->name, cob->ob->id.name + 2, (cob->pchan) ? cob->pchan->name : NULL);
                
                /* Get the appropriate information from the action */
-               if (cob->type == CONSTRAINT_OBTYPE_OBJECT || (data->flag & BONE_USE_OBJECT_ACTION)) {
+               if (cob->type == CONSTRAINT_OBTYPE_OBJECT || (data->flag & ACTCON_BONE_USE_OBJECT_ACTION)) {
                        Object workob;
                        
                        /* evaluate using workob */
index aae167d05c61c60ce3b51e0a50f4bc4a58119f4a..6ca9a95400dc2041d61c226dd3b83d4c6aed6e4e 100644 (file)
@@ -561,11 +561,11 @@ typedef enum eSameVolume_Modes {
        SAMEVOL_Z
 } eSameVolume_Modes;
 
-/* bActionConstraint.flag
- * WARNING: bitwise! */
-typedef enum eAction_flags {
-       BONE_USE_OBJECT_ACTION = 1 << 0, /* Bones use "object" part of target action, instead of "same bone name" part. */
-} eAction_flags;
+/* bActionConstraint.flag */
+typedef enum eActionConstraint_Flags {
+       /* Bones use "object" part of target action, instead of "same bone name" part */
+       ACTCON_BONE_USE_OBJECT_ACTION = (1 << 0), 
+} eActionConstraint_Flags;
 
 /* Locked-Axis Values (Locked Track) */
 typedef enum eLockAxis_Modes {
index f02df6c30ed4cf1b87f017590cf02c4e87f5eed9..ae8b0c515442bc2afce2b9b0d1bf7dc4cb28f916 100644 (file)
@@ -1112,7 +1112,7 @@ static void rna_def_constraint_action(BlenderRNA *brna)
        RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
 
        prop = RNA_def_property(srna, "use_bone_object_action", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_USE_OBJECT_ACTION);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", ACTCON_BONE_USE_OBJECT_ACTION);
        RNA_def_property_ui_text(prop, "Object Action",
                                 "Bones only: apply the object's transformation channels of the action "
                                 "to the constrained bone, instead of bone's channels");