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:
authorJoshua Leung <aligorith@gmail.com>2009-02-16 12:48:38 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-16 12:48:38 +0300
commitf6df8e1860d44d6b4d2c9048b0fb0ebdbfd850d3 (patch)
treea59306e035f74c5ddc9811fe5d4f13bd7d5dca73 /source/blender/editors/animation/anim_ipo_utils.c
parent5452c4e1464cf70187088185ab28981b2c94594d (diff)
F-Curve names: Experimental style 2
In this commit, I've experimented with the way in which F-Curve names (seen in DopeSheet/Graph Editor) are put together. Now, F-Curve names are assembled in the form: <array-index> <property-name> (<struct-name>) i.e. "X Location (Bone)", "Y Location (Object)" "Specularity (VeryLongMaterialName)", etc. The goal of this experiment was to hopefully make it quicker to do a left-margin scan and identify the defining differences between closely related F-Curves. - This has the benefit of no (potential) need for horizontal scrolling back and forth to see and compare the end portions of names, and also to avoid the important parts of the name getting pushed out of the standard viewable area by some owner-struct long names. - The downside is the loss of the clear hierarchial layout closely related to the RNA-paths used internally, that was provided by the old method. Also, this method also looks rather awkward on first glance, but if it improves efficiency of use, why not :)
Diffstat (limited to 'source/blender/editors/animation/anim_ipo_utils.c')
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 6be9a0e3091..84a18b64d6a 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -120,8 +120,16 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
char *structname=NULL, *propname=NULL, *arrayname=NULL, arrayindbuf[16];
PropertyRNA *nameprop;
- /* for now, name will consist of struct-name + property name + array index:
- * i.e. Bone1.Location.X, or Object.Location.X
+ /* For now, name will consist of 3 parts: struct-name, property name, array index
+ * There are several options possible:
+ * 1) <struct-name>.<property-name>.<array-index>
+ * i.e. Bone1.Location.X, or Object.Location.X
+ * 2) <array-index> <property-name> (<struct name>)
+ * i.e. X Location (Bone1), or X Location (Object)
+ *
+ * Currently, option 2 is in use, to try and make it easier to quickly identify F-Curves (it does have
+ * problems with looking rather odd though). Option 1 is better in terms of revealing a consistent sense of
+ * hierarchy though, which isn't so clear with option 2.
*/
/* for structname, we use a custom name if one is available */
@@ -141,9 +149,14 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* Array Index - only if applicable */
if (RNA_property_array_length(&ptr, prop)) {
// XXX the format of these is not final... we don't know how this will go yet
- static char *vectoritem[4]= {".X", ".Y", ".Z", ".W"};
- static char *quatitem[4]= {".W", ".X", ".Y", ".Z"};
- static char *coloritem[4]= {".R", ".G", ".B", ".A"};
+ // format 1 style
+ //static char *vectoritem[4]= {".X", ".Y", ".Z", ".W"};
+ //static char *quatitem[4]= {".W", ".X", ".Y", ".Z"};
+ //static char *coloritem[4]= {".R", ".G", ".B", ".A"};
+ // format 2 style
+ static char *vectoritem[4]= {"X ", "Y ", "Z ", "W "};
+ static char *quatitem[4]= {"W ", "X ", "Y ", "Z "};
+ static char *coloritem[4]= {"R ", "G ", "B ", "A "};
int tot= RNA_property_array_length(&ptr, prop);
int propsubtype= RNA_property_subtype(&ptr, prop);
@@ -167,8 +180,9 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
}
/* putting this all together into the buffer */
- // XXX we need to check for invalid names...
- BLI_snprintf(name, 128, "%s.%s%s", structname, propname, arrayname);
+ // XXX we need to check for invalid names...
+ //BLI_snprintf(name, 128, "%s.%s%s", structname, propname, arrayname); // format 1
+ BLI_snprintf(name, 128, "%s%s (%s)", arrayname, propname, structname); // format 2
/* free temp name if nameprop is set */
if (nameprop)