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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-08 19:30:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-08 19:30:00 +0400
commitf9d07ff3ee312a9ea7d93ef53bfebe327fa058ee (patch)
tree99487b11a3d53d3758d7d438266ebda44b34973c /source/blender/editors/animation/anim_ipo_utils.c
parent817d308803dc1234e9e7b4cab782c0f52a4ebaca (diff)
style cleanup: animation + buttons
Diffstat (limited to 'source/blender/editors/animation/anim_ipo_utils.c')
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 4be3f79060e..593010fae09 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -78,9 +78,9 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* try to resolve the path */
if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
- const char *structname=NULL, *propname=NULL;
+ const char *structname = NULL, *propname = NULL;
char arrayindbuf[16];
- const char *arrayname=NULL;
+ const char *arrayname = NULL;
short free_structname = 0;
/* For now, name will consist of 3 parts: struct-name, property name, array index
@@ -104,44 +104,44 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
*/
if (strstr(fcu->rna_path, "bones") && strstr(fcu->rna_path, "constraints")) {
/* perform string 'chopping' to get "Bone Name : Constraint Name" */
- char *pchanName= BLI_getQuotedStr(fcu->rna_path, "bones[");
- char *constName= BLI_getQuotedStr(fcu->rna_path, "constraints[");
+ char *pchanName = BLI_getQuotedStr(fcu->rna_path, "bones[");
+ char *constName = BLI_getQuotedStr(fcu->rna_path, "constraints[");
/* assemble the string to display in the UI... */
- structname= BLI_sprintfN("%s : %s", pchanName, constName);
- free_structname= 1;
+ structname = BLI_sprintfN("%s : %s", pchanName, constName);
+ free_structname = 1;
/* free the temp names */
if (pchanName) MEM_freeN(pchanName);
if (constName) MEM_freeN(constName);
}
else if (ptr.data != ptr.id.data) {
- PropertyRNA *nameprop= RNA_struct_name_property(ptr.type);
+ PropertyRNA *nameprop = RNA_struct_name_property(ptr.type);
if (nameprop) {
/* this gets a string which will need to be freed */
- structname= RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0, NULL);
- free_structname= 1;
+ structname = RNA_property_string_get_alloc(&ptr, nameprop, NULL, 0, NULL);
+ free_structname = 1;
}
else
- structname= RNA_struct_ui_name(ptr.type);
+ structname = RNA_struct_ui_name(ptr.type);
}
/* Property Name is straightforward */
- propname= RNA_property_ui_name(prop);
+ propname = RNA_property_ui_name(prop);
/* Array Index - only if applicable */
if (RNA_property_array_length(&ptr, prop)) {
- char c= RNA_property_array_item_char(prop, fcu->array_index);
+ char c = RNA_property_array_item_char(prop, fcu->array_index);
/* we need to write the index to a temp buffer (in py syntax) */
if (c) BLI_snprintf(arrayindbuf, sizeof(arrayindbuf), "%c ", c);
else BLI_snprintf(arrayindbuf, sizeof(arrayindbuf), "[%d]", fcu->array_index);
- arrayname= &arrayindbuf[0];
+ arrayname = &arrayindbuf[0];
}
else {
/* no array index */
- arrayname= "";
+ arrayname = "";
}
/* putting this all together into the buffer */
@@ -160,7 +160,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* Icon for this property's owner:
* use the struct's icon if it is set
*/
- icon= RNA_struct_ui_icon(ptr.type);
+ icon = RNA_struct_ui_icon(ptr.type);
/* valid path - remove the invalid tag since we now know how to use it saving
* users manual effort to reenable using "Revive Disabled FCurves" [#29629]
@@ -173,7 +173,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* icon for this should be the icon for the base ID */
// TODO: or should we just use the error icon?
- icon= RNA_struct_ui_icon(id_ptr.type);
+ icon = RNA_struct_ui_icon(id_ptr.type);
/* tag F-Curve as disabled - as not usable path */
fcu->flag |= FCURVE_DISABLED;
@@ -187,7 +187,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* ------------------------------- Color Codes for F-Curve Channels ---------------------------- */
/* step between the major distinguishable color bands of the primary colors */
-#define HSV_BANDWIDTH 0.3f
+#define HSV_BANDWIDTH 0.3f
/* used to determine the color of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
//void fcurve_rainbow (unsigned int cur, unsigned int tot, float *out)
@@ -202,8 +202,8 @@ void getcolor_fcurve_rainbow(int cur, int tot, float *out)
* 4 - for 'even' numbers of curves - there should be a majority of quartets of curves
* so the base color is simply one of the three primary colors
*/
- grouping= (4 - (tot % 2));
- hue= HSV_BANDWIDTH * (float)(cur % grouping);
+ grouping = (4 - (tot % 2));
+ hue = HSV_BANDWIDTH * (float)(cur % grouping);
/* 'Value' (i.e. darkness) needs to vary so that larger sets of three will be
* 'darker' (i.e. smaller value), so that they don't look that similar to previous ones.
@@ -214,15 +214,15 @@ void getcolor_fcurve_rainbow(int cur, int tot, float *out)
/* the base color can get offset a bit so that the colors aren't so identical */
hue += fac * HSV_BANDWIDTH;
- if (hue > 1.0f) hue= fmod(hue, 1.0f);
+ if (hue > 1.0f) hue = fmod(hue, 1.0f);
/* saturation adjustments for more visible range */
- if ((hue > 0.5f) && (hue < 0.8f)) sat= 0.5f;
- else sat= 0.6f;
+ if ((hue > 0.5f) && (hue < 0.8f)) sat = 0.5f;
+ else sat = 0.6f;
/* value is fixed at 1.0f, otherwise we cannot clearly see the curves... */
- val= 1.0f;
+ val = 1.0f;
/* finally, conver this to RGB colors */
- hsv_to_rgb(hue, sat, val, out, out+1, out+2);
+ hsv_to_rgb(hue, sat, val, out, out + 1, out + 2);
}