Commit Graph

460 Commits

Author SHA1 Message Date
Campbell Barton 18c7354bd2 remove warning left in by mistake and comment unused function. 2011-02-25 02:27:54 +00:00
Campbell Barton b8e3f4ee30 fix for cmake not having the correct svn revision in buildinfo, now generate a header every build with the time, date, svn revision. 2011-02-24 17:57:35 +00:00
Campbell Barton d13470ba72 patch from sambler on irc, writes version info for OSX. 2011-02-22 06:05:08 +00:00
Campbell Barton 9ef0eed4b6 build python module without binreloc, add dummy argv[0] to initialize bprogname. 2011-02-21 13:13:08 +00:00
Nathan Letwory ef60ae9521 And the last one. hopefully. 2011-02-21 13:00:38 +00:00
Campbell Barton eee4a62e87 move addon utilities into their own module, these were getting mixed between bpy.utils and space_userpref. 2011-02-21 07:07:44 +00:00
Nathan Letwory 958b5c1d8d Make sure we can build without the optional new WITH_PYTHON_MODULE option. Looks like a #ifndef was meant around the blender_esc implementation. 2011-02-21 00:45:54 +00:00
Campbell Barton c30149991c Experimental option to build blender as a python module, rather then blender embedding python.
CMake build option WITH_PYTHON_MODULE, will build ./bin/bpy.so

This allows 'bpy' to be imported from python or other applications/IDE's which embed python, eg:
   python -c "import bpy ; bpy.ops.render.render(write_still=True)"

This runs in background mode and has similar restrictions to running a script:
   blender --background --python test.py

TODO:
 - install to site-packages with blender scripts
 - add support for imp.reload()
