[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12935] branches/animsys-aligorith/source/ blender: == AnimSys Branch - KeyableType improvements ==

Joshua Leung aligorith at gmail.com
Tue Dec 18 01:18:05 CET 2007


Revision: 12935
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12935
Author:   aligorith
Date:     2007-12-18 01:18:04 +0100 (Tue, 18 Dec 2007)

Log Message:
-----------
== AnimSys Branch - KeyableType improvements ==

KeyableTypes now store the blocktype (IPOB_*) and subblock-type (i.e.  type of constraint/modifier/node/etc.) they belong to. sdna2kt has been updated accordingly for these changes.

Also, fixed a bug with sdna2kt, which caused it to add a comma after the last kt definition in an array too. It now checks for such cases

Modified Paths:
--------------
    branches/animsys-aligorith/source/blender/blenkernel/intern/keyabletypes.c
    branches/animsys-aligorith/source/blender/makesdna/DNA_animdata_types.h
    branches/animsys-aligorith/source/blender/makesdna/DNA_constraint_types.h
    branches/animsys-aligorith/source/blender/makesdna/DNA_material_types.h
    branches/animsys-aligorith/source/blender/makesdna/intern/_sdna2kt_extras.py
    branches/animsys-aligorith/source/blender/makesdna/intern/sdna2kt.py

