From 81cdf2428405f7390c4f3e0973ab4ea567e3cf7a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 28 Dec 2007 21:16:00 +0000 Subject: Fix for [#7866] Relative Path to library from command line http://projects.blender.org/tracker/index.php?func=detail&aid=7866&group_id=9&atid=125 where linked relative blend files would not load when the absolute path was not given. Solved by constructing the absolute path from the command line argument given. --- source/creator/creator.c | 49 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 6a780553607..e5abe425468 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -687,9 +687,50 @@ int main(int argc, char **argv) break; } } - else { + else { + + /* Make the path absolute because its needed for relative linked blends to be found */ + int abs = 0; + int filelen; + char cwd[FILE_MAXDIR + FILE_MAXFILE]; + char filename[FILE_MAXDIR + FILE_MAXFILE]; + cwd[0] = filename[0] = '\0'; + + BLI_strncpy(filename, argv[a], sizeof(filename)); + filelen = strlen(filename); + + /* relative path checks, could do more tests here... */ +#ifdef WIN32 + /* Account for X:/ and X:\ - should be enough */ + if (filelen >= 3 && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/')) + abs = 1; +#else + if (filelen >= 2 && filename[0] == '/') + abs = 1 ; +#endif + if (!abs) { + BLI_getwdN(cwd); /* incase the full path to the blend isnt used */ + + if (cwd[0] == '\0') { + printf( + "Could not get the current working directory - $PWD for an unknown reason.\n\t" + "Relative linked files will not load if the entire blend path is not used.\n\t" + "The 'Play' button may also fail.\n" + ); + } else { + /* uses the blend path relative to cwd important for loading relative linked files. + * + * cwd should contain c:\ etc on win32 so the relbase can be NULL + * relbase being NULL also prevents // being misunderstood as relative to the current + * blend file which isnt a feature we want to use in this case since were dealing + * with a path from the command line, rather then from inside Blender */ + + BLI_make_file_string(NULL, filename, cwd, argv[a]); + } + } + if (G.background) { - BKE_read_file(argv[a], NULL); + BKE_read_file(filename, NULL); sound_initialize_sounds(); /* happens for the UI on file reading too */ @@ -698,8 +739,8 @@ int main(int argc, char **argv) } else { /* we are not running in background mode here, but start blender in UI mode with a file - this should do everything a 'load file' does */ - BIF_read_file(argv[a]); - } + BIF_read_file(filename); + } } } -- cgit v1.2.3 From bb603a53a161ecbbac854fbe38c4b00c423c9f7a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 3 Jan 2008 10:27:29 +0000 Subject: Added a note to blender help text about argument order (pitfall I ran into when rendering) also removed FTYPE as an optional format (TODO - remove FTYPE from render output panel since you cant use FTYPE anymore and its not used internally, hint hint) --- source/creator/creator.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index e5abe425468..879bbbd386f 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -171,7 +171,11 @@ static void print_help(void) { printf ("Blender %d.%02d (sub %d) Build\n", G.version/100, G.version%100, BLENDER_SUBVERSION); printf ("Usage: blender [options ...] [file]\n"); - + printf ("Note: Arguments are executed in the order they are given. eg.\n"); + printf (" blender -b test.blend -f 1 -o /tmp\n"); + printf (" ...may not render to /tmp because '-f 1' renders before the output path is set\n"); + printf (" blender -b -o /tmp test.blend -f 1\n"); + printf (" ...may not render to /tmp because loading the blend file overwrites the output path that was set\n"); printf ("\nRender options:\n"); printf (" -b \tRender in background\n"); printf (" -S \tSet scene \n"); @@ -184,10 +188,10 @@ static void print_help(void) printf (" The frame number will be added at the end of the filename.\n"); printf (" eg: blender -b foobar.blend -o //render_ -F PNG -x 1\n"); printf (" -F \tSet the render format, Valid options are..\n"); - printf (" \tTGA IRIS HAMX FTYPE JPEG MOVIE IRIZ RAWTGA\n"); + printf (" \tTGA IRIS HAMX JPEG MOVIE IRIZ RAWTGA\n"); printf (" \tAVIRAW AVIJPEG PNG BMP FRAMESERVER\n"); printf (" (formats that can be compiled into blender, not available on all systems)\n"); - printf (" \tHDR TIFF EXR MPEG AVICODEC QUICKTIME CINEON DPX\n"); + printf (" \tHDR TIFF EXR MPEG AVICODEC QUICKTIME CINEON DPX DDS\n"); printf (" -x \tSet option to add the file extension to the end of the file.\n"); printf (" -t \tUse amount of for rendering\n"); printf ("\nAnimation options:\n"); @@ -636,7 +640,9 @@ int main(int argc, char **argv) if (!strcmp(argv[a],"TGA")) G.scene->r.imtype = R_TARGA; else if (!strcmp(argv[a],"IRIS")) G.scene->r.imtype = R_IRIS; else if (!strcmp(argv[a],"HAMX")) G.scene->r.imtype = R_HAMX; - else if (!strcmp(argv[a],"FTYPE")) G.scene->r.imtype = R_FTYPE; +#ifdef WITH_DDS + else if (!strcmp(argv[a],"DDS")) G.scene->r.imtype = R_DDS; +#endif else if (!strcmp(argv[a],"JPEG")) G.scene->r.imtype = R_JPEG90; else if (!strcmp(argv[a],"MOVIE")) G.scene->r.imtype = R_MOVIE; else if (!strcmp(argv[a],"IRIZ")) G.scene->r.imtype = R_IRIZ; @@ -649,12 +655,14 @@ int main(int argc, char **argv) else if (!strcmp(argv[a],"BMP")) G.scene->r.imtype = R_BMP; else if (!strcmp(argv[a],"HDR")) G.scene->r.imtype = R_RADHDR; else if (!strcmp(argv[a],"TIFF")) G.scene->r.imtype = R_IRIS; +#ifdef WITH_OPENEXR else if (!strcmp(argv[a],"EXR")) G.scene->r.imtype = R_OPENEXR; +#endif else if (!strcmp(argv[a],"MPEG")) G.scene->r.imtype = R_FFMPEG; else if (!strcmp(argv[a],"FRAMESERVER")) G.scene->r.imtype = R_FRAMESERVER; else if (!strcmp(argv[a],"CINEON")) G.scene->r.imtype = R_CINEON; else if (!strcmp(argv[a],"DPX")) G.scene->r.imtype = R_DPX; - else printf("\nError: Format from '-F ' not known.\n"); + else printf("\nError: Format from '-F ' not known or not compiled in this release.\n"); } } else { printf("\nError: no blend loaded. cannot use '-x'.\n"); -- cgit v1.2.3 From 86471f8b72d2a6ac8f6078b92f701da1eeab2525 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 3 Jan 2008 14:53:44 +0000 Subject: Split guardedalloc print into 2 funcs, 1 that prints on errors, another then prints the memory blocks as a python dict, minor changes to help text --- source/creator/creator.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 879bbbd386f..9b5a151b56b 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -176,8 +176,10 @@ static void print_help(void) printf (" ...may not render to /tmp because '-f 1' renders before the output path is set\n"); printf (" blender -b -o /tmp test.blend -f 1\n"); printf (" ...may not render to /tmp because loading the blend file overwrites the output path that was set\n"); + printf (" \"blender -b test.blend -o /tmp -f 1\" works as expected.\n"); printf ("\nRender options:\n"); printf (" -b \tRender in background\n"); + printf (" -a render frames from start to end (inclusive), only works when used after -b\n"); printf (" -S \tSet scene \n"); printf (" -f \tRender frame and save it\n"); printf (" -s \tSet start to frame (use with -a)\n"); @@ -186,16 +188,25 @@ static void print_help(void) printf (" Use // at the start of the path to\n"); printf (" render relative to the blend file.\n"); printf (" The frame number will be added at the end of the filename.\n"); - printf (" eg: blender -b foobar.blend -o //render_ -F PNG -x 1\n"); - printf (" -F \tSet the render format, Valid options are..\n"); + printf (" eg: blender -b foobar.blend -o //render_ -F PNG -x 1 -a\n"); + printf ("\nFormat options:\n"); + printf (" -F \tSet the render format, Valid options are...\n"); printf (" \tTGA IRIS HAMX JPEG MOVIE IRIZ RAWTGA\n"); printf (" \tAVIRAW AVIJPEG PNG BMP FRAMESERVER\n"); printf (" (formats that can be compiled into blender, not available on all systems)\n"); printf (" \tHDR TIFF EXR MPEG AVICODEC QUICKTIME CINEON DPX DDS\n"); printf (" -x \tSet option to add the file extension to the end of the file.\n"); printf (" -t \tUse amount of for rendering\n"); - printf ("\nAnimation options:\n"); - printf (" -a \tPlayback \n"); + /*Add these later - Campbell*/ + /* + printf (" -colorchannel \tColors to save, valid types are: BW RGB RGBA \n"); + printf (" -compression \t Use with EXR format, valid types are..\n"); + printf (" \tZIP Pxr24 PIZ RLE\n"); + printf (" -zbuf \tUse with EXR format, set the zbuf save option\n"); + printf (" -halffloat \tUse with EXR format, set the half float option\n"); + printf (" -preview \tUse with EXR format, save a jpeg for viewing as well as the EXR\n");*/ + printf ("\nAnimation playback options:\n"); + printf (" -a \tPlayback , only operates this way when -b is not used.\n"); printf (" -p \tOpen with lower left corner at , \n"); printf (" -m\t\tRead from disk (Don't buffer)\n"); printf (" -f \t\tSpecify FPS to start with\n"); @@ -337,7 +348,7 @@ int main(int argc, char **argv) /* Handle -* switches */ else if(argv[a][0] == '-') { switch(argv[a][1]) { - case 'a': + case 'a': /* -b was not given, play an animation */ playanim(argc-1, argv+1); exit(0); break; @@ -662,7 +673,7 @@ int main(int argc, char **argv) else if (!strcmp(argv[a],"FRAMESERVER")) G.scene->r.imtype = R_FRAMESERVER; else if (!strcmp(argv[a],"CINEON")) G.scene->r.imtype = R_CINEON; else if (!strcmp(argv[a],"DPX")) G.scene->r.imtype = R_DPX; - else printf("\nError: Format from '-F ' not known or not compiled in this release.\n"); + else printf("\nError: Format from '-F' not known or not compiled in this release.\n"); } } else { printf("\nError: no blend loaded. cannot use '-x'.\n"); -- cgit v1.2.3 From 09c2fd6f11eb00809678e869aec32f305e03ef02 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 18 Jan 2008 15:10:17 +0000 Subject: Linux only addition to know for sure the path of blender because sometimes the Play button doesn't work depending on how blender is started. This uses binreloc - http://autopackage.org/docs/binreloc/ it should also solve the problem of python scripts not being found. --- source/creator/Makefile | 3 +++ source/creator/SConscript | 3 +++ source/creator/creator.c | 10 ++++++++++ 3 files changed, 16 insertions(+) (limited to 'source/creator') diff --git a/source/creator/Makefile b/source/creator/Makefile index 02c22aa4da8..5fba2a1bb70 100644 --- a/source/creator/Makefile +++ b/source/creator/Makefile @@ -42,6 +42,9 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I../blender/render/extern/include CPPFLAGS += -I../blender/radiosity/extern/include +ifeq ($(OS),linux) + CPPFLAGS += -I$(OCGDIR)/extern/binreloc/include +endif # two needed for the kernel CPPFLAGS += -I../blender/imbuf CPPFLAGS += -I../blender/makesdna diff --git a/source/creator/SConscript b/source/creator/SConscript index 9bc49b2fc30..b09229a1641 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -15,4 +15,7 @@ if env['WITH_BF_QUICKTIME']==1: incs += ' ' + env['BF_QUICKTIME_INC'] defs.append('WITH_QUICKTIME') +if env['OURPLATFORM'] == 'linux2': + incs += ' ../../extern/binreloc/include' + env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 ) diff --git a/source/creator/creator.c b/source/creator/creator.c index 9b5a151b56b..7e426288340 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -97,6 +97,10 @@ # include #endif +#ifdef __linux__ +#include "binreloc.h" +#endif + // from buildinfo.c #ifdef BUILD_DATE extern char * build_date; @@ -253,6 +257,12 @@ int main(int argc, char **argv) int audio = 0; #endif + +#ifdef __linux__ + /* linux uses binrealoc to know its binary path */ + br_init( NULL ); +#endif + setCallbacks(); #ifdef __APPLE__ /* patch to ignore argument finder gives us (pid?) */ -- cgit v1.2.3 From 320ac3f0e289b2c4d8add38926913eb2d4809f55 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Fri, 18 Jan 2008 21:39:47 +0000 Subject: Fixing makefiles for binreloc I made it use flags like other things default on for linux. ideasman helped me get scons working. Cmake still needs some love... Kent --- source/creator/CMakeLists.txt | 5 +++++ source/creator/Makefile | 8 +++++--- source/creator/SConscript | 5 +++-- source/creator/creator.c | 5 ++--- 4 files changed, 15 insertions(+), 8 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index a34ed069b02..7b9da71a501 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -42,12 +42,17 @@ INCLUDE_DIRECTORIES(../../intern/guardedalloc ../blender/makesdna ../kernel/gen_messaging ../kernel/gen_system + ../../extern/binreloc/include ) IF(WITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME) ENDIF(WITH_QUICKTIME) +IF(WITH_BINRELOC) + ADD_DEFINITIONS(-DWITH_BINRELOC) +endif(WITH_VINRELOC) + IF(YESIAMSTUPID) ADD_DEFINITIONS(-DYESIAMSTUPID) ENDIF(YESIAMSTUPID) diff --git a/source/creator/Makefile b/source/creator/Makefile index 5fba2a1bb70..a7f2dfeecb6 100644 --- a/source/creator/Makefile +++ b/source/creator/Makefile @@ -42,9 +42,7 @@ CFLAGS += $(LEVEL_1_C_WARNINGS) CPPFLAGS += -I../blender/render/extern/include CPPFLAGS += -I../blender/radiosity/extern/include -ifeq ($(OS),linux) - CPPFLAGS += -I$(OCGDIR)/extern/binreloc/include -endif + # two needed for the kernel CPPFLAGS += -I../blender/imbuf CPPFLAGS += -I../blender/makesdna @@ -62,6 +60,10 @@ ifeq ($(WITH_QUICKTIME), true) CPPFLAGS += -I$(NAN_QUICKTIME)/include -DWITH_QUICKTIME endif +ifeq ($(WITH_BINRELOC), true) + CPPFLAGS += -I$(OCGDIR)/extern/binreloc/include -DWITH_BINRELOC +endif + ifeq ($(NAN_YESIAMSTUPID), true) CPPFLAGS += -DYESIAMSTUPID endif diff --git a/source/creator/SConscript b/source/creator/SConscript index b09229a1641..833b56eccd8 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -15,7 +15,8 @@ if env['WITH_BF_QUICKTIME']==1: incs += ' ' + env['BF_QUICKTIME_INC'] defs.append('WITH_QUICKTIME') -if env['OURPLATFORM'] == 'linux2': - incs += ' ../../extern/binreloc/include' +if env['WITH_BF_BINRELOC']==1: + incs += ' ../../extern/binreloc/include' + defs.append('WITH_BINRELOC') env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 ) diff --git a/source/creator/creator.c b/source/creator/creator.c index 7e426288340..11065155f12 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -97,7 +97,7 @@ # include #endif -#ifdef __linux__ +#ifdef WITH_BINRELOC #include "binreloc.h" #endif @@ -258,8 +258,7 @@ int main(int argc, char **argv) #endif -#ifdef __linux__ - /* linux uses binrealoc to know its binary path */ +#ifdef WITH_BINRELOC br_init( NULL ); #endif -- cgit v1.2.3 From c4929f84f77747957389a72092b5afd8383aa3eb Mon Sep 17 00:00:00 2001 From: Chris Want Date: Tue, 22 Jan 2008 04:27:23 +0000 Subject: CMake isn't fully working yet, just correcting a simple typo. I see BINRELOC is set as a configurable option -- does this mean that it is optional on linux? (I thought it was required.) --- source/creator/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 7b9da71a501..4f11ea672d3 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -51,7 +51,7 @@ ENDIF(WITH_QUICKTIME) IF(WITH_BINRELOC) ADD_DEFINITIONS(-DWITH_BINRELOC) -endif(WITH_VINRELOC) +endif(WITH_BINRELOC) IF(YESIAMSTUPID) ADD_DEFINITIONS(-DYESIAMSTUPID) -- cgit v1.2.3 From 659316e4f491b62868a6706fb35d097f51711c67 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Tue, 22 Jan 2008 05:34:53 +0000 Subject: Fixes for CMake. --- source/creator/CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 4f11ea672d3..2b566d77a29 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -42,16 +42,18 @@ INCLUDE_DIRECTORIES(../../intern/guardedalloc ../blender/makesdna ../kernel/gen_messaging ../kernel/gen_system - ../../extern/binreloc/include ) + + IF(WITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME) ENDIF(WITH_QUICKTIME) -IF(WITH_BINRELOC) +IF(LINUX) ADD_DEFINITIONS(-DWITH_BINRELOC) -endif(WITH_BINRELOC) + INCLUDE_DIRECTORIES(${BINRELOC_INC}) +endif(LINUX) IF(YESIAMSTUPID) ADD_DEFINITIONS(-DYESIAMSTUPID) @@ -196,6 +198,10 @@ FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS) SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity blender_IK bf_elbeem) +IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc) +ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + IF(UNIX) # Sort libraries SET(BLENDER_SORTED_LIBS @@ -259,6 +265,7 @@ IF(UNIX) bf_moto blender_python bf_quicktime + extern_binreloc ) FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) -- cgit v1.2.3 From a9518afc67d1350b2bdf369dd5be891956ddb5f1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 3 Feb 2008 19:03:18 +0000 Subject: feature request from peach, remove selected objects from 1 group. Also made rem_from_group return if it removed the object which save some looping. Added a node in the blender help message that background mode dosnt load the .B.blend file as a bug was reported recently because of this. --- source/creator/creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 11065155f12..7c7e81b5b45 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -182,7 +182,7 @@ static void print_help(void) printf (" ...may not render to /tmp because loading the blend file overwrites the output path that was set\n"); printf (" \"blender -b test.blend -o /tmp -f 1\" works as expected.\n"); printf ("\nRender options:\n"); - printf (" -b \tRender in background\n"); + printf (" -b \tRender in background (doesn't load the user defaults .B.blend file)\n"); printf (" -a render frames from start to end (inclusive), only works when used after -b\n"); printf (" -S \tSet scene \n"); printf (" -f \tRender frame and save it\n"); -- cgit v1.2.3 From 37d139ea54029589b34807c59f0108d51b415ef3 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Tue, 5 Feb 2008 19:31:21 +0000 Subject: This is patch: [#8228] Add MultiLayer image type to python and batch rendering Submitted By: Stephane SOPPERA (soppera) Also fixes a small typo with wrong filetype for TIFF commandline rendering. Kent --- source/creator/creator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 7c7e81b5b45..4dd1350ea48 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -198,7 +198,7 @@ static void print_help(void) printf (" \tTGA IRIS HAMX JPEG MOVIE IRIZ RAWTGA\n"); printf (" \tAVIRAW AVIJPEG PNG BMP FRAMESERVER\n"); printf (" (formats that can be compiled into blender, not available on all systems)\n"); - printf (" \tHDR TIFF EXR MPEG AVICODEC QUICKTIME CINEON DPX DDS\n"); + printf (" \tHDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS\n"); printf (" -x \tSet option to add the file extension to the end of the file.\n"); printf (" -t \tUse amount of for rendering\n"); /*Add these later - Campbell*/ @@ -674,9 +674,10 @@ int main(int argc, char **argv) else if (!strcmp(argv[a],"QUICKTIME")) G.scene->r.imtype = R_QUICKTIME; else if (!strcmp(argv[a],"BMP")) G.scene->r.imtype = R_BMP; else if (!strcmp(argv[a],"HDR")) G.scene->r.imtype = R_RADHDR; - else if (!strcmp(argv[a],"TIFF")) G.scene->r.imtype = R_IRIS; + else if (!strcmp(argv[a],"TIFF")) G.scene->r.imtype = R_TIFF; #ifdef WITH_OPENEXR else if (!strcmp(argv[a],"EXR")) G.scene->r.imtype = R_OPENEXR; + else if (!strcmp(argv[a],"MULTILAYER")) G.scene->r.imtype = R_MULTILAYER; #endif else if (!strcmp(argv[a],"MPEG")) G.scene->r.imtype = R_FFMPEG; else if (!strcmp(argv[a],"FRAMESERVER")) G.scene->r.imtype = R_FRAMESERVER; -- cgit v1.2.3 From 69e6a6cbc9cfdae6804d538cb4810672c5318d48 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 11 Feb 2008 13:30:52 +0000 Subject: Pointcache: Fixed non-availability when blend file was loaded from command line and also another case where you startet from an unsaved blend and switched to a saved one; Cloth: Fixid mass init, little speedup for collisions; Collision Modifier: More generalized it --- source/creator/creator.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 4dd1350ea48..3918e29b9bf 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -759,8 +759,12 @@ int main(int argc, char **argv) } if (G.background) { - BKE_read_file(filename, NULL); + int retval = BKE_read_file(filename, NULL); sound_initialize_sounds(); + + /*we successfully loaded a blend file, get sure that + pointcache works */ + if (retval!=0) G.relbase_valid = 1; /* happens for the UI on file reading too */ BKE_reset_undo(); -- cgit v1.2.3 From bc9848f7e67c3e695403179f8bcdb78b0e5764a3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Feb 2008 13:55:22 +0000 Subject: Added a global string to be used for the tempdir. since the user preference is not loaded in background mode and the user preference is not validated and has no fallback. 'btempdir' is set with BLI_where_is_temp() - This tries to use U.tempdir but falls back to $TEMP or /tmp/ --- source/creator/creator.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 3918e29b9bf..d4a0bb49614 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -128,7 +128,7 @@ extern void winlay_process_events(int wait_for_event); extern int pluginapi_force_ref(void); /* from blenpluginapi:pluginapi.c */ char bprogname[FILE_MAXDIR+FILE_MAXFILE]; /* from blenpluginapi:pluginapi.c */ - +char btempdir[FILE_MAXDIR+FILE_MAXFILE]; /* Initialise callbacks for the modules that need them */ void setCallbacks(void); @@ -317,7 +317,7 @@ int main(int argc, char **argv) // need this. BLI_where_am_i(bprogname, argv[0]); - + /* Hack - force inclusion of the plugin api functions, * see blenpluginapi:pluginapi.c */ @@ -490,12 +490,16 @@ int main(int argc, char **argv) * added note (ton): i removed it altogether */ - BIF_init(); + BIF_init(); /* loads .B.blend */ + + BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */ } else { BPY_start_python(argc, argv); + BLI_where_is_temp( btempdir, 0 ); /* call after loading the .B.blend so we can read U.tempdir */ + // (ton) Commented out. I have no idea whats thisfor... will mail around! // SYS_WriteCommandLineInt(syshandle,"noaudio",1); // audio = 0; -- cgit v1.2.3 From 82d769c79f5e18b5b33030c188e3b2b93f9a346b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Feb 2008 22:23:21 +0000 Subject: automatic threads, next to the Threads button, so you can set threads to use whatever the system has, useful in the studio with 2,4,8 core systems when sharing files. --- source/creator/creator.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index d4a0bb49614..ab6f9681978 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -200,15 +200,8 @@ static void print_help(void) printf (" (formats that can be compiled into blender, not available on all systems)\n"); printf (" \tHDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS\n"); printf (" -x \tSet option to add the file extension to the end of the file.\n"); - printf (" -t \tUse amount of for rendering\n"); - /*Add these later - Campbell*/ - /* - printf (" -colorchannel \tColors to save, valid types are: BW RGB RGBA \n"); - printf (" -compression \t Use with EXR format, valid types are..\n"); - printf (" \tZIP Pxr24 PIZ RLE\n"); - printf (" -zbuf \tUse with EXR format, set the zbuf save option\n"); - printf (" -halffloat \tUse with EXR format, set the half float option\n"); - printf (" -preview \tUse with EXR format, save a jpeg for viewing as well as the EXR\n");*/ + printf (" -t \tUse amount of for rendering.\n"); + printf (" [1-8], 0 for systems processor count.\n"); printf ("\nAnimation playback options:\n"); printf (" -a \tPlayback , only operates this way when -b is not used.\n"); printf (" -p \tOpen with lower left corner at , \n"); -- cgit v1.2.3 From a2ce30a90845750589239dc8862d089220342893 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 28 Feb 2008 21:27:48 +0000 Subject: changing default SDL audio driver for linux to alsa since its default in 2.6 kernel's and many users report problems if they dont specifically set it to alsa. --- source/creator/creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index ab6f9681978..d9099334afd 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -298,7 +298,7 @@ int main(int argc, char **argv) signal (SIGFPE, fpe_handler); #else if ( getenv("SDL_AUDIODRIVER") == NULL) { - setenv("SDL_AUDIODRIVER", "dma", 1); + setenv("SDL_AUDIODRIVER", "alsa", 1); } #endif #endif -- cgit v1.2.3 From 2455cf7f13d5542c90496e3c2f9af309aa85d22f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 2 Mar 2008 22:09:40 +0000 Subject: blenders window argument -w / -W didnt use the last argument as command line arg should. --- source/creator/creator.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index d9099334afd..4d8b63f18f0 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -438,13 +438,6 @@ int main(int argc, char **argv) break; case 'w': - /* XXX, fixme zr, with borders */ - /* there probably is a better way to do - * this, right now do as if blender was - * called with "-p 0 0 xres yres" -- sgefant - */ - winlay_get_screensize(&sizx, &sizy); - setprefsize(0, 0, sizx, sizy, 1); G.windowstate = G_WINDOWSTATE_BORDER; break; case 'W': @@ -475,6 +468,16 @@ int main(int argc, char **argv) } } + /* XXX, fixme zr, with borders */ + /* there probably is a better way to do + * this, right now do as if blender was + * called with "-p 0 0 xres yres" -- sgefant + */ + if (G.windowstate == G_WINDOWSTATE_BORDER) { + winlay_get_screensize(&sizx, &sizy); + setprefsize(0, 0, sizx, sizy, 1); + } + BPY_start_python(argc, argv); /** -- cgit v1.2.3 From 54daccda76289f14d94b372bf70e48e37aac8adc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 3 Mar 2008 08:55:45 +0000 Subject: updated the notes for blenders help message --- source/creator/creator.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 4d8b63f18f0..6a6228bcd3d 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -174,20 +174,14 @@ static void print_version(void) static void print_help(void) { printf ("Blender %d.%02d (sub %d) Build\n", G.version/100, G.version%100, BLENDER_SUBVERSION); - printf ("Usage: blender [options ...] [file]\n"); - printf ("Note: Arguments are executed in the order they are given. eg.\n"); - printf (" blender -b test.blend -f 1 -o /tmp\n"); - printf (" ...may not render to /tmp because '-f 1' renders before the output path is set\n"); - printf (" blender -b -o /tmp test.blend -f 1\n"); - printf (" ...may not render to /tmp because loading the blend file overwrites the output path that was set\n"); - printf (" \"blender -b test.blend -o /tmp -f 1\" works as expected.\n"); + printf ("Usage: blender [args ...] [file] [args ...]\n"); printf ("\nRender options:\n"); printf (" -b \tRender in background (doesn't load the user defaults .B.blend file)\n"); printf (" -a render frames from start to end (inclusive), only works when used after -b\n"); printf (" -S \tSet scene \n"); printf (" -f \tRender frame and save it\n"); - printf (" -s \tSet start to frame (use with -a)\n"); - printf (" -e \tSet end to frame (use with -a)\n"); + printf (" -s \tSet start to frame (use before the -a argument)\n"); + printf (" -e \tSet end to frame (use before the -a argument)\n"); printf (" -o \tSet the render path and file name.\n"); printf (" Use // at the start of the path to\n"); printf (" render relative to the blend file.\n"); @@ -232,6 +226,17 @@ static void print_help(void) printf (" -v\t\tPrint Blender version and exit\n"); printf (" --\t\tEnds option processing. Following arguments are \n"); printf (" \t\t passed unchanged. Access via Python's sys.argv\n"); + printf ("\nNote: Arguments must be seperated by white. eg:\n"); + printf (" \"blender -ba test.blend\"\n"); + printf (" ...will ignore the 'a'\n"); + printf (" \"blender -b test.blend -f8\"\n"); + printf (" ...will ignore 8 because there is no space between the -f and the frame value\n"); + printf ("Note: Arguments are executed in the order they are given. eg:\n"); + printf (" \"blender -b test.blend -f 1 -o /tmp\"\n"); + printf (" ...may not render to /tmp because '-f 1' renders before the output path is set\n"); + printf (" \"blender -b -o /tmp test.blend -f 1\"\n"); + printf (" ...may not render to /tmp because loading the blend file overwrites the output path that was set\n"); + printf (" \"blender -b test.blend -o /tmp -f 1\" works as expected.\n\n"); } -- cgit v1.2.3 From d6151609f97753fb17121a2009cc44b4f8df59c5 Mon Sep 17 00:00:00 2001 From: Stephen Swaney Date: Mon, 3 Mar 2008 13:34:31 +0000 Subject: Minor corrections to help message. --- source/creator/creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 6a6228bcd3d..ddcdeb0741d 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -226,7 +226,7 @@ static void print_help(void) printf (" -v\t\tPrint Blender version and exit\n"); printf (" --\t\tEnds option processing. Following arguments are \n"); printf (" \t\t passed unchanged. Access via Python's sys.argv\n"); - printf ("\nNote: Arguments must be seperated by white. eg:\n"); + printf ("\nNote: Arguments must be separated by white space. eg:\n"); printf (" \"blender -ba test.blend\"\n"); printf (" ...will ignore the 'a'\n"); printf (" \"blender -b test.blend -f8\"\n"); -- cgit v1.2.3 From a37009f582dd83a0422bd4009d521445f4f6c5c0 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Tue, 4 Mar 2008 18:31:57 +0000 Subject: Small change in the logic for -w -p The previous changes didn't quite work all the time. This should simplify things. Kent --- source/creator/creator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index ddcdeb0741d..7ca658978f9 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -427,7 +427,6 @@ int main(int argc, char **argv) a++; sizy= atoi(argv[a]); - setprefsize(stax, stay, sizx, sizy, 0); break; case 'd': G.f |= G_DEBUG; /* std output printf's */ @@ -448,6 +447,10 @@ int main(int argc, char **argv) case 'W': /* XXX, fixme zr, borderless on win32 */ /* now on all platforms as of 20070411 - DJC */ + winlay_get_screensize(&sizx, &sizy); + stax=0; + stay=0; + G.windowstate = G_WINDOWSTATE_FULLSCREEN; break; case 'R': @@ -478,10 +481,7 @@ int main(int argc, char **argv) * this, right now do as if blender was * called with "-p 0 0 xres yres" -- sgefant */ - if (G.windowstate == G_WINDOWSTATE_BORDER) { - winlay_get_screensize(&sizx, &sizy); - setprefsize(0, 0, sizx, sizy, 1); - } + setprefsize(stax, stay, sizx, sizy, 0); BPY_start_python(argc, argv); -- cgit v1.2.3 From b7bfa641ca52b852d885cb401a08fc904f5a5849 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Tue, 4 Mar 2008 18:38:18 +0000 Subject: I broke it for the case where -w and -W are not called. This should fix that up as well. Kent --- source/creator/creator.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 7ca658978f9..8562fc3d7d4 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -476,12 +476,8 @@ int main(int argc, char **argv) } } - /* XXX, fixme zr, with borders */ - /* there probably is a better way to do - * this, right now do as if blender was - * called with "-p 0 0 xres yres" -- sgefant - */ - setprefsize(stax, stay, sizx, sizy, 0); + if ( (G.windowstate == G_WINDOWSTATE_BORDER) || (G.windowstate == G_WINDOWSTATE_FULLSCREEN)) + setprefsize(stax, stay, sizx, sizy, 0); BPY_start_python(argc, argv); -- cgit v1.2.3 From db85f0f39a38366ba55df5a27906bff8e87395d7 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 5 Mar 2008 03:59:44 +0000 Subject: * Patch by Leandro Inocencio (cesio) to redraw Action Editor after hiding/unhiding bones * Fixes for compiler warnings --- source/creator/creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 8562fc3d7d4..a23a59ccba0 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -245,7 +245,7 @@ extern void winlay_get_screensize(int *width_r, int *height_r); int main(int argc, char **argv) { - int a, i, stax, stay, sizx, sizy; + int a, i, stax=0, stay=0, sizx, sizy; SYS_SystemHandle syshandle; Scene *sce; -- cgit v1.2.3 From 2e030000d14a03a76a1eaa716483f8b57fcdc0af Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 5 Mar 2008 11:42:40 +0000 Subject: Bugfix: recent command line changes broke running with ./blender -w, was using uninitialized variables. --- source/creator/creator.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index a23a59ccba0..7b2651ba10a 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -442,6 +442,10 @@ int main(int argc, char **argv) break; case 'w': + winlay_get_screensize(&sizx, &sizy); + stax=0; + stay=0; + G.windowstate = G_WINDOWSTATE_BORDER; break; case 'W': -- cgit v1.2.3 From 18fc43950d84995c7433295e8dfce065dc08ae67 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Wed, 5 Mar 2008 21:11:24 +0000 Subject: I didn't get any comments so I'm assuming its a good idea. This makes it so the following are equal. blender -w -p 0 0 500 500 blender -p 0 0 500 500 -w Just move initalization for full screen to before the loop starts. so it doesn't matter where a -p shows up to override fullscreen. Kent --- source/creator/creator.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 7b2651ba10a..b7a756949f1 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -409,6 +409,10 @@ int main(int argc, char **argv) init_def_material(); + winlay_get_screensize(&sizx, &sizy); + stax=0; + stay=0; + if(G.background==0) { for(a=1; a Date: Fri, 28 Mar 2008 14:55:49 +0000 Subject: This is patch: [#8766] Scons build does not take into account WITH_BF_OPENEXR for source/creator Submitted By: Stephane SOPPERA Fixes -F EXR on the commandline... Kent --- source/creator/SConscript | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/creator') diff --git a/source/creator/SConscript b/source/creator/SConscript index 833b56eccd8..cac9e895a97 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -19,4 +19,7 @@ if env['WITH_BF_BINRELOC']==1: incs += ' ../../extern/binreloc/include' defs.append('WITH_BINRELOC') +if env['WITH_BF_OPENEXR']==1: + defs.append('WITH_OPENEXR') + env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 ) -- cgit v1.2.3 From 188687208968d95e57c6560f28da7b76aac1d574 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 12 Apr 2008 10:55:10 +0000 Subject: simple fix for "Unable to make version backup" warning when saving files. missing a return. For *nix sustems, recent physics pointcache refactor uses stdio.h's remove() rather then system("rm -f ...") for removing files, since it was a lot slower for removing pointcache. Ton used the system command because there was some problem using remove() ~6years back, but he cant remember why, (maybe its not a problem now) Simple error, remove wasn't returning a value, but keep an eye out for problems removing files, and if anyone can reproduce the "Unable to make version backup" problem when saving, we should look into it. Also added a note about using # in the output path for blenders command line help text. --- source/creator/creator.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index b7a756949f1..806a8c108c0 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -185,6 +185,10 @@ static void print_help(void) printf (" -o \tSet the render path and file name.\n"); printf (" Use // at the start of the path to\n"); printf (" render relative to the blend file.\n"); + printf (" The # characters are replaced by the frame number, and used to define zero padding.\n"); + printf (" ani_##_test.png becomes ani_01_test.png\n"); + printf (" test-######.png becomes test-000001.png\n"); + printf (" When the filename has no #, The suffix #### is added to the filename\n"); printf (" The frame number will be added at the end of the filename.\n"); printf (" eg: blender -b foobar.blend -o //render_ -F PNG -x 1 -a\n"); printf ("\nFormat options:\n"); -- cgit v1.2.3 From e17b13d9d283bcf2536fb49c86252cb04f3170fc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 12 Apr 2008 22:17:23 +0000 Subject: Made octree size always available since its used for baking. Documented obscure environment variables --- source/creator/creator.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 806a8c108c0..a1d837d5b6b 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -230,6 +230,18 @@ static void print_help(void) printf (" -v\t\tPrint Blender version and exit\n"); printf (" --\t\tEnds option processing. Following arguments are \n"); printf (" \t\t passed unchanged. Access via Python's sys.argv\n"); + printf ("\nEnironment Variables:\n"); + printf (" $HOME\t\t\tStore files such as .blender/ .B.blend .Bfs .Blog here.\n"); +#ifdef WIN32 + printf (" $TEMP\t\tStore temporary files here.\n"); +#else + printf (" $TMP or $TMPDIR\tStore temporary files here.\n"); + printf (" $SDL_AUDIODRIVER\tLibSDL audio driver - alsa, esd, alsa, dma.\n"); + printf (" $BF_TIFF_LIB\t\tUse an alternative libtiff.so for loading tiff image files.\n"); +#endif + printf (" $IMAGEEDITOR\t\tImage editor executable, launch with the IKey from the file selector.\n"); + printf (" $WINEDITOR\t\tText editor executable, launch with the EKey from the file selector.\n"); + printf (" $PYTHONHOME\t\tPath to the python directory, eg. /usr/lib/python.\n"); printf ("\nNote: Arguments must be separated by white space. eg:\n"); printf (" \"blender -ba test.blend\"\n"); printf (" ...will ignore the 'a'\n"); -- cgit v1.2.3 From 5d0a207ecb843c4c73be897cfccbf3a0d2db574b Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 16 Apr 2008 22:40:48 +0000 Subject: Patch from GSR that a) fixes a whole bunch of GPL/BL license blocks that were previously missed; and b) greatly increase my ohloh stats! --- source/creator/CMakeLists.txt | 9 +++------ source/creator/Makefile | 9 +++------ source/creator/buildinfo.c | 9 +++------ source/creator/creator.c | 9 +++------ 4 files changed, 12 insertions(+), 24 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 2b566d77a29..ab6f7632636 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -1,13 +1,10 @@ # $Id$ -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,7 +22,7 @@ # # Contributor(s): Jacques Beaurain. # -# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# ***** END GPL LICENSE BLOCK ***** SETUP_LIBDIRS() diff --git a/source/creator/Makefile b/source/creator/Makefile index a7f2dfeecb6..8a0d20264ea 100644 --- a/source/creator/Makefile +++ b/source/creator/Makefile @@ -1,15 +1,12 @@ # # $Id$ # -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +24,7 @@ # # Contributor(s): none yet. # -# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# ***** END GPL LICENSE BLOCK ***** # LIBNAME = creator diff --git a/source/creator/buildinfo.c b/source/creator/buildinfo.c index 69d3b090086..e25caa34f46 100644 --- a/source/creator/buildinfo.c +++ b/source/creator/buildinfo.c @@ -1,15 +1,12 @@ /* * $Id$ * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +24,7 @@ * * Contributor(s): none yet. * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** + * ***** END GPL LICENSE BLOCK ***** */ #ifdef HAVE_CONFIG_H diff --git a/source/creator/creator.c b/source/creator/creator.c index a1d837d5b6b..7607d1026f8 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1,15 +1,12 @@ /* * $Id$ * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +24,7 @@ * * Contributor(s): none yet. * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** + * ***** END GPL LICENSE BLOCK ***** */ #include #include -- cgit v1.2.3 From da3c44958e7264d2cb7cd98615b4d1d05cc02a96 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 Apr 2008 14:10:40 +0000 Subject: Bugfix for [#8962] Blender crashes on joining meshes with python blenders screen needs initializing before running python scripts when not in background mode. --- source/creator/creator.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 7607d1026f8..24cdfe88940 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -256,9 +256,20 @@ static void print_help(void) double PIL_check_seconds_timer(void); extern void winlay_get_screensize(int *width_r, int *height_r); +static void main_init_screen( void ) +{ + setscreen(G.curscreen); + + if(G.main->scene.first==0) { + set_scene( add_scene("1") ); + } + + screenmain(); +} + int main(int argc, char **argv) { - int a, i, stax=0, stay=0, sizx, sizy; + int a, i, stax=0, stay=0, sizx, sizy, scr_init = 0; SYS_SystemHandle syshandle; Scene *sce; @@ -649,7 +660,14 @@ int main(int argc, char **argv) break; case 'P': a++; - if (a < argc) BPY_run_python_script (argv[a]); + if (a < argc) { + /* If we're not running in background mode, then give python a valid screen */ + if ((G.background==0) && (scr_init==0)) { + main_init_screen(); + scr_init = 1; + } + BPY_run_python_script (argv[a]); + } else printf("\nError: you must specify a Python script after '-P '.\n"); break; case 'o': @@ -794,16 +812,11 @@ int main(int argc, char **argv) /* actually incorrect, but works for now (ton) */ exit_usiblender(); } - - setscreen(G.curscreen); - - if(G.main->scene.first==0) { - sce= add_scene("1"); - set_scene(sce); + + if (scr_init==0) { + main_init_screen(); } - screenmain(); - return 0; } /* end of int main(argc,argv) */ -- cgit v1.2.3 From be0b8ccfaaa98118468c8fec971792ab1123eaca Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 Apr 2008 21:14:55 +0000 Subject: Used GET_INT_FROM_POINTER to get rid of many warnings that only occurred with 64bit os's Also use Py_ssize_t which we might need to define for older python's --- source/creator/creator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 24cdfe88940..e91705345c6 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -227,7 +227,7 @@ static void print_help(void) printf (" -v\t\tPrint Blender version and exit\n"); printf (" --\t\tEnds option processing. Following arguments are \n"); printf (" \t\t passed unchanged. Access via Python's sys.argv\n"); - printf ("\nEnironment Variables:\n"); + printf ("\nEnvironment Variables:\n"); printf (" $HOME\t\t\tStore files such as .blender/ .B.blend .Bfs .Blog here.\n"); #ifdef WIN32 printf (" $TEMP\t\tStore temporary files here.\n"); @@ -271,7 +271,6 @@ int main(int argc, char **argv) { int a, i, stax=0, stay=0, sizx, sizy, scr_init = 0; SYS_SystemHandle syshandle; - Scene *sce; #if defined(WIN32) || defined (__linux__) int audio = 1; -- cgit v1.2.3 From 003b7cc1fe03cac055a61ec67c9fee638dbb4c1a Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Thu, 24 Apr 2008 19:18:46 +0000 Subject: == cmake win32 == - fixed CMAKE files for Win32 for new ffmpeg libs - ignore libc in debug build. TODO: debug build with OpenEXR still fails with unresolved externals due to /MTd flag. --- source/creator/CMakeLists.txt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index ab6f7632636..05c58a258ec 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -172,18 +172,14 @@ IF(WIN32) POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avcodec-51.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avformat-51.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avformat-52.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avdevice-52.dll\" \"$\(TargetDir\)\\\" COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avutil-49.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libdts.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaac.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaad.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libgsm.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaac-0.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaad-0.dll\" \"$\(TargetDir\)\\\" COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libmp3lame-0.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libogg-0.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libvorbis-0.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libvorbisenc-2.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libx264-54.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\postproc-51.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libx264-59.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\swscale-0.dll\" \"$\(TargetDir\)\\\" COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\xvidcore.dll\" \"$\(TargetDir\)\\\" ) ENDIF(WITH_FFMPEG) -- cgit v1.2.3 From db18b47be53d997e95f7f0d3ba796c0b1b4133b5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 27 Apr 2008 11:37:57 +0000 Subject: fix for own error when trying to fix python command line crash, was calling screenmain() before executing the python script which meant it was never executed (therefore no crash :) ) Moved screenmain() back to the the end of main() and added a TESTBASELIB_BGMODE which checks for G.vd and uses the scene layer if its not there. Of course python should not be running stuff that uses G.vd :/ Also made python scripts stay attached to screens when LOAD UI is disabled. This means you can load a new blend file and the python console can stay open, has been tested for a while in the apricot branch. --- source/creator/creator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index e91705345c6..2fd3a482a27 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -263,8 +263,6 @@ static void main_init_screen( void ) if(G.main->scene.first==0) { set_scene( add_scene("1") ); } - - screenmain(); } int main(int argc, char **argv) @@ -815,6 +813,8 @@ int main(int argc, char **argv) if (scr_init==0) { main_init_screen(); } + + screenmain(); /* main display loop */ return 0; } /* end of int main(argc,argv) */ -- cgit v1.2.3 From c0d981f6db057fbe8c5a9483382bab1e20572e38 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 May 2008 18:57:24 +0000 Subject: patches [#10529] -p command line option fix [#8844] Glossy controls Python API --- source/creator/creator.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 2fd3a482a27..a4588bb4597 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -451,6 +451,7 @@ int main(int argc, char **argv) sizx= atoi(argv[a]); a++; sizy= atoi(argv[a]); + G.windowstate = G_WINDOWSTATE_BORDER; break; case 'd': -- cgit v1.2.3 From 652ee1e31baa52c8e504bfcf3759ea94c7f5ab66 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 1 Jun 2008 16:13:04 +0000 Subject: functionality fix Originally the only way to run scripts automatically was with scriptlinks, which could be disabled for loading untrusted blend files. Since then PyDrivers and PyConstraints would run even when G.f&G_DOSCRIPTLINKS was disabled. Gensher, Theeth and Ianwill agree its acceptable to reuse the flag for other areas python runs automatically. PyNodes still have no way to be disabled, (todo before 2.46a) --- source/creator/creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index a4588bb4597..2e6b5d7353e 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -219,7 +219,7 @@ static void print_help(void) printf (" -d\t\tTurn debugging on\n"); printf (" -noaudio\tDisable audio on systems that support audio\n"); printf (" -h\t\tPrint this help text\n"); - printf (" -y\t\tDisable script links, use -Y to find out why its -y\n"); + printf (" -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n"); printf (" -P \tRun the given Python script (filename or Blender Text)\n"); #ifdef WIN32 printf (" -R\t\tRegister .blend extension\n"); -- cgit v1.2.3 From 272a91f754fd215f2ad9b48ba80fe56ee0564d7a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 17 Jun 2008 10:27:34 +0000 Subject: Merge of apricot branch game engine changes into trunk, excluding GLSL. GLEW ==== Added the GLEW opengl extension library into extern/, always compiled into Blender now. This is much nicer than doing this kind of extension management manually, and will be used in the game engine, for GLSL, and other opengl extensions. * According to the GLEW website it works on Windows, Linux, Mac OS X, FreeBSD, Irix, and Solaris. There might still be platform specific issues due to this commit, so let me know and I'll look into it. * This means also that all extensions will now always be compiled in, regardless of the glext.h on the platform where compilation happens. Game Engine =========== Refactoring of the use of opengl extensions and other drawing code in the game engine, and cleaning up some hacks related to GLSL integration. These changes will be merged into trunk too after this. The game engine graphics demos & apricot level survived my tests, but this could use some good testing of course. For users: please test with the options "Generate Display Lists" and "Vertex Arrays" enabled, these should be the fastest and are supposed to be "unreliable", but if that's the case that's probably due to bugs that can be fixed. * The game engine now also uses GLEW for extensions, replacing the custom opengl extensions code that was there. Removes a lot of #ifdef's, but the runtime checks stay of course. * Removed the WITHOUT_GLEXT environment variable. This was added to work around a specific bug and only disabled multitexturing anyway. It might also have caused a slowdown since it was retrieving the environment variable for every vertex in immediate mode (bug #13680). * Refactored the code to allow drawing skinned meshes with vertex arrays too, removing some specific immediate mode drawing functions for this that only did extra normal calculation. Now it always splits vertices of flat faces instead. * Refactored normal recalculation with some minor optimizations, required for the above change. * Removed some outdated code behind the __NLA_OLDDEFORM #ifdef. * Fixed various bugs in setting of multitexture coordinates and vertex attributes for vertex arrays. These were not being enabled/disabled correct according to the opengl spec, leading to crashes. Also tangent attributes used an immediate mode call for vertex arrays, which can't work. * Fixed use of uninitialized variable in RAS_TexVert. * Exporting skinned meshes was doing O(n^2) lookups for vertices and deform weights, now uses same trick as regular meshes. --- source/creator/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 05c58a258ec..d17b94c631d 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -259,6 +259,7 @@ IF(UNIX) blender_python bf_quicktime extern_binreloc + extern_glew ) FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) -- cgit v1.2.3 From 8b9503e0ecb9c1f524278df0fafda409425b21da Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 23 Jun 2008 16:47:15 +0000 Subject: bugfix [#14796] -t command line switch doesn't work unless FIXED_THREADS has previously been turned on Command line threads now override blendfile setting in background mode. Command line Threads greater then 8 are now clamped. --- source/creator/creator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 2e6b5d7353e..9589f1e3e94 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -195,7 +195,7 @@ static void print_help(void) printf (" (formats that can be compiled into blender, not available on all systems)\n"); printf (" \tHDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS\n"); printf (" -x \tSet option to add the file extension to the end of the file.\n"); - printf (" -t \tUse amount of for rendering.\n"); + printf (" -t \tUse amount of for rendering (background mode only).\n"); printf (" [1-8], 0 for systems processor count.\n"); printf ("\nAnimation playback options:\n"); printf (" -a \tPlayback , only operates this way when -b is not used.\n"); @@ -723,6 +723,8 @@ int main(int argc, char **argv) a++; if(G.background) { RE_set_max_threads(atoi(argv[a])); + } else { + printf("Warning: threads can only be set in background mode\n"); } break; case 'x': /* extension */ -- cgit v1.2.3 From 8a295553f7fef22b67e3cb3be4d9881cfadedafc Mon Sep 17 00:00:00 2001 From: Willian Padovani Germano Date: Sat, 26 Jul 2008 22:00:26 +0000 Subject: == Python scriptlinks == Render/postrender events were missing from bg rendering (and also from rendering called inside scripts). Found this because of bug #17389, the code to prevent race conditions with pynodes is currently inside BPY_do_all_scripts (that runs scriptlinks) and so was not being called in bg mode or rendering via scripts. http://projects.blender.org/tracker/?func=detail&atid=125&aid=17389&group_id=9 --- source/creator/creator.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 9589f1e3e94..e17b0f66977 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -618,8 +618,23 @@ int main(int argc, char **argv) if (G.scene) { if (a < argc) { int frame= MIN2(MAXFRAME, MAX2(1, atoi(argv[a]))); + int slink_flag= 0; Render *re= RE_NewRender(G.scene->id.name); + + if (G.f & G_DOSCRIPTLINKS) { + BPY_do_all_scripts(SCRIPT_RENDER); + /* avoid FRAMECHANGED slink event + * (should only be triggered in anims): */ + G.f &= ~G_DOSCRIPTLINKS; + slink_flag= 1; + } + RE_BlenderAnim(re, G.scene, frame, frame); + + if (slink_flag) { + G.f |= G_DOSCRIPTLINKS; + BPY_do_all_scripts(SCRIPT_POSTRENDER); + } } } else { printf("\nError: no blend loaded. cannot use '-f'.\n"); @@ -628,7 +643,14 @@ int main(int argc, char **argv) case 'a': if (G.scene) { Render *re= RE_NewRender(G.scene->id.name); + + if (G.f & G_DOSCRIPTLINKS) + BPY_do_all_scripts(SCRIPT_RENDER); + RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra); + + if (G.f & G_DOSCRIPTLINKS) + BPY_do_all_scripts(SCRIPT_POSTRENDER); } else { printf("\nError: no blend loaded. cannot use '-a'.\n"); } -- cgit v1.2.3 From cb89decfdcf5e6b2f26376d416633f4ccf0c532d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 4 Sep 2008 20:51:28 +0000 Subject: Merge of first part of changes from the apricot branch, especially the features that are needed to run the game. Compile tested with scons, make, but not cmake, that seems to have an issue not related to these changes. The changes include: * GLSL support in the viewport and game engine, enable in the game menu in textured draw mode. * Synced and merged part of the duplicated blender and gameengine/ gameplayer drawing code. * Further refactoring of game engine drawing code, especially mesh storage changed a lot. * Optimizations in game engine armatures to avoid recomputations. * A python function to get the framerate estimate in game. * An option take object color into account in materials. * An option to restrict shadow casters to a lamp's layers. * Increase from 10 to 18 texture slots for materials, lamps, word. An extra texture slot shows up once the last slot is used. * Memory limit for undo, not enabled by default yet because it needs the .B.blend to be changed. * Multiple undo for image painting. * An offset for dupligroups, so not all objects in a group have to be at the origin. --- source/creator/CMakeLists.txt | 3 +++ source/creator/Makefile | 2 ++ source/creator/SConscript | 2 +- source/creator/creator.c | 8 ++++---- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index d17b94c631d..04219ac5868 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -37,8 +37,10 @@ INCLUDE_DIRECTORIES(../../intern/guardedalloc ../blender/render/extern/include ../blender/python ../blender/makesdna + ../blender/gpu ../kernel/gen_messaging ../kernel/gen_system + ../../extern/glew/include ) @@ -210,6 +212,7 @@ IF(UNIX) blender_python bf_blenkernel bf_nodes + bf_gpu bf_blenloader bf_blenpluginapi bf_imbuf diff --git a/source/creator/Makefile b/source/creator/Makefile index 8a0d20264ea..158aee1a647 100644 --- a/source/creator/Makefile +++ b/source/creator/Makefile @@ -49,9 +49,11 @@ CPPFLAGS += -I../blender/renderconverter CPPFLAGS += -I../blender/blenkernel CPPFLAGS += -I../blender/python CPPFLAGS += -I../blender/blenloader +CPPFLAGS += -I../blender/gpu CPPFLAGS += -I../kernel/gen_system CPPFLAGS += -I../kernel/gen_messaging CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include +CPPFLAGS += -I$(NAN_GLEW)/include ifeq ($(WITH_QUICKTIME), true) CPPFLAGS += -I$(NAN_QUICKTIME)/include -DWITH_QUICKTIME diff --git a/source/creator/SConscript b/source/creator/SConscript index cac9e895a97..a4c218f89d6 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -7,7 +7,7 @@ incs = '#/intern/guardedalloc ../blender/blenlib ../blender/blenkernel' incs += ' ../blender/include ../blender/blenloader ../blender/imbuf' incs += ' ../blender/renderconverter ../blender/render/extern/include' incs += ' ../blender/python ../blender/makesdna ../kernel/gen_messaging' -incs += ' ../kernel/gen_system' +incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu' incs += ' ' + env['BF_OPENGL_INC'] defs = [] diff --git a/source/creator/creator.c b/source/creator/creator.c index e17b0f66977..ec87cdd8cf7 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -70,14 +70,14 @@ #include "BLO_writefile.h" #include "BLO_readfile.h" -#include "BDR_drawmesh.h" - #include "IMB_imbuf.h" // for quicktime_init #include "BPY_extern.h" #include "RE_pipeline.h" +#include "GPU_draw.h" + #include "playanim_ext.h" #include "mydevice.h" #include "nla.h" @@ -600,12 +600,12 @@ int main(int argc, char **argv) /* doMipMap */ if (!strcmp(argv[a],"nomipmap")) { - set_mipmap(0); //doMipMap = 0; + GPU_set_mipmap(0); //doMipMap = 0; } /* linearMipMap */ if (!strcmp(argv[a],"linearmipmap")) { - set_linear_mipmap(1); //linearMipMap = 1; + GPU_set_linear_mipmap(1); //linearMipMap = 1; } -- cgit v1.2.3 From d111983064296dc9dd2c1b3f1735efd38f95c9d1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 14 Sep 2008 03:51:51 +0000 Subject: Fix for bug #5758 and #17585: armatures with IK constraint did not work in the game player, now the IK lib is linked into the player. Makefiles/Scons/CMake buildsystems have been updated. Fix materials nodes to work in the game player. --- source/creator/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 04219ac5868..93cc0e8afb5 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -191,7 +191,7 @@ ADD_DEPENDENCIES(blender makesdna) FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS) -SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity blender_IK bf_elbeem) +SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity bf_elbeem) IF(CMAKE_SYSTEM_NAME MATCHES "Linux") SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc) @@ -226,7 +226,7 @@ IF(UNIX) bf_decimation bf_elbeem bf_yafray - blender_IK + bf_IK bf_memutil bf_guardedalloc blender_CTR -- cgit v1.2.3 From ac86c04401686a9d119ea84ad489ca3db7403e5c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 15 Sep 2008 01:32:53 +0000 Subject: added BLI_convertstringcwd, used so command line blendfiles and python scripts can be relative to the current path. - was alredy doing this for blendfiles, but better to have in its own function. header_text.c - renamed PATH_MAX, was defined by system includes. --- source/creator/creator.c | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index ec87cdd8cf7..bdd16dc6bed 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -772,44 +772,10 @@ int main(int argc, char **argv) else { /* Make the path absolute because its needed for relative linked blends to be found */ - int abs = 0; - int filelen; - char cwd[FILE_MAXDIR + FILE_MAXFILE]; char filename[FILE_MAXDIR + FILE_MAXFILE]; - cwd[0] = filename[0] = '\0'; BLI_strncpy(filename, argv[a], sizeof(filename)); - filelen = strlen(filename); - - /* relative path checks, could do more tests here... */ -#ifdef WIN32 - /* Account for X:/ and X:\ - should be enough */ - if (filelen >= 3 && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/')) - abs = 1; -#else - if (filelen >= 2 && filename[0] == '/') - abs = 1 ; -#endif - if (!abs) { - BLI_getwdN(cwd); /* incase the full path to the blend isnt used */ - - if (cwd[0] == '\0') { - printf( - "Could not get the current working directory - $PWD for an unknown reason.\n\t" - "Relative linked files will not load if the entire blend path is not used.\n\t" - "The 'Play' button may also fail.\n" - ); - } else { - /* uses the blend path relative to cwd important for loading relative linked files. - * - * cwd should contain c:\ etc on win32 so the relbase can be NULL - * relbase being NULL also prevents // being misunderstood as relative to the current - * blend file which isnt a feature we want to use in this case since were dealing - * with a path from the command line, rather then from inside Blender */ - - BLI_make_file_string(NULL, filename, cwd, argv[a]); - } - } + BLI_convertstringcwd(filename); if (G.background) { int retval = BKE_read_file(filename, NULL); -- cgit v1.2.3 From 9031ef3e8704526db94027f0311ba0b7613afd88 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 16 Sep 2008 02:58:33 +0000 Subject: Fix for bug #12028: background rendering on Mac OS X without a window manager did not work anymore since 2.46. --- source/creator/creator.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index bdd16dc6bed..f27dee946ed 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -267,7 +267,7 @@ static void main_init_screen( void ) int main(int argc, char **argv) { - int a, i, stax=0, stay=0, sizx, sizy, scr_init = 0; + int a, i, stax, stay, sizx, sizy, scr_init = 0; SYS_SystemHandle syshandle; #if defined(WIN32) || defined (__linux__) @@ -301,10 +301,10 @@ int main(int argc, char **argv) setprefsize(left +10,scr_y - bottom +10,right-left -20,bottom - 64, 0); } else { - winlay_get_screensize(&scr_x, &scr_y); + winlay_get_screensize(&scr_x, &scr_y); - /* 40 + 684 + (headers) 22 + 22 = 768, the powerbook screen height */ - setprefsize(120, 40, 850, 684, 0); + /* 40 + 684 + (headers) 22 + 22 = 768, the powerbook screen height */ + setprefsize(120, 40, 850, 684, 0); } winlay_process_events(0); @@ -430,11 +430,11 @@ int main(int argc, char **argv) init_def_material(); - winlay_get_screensize(&sizx, &sizy); - stax=0; - stay=0; - if(G.background==0) { + winlay_get_screensize(&sizx, &sizy); + stax=0; + stay=0; + for(a=1; a Date: Thu, 18 Sep 2008 22:33:49 +0000 Subject: == Python Script Links == Bug #17599: Summary: Python constraints, good in 2.46 not working anymore in 2.47 http://projects.blender.org/tracker/?func=detail&atid=125&aid=17599&group_id=9 Improved my old hack to avoid frame changed scriptlinks from running when rendering stills, should fix this bug. It also causes REDRAW scriptlinks to be executed during renders, but that conforms to how FRAMECHANGED ones work. BTW: this can still be improved. The current system meant to disable all Python functionality at once needs imo to be replaced by one that allows to enable / disable per feature (scriptlinks, pyconstraints, pynodes, etc.). A better way to inform scriptlinks about what is going on (render, anim, render anim, etc.) would also help. Will discuss with others. --- source/creator/creator.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index f27dee946ed..ac81557110f 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -618,23 +618,14 @@ int main(int argc, char **argv) if (G.scene) { if (a < argc) { int frame= MIN2(MAXFRAME, MAX2(1, atoi(argv[a]))); - int slink_flag= 0; Render *re= RE_NewRender(G.scene->id.name); - if (G.f & G_DOSCRIPTLINKS) { - BPY_do_all_scripts(SCRIPT_RENDER); - /* avoid FRAMECHANGED slink event - * (should only be triggered in anims): */ - G.f &= ~G_DOSCRIPTLINKS; - slink_flag= 1; - } + if (G.f & G_DOSCRIPTLINKS) + BPY_do_all_scripts(SCRIPT_RENDER, 0); RE_BlenderAnim(re, G.scene, frame, frame); - if (slink_flag) { - G.f |= G_DOSCRIPTLINKS; - BPY_do_all_scripts(SCRIPT_POSTRENDER); - } + BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); } } else { printf("\nError: no blend loaded. cannot use '-f'.\n"); @@ -645,12 +636,12 @@ int main(int argc, char **argv) Render *re= RE_NewRender(G.scene->id.name); if (G.f & G_DOSCRIPTLINKS) - BPY_do_all_scripts(SCRIPT_RENDER); + BPY_do_all_scripts(SCRIPT_RENDER, 1); RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra); if (G.f & G_DOSCRIPTLINKS) - BPY_do_all_scripts(SCRIPT_POSTRENDER); + BPY_do_all_scripts(SCRIPT_POSTRENDER, 1); } else { printf("\nError: no blend loaded. cannot use '-a'.\n"); } -- cgit v1.2.3 From 4f737bafa7c5366a2bf4c69d6e2b1c77ff64c73b Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Fri, 19 Sep 2008 21:57:15 +0000 Subject: == Render == Commit patch #7788, allow to set the render step, so it's possible make render every N frames only. The step is change in Scene buttons (F10), below start and end frame buttons. Also add a command line options (-j), so it's possible to overwrite the file step (useful for renderfarm). [ Brecht, this work with OpenGL renders and simulated the skipped frames, please double check ] --- source/creator/creator.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index ac81557110f..dffa755b264 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -202,6 +202,7 @@ static void print_help(void) printf (" -p \tOpen with lower left corner at , \n"); printf (" -m\t\tRead from disk (Don't buffer)\n"); printf (" -f \t\tSpecify FPS to start with\n"); + printf (" -j \tSet frame step to \n"); printf ("\nWindow options:\n"); printf (" -w\t\tForce opening with borders (default)\n"); @@ -623,7 +624,7 @@ int main(int argc, char **argv) if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_RENDER, 0); - RE_BlenderAnim(re, G.scene, frame, frame); + RE_BlenderAnim(re, G.scene, frame, frame, G.scene->frame_step); BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); } @@ -638,7 +639,7 @@ int main(int argc, char **argv) if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_RENDER, 1); - RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra); + RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra, G.scene->frame_step); if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_POSTRENDER, 1); @@ -669,6 +670,15 @@ int main(int argc, char **argv) printf("\nError: no blend loaded. cannot use '-e'.\n"); } break; + case 'j': + a++; + if(G.scene) { + int fstep= MIN2(MAXFRAME, MAX2(1, atoi(argv[a]))); + if (a < argc) (G.scene->frame_step) = fstep; + } else { + printf("\nError: no blend loaded. cannot use '-j'.\n"); + } + break; case 'P': a++; if (a < argc) { -- cgit v1.2.3 From 6d7fe877674348a0a6a7e2edf869187369689c5e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 Sep 2008 08:41:11 +0000 Subject: binreloc include was wrong for make, removed last YESIAMSTUPID --- source/creator/CMakeLists.txt | 4 ---- source/creator/Makefile | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 93cc0e8afb5..99e8b576412 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -54,10 +54,6 @@ IF(LINUX) INCLUDE_DIRECTORIES(${BINRELOC_INC}) endif(LINUX) -IF(YESIAMSTUPID) - ADD_DEFINITIONS(-DYESIAMSTUPID) -ENDIF(YESIAMSTUPID) - MESSAGE(STATUS "Configuring blender") ADD_CUSTOM_COMMAND( diff --git a/source/creator/Makefile b/source/creator/Makefile index 158aee1a647..9273d943883 100644 --- a/source/creator/Makefile +++ b/source/creator/Makefile @@ -60,11 +60,7 @@ ifeq ($(WITH_QUICKTIME), true) endif ifeq ($(WITH_BINRELOC), true) - CPPFLAGS += -I$(OCGDIR)/extern/binreloc/include -DWITH_BINRELOC -endif - -ifeq ($(NAN_YESIAMSTUPID), true) - CPPFLAGS += -DYESIAMSTUPID + CPPFLAGS += -I$(NANBLENDERHOME)/extern/binreloc/include -DWITH_BINRELOC endif CPPFLAGS += -I$(OPENGL_HEADERS) -- cgit v1.2.3 From f8fb61f9fa0439cbdb6b43d79d82687692daea2f Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Sun, 28 Sep 2008 03:07:13 +0000 Subject: enable -noaudio option, so it actually works (and doesn't get overwritten by a game flag). audio initialization delays startup of game engine 2 seconds add -nojoystick commandline option: it takes 5 seconds everytime to start the game engine, while there IS no joystick. In other words: blender -noaudio -nojoystick improves workflow turnaround times for P - ESC from 7 seconds to 1 second! Improved Bullet soft body advanced options, still work-in-progress. Make sure to create game Bullet soft bodies from scratch, it is not compatible with last weeks builds. --- source/creator/creator.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index dffa755b264..8d46d1b130b 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -219,6 +219,7 @@ static void print_help(void) printf ("\nMisc options:\n"); printf (" -d\t\tTurn debugging on\n"); printf (" -noaudio\tDisable audio on systems that support audio\n"); + printf (" -nojoystick\tDisable joystick support\n"); printf (" -h\t\tPrint this help text\n"); printf (" -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n"); printf (" -P \tRun the given Python script (filename or Blender Text)\n"); @@ -493,6 +494,14 @@ int main(int argc, char **argv) audio = 0; if (G.f & G_DEBUG) printf("setting audio to: %d\n", audio); } + if (BLI_strcasecmp(argv[a], "-nojoystick") == 0) { + /** + don't initialize joysticks if user doesn't want to use joysticks + failed joystick initialization delays over 5 seconds, before game engine start + */ + SYS_WriteCommandLineInt(syshandle,"nojoystick",1); + if (G.f & G_DEBUG) printf("disabling nojoystick\n"); + } break; } } -- cgit v1.2.3 From 2a331067cc52693aa903a0487be29c93298c4b8b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 29 Sep 2008 17:08:11 +0000 Subject: resolve some compiler warnings with intel c/c++ compiler * subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later. * some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion. * removed unused vars * obscure python memory leak with colorband. * make_sample_tables had a loop running wasnt used. * if 0'd functions in arithb.c that are not used yet. * made many functions static --- source/creator/creator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 8d46d1b130b..84ee7c319f9 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -107,8 +107,8 @@ extern char * build_type; #endif /* Local Function prototypes */ -static void print_help(); -static void print_version(); +static void print_help(void); +static void print_version(void); /* defined in ghostwinlay and winlay, we can't include carbon here, conflict with DNA */ @@ -128,7 +128,7 @@ char bprogname[FILE_MAXDIR+FILE_MAXFILE]; /* from blenpluginapi:pluginapi.c */ char btempdir[FILE_MAXDIR+FILE_MAXFILE]; /* Initialise callbacks for the modules that need them */ -void setCallbacks(void); +static void setCallbacks(void); #if defined(__sgi) || defined(__alpha__) static void fpe_handler(int sig) @@ -831,7 +831,7 @@ static void mem_error_cb(char *errorStr) fflush(stderr); } -void setCallbacks(void) +static void setCallbacks(void) { /* Error output from the alloc routines: */ MEM_set_error_callback(mem_error_cb); -- cgit v1.2.3 From 13c8e189f61dbb342039d3811d3e80879c99f62c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 30 Sep 2008 05:05:50 +0000 Subject: WITH_ELBEEM diabled wasnt working with cmake --- source/creator/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 99e8b576412..5109fbc0930 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -187,7 +187,11 @@ ADD_DEPENDENCIES(blender makesdna) FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS) -SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity bf_elbeem) +SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity) + +IF(WITH_ELBEEM) + SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} bf_elbeem) +ENDIF(WITH_ELBEEM) IF(CMAKE_SYSTEM_NAME MATCHES "Linux") SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc) -- cgit v1.2.3 From 9cbb1745c2e149657f9d7a9988eccfc884f0bffc Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 8 Oct 2008 18:15:19 +0000 Subject: Bugfix #17784 libtiff init was missing on "Play anim", causing it to not read tiffs. --- source/creator/creator.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 84ee7c319f9..ab86c46dbdd 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -379,6 +379,10 @@ int main(int argc, char **argv) else if(argv[a][0] == '-') { switch(argv[a][1]) { case 'a': /* -b was not given, play an animation */ + + /* exception here, see below, it probably needs happens after qt init? */ + libtiff_init(); + playanim(argc-1, argv+1); exit(0); break; -- cgit v1.2.3 From 495eab6709807997b944068550108e99ad63e010 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 8 Oct 2008 19:56:41 +0000 Subject: Patch #7065, from Stephane SOPPERA, part one: define macro WITH_OPENEXR when the sources are configured with OpenEXR support. --- source/creator/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 5109fbc0930..d3c19f8f546 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -49,6 +49,10 @@ IF(WITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME) ENDIF(WITH_QUICKTIME) +IF(WITH_OPENEXR) + ADD_DEFINITIONS(-DWITH_OPENEXR) +ENDIF(WITH_OPENEXR) + IF(LINUX) ADD_DEFINITIONS(-DWITH_BINRELOC) INCLUDE_DIRECTORIES(${BINRELOC_INC}) -- cgit v1.2.3 From 890b9f26f717dd5f58533673873f9f663f4a9ee3 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 8 Oct 2008 19:58:57 +0000 Subject: Patch #7065, from Stephane SOPPERA, part two: improvements when using the commandline 'nmake' to build blender on windows -- please test! --- source/creator/CMakeLists.txt | 58 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 30 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index d3c19f8f546..c4b77f893fd 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -133,16 +133,16 @@ IF(WIN32) ADD_CUSTOM_COMMAND(TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND if not exist \"$\(TargetDir\)\\.blender\" mkdir \"$\(TargetDir\)\\.blender\" - COMMAND if not exist \"$\(TargetDir\)\\.blender\\locale\" mkdir \"$\(TargetDir\)\\.blender\\locale\" - COMMAND if not exist \"$\(TargetDir\)\\.blender\\scripts\" mkdir \"$\(TargetDir\)\\.blender\\scripts\" - COMMAND if not exist \"$\(TargetDir\)\\plugins\" mkdir \"$\(TargetDir\)\\plugins\" - COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" \"$\(TargetDir\)\\.blender\\\" - COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" \"$\(TargetDir\)\\.blender\\\" - COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" \"$\(TargetDir\)\\.blender\\locale\" - COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" \"$\(TargetDir\)\\.blender\\scripts\" - COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" \"$\(TargetDir\)\\plugins\" - COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" \"$\(TargetDir\)\" + COMMAND if not exist \"${TARGETDIR}\\.blender\" mkdir \"${TARGETDIR}\\.blender\" + COMMAND if not exist \"${TARGETDIR}\\.blender\\locale\" mkdir \"${TARGETDIR}\\.blender\\locale\" + COMMAND if not exist \"${TARGETDIR}\\.blender\\scripts\" mkdir \"${TARGETDIR}\\.blender\\scripts\" + COMMAND if not exist \"${TARGETDIR}\\plugins\" mkdir \"${TARGETDIR}\\plugins\" + COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\.blender\\\" + COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" \"${TARGETDIR}\\.blender\\\" + COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\.blender\\locale\" + COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" \"${TARGETDIR}\\.blender\\scripts\" + COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" \"${TARGETDIR}\\plugins\" + COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\" ) FILE(TO_NATIVE_PATH "${LIBDIR}" WIN_LIBDIR) @@ -150,22 +150,20 @@ IF(WIN32) ADD_CUSTOM_COMMAND(TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND copy /Y \"${WIN_LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\zlib\\lib\\zlib.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\tiff\\lib\\libtiff.dll\" \"$\(TargetDir\)\\\" - COMMAND if $\(ConfigurationName\)==Debug copy /Y \"${WIN_LIBDIR}\\python\\lib\\python25_D.dll\" \"$\(TargetDir\)\\\" - COMMAND if $\(ConfigurationName\)==Debug copy /Y \"${WIN_LIBDIR}\\CRTL\\lib\\msvcrtd.dll\" \"$\(TargetDir\)\\\" - COMMAND if NOT $\(ConfigurationName\)==Debug copy /Y \"${WIN_LIBDIR}\\python\\lib\\python25.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\tiff\\lib\\libtiff.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python25.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\" ) IF(WITH_INTERNATIONAL) ADD_CUSTOM_COMMAND(TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND copy /Y \"${WIN_LIBDIR}\\iconv\\lib\\iconv.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\iconv\\lib\\iconv.dll\" \"${TARGETDIR}\\\" ) ENDIF(WITH_INTERNATIONAL) @@ -173,16 +171,16 @@ IF(WIN32) ADD_CUSTOM_COMMAND(TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avcodec-51.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avformat-52.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avdevice-52.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avutil-49.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaac-0.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaad-0.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libmp3lame-0.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libx264-59.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\swscale-0.dll\" \"$\(TargetDir\)\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\xvidcore.dll\" \"$\(TargetDir\)\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avcodec-51.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avformat-52.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avdevice-52.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avutil-49.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaac-0.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaad-0.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libmp3lame-0.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libx264-59.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\swscale-0.dll\" \"${TARGETDIR}\\\" + COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\xvidcore.dll\" \"${TARGETDIR}\\\" ) ENDIF(WITH_FFMPEG) ENDIF(WIN32) -- cgit v1.2.3 From 84cf941c291de2c3d03f3125bc29de907d47f56c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 12 Oct 2008 18:32:26 +0000 Subject: Added a -noglsl option to disable GLSL from the command line. --- source/creator/creator.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index ab86c46dbdd..38c37575bd1 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -77,6 +77,7 @@ #include "RE_pipeline.h" #include "GPU_draw.h" +#include "GPU_extensions.h" #include "playanim_ext.h" #include "mydevice.h" @@ -220,6 +221,7 @@ static void print_help(void) printf (" -d\t\tTurn debugging on\n"); printf (" -noaudio\tDisable audio on systems that support audio\n"); printf (" -nojoystick\tDisable joystick support\n"); + printf (" -noglsl\tDisable GLSL shading\n"); printf (" -h\t\tPrint this help text\n"); printf (" -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n"); printf (" -P \tRun the given Python script (filename or Blender Text)\n"); @@ -506,6 +508,8 @@ int main(int argc, char **argv) SYS_WriteCommandLineInt(syshandle,"nojoystick",1); if (G.f & G_DEBUG) printf("disabling nojoystick\n"); } + if (BLI_strcasecmp(argv[a], "-noglsl") == 0) + GPU_extensions_disable(); break; } } -- cgit v1.2.3 From c6d1ac3af8af4c074228b74157be9d9addf16ea7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 19 Oct 2008 06:12:11 +0000 Subject: only set the SDL audio driver to alsa when not running in background mode and when blender is compiled with SDL. --- source/creator/SConscript | 3 +++ source/creator/creator.c | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'source/creator') diff --git a/source/creator/SConscript b/source/creator/SConscript index a4c218f89d6..15f73040f4b 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -22,4 +22,7 @@ if env['WITH_BF_BINRELOC']==1: if env['WITH_BF_OPENEXR']==1: defs.append('WITH_OPENEXR') +if not env['WITH_BF_SDL']: + defs.append('DISABLE_SDL') + env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 ) diff --git a/source/creator/creator.c b/source/creator/creator.c index 38c37575bd1..b5360b31a0a 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -237,8 +237,10 @@ static void print_help(void) printf (" $TEMP\t\tStore temporary files here.\n"); #else printf (" $TMP or $TMPDIR\tStore temporary files here.\n"); - printf (" $SDL_AUDIODRIVER\tLibSDL audio driver - alsa, esd, alsa, dma.\n"); printf (" $BF_TIFF_LIB\t\tUse an alternative libtiff.so for loading tiff image files.\n"); +#endif +#ifndef DISABLE_SDL + printf (" $SDL_AUDIODRIVER\tLibSDL audio driver - alsa, esd, alsa, dma.\n"); #endif printf (" $IMAGEEDITOR\t\tImage editor executable, launch with the IKey from the file selector.\n"); printf (" $WINEDITOR\t\tText editor executable, launch with the EKey from the file selector.\n"); @@ -326,10 +328,6 @@ int main(int argc, char **argv) #ifdef __linux__ #ifdef __alpha__ signal (SIGFPE, fpe_handler); - #else - if ( getenv("SDL_AUDIODRIVER") == NULL) { - setenv("SDL_AUDIODRIVER", "alsa", 1); - } #endif #endif #if defined(__sgi) @@ -432,7 +430,7 @@ int main(int argc, char **argv) /* for all platforms, even windos has it! */ if(G.background) signal(SIGINT, blender_esc); /* ctrl c out bg render */ - + /* background render uses this font too */ BKE_font_register_builtin(datatoc_Bfont, datatoc_Bfont_size); @@ -530,6 +528,15 @@ int main(int argc, char **argv) BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */ +#ifndef DISABLE_SDL +#ifdef __linux__ + /* On linux the default SDL driver dma often would not play + * use alsa if none is set */ + if ( getenv("SDL_AUDIODRIVER") == NULL) { + setenv("SDL_AUDIODRIVER", "alsa", 1); + } +#endif +#endif } else { BPY_start_python(argc, argv); -- cgit v1.2.3 From 2ecf987dc665eff477fb03a0cef0b2972e4b78d2 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Wed, 22 Oct 2008 11:28:10 +0000 Subject: * Minor cleanup of SCons files - cleanup of boolean usage - use True and False now instead of 'true'/'false' or 0/1 - changed SConscripts accordingly --- source/creator/SConscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/creator') diff --git a/source/creator/SConscript b/source/creator/SConscript index 15f73040f4b..c5a661abd69 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -11,15 +11,15 @@ incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu' incs += ' ' + env['BF_OPENGL_INC'] defs = [] -if env['WITH_BF_QUICKTIME']==1: +if env['WITH_BF_QUICKTIME']: incs += ' ' + env['BF_QUICKTIME_INC'] defs.append('WITH_QUICKTIME') -if env['WITH_BF_BINRELOC']==1: +if env['WITH_BF_BINRELOC']: incs += ' ../../extern/binreloc/include' defs.append('WITH_BINRELOC') -if env['WITH_BF_OPENEXR']==1: +if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') if not env['WITH_BF_SDL']: -- cgit v1.2.3 From 705a248c75467ef67eba1cda124fd5375eb4666f Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Tue, 28 Oct 2008 18:33:34 +0000 Subject: Updated cmake so it has the option to use WITH_DDS Kent --- source/creator/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index c4b77f893fd..e84d1aac3a7 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -222,6 +222,7 @@ IF(UNIX) bf_avi bf_cineon bf_openexr + bf_dds bf_readblenfile blender_bop bf_kernel -- cgit v1.2.3 From ac4ff83ca6b5795f4451a7e743d3975aeb17ae3b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 28 Oct 2008 18:47:13 +0000 Subject: added scons option BF_WITH_PYTHON (defined as DISABLE_PYTHON) --- source/creator/SConscript | 3 +++ source/creator/creator.c | 32 +++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) (limited to 'source/creator') diff --git a/source/creator/SConscript b/source/creator/SConscript index c5a661abd69..16556643707 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -25,4 +25,7 @@ if env['WITH_BF_OPENEXR']: if not env['WITH_BF_SDL']: defs.append('DISABLE_SDL') +if not env['WITH_BF_PYTHON']: + defs.append('DISABLE_PYTHON') + env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 ) diff --git a/source/creator/creator.c b/source/creator/creator.c index b5360b31a0a..872a5f4d497 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -72,7 +72,9 @@ #include "IMB_imbuf.h" // for quicktime_init +#ifndef DISABLE_PYTHON #include "BPY_extern.h" +#endif #include "RE_pipeline.h" @@ -515,9 +517,9 @@ int main(int argc, char **argv) if ( (G.windowstate == G_WINDOWSTATE_BORDER) || (G.windowstate == G_WINDOWSTATE_FULLSCREEN)) setprefsize(stax, stay, sizx, sizy, 0); - +#ifndef DISABLE_PYTHON BPY_start_python(argc, argv); - +#endif /** * NOTE: sound_init_audio() *must be* after start_python, * at least on FreeBSD. @@ -539,8 +541,9 @@ int main(int argc, char **argv) #endif } else { +#ifndef DISABLE_PYTHON BPY_start_python(argc, argv); - +#endif BLI_where_is_temp( btempdir, 0 ); /* call after loading the .B.blend so we can read U.tempdir */ // (ton) Commented out. I have no idea whats thisfor... will mail around! @@ -549,7 +552,7 @@ int main(int argc, char **argv) // sound_init_audio(); // if (G.f & G_DEBUG) printf("setting audio to: %d\n", audio); } - +#ifndef DISABLE_PYTHON /** * NOTE: the U.pythondir string is NULL until BIF_init() is executed, * so we provide the BPY_ function below to append the user defined @@ -559,7 +562,8 @@ int main(int argc, char **argv) * on U.pythondir. */ BPY_post_start_python(); - +#endif + #ifdef WITH_QUICKTIME quicktime_init(); @@ -644,13 +648,14 @@ int main(int argc, char **argv) if (a < argc) { int frame= MIN2(MAXFRAME, MAX2(1, atoi(argv[a]))); Render *re= RE_NewRender(G.scene->id.name); - +#ifndef DISABLE_PYTHON if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_RENDER, 0); - +#endif RE_BlenderAnim(re, G.scene, frame, frame, G.scene->frame_step); - +#ifndef DISABLE_PYTHON BPY_do_all_scripts(SCRIPT_POSTRENDER, 0); +#endif } } else { printf("\nError: no blend loaded. cannot use '-f'.\n"); @@ -659,14 +664,15 @@ int main(int argc, char **argv) case 'a': if (G.scene) { Render *re= RE_NewRender(G.scene->id.name); - +#ifndef DISABLE_PYTHON if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_RENDER, 1); - +#endif RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra, G.scene->frame_step); - +#ifndef DISABLE_PYTHON if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_POSTRENDER, 1); +#endif } else { printf("\nError: no blend loaded. cannot use '-a'.\n"); } @@ -704,6 +710,7 @@ int main(int argc, char **argv) } break; case 'P': +#ifndef DISABLE_PYTHON a++; if (a < argc) { /* If we're not running in background mode, then give python a valid screen */ @@ -714,6 +721,9 @@ int main(int argc, char **argv) BPY_run_python_script (argv[a]); } else printf("\nError: you must specify a Python script after '-P '.\n"); +#else + printf("This blender was built without python support\n"); +#endif /* DISABLE_PYTHON */ break; case 'o': a++; -- cgit v1.2.3 From 752920c53196585219cd50ee38f05bee0a885092 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 2 Nov 2008 12:50:11 +0000 Subject: python25.zip wasn't copied using cmake. Should fix win64 python e.g. "import random" problem --- source/creator/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index e84d1aac3a7..efeff572c74 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -143,6 +143,7 @@ IF(WIN32) COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" \"${TARGETDIR}\\.blender\\scripts\" COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" \"${TARGETDIR}\\plugins\" COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\" + COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\windows\\extra\\python25.zip\" \"${TARGETDIR}\\\" ) FILE(TO_NATIVE_PATH "${LIBDIR}" WIN_LIBDIR) -- cgit v1.2.3 From 407e38a7447a5c55aea4c9b8f4a3eebca26c687e Mon Sep 17 00:00:00 2001 From: Enrico Fracasso Date: Sun, 2 Nov 2008 14:54:44 +0000 Subject: Added bf_videotex to unix libraries (linking error) --- source/creator/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index efeff572c74..ee6f19e457d 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -266,7 +266,8 @@ IF(UNIX) blender_python bf_quicktime extern_binreloc - extern_glew + extern_glew + bf_videotex ) FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) -- cgit v1.2.3 From 483136c8e4d73fafe2b3e0953a6325107558d896 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 11 Nov 2008 14:14:22 +0000 Subject: Adjusted scons files so disabling quicktime, python and sdl also removes their includes when building. writefile.c had usless include. --- source/creator/SConscript | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/creator') diff --git a/source/creator/SConscript b/source/creator/SConscript index 16556643707..505b69b8e6d 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -6,7 +6,7 @@ sources = 'creator.c' incs = '#/intern/guardedalloc ../blender/blenlib ../blender/blenkernel' incs += ' ../blender/include ../blender/blenloader ../blender/imbuf' incs += ' ../blender/renderconverter ../blender/render/extern/include' -incs += ' ../blender/python ../blender/makesdna ../kernel/gen_messaging' +incs += ' ../blender/makesdna ../kernel/gen_messaging' incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu' incs += ' ' + env['BF_OPENGL_INC'] @@ -25,7 +25,9 @@ if env['WITH_BF_OPENEXR']: if not env['WITH_BF_SDL']: defs.append('DISABLE_SDL') -if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') +if env['WITH_BF_PYTHON']: + incs += ' ../blender/python' +else: + defs.append('DISABLE_PYTHON') env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 ) -- cgit v1.2.3