diff options
author | Joshua Leung <aligorith@gmail.com> | 2013-03-21 10:11:16 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2013-03-21 10:11:16 +0400 |
commit | 3725089b6ba83ab1a093d155fd72e8f4bfd2e872 (patch) | |
tree | 203e7c254838041c1226d069c2eaffae13cc994e /source/blender/blenkernel/intern | |
parent | 3b885751b6eb7f11272468ae4354fb092ea2a7bb (diff) |
Driver error warnings are now only printed to the console when Blender is run
using the -d flag
This prevents a stream of error messages flooding the console when working with
particular rigs which may have a few broken controls. In general, riggers now
have a better alternative by using the filtering tools in the Graph Editor.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 594b887d361..f63eb9f87e3 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1024,10 +1024,11 @@ static float dtar_get_prop_val(ChannelDriver *driver, DriverTarget *dtar) id = dtar_id_ensure_proxy_from(dtar->id); /* error check for missing pointer... */ - /* TODO: tag the specific target too as having issues */ if (id == NULL) { - printf("Error: driver has an invalid target to use\n"); - if (G.debug & G_DEBUG) printf("\tpath = %s\n", dtar->rna_path); + if (G.debug & G_DEBUG) { + printf("Error: driver has an invalid target to use (path = %s)\n", dtar->rna_path); + } + driver->flag |= DRIVER_FLAG_INVALID; dtar->flag |= DTAR_FLAG_INVALID; return 0.0f; @@ -1089,8 +1090,9 @@ static float dtar_get_prop_val(ChannelDriver *driver, DriverTarget *dtar) } else { /* path couldn't be resolved */ - if (G.debug & G_DEBUG) + if (G.debug & G_DEBUG) { printf("Driver Evaluation Error: cannot resolve target for %s -> %s\n", id->name, dtar->rna_path); + } driver->flag |= DRIVER_FLAG_INVALID; dtar->flag |= DTAR_FLAG_INVALID; @@ -1152,19 +1154,25 @@ static float dvar_eval_rotDiff(ChannelDriver *driver, DriverVar *dvar) /* check what the error was */ if ((pchan == NULL) && (pchan2 == NULL)) { - printf("Driver Evaluation Error: Rotational difference failed - first 2 targets invalid\n"); + if (G.debug & G_DEBUG) { + printf("Driver Evaluation Error: Rotational difference failed - first 2 targets invalid\n"); + } dtar1->flag |= DTAR_FLAG_INVALID; dtar2->flag |= DTAR_FLAG_INVALID; } else if (pchan == NULL) { - printf("Driver Evaluation Error: Rotational difference failed - first target not valid PoseChannel\n"); + if (G.debug & G_DEBUG) { + printf("Driver Evaluation Error: Rotational difference failed - first target not valid PoseChannel\n"); + } dtar1->flag |= DTAR_FLAG_INVALID; dtar2->flag &= ~DTAR_FLAG_INVALID; } else if (pchan2 == NULL) { - printf("Driver Evaluation Error: Rotational difference failed - second target not valid PoseChannel\n"); + if (G.debug & G_DEBUG) { + printf("Driver Evaluation Error: Rotational difference failed - second target not valid PoseChannel\n"); + } dtar1->flag &= ~DTAR_FLAG_INVALID; dtar2->flag |= DTAR_FLAG_INVALID; |