Modified: branches/animsys-aligorith/source/blender/blenkernel/intern/keyabletypes.c
===================================================================
--- branches/animsys-aligorith/source/blender/blenkernel/intern/keyabletypes.c	2007-12-17 21:19:17 UTC (rev 12934)
+++ branches/animsys-aligorith/source/blender/blenkernel/intern/keyabletypes.c	2007-12-18 00:18:04 UTC (rev 12935)
@@ -169,63 +169,63 @@
 /* =================== KeyableTypes ======================== */ 
 /* Keyable Types for: IPOB_OB */
 static bKeyableType KeyTypes_OB[] = {
-{NULL,NULL, "LocX", "LocX", 0.0, 0.0, offsetof(Object, loc[0]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "LocY", "LocY", 0.0, 0.0, offsetof(Object, loc[1]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "LocZ", "LocZ", 0.0, 0.0, offsetof(Object, loc[2]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaLocX", "dLocX", 0.0, 0.0, offsetof(Object, dloc[0]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaLocY", "dLocY", 0.0, 0.0, offsetof(Object, dloc[1]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaLocZ", "dLocZ", 0.0, 0.0, offsetof(Object, dloc[2]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "ScaleX", "ScaleX", 0.0, 0.0, offsetof(Object, size[0]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "ScaleY", "ScaleY", 0.0, 0.0, offsetof(Object, size[1]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "ScaleZ", "ScaleZ", 0.0, 0.0, offsetof(Object, size[2]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaScaleX", "dScaleX", 0.0, 0.0, offsetof(Object, dsize[0]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaScaleY", "dScaleY", 0.0, 0.0, offsetof(Object, dsize[1]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaScaleZ", "dScaleZ", 0.0, 0.0, offsetof(Object, dsize[2]), IPO_FLOAT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "RotX", "RotX", 0.0, 0.0, offsetof(Object, rot[0]), IPO_FLOAT_DEGR, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "RotY", "RotY", 0.0, 0.0, offsetof(Object, rot[1]), IPO_FLOAT_DEGR, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "RotZ", "RotZ", 0.0, 0.0, offsetof(Object, rot[2]), IPO_FLOAT_DEGR, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaRotX", "dRotX", 0.0, 0.0, offsetof(Object, drot[0]), IPO_FLOAT_DEGR, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaRotY", "dRotY", 0.0, 0.0, offsetof(Object, drot[1]), IPO_FLOAT_DEGR, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "DeltaRotZ", "dRotZ", 0.0, 0.0, offsetof(Object, drot[2]), IPO_FLOAT_DEGR, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 1", "Lay1", 0.0f, (1<<1), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 2", "Lay2", 0.0f, (1<<2), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 3", "Lay3", 0.0f, (1<<3), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 4", "Lay4", 0.0f, (1<<4), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 5", "Lay5", 0.0f, (1<<5), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 6", "Lay6", 0.0f, (1<<6), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 7", "Lay7", 0.0f, (1<<7), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 8", "Lay8", 0.0f, (1<<8), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 9", "Lay9", 0.0f, (1<<9), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 10", "Lay10", 0.0f, (1<<10), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 11", "Lay11", 0.0f, (1<<11), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 12", "Lay12", 0.0f, (1<<12), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 13", "Lay13", 0.0f, (1<<13), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 14", "Lay14", 0.0f, (1<<14), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 15", "Lay15", 0.0f, (1<<15), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 16", "Lay16", 0.0f, (1<<16), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 17", "Lay17", 0.0f, (1<<17), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 18", "Lay18", 0.0f, (1<<18), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 19", "Lay19", 0.0f, (1<<19), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
-{NULL,NULL, "Layer 20", "Lay20", 0.0f, (1<<20), offsetof(Object, lay), IPO_INT_BIT, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "LocX", "LocX", 0.0, 0.0, offsetof(Object, loc[0]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "LocY", "LocY", 0.0, 0.0, offsetof(Object, loc[1]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "LocZ", "LocZ", 0.0, 0.0, offsetof(Object, loc[2]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaLocX", "dLocX", 0.0, 0.0, offsetof(Object, dloc[0]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaLocY", "dLocY", 0.0, 0.0, offsetof(Object, dloc[1]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaLocZ", "dLocZ", 0.0, 0.0, offsetof(Object, dloc[2]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "ScaleX", "ScaleX", 0.0, 0.0, offsetof(Object, size[0]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "ScaleY", "ScaleY", 0.0, 0.0, offsetof(Object, size[1]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "ScaleZ", "ScaleZ", 0.0, 0.0, offsetof(Object, size[2]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaScaleX", "dScaleX", 0.0, 0.0, offsetof(Object, dsize[0]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaScaleY", "dScaleY", 0.0, 0.0, offsetof(Object, dsize[1]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaScaleZ", "dScaleZ", 0.0, 0.0, offsetof(Object, dsize[2]), IPO_FLOAT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "RotX", "RotX", 0.0, 0.0, offsetof(Object, rot[0]), IPO_FLOAT_DEGR, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "RotY", "RotY", 0.0, 0.0, offsetof(Object, rot[1]), IPO_FLOAT_DEGR, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "RotZ", "RotZ", 0.0, 0.0, offsetof(Object, rot[2]), IPO_FLOAT_DEGR, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaRotX", "dRotX", 0.0, 0.0, offsetof(Object, drot[0]), IPO_FLOAT_DEGR, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaRotY", "dRotY", 0.0, 0.0, offsetof(Object, drot[1]), IPO_FLOAT_DEGR, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "DeltaRotZ", "dRotZ", 0.0, 0.0, offsetof(Object, drot[2]), IPO_FLOAT_DEGR, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 1", "Lay1", 0.0f, (1<<1), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 2", "Lay2", 0.0f, (1<<2), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 3", "Lay3", 0.0f, (1<<3), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 4", "Lay4", 0.0f, (1<<4), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 5", "Lay5", 0.0f, (1<<5), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 6", "Lay6", 0.0f, (1<<6), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 7", "Lay7", 0.0f, (1<<7), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 8", "Lay8", 0.0f, (1<<8), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 9", "Lay9", 0.0f, (1<<9), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 10", "Lay10", 0.0f, (1<<10), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 11", "Lay11", 0.0f, (1<<11), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 12", "Lay12", 0.0f, (1<<12), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 13", "Lay13", 0.0f, (1<<13), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 14", "Lay14", 0.0f, (1<<14), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 15", "Lay15", 0.0f, (1<<15), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 16", "Lay16", 0.0f, (1<<16), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 17", "Lay17", 0.0f, (1<<17), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 18", "Lay18", 0.0f, (1<<18), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 19", "Lay19", 0.0f, (1<<19), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo},
+{NULL,NULL, "Layer 20", "Lay20", 0.0f, (1<<20), offsetof(Object, lay), IPO_INT_BIT, IPOB_OB, -1, "", "", kt_read_ipo, kt_write_ipo} 
 }; 
 static int TOT_KTS_OB = sizeof(KeyTypes_OB)/sizeof(bKeyableType);
 
 /* Keyable Types for: IPOB_MAT */
 static bKeyableType KeyTypes_MAT[] = {

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list