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).
This commit is contained in:
2019-01-16 19:41:29 +01:00
parent feaf846f93
commit 8102200006
6 changed files with 34 additions and 9 deletions

View File

@@ -201,8 +201,9 @@ static void freeData(ModifierData *md)
ClothModifierData *clmd = (ClothModifierData *) md;
if (clmd) {
if (G.debug_value > 0)
if (G.debug & G_DEBUG_SIMDATA) {
printf("clothModifier_freeData\n");
}
cloth_free_modifier_extern(clmd);

View File

@@ -141,8 +141,9 @@ static void deformVerts(
current_time = DEG_get_ctime(ctx->depsgraph);
if (G.debug_value > 0)
if (G.debug & G_DEBUG_SIMDATA) {
printf("current_time %f, collmd->time_xnew %f\n", current_time, collmd->time_xnew);
}
mvert_num = mesh_src->totvert;