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:
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c4
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c18
-rw-r--r--source/blender/editors/animation/anim_filter.c8
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c2
-rw-r--r--source/blender/editors/animation/anim_markers.c2
-rw-r--r--source/blender/editors/animation/drivers.c2
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c8
-rw-r--r--source/blender/editors/animation/keyframes_draw.c12
-rw-r--r--source/blender/editors/animation/keyframes_edit.c12
-rw-r--r--source/blender/editors/animation/keyframes_general.c2
-rw-r--r--source/blender/editors/animation/keyframing.c40
11 files changed, 56 insertions, 54 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 29d5604089d..4637c55fb9b 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2809,7 +2809,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
float y, ymid, ytext;
/* sanity checks - don't draw anything */
- if ELEM(NULL, acf, ale)
+ if (ELEM(NULL, acf, ale))
return;
/* get initial offset */
@@ -3237,7 +3237,7 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
short offset;
/* sanity checks - don't draw anything */
- if ELEM3(NULL, acf, ale, block)
+ if (ELEM3(NULL, acf, ale, block))
return;
/* get initial offset */
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 1a2400d7216..102587909cd 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -398,14 +398,14 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
}
}
if (match == NULL) {
- printf("ERROR: no channel matching the one changed was found \n");
+ printf("ERROR: no channel matching the one changed was found\n");
return;
}
else {
bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale_setting);
if (acf == NULL) {
- printf("ERROR: no channel info for the changed channel \n");
+ printf("ERROR: no channel info for the changed channel\n");
return;
}
@@ -1089,7 +1089,7 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
default: /* some collection of actions */
if (adt->action)
rearrange_action_channels(&ac, adt->action, mode);
- else if (G.f & G_DEBUG)
+ else if (G.debug & G_DEBUG)
printf("Animdata has no action\n");
break;
}
@@ -1971,8 +1971,8 @@ static void rename_anim_channels (bAnimContext *ac, int channel_index)
ale= BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
- if (G.f & G_DEBUG)
- printf("Error: animation channel (index = %d) not found in rename_anim_channels() \n", channel_index);
+ if (G.debug & G_DEBUG)
+ printf("Error: animation channel (index = %d) not found in rename_anim_channels()\n", channel_index);
BLI_freelistN(&anim_data);
return;
@@ -2072,8 +2072,8 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
ale= BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
- if (G.f & G_DEBUG)
- printf("Error: animation channel (index = %d) not found in mouse_anim_channels() \n", channel_index);
+ if (G.debug & G_DEBUG)
+ printf("Error: animation channel (index = %d) not found in mouse_anim_channels()\n", channel_index);
BLI_freelistN(&anim_data);
return 0;
@@ -2293,8 +2293,8 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i
}
break;
default:
- if (G.f & G_DEBUG)
- printf("Error: Invalid channel type in mouse_anim_channels() \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: Invalid channel type in mouse_anim_channels()\n");
}
/* free channels */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 76217a7592f..8bb476b1f17 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1458,8 +1458,8 @@ static size_t animdata_filter_ds_textures (bAnimContext *ac, ListBase *anim_data
default:
{
/* invalid/unsupported option */
- if (G.f & G_DEBUG)
- printf("ERROR: unsupported owner_id (i.e. texture stack) for filter textures - %s \n", owner_id->name);
+ if (G.debug & G_DEBUG)
+ printf("ERROR: unsupported owner_id (i.e. texture stack) for filter textures - %s\n", owner_id->name);
return 0;
}
}
@@ -2061,8 +2061,8 @@ static size_t animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data,
/* check that we do indeed have a scene */
if ((ads->source == NULL) || (GS(ads->source->name)!=ID_SCE)) {
printf("DopeSheet Error: Not scene!\n");
- if (G.f & G_DEBUG)
- printf("\tPointer = %p, Name = '%s' \n", (void *)ads->source, (ads->source)?ads->source->name:NULL);
+ if (G.debug & G_DEBUG)
+ printf("\tPointer = %p, Name = '%s'\n", (void *)ads->source, (ads->source)?ads->source->name:NULL);
return 0;
}
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 169d6b94413..6f4d4c4a431 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -61,7 +61,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* sanity checks */
if (name == NULL)
return icon;
- else if ELEM3(NULL, id, fcu, fcu->rna_path) {
+ else if (ELEM3(NULL, id, fcu, fcu->rna_path)) {
if (fcu == NULL)
strcpy(name, "<invalid>");
else if (fcu->rna_path == NULL)
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 86e3c8050c2..73dba91207f 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -201,7 +201,7 @@ void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *l
int selcount = 0;
/* sanity check */
- //printf("markers = %p - %p, %p \n", markers, markers->first, markers->last);
+ //printf("markers = %p - %p, %p\n", markers, markers->first, markers->last);
if (markers == NULL) {
*first = 0.0f;
*last = 0.0f;
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 881de2904f7..9c4f96ebe6d 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -84,7 +84,7 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind
FCurve *fcu;
/* sanity checks */
- if ELEM(NULL, id, rna_path)
+ if (ELEM(NULL, id, rna_path))
return NULL;
/* init animdata if none available yet */
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 9b3e481d118..d5ec98da588 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -341,7 +341,7 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float
* - keyframe to be added would replace one of the existing ones on bounds
*/
if ((arraylen <= 0) || (array == NULL)) {
- printf("Warning: binarysearch_fcm_envelopedata_index() encountered invalid array \n");
+ printf("Warning: binarysearch_fcm_envelopedata_index() encountered invalid array\n");
return 0;
}
else {
@@ -391,10 +391,10 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float
/* print error if loop-limit exceeded */
if (loopbreaker == (maxloop-1)) {
- printf("Error: binarysearch_fcm_envelopedata_index() was taking too long \n");
+ printf("Error: binarysearch_fcm_envelopedata_index() was taking too long\n");
// include debug info
- printf("\tround = %d: start = %d, end = %d, arraylen = %d \n", loopbreaker, start, end, arraylen);
+ printf("\tround = %d: start = %d, end = %d, arraylen = %d\n", loopbreaker, start, end, arraylen);
}
/* not found, so return where to place it */
@@ -784,7 +784,7 @@ short ANIM_fmodifiers_copy_to_buf (ListBase *modifiers, short active)
short ok = 1;
/* sanity checks */
- if ELEM(NULL, modifiers, modifiers->first)
+ if (ELEM(NULL, modifiers, modifiers->first))
return 0;
/* copy the whole list, or just the active one? */
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 1c0bb9beaa1..0e0ff0defbb 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -189,7 +189,7 @@ static void nupdate_ak_gpframe (void *node, void *data)
/* Add the given BezTriple to the given 'list' of Keyframes */
static void add_bezt_to_keycolumns_list(DLRBT_Tree *keys, BezTriple *bezt)
{
- if ELEM(NULL, keys, bezt)
+ if (ELEM(NULL, keys, bezt))
return;
else
BLI_dlrbTree_add(keys, compare_ak_bezt, nalloc_ak_bezt, nupdate_ak_bezt, bezt);
@@ -198,7 +198,7 @@ static void add_bezt_to_keycolumns_list(DLRBT_Tree *keys, BezTriple *bezt)
/* Add the given GPencil Frame to the given 'list' of Keyframes */
static void add_gpframe_to_keycolumns_list(DLRBT_Tree *keys, bGPDframe *gpf)
{
- if ELEM(NULL, keys, gpf)
+ if (ELEM(NULL, keys, gpf))
return;
else
BLI_dlrbTree_add(keys, compare_ak_gpframe, nalloc_ak_gpframe, nupdate_ak_gpframe, gpf);
@@ -269,8 +269,8 @@ static void nupdate_abk_bezt (void *node, void *data)
if (abk->numBezts >= MAX_ABK_BUFSIZE) {
// TODO: need to allocate new array to cater...
//bezts_extra= MEM_callocN(...);
- if (G.f & G_DEBUG)
- printf("FIXME: nupdate_abk_bezt() missing case for too many overlapping BezTriples \n");
+ if (G.debug & G_DEBUG)
+ printf("FIXME: nupdate_abk_bezt() missing case for too many overlapping BezTriples\n");
}
else {
/* just store an extra one */
@@ -538,7 +538,7 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
glEnable(GL_LINE_SMOOTH);
/* draw! */
- if ELEM(mode, KEYFRAME_SHAPE_INSIDE, KEYFRAME_SHAPE_BOTH) {
+ if (ELEM(mode, KEYFRAME_SHAPE_INSIDE, KEYFRAME_SHAPE_BOTH)) {
/* interior - hardcoded colors (for selected and unselected only) */
switch (key_type) {
case BEZT_KEYTYPE_BREAKDOWN: /* bluish frames for now */
@@ -574,7 +574,7 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
glCallList(displist2);
}
- if ELEM(mode, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_BOTH) {
+ if (ELEM(mode, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_BOTH)) {
/* exterior - black frame */
glColor4f(0.0f, 0.0f, 0.0f, alpha);
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index c6aed3133e2..4e59216a39c 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -760,11 +760,13 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type)
/* standard validation step for a few of these (implemented as macro for inlining without fn-call overhead):
* "if the handles are not of the same type, set them to type free"
*/
-#define ENSURE_HANDLES_MATCH(bezt) \
- if (bezt->h1 != bezt->h2) { \
- if ELEM3(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM) bezt->h1= HD_FREE; \
- if ELEM3(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM) bezt->h2= HD_FREE; \
- }
+#define ENSURE_HANDLES_MATCH(bezt) \
+ if (bezt->h1 != bezt->h2) { \
+ if (ELEM3(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \
+ bezt->h1= HD_FREE; \
+ if (ELEM3(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \
+ bezt->h2= HD_FREE; \
+ }
/* Sets the selected bezier handles to type 'auto' */
static short set_bezier_auto(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 5d6d02bef63..831b8d21b01 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -145,7 +145,7 @@ void duplicate_fcurve_keys(FCurve *fcu)
int i;
/* this can only work when there is an F-Curve, and also when there are some BezTriples */
- if ELEM(NULL, fcu, fcu->bezt)
+ if (ELEM(NULL, fcu, fcu->bezt))
return;
for (i=0; i < fcu->totvert; i++) {
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 71e70536d15..47972ca2c6f 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -131,7 +131,7 @@ bAction *verify_adt_action (ID *id, short add)
adt= BKE_id_add_animdata(id);
if (adt == NULL) {
/* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */
- printf("ERROR: Couldn't add AnimData (ID = %s) \n", (id) ? (id->name) : "<None>");
+ printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : "<None>");
return NULL;
}
@@ -156,7 +156,7 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[],
FCurve *fcu;
/* sanity checks */
- if ELEM(NULL, act, rna_path)
+ if (ELEM(NULL, act, rna_path))
return NULL;
/* try to find f-curve matching for this setting
@@ -584,7 +584,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
searchtype= VISUALKEY_ROT;
}
else {
- printf("%s failed: identifier - '%s' \n", __func__, identifier);
+ printf("%s failed: identifier - '%s'\n", __func__, identifier);
return 0;
}
@@ -980,7 +980,7 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
int ret= 0;
/* sanity checks */
- if ELEM(NULL, id, adt) {
+ if (ELEM(NULL, id, adt)) {
BKE_report(reports, RPT_ERROR, "No ID-Block and/Or AnimData to delete keyframe from");
return 0;
}
@@ -1007,7 +1007,7 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
cfra= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
}
else {
- BKE_reportf(reports, RPT_ERROR, "No Action to delete keyframes from for ID = %s \n", id->name);
+ BKE_reportf(reports, RPT_ERROR, "No Action to delete keyframes from for ID = %s\n", id->name);
return 0;
}
}
@@ -1036,8 +1036,8 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
continue;
if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ) {
- if (G.f & G_DEBUG)
- printf("WARNING: not deleting keyframe for locked F-Curve \n");
+ if (G.debug & G_DEBUG)
+ printf("WARNING: not deleting keyframe for locked F-Curve\n");
continue;
}
@@ -1128,8 +1128,8 @@ static int insert_key_exec (bContext *C, wmOperator *op)
/* try to insert keyframes for the channels specified by KeyingSet */
success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
- if (G.f & G_DEBUG)
- BKE_reportf(op->reports, RPT_INFO, "KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success);
+ if (G.debug & G_DEBUG)
+ BKE_reportf(op->reports, RPT_INFO, "KeyingSet '%s' - Successfully added %d Keyframes\n", ks->name, success);
/* report failure or do updates? */
if (success == MODIFYKEY_INVALID_CONTEXT) {
@@ -1284,8 +1284,8 @@ static int delete_key_exec (bContext *C, wmOperator *op)
/* try to delete keyframes for the channels specified by KeyingSet */
success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_DELETE, cfra);
- if (G.f & G_DEBUG)
- printf("KeyingSet '%s' - Successfully removed %d Keyframes \n", ks->name, success);
+ if (G.debug & G_DEBUG)
+ printf("KeyingSet '%s' - Successfully removed %d Keyframes\n", ks->name, success);
/* report failure or do updates? */
if (success == MODIFYKEY_INVALID_CONTEXT) {
@@ -1448,17 +1448,17 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
success+= insert_keyframe_direct(op->reports, ptr, prop, fcu, cfra, 0);
}
else {
- if (G.f & G_DEBUG)
- printf("Button Insert-Key: no path to property \n");
+ if (G.debug & G_DEBUG)
+ printf("Button Insert-Key: no path to property\n");
BKE_report(op->reports, RPT_WARNING, "Failed to resolve path to property. Try using a Keying Set instead");
}
}
- else if (G.f & G_DEBUG) {
+ else if (G.debug & G_DEBUG) {
printf("ptr.data = %p, prop = %p,", (void *)ptr.data, (void *)prop);
if (prop)
- printf("animatable = %d \n", RNA_property_animateable(&ptr, prop));
+ printf("animatable = %d\n", RNA_property_animateable(&ptr, prop));
else
- printf("animatable = NULL \n");
+ printf("animatable = NULL\n");
}
if (success) {
@@ -1525,11 +1525,11 @@ static int delete_key_button_exec (bContext *C, wmOperator *op)
MEM_freeN(path);
}
- else if (G.f & G_DEBUG)
- printf("Button Delete-Key: no path to property \n");
+ else if (G.debug & G_DEBUG)
+ printf("Button Delete-Key: no path to property\n");
}
- else if (G.f & G_DEBUG) {
- printf("ptr.data = %p, prop = %p \n", (void *)ptr.data, (void *)prop);
+ else if (G.debug & G_DEBUG) {
+ printf("ptr.data = %p, prop = %p\n", (void *)ptr.data, (void *)prop);
}