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/creator/creator.c (-5 / +10 lines)
Lines 232-238 static void print_help(void) Link Here
232
	printf ("  -nojoystick\tDisable joystick support\n");
232
	printf ("  -nojoystick\tDisable joystick support\n");
233
	printf ("  -noglsl\tDisable GLSL shading\n");
233
	printf ("  -noglsl\tDisable GLSL shading\n");
234
	printf ("  -h\t\tPrint this help text\n");
234
	printf ("  -h\t\tPrint this help text\n");
235
	printf ("  -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n");
235
	printf ("  -666\t\tEnables automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n");
236
	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");
237
	printf ("  -P <filename>\tRun the given Python script (filename or Blender Text)\n");
237
#ifdef WIN32
238
#ifdef WIN32
238
	printf ("  -R\t\tRegister .blend extension\n");
239
	printf ("  -R\t\tRegister .blend extension\n");
Lines 366-372 int main(int argc, char **argv) Link Here
366
367
367
	/* first test for background */
368
	/* first test for background */
368
369
369
	G.f |= G_DOSCRIPTLINKS; /* script links enabled by default */
370
	G.f &= ~G_DOSCRIPTLINKS; /* script links disabled by default */
370
371
371
	for(a=1; a<argc; a++) {
372
	for(a=1; a<argc; a++) {
372
373
Lines 388-393 int main(int argc, char **argv) Link Here
388
			exit(0);
389
			exit(0);
389
		}
390
		}
390
391
392
		if (!strcmp(argv[a], "-666")){
393
			G.f |= G_DOSCRIPTLINKS;
394
		}
395
391
		/* Handle -* switches */
396
		/* Handle -* switches */
392
		else if(argv[a][0] == '-') {
397
		else if(argv[a][0] == '-') {
393
			switch(argv[a][1]) {
398
			switch(argv[a][1]) {
Lines 405-411 int main(int argc, char **argv) Link Here
405
				a= argc;
410
				a= argc;
406
				break;
411
				break;
407
412
408
			case 'y':
413
			case 'y':  /* NOTE: -y works the exact opposite way in version 2.57! */
409
				G.f &= ~G_DOSCRIPTLINKS;
414
				G.f &= ~G_DOSCRIPTLINKS;
410
				break;
415
				break;
411
416
Lines 680-686 int main(int argc, char **argv) Link Here
680
#endif
685
#endif
681
						RE_BlenderAnim(re, G.scene, frame, frame, G.scene->frame_step);
686
						RE_BlenderAnim(re, G.scene, frame, frame, G.scene->frame_step);
682
#ifndef DISABLE_PYTHON
687
#ifndef DISABLE_PYTHON
683
						BPY_do_all_scripts(SCRIPT_POSTRENDER, 0);
688
						if (G.f & G_DOSCRIPTLINKS)
689
							BPY_do_all_scripts(SCRIPT_POSTRENDER, 0);
684
#endif
690
#endif
685
					}
691
					}
686
				} else {
692
				} else {
687
- 

Return to bug 293130