From 81022000063c1fe84d85e8de416d8ab0c2c4c516 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 16 Jan 2019 19:41:29 +0100 Subject: Cleanup/sanitize usages of G.debug_value. There was no documentation at all, some very bad practices (like using G.debug_value > 0 as some sort of global debug print switch), and even an overlapping use of '1' value... Also, python setter did not check for valid range (since this is a short, not an int). --- source/blender/blenkernel/intern/cloth.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/cloth.c') diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 30b5d92bdb7..47afef444cf 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -515,8 +515,9 @@ void cloth_free_modifier(ClothModifierData *clmd ) void cloth_free_modifier_extern(ClothModifierData *clmd ) { Cloth *cloth = NULL; - if (G.debug_value > 0) + if (G.debug & G_DEBUG_SIMDATA) { printf("cloth_free_modifier_extern\n"); + } if ( !clmd ) return; @@ -524,8 +525,9 @@ void cloth_free_modifier_extern(ClothModifierData *clmd ) cloth = clmd->clothObject; if ( cloth ) { - if (G.debug_value > 0) + if (G.debug & G_DEBUG_SIMDATA) { printf("cloth_free_modifier_extern in\n"); + } BPH_cloth_solver_free(clmd); @@ -728,8 +730,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, Mesh *mesh, fl // If we have a clothObject, free it. if ( clmd->clothObject != NULL ) { cloth_free_modifier ( clmd ); - if (G.debug_value > 0) + if (G.debug & G_DEBUG_SIMDATA) { printf("cloth_free_modifier cloth_from_object\n"); + } } // Allocate a new cloth object. -- cgit v1.2.3