2011-02-20 23:39:29 +00:00
Campbell Barton 06aee2ef0e misc warnings/fixes
- WITH_OPENJPEG wasn't defined for creator.c with CMake.
- remove shadowed/redefined vars.
- remove some unused RNA report args.
- re-arrange IMB_FILE_TYPES so IRIS is not the first format tested, since its not very common test JPEG and PNG first.
2011-02-20 15:48:01 +00:00
Campbell Barton 9ee1b3930f set main() argv functions to be const char *
also set minimum cmake version to 2.8
2011-02-19 12:05:20 +00:00
Campbell Barton f94256ea5c fix for building with make on linux from recent new lib. 2011-02-15 12:37:15 +00:00
Campbell Barton 8b7482892b made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors. 2011-02-14 17:55:27 +00:00
Campbell Barton 0955c664aa fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
2011-02-13 10:52:18 +00:00
Campbell Barton 867fc4b463 enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
2011-02-13 03:21:27 +00:00
Campbell Barton 55f68c3657 fix for more warnings.
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
2011-02-12 16:54:24 +00:00
Campbell Barton 711ba795f7 ignore __pycache__ dir for scons and cmake installation (py3.2 caches modules here). 2011-02-09 00:45:16 +00:00
Campbell Barton 89c617a116 remove nan-makefiles 2011-01-30 15:29:22 +00:00
Janne Karhu f11424d644 Fix for [#25825] Boolean doesn't work in command-line rendering (2.56)
* DAG_on_load_update wasn't called at all for background rendering, so any non-animated object data wasn't updated properly.
2011-01-28 15:24:02 +00:00
Campbell Barton 8cf0d64623 option for blender --addons rigify,io_scene_fbx,add_mesh_gears
needed so ctest unit testing can be done on addons that are not enabled by default.
2011-01-26 16:30:12 +00:00
Campbell Barton d75216ba1c - fix problem with cmake, windows 'RelWithDebInfo' target, was giving error: "ImportError: No module named _socket" because of copying wrong files over.
- move test -> tests, this name is used elsewhere in lib/tests.
- change interface code not to loop on a float value (clang warning), harmless, but with extreme cases an eternal loop would still be possible though unlikely.
2011-01-23 11:42:29 +00:00
Campbell Barton f0d9ff34af Command line options to set blender system environment variables.
Added because CTest has no convenient way to set environment vars for commands it runs.

 --env-system-config -> BLENDER_SYSTEM_CONFIG
 --env-system-datafiles -> BLENDER_SYSTEM_DATAFILES
 --env-system-scripts -> BLENDER_SYSTEM_SCRIPTS
 --env-system-plugins -> BLENDER_SYSTEM_PLUGINS
 --env-system-python -> BLENDER_SYSTEM_PYTHON
2011-01-19 21:30:23 +00:00
Campbell Barton 161cbed9b5 new command line option '--factory-startup' to skip reading startup.blend. useful for testing with a predictable environment.
also commented python benchmark prints on exit, can enable when profiling later.
2011-01-19 09:13:24 +00:00
Campbell Barton 8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
Campbell Barton a132674634 patch [#25490] Fix for [#22096] Blender tries to open non-blend file
from Alexander Kuznetsov (alexk) with edits.

From the report:
Blender assumed that all files are .blend as retval = 0;

Now retval is initialized as file cannot be open (-1) for gzopen fail and directory case
retval = -2; is defined for not supported formats
This must be assigned before #ifdef WITH_PYTHON because this part can be missing
Finally retval = 0; if it is a .blend file

---
also made other edits.

- exotic.c's blend header checking was sloppy, didn't check data was actually read, only checked first 4 bytes and had a check for "blend.gz" extension which is unnecessary.
- use defines to help readability for BKE_read_exotic & BKE_read_file return values.
- no need to check for a NULL pointer before calling BKE_reportf(). (will just print to the console)
- print better reports when the file fails to load.
2011-01-07 06:50:29 +00:00
Campbell Barton 96b646c68d edits for BPY_extern.h functions, no functional changes
- remove unused code.
- BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec
- renamed funcs.
2011-01-05 02:08:54 +00:00
Guillermo S. Romero 29799bf09c Compact -I paths in makefiles for more readble files/output.
Also some white space cleaning and removal of redundant parameter.
2010-12-22 22:15:20 +00:00
Campbell Barton da153a509b CMake RelWithDebInfo uses python31.dll, not python31_d.dll 2010-12-19 16:09:24 +00:00
Campbell Barton 5c621bd7f5 cmake was complaining when there was no libs skipped. 2010-12-17 04:41:48 +00:00
Campbell Barton 566bda734a last commit to fix warnings didnt set them at all, not it works as it should.
also made cmakes output a lot quieter, messages can be uncommented for debugging or added back if other devs need this for some reason.
2010-12-16 12:48:30 +00:00
Campbell Barton afacd18498 use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed. 2010-12-08 08:43:06 +00:00
Campbell Barton d64f46e0bb CMake: use a global list to store libraries built rather then cmake_blender_libs.txt file. 2010-12-06 10:56:37 +00:00
Campbell Barton 42d6603cae Add option for CMake to build libredcode, also use CODEC prefix for ffmpeg, quicktime & sndfile options. 2010-11-30 18:52:39 +00:00
Campbell Barton e8397e6193 include headers in cmake source, added a script to check for consistency, reporting missing headers & C files.
this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
2010-11-29 04:35:56 +00:00
Campbell Barton 02cc80691d python access to driver namespace, rather then have a textblock defined for drivers allow scripts to add functions directly.
- bpy.app.driver_namespace, read-only dictionary, edit in-place.
- reset on file load and new file.
- on errors the namespace used to be reset, this should not be needed.

simple example.

  def driverFunc(val):
    return val * val
  bpy.app.driver_namespace['driverFunc'] = driverFunc

... now all drivers can access this function.
2010-11-27 02:39:51 +00:00
Campbell Barton 7c7307edbf add a window manager to files loaded from 2.4x in background mode. (partial fix for [#24882]). 2010-11-24 14:40:03 +00:00
Campbell Barton 837fedf372 fix for building with mingw/cmake 2010-11-22 23:25:21 +00:00
Campbell Barton 94e17ff01e fix for cmake if build flags are not defined. 2010-11-22 23:06:57 +00:00
Campbell Barton 39b7bfe6bd - check IF WIN32 AND NOT UNIX (for cygwin)
- patch from Mike S to enable OpenMP and xcode
2010-11-21 13:41:43 +00:00
Campbell Barton da1f288f50 rename libs internal libs for CMake + SCons (used in MSVC project files)
for game engine use "ge_" prefix & make names generally more descriptive.
2010-11-18 11:42:05 +00:00
Thomas Dinges fe53cf2cb4 Patch [#24608] Fix for typo and better indentation in command line help by Susanne H. (sanne). Thanks! 2010-11-08 14:08:22 +00:00
Campbell Barton 5fafa570d0 warn if blender is compiled without python 2010-11-04 13:13:31 +00:00
Campbell Barton 6b767b8018 fix [#24499] Consistency Issue with LassoSelect/ExtendOption
Added extend option to lasso. 

also...
- selecting bones wasn't checking their layer of if they were hidden in a number of places.
- fixed memory leak.

small unrealed changes
- added PBONE_VISIBLE macro
- renamed functions used for paint selectoin from *_tface to paintface_*. sine they no longer have anything todo with tface's.
- removed scanfill include from BLI_blenlib.h, this is only used in very few places and quite specific.


Noticed lasso select is broken for metaballs and face mask mode but this has been the case for a while, will look into it next.
2010-11-03 01:56:02 +00:00
Campbell Barton 0876fce009 rename and negate DISABLE_PYTHON --> WITH_PYTHON 2010-10-31 04:11:39 +00:00
Campbell Barton 50dab4fc37 rename definition for enabling the game engine GAMEBLENDER==1 --> WITH_GAMEENGINE 2010-10-31 03:20:33 +00:00
Campbell Barton bae43df4ec building the BGE without bullet works again. 2010-10-31 01:04:31 +00:00
Campbell Barton 7f5abb7fe2 dont build blender/kernel if the game engines disabled. 2010-10-31 00:56:46 +00:00
Campbell Barton 2d9be2226a warning fixes. 2010-10-23 16:03:31 +00:00
Campbell Barton 05b297c52f CMake options to disable Decimate and Boolean Modifiers: WITH_MOD_BOOLEAN, WITH_MOD_DECIMATE, renamed WITH_FLUID to WITH_MOD_FLUID 2010-10-23 15:40:13 +00:00
Nathan Letwory 2a89fb887e * Enable compile and link flags to build info also on Windows and in SCons.
* Added build_system SCons or CMake
* Write the new build info also to system-info.txt
2010-10-19 05:00:36 +00:00
Nathan Letwory 6e77dc1942 whitespace commit, AKA commit count bump. 2010-10-18 20:33:04 +00:00