Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 293130 | Differences between
and this patch

Collapse All | Expand All

(-)a/source/blender/blenkernel/intern/blender.c (-1 / +10 lines)
Lines 388-394 static void setup_app_data(BlendFileData *bfd, char *filename) Link Here
388
	if (G.f & G_DEBUG) bfd->globalf |= G_DEBUG;
388
	if (G.f & G_DEBUG) bfd->globalf |= G_DEBUG;
389
	else bfd->globalf &= ~G_DEBUG;
389
	else bfd->globalf &= ~G_DEBUG;
390
390
391
	if ((U.flag & USER_DONT_DOSCRIPTLINKS)) bfd->globalf &= ~G_DOSCRIPTLINKS;
391
	if (G.f & G_DOSCRIPTLINKS) {
392
		/* Blender running in -666 mode */
393
		/* NOTE: In background mode U.flag has not been initialized from ~/.B.blend */
394
		if (! G.background && (U.flag & USER_DONT_DOSCRIPTLINKS))
395
			/* Prefer disabled "Auto Run Python Scripts" over -666 */
396
			bfd->globalf &= ~G_DOSCRIPTLINKS;
397
	} else {
398
		/* Blender NOT running in -666 mode, deny pulling G_DOSCRIPTLINKS in */
399
		bfd->globalf &= ~G_DOSCRIPTLINKS;
400
	}
392
401
393
	G.f= bfd->globalf;
402
	G.f= bfd->globalf;
394
403
(-)a/source/blender/python/api2_2x/sceneRender.c (-1 / +2 lines)
Lines 498-504 static PyObject *RenderData_Render( BPy_RenderData * self ) Link Here
498
498
499
		RE_BlenderFrame(re, G.scene, G.scene->r.cfra);
499
		RE_BlenderFrame(re, G.scene, G.scene->r.cfra);
500
500
501
		BPY_do_all_scripts(SCRIPT_POSTRENDER, 0);
501
		if (G.f & G_DOSCRIPTLINKS)
502
			BPY_do_all_scripts(SCRIPT_POSTRENDER, 0);
502
503
503
		set_scene_bg( oldsce );
504
		set_scene_bg( oldsce );
504
	}
505
	}
(-)a/source/blender/src/buttons_script.c (-1 / +3 lines)
Lines 107-112 Link Here
107
#include "blendef.h"
107
#include "blendef.h"
108
#include "butspace.h"
108
#include "butspace.h"
109
109
110
extern int button_enable_script_links_enabled;
111
110
/* ************************ function prototypes ********************** */
112
/* ************************ function prototypes ********************** */
111
void draw_scriptlink(uiBlock *, ScriptLink *, int , int , int ) ;
113
void draw_scriptlink(uiBlock *, ScriptLink *, int , int , int ) ;
112
114
Lines 323-329 static void script_panel_scriptlink(void) Link Here
323
	block= uiNewBlock(&curarea->uiblocks, "script_panel_scriptlink", UI_EMBOSS, UI_HELV, curarea->win);
325
	block= uiNewBlock(&curarea->uiblocks, "script_panel_scriptlink", UI_EMBOSS, UI_HELV, curarea->win);
324
	if(uiNewPanel(curarea, block, "Scriptlinks", "Script", 0, 0, 318, 204)==0) return;
326
	if(uiNewPanel(curarea, block, "Scriptlinks", "Script", 0, 0, 318, 204)==0) return;
325
327
326
	uiDefButBitI(block, TOG, G_DOSCRIPTLINKS, REDRAWBUTSSCRIPT,
328
	uiDefButBitI(block, button_enable_script_links_enabled ? TOG : BUT, G_DOSCRIPTLINKS, REDRAWBUTSSCRIPT,
327
			"Enable Script Links", xco, 200, 150, 20, &G.f, 0, 0, 0, 0,
329
			"Enable Script Links", xco, 200, 150, 20, &G.f, 0, 0, 0, 0,
328
			"Enable execution of all assigned Script links and Space Handelers");
330
			"Enable execution of all assigned Script links and Space Handelers");
