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-03-31 04:59:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-31 04:59:17 +0400
commit5b88712ff932fcbcd0bb0fb257e8e9c2e247a82a (patch)
treeca0f15ee78fee5aef80ebf5c0f9f46529b65a9e2 /source/blender/editors
parentebb229110e4af5d2df5613b6345da2f602b90092 (diff)
move debug flag into its own global var (G.debug), split up debug options.
--debug --debug-ffmpeg --debug-python --debug-events --debug-wm This makes debug output easier to read - event debug prints would flood output too much before. For convenience: --debug-all turns all debug flags on (works as --debug did before). also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
Diffstat (limited to 'source/blender/editors')
-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_markers.c2
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c6
-rw-r--r--source/blender/editors/animation/keyframes_draw.c4
-rw-r--r--source/blender/editors/animation/keyframing.c36
-rw-r--r--source/blender/editors/armature/editarmature.c10
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c2
-rw-r--r--source/blender/editors/armature/reeb.c4
-rw-r--r--source/blender/editors/curve/editcurve.c2
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_buttons.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c76
-rw-r--r--source/blender/editors/interface/interface_anim.c4
-rw-r--r--source/blender/editors/interface/interface_handlers.c2
-rw-r--r--source/blender/editors/interface/interface_icons.c10
-rw-r--r--source/blender/editors/interface/interface_ops.c2
-rw-r--r--source/blender/editors/interface/interface_style.c2
-rw-r--r--source/blender/editors/interface/view2d.c4
-rw-r--r--source/blender/editors/object/object_constraint.c6
-rw-r--r--source/blender/editors/object/object_relations.c4
-rw-r--r--source/blender/editors/physics/particle_edit.c4
-rw-r--r--source/blender/editors/physics/particle_object.c2
-rw-r--r--source/blender/editors/physics/physics_fluid.c8
-rw-r--r--source/blender/editors/render/render_internal.c4
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/screen/screen_edit.c10
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_undo.c8
-rw-r--r--source/blender/editors/space_action/action_select.c2
-rw-r--r--source/blender/editors/space_graph/graph_edit.c2
-rw-r--r--source/blender/editors/space_nla/nla_channels.c8
-rw-r--r--source/blender/editors/space_nla/nla_edit.c2
-rw-r--r--source/blender/editors/space_nla/nla_select.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/util/editmode_undo.c4
-rw-r--r--source/blender/editors/util/undo.c10
39 files changed, 148 insertions, 142 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index aa15d53abe6..fb6a65a585f 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -394,14 +394,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;
}
@@ -1085,7 +1085,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;
}
@@ -1967,8 +1967,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;
@@ -2068,8 +2068,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;
@@ -2288,8 +2288,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 a17d15d144f..5729ee79cef 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1396,8 +1396,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;
}
}
@@ -1994,8 +1994,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_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/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index d19a137a6a8..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 */
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 146aea401ec..0e0ff0defbb 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -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 */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index ba413fda00c..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;
}
@@ -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;
}
@@ -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);
}
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 0d93f9401a3..a09722f78b6 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -395,7 +395,7 @@ void ED_armature_from_edit(Object *obedit)
if (fBone->parent==eBone)
fBone->parent= eBone->parent;
}
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("Warning: removed zero sized bone: %s\n", eBone->name);
bone_free(arm, eBone);
}
@@ -2933,7 +2933,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
}
else {
// FIXME.. figure out a method for multiple bones
- BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d \n", count);
+ BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d\n", count);
BLI_freelistN(&points);
return OPERATOR_CANCELLED;
}
@@ -2976,9 +2976,9 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
/* check if same bone */
if (start == end) {
- if (G.f & G_DEBUG) {
- printf("Error: same bone! \n");
- printf("\tstart = %s, end = %s \n", start->name, end->name);
+ if (G.debug & G_DEBUG) {
+ printf("Error: same bone!\n");
+ printf("\tstart = %s, end = %s\n", start->name, end->name);
}
}
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 261018329ab..f554b7b1c50 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -2657,7 +2657,7 @@ static void findCorrespondingArc(RigGraph *rigg, RigArc *start_arc, RigNode *sta
if (next_earc->flag == ARC_FREE && next_earc->symmetry_level == symmetry_level)
{
-// printf("USING: \n");
+// printf("USING:\n");
// printf("flag %i -- level %i -- flag %i -- group %i\n", next_earc->flag, next_earc->symmetry_level, next_earc->symmetry_flag, next_earc->symmetry_group);
matchMultiResolutionArc(rigg, start_node, next_iarc, next_earc);
break;
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 30f929c9603..546bcb1f40f 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -554,12 +554,12 @@ static void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc)
if (ceilf(head->weight) != arc->buckets[0].val)
{
printArc(arc);
- printf("alloc error in first bucket: %f should be %f \n", arc->buckets[0].val, ceil(head->weight));
+ printf("alloc error in first bucket: %f should be %f\n", arc->buckets[0].val, ceil(head->weight));
}
if (floorf(tail->weight) != arc->buckets[arc->bcount - 1].val)
{
printArc(arc);
- printf("alloc error in last bucket: %f should be %f \n", arc->buckets[arc->bcount - 1].val, floor(tail->weight));
+ printf("alloc error in last bucket: %f should be %f\n", arc->buckets[arc->bcount - 1].val, floor(tail->weight));
}
}
}
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index aeab4f27179..a5188ea769e 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1944,7 +1944,7 @@ static void adduplicateflagNurb(Object *obedit, short flag)
}
}
if (newu==0 || newv==0) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("Can't duplicate Nurb\n");
}
else {
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 528991e31f0..8f0ea378a2a 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -117,7 +117,7 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick
float oldpressure = points[0].pressure;
/* draw stroke curve */
- if (G.f & G_DEBUG) setlinestyle(2);
+ if (G.debug & G_DEBUG) setlinestyle(2);
glLineWidth(oldpressure * thickness);
glBegin(GL_LINE_STRIP);
@@ -147,7 +147,7 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick
/* reset for predictable OpenGL context */
glLineWidth(1.0f);
- if (G.f & G_DEBUG) setlinestyle(0);
+ if (G.debug & G_DEBUG) setlinestyle(0);
}
}
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c
index 62e2e62b880..263c842ed08 100644
--- a/source/blender/editors/gpencil/gpencil_buttons.c
+++ b/source/blender/editors/gpencil/gpencil_buttons.c
@@ -204,7 +204,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
uiItemR(col, &ptr, "line_width", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
/* debugging options */
- if (G.f & G_DEBUG) {
+ if (G.debug & G_DEBUG) {
uiItemR(col, &ptr, "show_points", 0, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 20111fc66b2..c366de6fa43 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -569,8 +569,8 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
/* exit with error if no valid points from this stroke */
if (totelem == 0) {
- if (G.f & G_DEBUG)
- printf("Error: No valid points in stroke buffer to convert (tot=%d) \n", gpd->sbuffer_size);
+ if (G.debug & G_DEBUG)
+ printf("Error: No valid points in stroke buffer to convert (tot=%d)\n", gpd->sbuffer_size);
return;
}
@@ -987,8 +987,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
/* make sure the active view (at the starting time) is a 3d-view */
if (curarea == NULL) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: No active view for painting \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: No active view for painting\n");
return 0;
}
@@ -1013,8 +1013,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
if (ar->regiondata == NULL) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: 3D-View active region doesn't have any region data, so cannot be drawable \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: 3D-View active region doesn't have any region data, so cannot be drawable\n");
return 0;
}
@@ -1022,8 +1022,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
/* check that gpencil data is allowed to be drawn */
if ((v3d->flag2 & V3D_DISPGP)==0) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view, Grease Pencil not shown \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: In active view, Grease Pencil not shown\n");
return 0;
}
#endif
@@ -1043,8 +1043,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
/* check that gpencil data is allowed to be drawn */
if ((snode->flag & SNODE_DISPGP)==0) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view, Grease Pencil not shown \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: In active view, Grease Pencil not shown\n");
return 0;
}
#endif
@@ -1063,14 +1063,14 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
/* check that gpencil data is allowed to be drawn */
if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil\n");
return 0;
}
if ((sseq->flag & SEQ_DRAW_GPENCIL)==0) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view, Grease Pencil not shown \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: In active view, Grease Pencil not shown\n");
return 0;
}
}
@@ -1090,8 +1090,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
/* check that gpencil data is allowed to be drawn */
if ((sima->flag & SI_DISPGP)==0) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view, Grease Pencil not shown \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: In active view, Grease Pencil not shown\n");
return 0;
}
#endif
@@ -1121,8 +1121,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
default:
{
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: Active view not appropriate for Grease Pencil drawing \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: Active view not appropriate for Grease Pencil drawing\n");
return 0;
}
break;
@@ -1132,8 +1132,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
gpd_ptr= gpencil_data_get_pointers(C, &p->ownerPtr);
if (gpd_ptr == NULL) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: Current context doesn't allow for any Grease Pencil data \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: Current context doesn't allow for any Grease Pencil data\n");
return 0;
}
else {
@@ -1209,8 +1209,8 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
}
if (p->gpl->flag & GP_LAYER_LOCKED) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: Cannot paint on locked layer \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: Cannot paint on locked layer\n");
return;
}
@@ -1218,8 +1218,8 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
p->gpf= gpencil_layer_getframe(p->gpl, p->scene->r.cfra, 1);
if (p->gpf == NULL) {
p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: No frame created (gpencil_paint_init) \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: No frame created (gpencil_paint_init)\n");
return;
}
else
@@ -1519,8 +1519,8 @@ static void gpencil_draw_apply (wmOperator *op, tGPsdata *p)
BKE_report(op->reports, RPT_ERROR, "Cannot paint stroke");
p->status = GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: Grease-Pencil Paint - Add Point Invalid \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: Grease-Pencil Paint - Add Point Invalid\n");
return;
}
@@ -1595,18 +1595,18 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
{
tGPsdata *p = NULL;
- //printf("GPencil - Starting Re-Drawing \n");
+ //printf("GPencil - Starting Re-Drawing\n");
/* try to initialize context data needed while drawing */
if (!gpencil_draw_init(C, op)) {
if (op->customdata) MEM_freeN(op->customdata);
- //printf("\tGP - no valid data \n");
+ //printf("\tGP - no valid data\n");
return OPERATOR_CANCELLED;
}
else
p= op->customdata;
- //printf("\tGP - Start redrawing stroke \n");
+ //printf("\tGP - Start redrawing stroke\n");
/* loop over the stroke RNA elements recorded (i.e. progress of mouse movement),
* setting the relevant values in context at each step, then applying
@@ -1614,7 +1614,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
RNA_BEGIN(op->ptr, itemptr, "stroke") {
float mousef[2];
- //printf("\t\tGP - stroke elem \n");
+ //printf("\t\tGP - stroke elem\n");
/* get relevant data for this point from stroke */
RNA_float_get_array(&itemptr, "mouse", mousef);
@@ -1647,7 +1647,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
}
RNA_END;
- //printf("\tGP - done \n");
+ //printf("\tGP - done\n");
/* cleanup */
gpencil_draw_exit(C, op);
@@ -1667,15 +1667,15 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
tGPsdata *p = NULL;
wmWindow *win= CTX_wm_window(C);
- if (G.f & G_DEBUG)
- printf("GPencil - Starting Drawing \n");
+ if (G.debug & G_DEBUG)
+ printf("GPencil - Starting Drawing\n");
/* try to initialize context data needed while drawing */
if (!gpencil_draw_init(C, op)) {
if (op->customdata)
MEM_freeN(op->customdata);
- if (G.f & G_DEBUG)
- printf("\tGP - no valid data \n");
+ if (G.debug & G_DEBUG)
+ printf("\tGP - no valid data\n");
return OPERATOR_CANCELLED;
}
else
@@ -1742,11 +1742,11 @@ static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op)
* otherwise we could crash (see bug #20586)
*/
if (CTX_wm_area(C) != p->sa) {
- printf("\t\t\tGP - wrong area execution abort! \n");
+ printf("\t\t\tGP - wrong area execution abort!\n");
p->status= GP_STATUS_ERROR;
}
- //printf("\t\tGP - start stroke \n");
+ //printf("\t\tGP - start stroke\n");
/* we may need to set up paint env again if we're resuming */
// XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions
@@ -1858,7 +1858,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
/* finish painting operation if anything went wrong just now */
if (p->status == GP_STATUS_ERROR) {
- printf("\t\t\t\tGP - add error done! \n");
+ printf("\t\t\t\tGP - add error done!\n");
estate = OPERATOR_CANCELLED;
}
else {
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 955d564e111..c7f8ad521fa 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -135,7 +135,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str)
/* button must have RNA-pointer to a numeric-capable property */
if (ELEM(NULL, but->rnapoin.data, but->rnaprop)) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("ERROR: create expression failed - button has no RNA info attached\n");
return 0;
}
@@ -144,7 +144,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str)
// FIXME: until materials can be handled by depsgraph, don't allow drivers to be created for them
id = (ID *)but->rnapoin.id.data;
if ((id == NULL) || (GS(id->name) == ID_MA) || (GS(id->name) == ID_TE)) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("ERROR: create expression failed - invalid id-datablock for adding drivers (%p)\n", id);
return 0;
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 420cae87851..887ae250c1b 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4585,7 +4585,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
}
}
- /* perhaps we should move this into (G.f & G_DEBUG) - campbell */
+ /* perhaps we should move this into (G.debug & G_DEBUG) - campbell */
uiItemFullO(layout, "UI_OT_editsource", "Edit Source", ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0);
uiPupMenuEnd(C, pup);
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 24881c034f4..d028fcd93ae 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -757,7 +757,7 @@ int UI_icon_get_width(int icon_id)
icon = BKE_icon_get(icon_id);
if (icon == NULL) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
return 0;
}
@@ -782,7 +782,7 @@ int UI_icon_get_height(int icon_id)
icon = BKE_icon_get(icon_id);
if (icon == NULL) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
return 0;
}
@@ -830,7 +830,7 @@ static void icon_create_rect(struct PreviewImage *prv_img, enum eIconSizes size)
unsigned int render_size = preview_render_size(size);
if (!prv_img) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("%s, error: requested preview image does not exist", __func__);
}
if (!prv_img->rect[size]) {
@@ -847,7 +847,7 @@ static void icon_create_rect(struct PreviewImage *prv_img, enum eIconSizes size)
static void icon_set_image(bContext *C, ID *id, PreviewImage *prv_img, enum eIconSizes size)
{
if (!prv_img) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("%s: no preview image for this ID: %s\n", __func__, id->name);
return;
}
@@ -967,7 +967,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al
alpha *= btheme->tui.icon_alpha;
if (icon == NULL) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
return;
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 34116f24901..ebaef26082f 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -460,7 +460,7 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op))
* - if commandline debug option enabled, show debug reports too
* - otherwise, up to info (which is what users normally see)
*/
- str = BKE_reports_string(reports, (G.f & G_DEBUG) ? RPT_DEBUG : RPT_INFO);
+ str = BKE_reports_string(reports, (G.debug & G_DEBUG) ? RPT_DEBUG : RPT_INFO);
if (str) {
write_text(txt, str);
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 91e3b99e23b..5d527667170 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -356,7 +356,7 @@ void uiStyleInit(void)
}
if (font->blf_id == -1) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("%s: error, no fonts available\n", __func__);
}
else {
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 5c05e9d2ba1..7eac3050b97 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -852,8 +852,8 @@ void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, int resize
height -= V2D_SCROLL_HEIGHT;
if (ELEM3(0, v2d, width, height)) {
- if (G.f & G_DEBUG)
- printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", (void *)v2d, width, height); // XXX temp debug info
+ if (G.debug & G_DEBUG)
+ printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d\n", (void *)v2d, width, height); // XXX temp debug info
return;
}
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 5b2aaf30897..ec3567454df 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -589,19 +589,19 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
if (pchan)
list = &pchan->constraints;
else {
- //if (G.f & G_DEBUG)
+ //if (G.debug & G_DEBUG)
//printf("edit_constraint_property_get: No active bone for object '%s'\n", (ob)? ob->id.name+2 : "<None>");
return NULL;
}
}
else {
- //if (G.f & G_DEBUG)
+ //if (G.debug & G_DEBUG)
//printf("edit_constraint_property_get: defaulting to getting list in the standard way\n");
list = get_active_constraints(ob);
}
con = constraints_findByName(list, constraint_name);
- //if (G.f & G_DEBUG)
+ //if (G.debug & G_DEBUG)
//printf("constraint found = %p, %s\n", (void *)con, (con)?con->name:"<Not found>");
if (con && (type != 0) && (con->type != type))
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index a6fb946c83f..57d0de522a1 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1504,8 +1504,8 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
ob->data= copy_speaker(ob->data);
break;
default:
- if (G.f & G_DEBUG)
- printf("ERROR single_obdata_users: can't copy %s\n", id->name);
+ if (G.debug & G_DEBUG)
+ printf("ERROR %s: can't copy %s\n", __func__, id->name);
return;
}
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index bf3a9fff4e2..53e0e2b4056 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3937,7 +3937,7 @@ void PE_undo_step(Scene *scene, int step)
if (edit->curundo==NULL || edit->curundo->prev==NULL);
else {
- if (G.f & G_DEBUG) printf("undo %s\n", edit->curundo->name);
+ if (G.debug & G_DEBUG) printf("undo %s\n", edit->curundo->name);
edit->curundo= edit->curundo->prev;
get_PTCacheUndo(edit, edit->curundo);
}
@@ -3949,7 +3949,7 @@ void PE_undo_step(Scene *scene, int step)
else {
get_PTCacheUndo(edit, edit->curundo->next);
edit->curundo= edit->curundo->next;
- if (G.f & G_DEBUG) printf("redo %s\n", edit->curundo->name);
+ if (G.debug & G_DEBUG) printf("redo %s\n", edit->curundo->name);
}
}
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 1e71cf61817..3d50ec26a40 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -670,7 +670,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree);
if (nearest.index == -1) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("No nearest point found for hair root!");
continue;
}
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 23765b03d35..6a074a542c3 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -224,17 +224,17 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char
// invalid, cant happen?
}
- fprintf(file, " CHANNEL %s = \n", str);
+ fprintf(file, " CHANNEL %s =\n", str);
for (i=0; i<channelSize;i++) {
fprintf(file," ");
for (j=0;j<=entries;j++) { // also print time value
fprintf(file," %f ", channel[i*(entries+1)+j] );
if (j==entries-1) { fprintf(file," "); }
}
- fprintf(file," \n");
+ fprintf(file,"\n");
}
- fprintf(file, " ; \n" );
+ fprintf(file, " ;\n" );
}
#endif
@@ -805,7 +805,7 @@ int runSimulationCallback(void *data, int status, int frame)
if (status == FLUIDSIM_CBSTATUS_NEWFRAME) {
fluidbake_updatejob(fb, frame / (float)settings->noOfFrames);
- //printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d \n", status,frame, settings->domainId, settings->noOfFrames ); // DEBUG
+ //printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d\n", status,frame, settings->domainId, settings->noOfFrames ); // DEBUG
}
if (fluidbake_breakjob(fb)) {
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 97fd80fc946..47a4c376f96 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -317,8 +317,8 @@ static void make_renderinfo_string(RenderStats *rs, Scene *scene, char *str)
/* very weak... but 512 characters is quite safe */
if (spos >= str + IMA_MAX_RENDER_TEXT)
- if (G.f & G_DEBUG)
- printf("WARNING! renderwin text beyond limit \n");
+ if (G.debug & G_DEBUG)
+ printf("WARNING! renderwin text beyond limit\n");
}
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 8f429321fbb..43b917c2186 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1037,7 +1037,7 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
if (count!=4) {
/* let's stop adding regions */
BLI_init_rcti(remainder, 0, 0, 0, 0);
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("region quadsplit failed\n");
}
else quad= 1;
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 9deb64ef60a..1b56feb09d1 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -531,7 +531,7 @@ int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2)
int dir;
dir = area_getorientation(sa1, sa2);
- /*printf("dir is : %i \n", dir);*/
+ /*printf("dir is : %i\n", dir);*/
if (dir < 0) {
if (sa1 ) sa1->flag &= ~AREA_FLAG_DRAWJOINFROM;
@@ -1101,7 +1101,9 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
WM_event_timer_sleep(wm, win, win->screen->animtimer, 0);
}
- if (G.f & G_DEBUG) printf("set screen\n");
+ if (G.debug & G_DEBUG_EVENTS) {
+ printf("%s: set screen\n", __func__);
+ }
win->screen->do_refresh= 0;
win->screen->context= ed_screen_context;
@@ -1634,8 +1636,8 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
for (old= sc->areabase.first; old; old= old->next)
if (old->full) break;
if (old==NULL) {
- if (G.f & G_DEBUG)
- printf("something wrong in areafullscreen\n");
+ if (G.debug & G_DEBUG)
+ printf("%s: something wrong in areafullscreen\n", __func__);
return NULL;
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index f0dbdf18826..e427e1e21cf 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -3374,7 +3374,7 @@ static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op))
ED_screen_delete_scene(C, scene);
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("scene delete %p\n", scene);
WM_event_add_notifier(C, NC_SCENE|NA_REMOVED, scene);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index f553084cfd9..9cf8cc21996 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1037,7 +1037,7 @@ static int pixel_bounds_uv(
bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1;
bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1;
- /*printf("%d %d %d %d \n", min_px[0], min_px[1], max_px[0], max_px[1]);*/
+ /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/
/* face uses no UV area when quantized to pixels? */
return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? 0 : 1;
@@ -1065,7 +1065,7 @@ static int pixel_bounds_array(float (*uv)[2], rcti *bounds_px, const int ibuf_x,
bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1;
bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1;
- /*printf("%d %d %d %d \n", min_px[0], min_px[1], max_px[0], max_px[1]);*/
+ /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/
/* face uses no UV area when quantized to pixels? */
return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? 0 : 1;
@@ -3643,7 +3643,7 @@ static int project_bucket_iter_next(ProjPaintState *ps, int *bucket_index, rctf
if (ps->thread_tot > 1)
BLI_lock_thread(LOCK_CUSTOM1);
- //printf("%d %d \n", ps->context_bucket_x, ps->context_bucket_y);
+ //printf("%d %d\n", ps->context_bucket_x, ps->context_bucket_y);
for (; ps->context_bucket_y < ps->bucketMax[1]; ps->context_bucket_y++) {
for (; ps->context_bucket_x < ps->bucketMax[0]; ps->context_bucket_x++) {
diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c
index fbf83dd8df5..65bcfcb7024 100644
--- a/source/blender/editors/sculpt_paint/paint_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_undo.c
@@ -160,7 +160,9 @@ static int undo_stack_step(bContext *C, UndoStack *stack, int step, const char *
if (stack->current == NULL) ;
else {
if (!name || strcmp(stack->current->name, name) == 0) {
- if (G.f & G_DEBUG) printf("undo %s\n", stack->current->name);
+ if (G.debug & G_DEBUG_WM) {
+ printf("%s: undo '%s'\n", __func__, stack->current->name);
+ }
undo_restore(C, stack, stack->current);
stack->current = stack->current->prev;
return 1;
@@ -174,7 +176,9 @@ static int undo_stack_step(bContext *C, UndoStack *stack, int step, const char *
undo = (stack->current && stack->current->next) ? stack->current->next : stack->elems.first;
undo_restore(C, stack, undo);
stack->current = undo;
- if (G.f & G_DEBUG) printf("redo %s\n", undo->name);
+ if (G.debug & G_DEBUG_WM) {
+ printf("%s: redo %s\n", __func__, undo->name);
+ }
return 1;
}
}
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 630bb75ed5d..f76f5f6523e 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -997,7 +997,7 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
ale= BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
- printf("Error: animation channel (index = %d) not found in mouse_action_keys() \n", channel_index);
+ printf("Error: animation channel (index = %d) not found in mouse_action_keys()\n", channel_index);
BLI_freelistN(&anim_data);
return;
}
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index c0cd2a882c8..76a2c926522 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -291,7 +291,7 @@ static void create_ghost_curves (bAnimContext *ac, int start, int end)
/* sanity check */
if (start >= end) {
- printf("Error: Frame range for Ghost F-Curve creation is inappropriate \n");
+ printf("Error: Frame range for Ghost F-Curve creation is inappropriate\n");
return;
}
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index c242a1c1323..1d323cb6a4f 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -92,8 +92,8 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
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;
@@ -284,8 +284,8 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
break;
default:
- if (G.f & G_DEBUG)
- printf("Error: Invalid channel type in mouse_nla_channels() \n");
+ if (G.debug & G_DEBUG)
+ printf("Error: Invalid channel type in mouse_nla_channels()\n");
}
/* free channels */
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 0c2dc7493e2..1a94b1160be 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -399,7 +399,7 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
if (act == NULL) {
BKE_report(op->reports, RPT_ERROR, "No valid Action to add");
- //printf("Add strip - actname = '%s' \n", actname);
+ //printf("Add strip - actname = '%s'\n", actname);
return OPERATOR_CANCELLED;
}
else if (act->idroot == 0) {
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index 1434bd8ddc2..b0cd59ea7ad 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -538,7 +538,7 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2],
ale= BLI_findlink(&anim_data, channel_index);
if (ale == NULL) {
/* channel not found */
- printf("Error: animation channel (index = %d) not found in mouse_nla_strips() \n", channel_index);
+ printf("Error: animation channel (index = %d) not found in mouse_nla_strips()\n", channel_index);
BLI_freelistN(&anim_data);
return;
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index d95947142f9..cf2b3730462 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -370,7 +370,7 @@ void ED_node_composit_default(Scene *sce)
/* but lets check it anyway */
if (sce->nodetree) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("error in composite initialize\n");
return;
}
@@ -410,7 +410,7 @@ void ED_node_texture_default(Tex *tx)
/* but lets check it anyway */
if (tx->nodetree) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("error in texture initialize\n");
return;
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 258debc8e60..6d76da3b0e0 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -3167,7 +3167,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
draw_em_measure_stats(v3d, ob, em, &scene->unit);
}
- if ((G.f & G_DEBUG) && (me->drawflag & ME_DRAWEXTRA_INDICES) &&
+ if ((G.debug & G_DEBUG) && (me->drawflag & ME_DRAWEXTRA_INDICES) &&
!(v3d->flag2 & V3D_RENDER_OVERRIDE)) {
draw_em_indices(em);
}
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index 8849a9af9c0..ac0f8306259 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -252,7 +252,7 @@ void undo_editmode_step(bContext *C, int step)
if (curundo == NULL || curundo->prev == NULL) error("No more steps to undo");
else {
- if (G.f & G_DEBUG) printf("undo %s\n", curundo->name);
+ if (G.debug & G_DEBUG) printf("undo %s\n", curundo->name);
curundo = curundo->prev;
undo_restore(curundo, curundo->getdata(C), obedit->data);
}
@@ -264,7 +264,7 @@ void undo_editmode_step(bContext *C, int step)
else {
undo_restore(curundo->next, curundo->getdata(C), obedit->data);
curundo = curundo->next;
- if (G.f & G_DEBUG) printf("redo %s\n", curundo->name);
+ if (G.debug & G_DEBUG) printf("redo %s\n", curundo->name);
}
}
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 62d761238e4..ac264c1a6af 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -82,7 +82,7 @@ void ED_undo_push(bContext *C, const char *str)
Object *obedit = CTX_data_edit_object(C);
Object *obact = CTX_data_active_object(C);
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("undo push %s\n", str);
if (obedit) {
@@ -361,7 +361,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
{
int retval;
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("redo_cb: operator redo %s\n", op->type->name);
ED_undo_pop_op(C, op);
@@ -371,7 +371,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
retval = WM_operator_repeat(C, op);
if ((retval & OPERATOR_FINISHED) == 0) {
- if (G.f & G_DEBUG)
+ if (G.debug & G_DEBUG)
printf("redo_cb: operator redo failed: %s, return %d\n", op->type->name, retval);
ED_undo_redo(C);
}
@@ -380,7 +380,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
}
}
else {
- if (G.f & G_DEBUG) {
+ if (G.debug & G_DEBUG) {
printf("redo_cb: WM_operator_repeat_check returned false %s\n", op->type->name);
}
}
@@ -389,7 +389,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
CTX_wm_region_set(C, ar);
}
else {
- if (G.f & G_DEBUG) {
+ if (G.debug & G_DEBUG) {
printf("redo_cb: ED_undo_operator_repeat called with NULL 'op'\n");
}
}