diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 14 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/implicit.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 14 |
4 files changed, 23 insertions, 17 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 2d30844af80..f71f82eca17 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -60,20 +60,26 @@ typedef struct Global { /* strings of recent opened files */ struct ListBase recent_files; - + short afbreek, moving, file_loaded; char background; char factory_startup; short winpos, displaymode; /* used to be in Render */ short rendering; /* to indicate render is busy, prevent renderwindow events etc */ - short rt; + /* debug value, can be set from the UI and python, used for testing nonstandard features */ + short debug_value; + + /* saved to the blend file as FileGlobal.globalf, + * however this is now only used for runtime options */ int f; + + /* debug flag, G_DEBUG, G_DEBUG_PYTHON & friends, set python or command line args */ int debug; /* Used for BMesh transformations */ struct BME_Glob *editBMesh; - + /* Frank's variables */ int save_over; @@ -88,7 +94,7 @@ typedef struct Global { /* this variable is written to / read from FileGlobal->fileflags */ int fileflags; - + /* save the allowed windowstate of blender when using -W or -w */ int windowstate; } Global; diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 74bfa0d60fc..694bb3f1afd 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -662,7 +662,7 @@ void cloth_free_modifier(ClothModifierData *clmd ) void cloth_free_modifier_extern(ClothModifierData *clmd ) { Cloth *cloth = NULL; - if (G.rt > 0) + if (G.debug_value > 0) printf("cloth_free_modifier_extern\n"); if ( !clmd ) @@ -671,7 +671,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd ) cloth = clmd->clothObject; if ( cloth ) { - if (G.rt > 0) + if (G.debug_value > 0) printf("cloth_free_modifier_extern in\n"); // If our solver provides a free function, call it @@ -852,7 +852,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d // If we have a clothObject, free it. if ( clmd->clothObject != NULL ) { cloth_free_modifier ( clmd ); - if (G.rt > 0) + if (G.debug_value > 0) printf("cloth_free_modifier cloth_from_object\n"); } @@ -1278,7 +1278,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) cloth->edgehash = edgehash; - if (G.rt > 0) + if (G.debug_value > 0) printf("avg_len: %f\n", clmd->sim_parms->avg_spring_len); return 1; diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 8a573aaa676..fdc3a8f4317 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -710,7 +710,7 @@ int implicit_init(Object *UNUSED(ob), ClothModifierData *clmd) Implicit_Data *id = NULL; LinkNode *search = NULL; - if (G.rt > 0) + if (G.debug_value > 0) printf("implicit_init\n"); // init memory guard @@ -1918,7 +1918,7 @@ void implicit_set_positions(ClothModifierData *clmd) copy_v3_v3(id->X[i], verts[i].x); copy_v3_v3(id->V[i], verts[i].v); } - if (G.rt > 0) + if (G.debug_value > 0) printf("implicit_set_positions\n"); } diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 26ca3805c28..008dc332710 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -1941,7 +1941,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], } } - if ((deflected < 2)&& (G.rt != 444)) { /* we did not hit a face until now */ + if ((deflected < 2)&& (G.debug_value != 444)) { /* we did not hit a face until now */ /* see if 'outer' hits an edge */ float dist; @@ -2493,7 +2493,7 @@ static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, fl static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, float timenow, int nl_flags) { /* redirection to the new threaded Version */ - if (!(G.rt & 0x10)) { // 16 + if (!(G.debug_value & 0x10)) { // 16 softbody_calc_forcesEx(scene, ob, forcetime, timenow, nl_flags); return; } @@ -2504,7 +2504,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa /*backward compatibility note: fixing bug [17428] which forces adaptive step size to tiny steps in some situations - .. keeping G.rt==17 0x11 option for old files 'needing' the bug*/ + .. keeping G.debug_value==17 0x11 option for old files 'needing' the bug*/ /* rule we never alter free variables :bp->vec bp->pos in here ! * this will ruin adaptive stepsize AKA heun! (BM) @@ -2756,9 +2756,9 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa if (sb_deflect_face(ob, bp->pos, facenormal, defforce, &cf, timenow, vel, &intrusion)) { if ((!nl_flags)&&(intrusion < 0.0f)) { - if (G.rt & 0x01) { // 17 we did check for bit 0x10 before + if (G.debug_value & 0x01) { // 17 we did check for bit 0x10 before /*fixing bug [17428] this forces adaptive step size to tiny steps - in some situations .. keeping G.rt==17 option for old files 'needing' the bug + in some situations .. keeping G.debug_value==17 option for old files 'needing' the bug */ /*bjornmose: uugh.. what an evil hack violation of the 'don't touch bp->pos in here' rule @@ -2837,7 +2837,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa nlEnd(NL_MATRIX); nlEnd(NL_SYSTEM); - if ((G.rt == 32) && (nl_flags & NLF_BUILD)) { + if ((G.debug_value == 32) && (nl_flags & NLF_BUILD)) { printf("####MEE#####\n"); nlPrintMatrix(); } @@ -2849,7 +2849,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa float f; int index =0; /* for debug purpose .. anyhow cropping B vector looks like working */ - if (G.rt ==32) + if (G.debug_value ==32) for (a=2*sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) { f=nlGetVariable(0, index); printf("(%f ", f);index++; |