329
	/* for proper alignment: */
331
	/* for proper alignment: */
(-)a/source/creator/creator.c (-5 / +14 lines)
Lines 108-113 Link Here
108
#include "binreloc.h"
108
#include "binreloc.h"
109
#endif
109
#endif
110
110
111
int button_enable_script_links_enabled = 0;
112
111
// from buildinfo.c
113
// from buildinfo.c
112
#ifdef BUILD_DATE
114
#ifdef BUILD_DATE
113
extern char * build_date;
115
extern char * build_date;
Lines 232-238 static void print_help(void) Link Here
232
	printf ("  -nojoystick\tDisable joystick support\n");
234
	printf ("  -nojoystick\tDisable joystick support\n");
233
	printf ("  -noglsl\tDisable GLSL shading\n");
235
	printf ("  -noglsl\tDisable GLSL shading\n");
234
	printf ("  -h\t\tPrint this help text\n");
236
	printf ("  -h\t\tPrint this help text\n");
235
	printf ("  -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n");
237
	printf ("  -666\t\tEnables automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n");
238
	printf ("  -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes) (default)\n");
236
	printf ("  -P <filename>\tRun the given Python script (filename or Blender Text)\n");
239
	printf ("  -P <filename>\tRun the given Python script (filename or Blender Text)\n");
237
#ifdef WIN32
240
#ifdef WIN32
238
	printf ("  -R\t\tRegister .blend extension\n");
241
	printf ("  -R\t\tRegister .blend extension\n");
Lines 366-372 int main(int argc, char **argv) Link Here
366
369
367
	/* first test for background */
370
	/* first test for background */
368
371
369
	G.f |= G_DOSCRIPTLINKS; /* script links enabled by default */
372
	G.f &= ~G_DOSCRIPTLINKS; /* script links disabled by default */
370
373
371
	for(a=1; a<argc; a++) {
374
	for(a=1; a<argc; a++) {
372
375
Lines 388-393 int main(int argc, char **argv) Link Here
388
			exit(0);
391
			exit(0);
389
		}
392
		}
390
393
394
		if (!strcmp(argv[a], "-666")){
395
			G.f |= G_DOSCRIPTLINKS;
396
			button_enable_script_links_enabled = 1;
397
		}
398
391
		/* Handle -* switches */
399
		/* Handle -* switches */
392
		else if(argv[a][0] == '-') {
400
		else if(argv[a][0] == '-') {
393
			switch(argv[a][1]) {
401
			switch(argv[a][1]) {
Lines 405-412 int main(int argc, char **argv) Link Here
405
				a= argc;
413
				a= argc;
406
				break;
414
				break;
407
415
408
			case 'y':
416
			case 'y':  /* NOTE: -y works the exact opposite way in version 2.57! */
409
				G.f &= ~G_DOSCRIPTLINKS;
417
				G.f &= ~G_DOSCRIPTLINKS;
418
				button_enable_script_links_enabled = 0;
410
				break;
419
				break;
411
420
412
			case 'Y':
421
			case 'Y':
Lines 680-686 int main(int argc, char **argv) Link Here
680
#endif
689
#endif
681
						RE_BlenderAnim(re, G.scene, frame, frame, G.scene->frame_step);
690
						RE_BlenderAnim(re, G.scene, frame, frame, G.scene->frame_step);
682
#ifndef DISABLE_PYTHON
691
#ifndef DISABLE_PYTHON
683
						BPY_do_all_scripts(SCRIPT_POSTRENDER, 0);
692
						if (G.f & G_DOSCRIPTLINKS)
693
							BPY_do_all_scripts(SCRIPT_POSTRENDER, 0);
684
#endif
694
#endif
685
					}
695
					}
686
				} else {
696
				} else {
687
- 

Return to bug 293130