Commit Graph

206 Commits

Author SHA1 Message Date
Brecht Van Lommel
d369a6aaaf Windows installer and Path changes, fixing various issues:
* Windows installer not working for non-admin users and multiple users
* Addon scripts not installing next to user configuration
* Portable install not being taken into account in all places

The main problem was the windows installer was installing system scripts in
AppData next to the user configuration directory, which is not shared between
users. Now these are installed in ProgramFiles, and only addon scripts added
by the users go to AppData.

On all platforms, addon scripts were sometimes getting installed between
system scripts, because the scripts folder in the executable directory was
given precedence over the user configuration folder, that is no longer done
now. So addons now behave like user configuration, they are preserved even
if you download a newer build of the same blender version.

If you have an installation of 2.57 on windows, the addon install location
will not change until we do the version bump to 2.58, to avoid conflicts with
the existing the installed 2.57 version.

The old behavior of giving precedence to the local folder was done to support
portable install, where all configuration is written to the local folder. This
is now implemented differently: if and only if a "config" folder exists in the
local folder, portable install will be assumed, and files will only be written
to that local folder.
2011-05-27 09:57:53 +00:00
Campbell Barton
0814cdf54e fix [#26951] blenderplayer and runtimes will not load
blenderplayer wasn't finding bundled python, eg: ./2.57/python/lib
2011-04-18 08:27:50 +00:00
Campbell Barton
1c6956a4d6 quiet msvc/mingw compiler warnings. 2011-04-10 09:37:04 +00:00
Campbell Barton
f4ba9495c5 fix [#26667] Can't import scripts when using blenderplayer
- move import override initialization to bpy_internal_import.c so the player and blender can both call.
- remove ineffectual & unused sandboxing code.
2011-03-29 16:12:25 +00:00
Campbell Barton
b11f29c8ac clear some c++ warnings. 2011-03-27 07:56:29 +00:00
Campbell Barton
fcc5b5c48c fix for blenderplayer using un-initialized mathutils types. 2011-03-25 00:34:28 +00:00
Mitchell Stokes
481b4842cf Blenderplayer: Fixing import issues. Using PyImport_ExtendInittab() for the Blender modules allows them to be imported in the Blenderplayer. 2011-03-22 08:35:56 +00:00
Mitchell Stokes
3384679aec BGE Dynamic Loading:
* Adding keyword arguments to LibLoad
   - load_actions (Default: False) Ensures that all actions are loaded. Otherwise, just actions used by objects in the scene are loaded.
   - verbose (Default: False) Turns on extra prints (eg SceneName: MyScene).
 * Also making error reporting better for when an invalid group/idcode is given.
2011-03-22 02:39:08 +00:00
Campbell Barton
2513b194a2 pedantic edit, no need to initialize var. 2011-03-21 12:40:06 +00:00
Mitchell Stokes
1f52d83a99 BGE Dynamic Loading: When given a relative path (starts with "//") for LibLoad(), make the path absolute. This helps resolve relative paths inside the library. 2011-03-21 09:29:28 +00:00
Nathan Letwory
bb6e7faf72 doxygen: gameengine/Ketsji tagged. 2011-02-25 13:35:59 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
Dalai Felinto
230aed6242 BGE: Action and ShapeKey Actuator PingPong playmode.
I have no idea why this hasn't been implemented before (the DEFINES were even there already). But since the Ipo (Fcurve) Actuator supports it I don't see why Action and ShapeKey shouldn't.
More than a new feature or a bugfix this is actually a step forward into unifying them.
2011-02-16 19:53:39 +00:00
Dalai Felinto
eff0e29cba BGE BugFix [#25711]render.setBackgroundColor() does not work:
Since rev.2 (hans ftw) we have a strange situation where horizon color was being used at Convert time for the WorldInfo background color (and for the fog). However through the Python API only the Rasterizer background color was being updated. On top of that the KX_KetsjiEngine.cpp::SetBackGround was using the WorldInfo bgcolor when render mode was the potato one (TEXTURED). Bottomline, when in potato mode the glClearColor used was the original one in worldinfo, not the API updated one in Rasterized.
2011-01-18 22:27:18 +00:00
Campbell Barton
a0b134cd88 bugfix [#25488] Game engine crash when try to run after blender app start
- also found other places where utf8 isnt ensured.
- remove duplicate NULL checks in object_edit.c
2011-01-06 05:04:07 +00:00
Dalai Felinto
f1c4688e25 renaming blf_api.h to blf_py_api.h
In windows this was producing Linking dependence errors because we have BLF_api.h in the /blenfont/ and blf_api.h in /python/generic/. It doesn't produces crash out of the box but I was trying to link both "api" files to the same project (Ketjsi folder). For the linking order was determining what header to use. A workaround is to "include" the file using some ../../ relative folder. But renaming it is less error prone.

Probably Ketsji folder shouldn't link to BLF_api.h anyways, but this is something I will look better later before another commit. In the mean time it's not a good idea to have 2 api files with the same name (for non case-sensitive systems).
2010-12-09 17:31:42 +00:00
Campbell Barton
0876fce009 rename and negate DISABLE_PYTHON --> WITH_PYTHON 2010-10-31 04:11:39 +00:00
Daniel Salazar
bd8758561f Build fix by Mike S 2010-10-30 02:59:42 +00:00
Campbell Barton
676829ccba workaround for python bug [#24400] If Script is executed with TEXT Editor, it becomes an error.
having the blend file as a part of the __file__ variable is not essential, this is fixed in python 3.2 so add an ifdef and don't use the blend file path for py older then 3.2.
2010-10-27 06:05:22 +00:00
Campbell Barton
3264ced377 move geometry python module into mathutils.geometry, since it provides utility functions using mathutils types. 2010-10-25 22:44:01 +00:00
Campbell Barton
a20843bf34 building without python works again for the BGE 2010-10-10 20:59:30 +00:00
Mitchell Stokes
f7fb4e70b3 Fixing a memory leak with SCA_PythonKeyboard and SCA_PythonMouse. 2010-10-09 01:31:20 +00:00
Mitchell Stokes
02d97e4da2 Campbell requested that I remove one of the bge.events.RETKEY aliases, so I'm removing bge.events.RETURNKEY. 2010-10-06 00:36:12 +00:00
Mitchell Stokes
3cf2d2fd4e A bit of bge.events work:
* A few places in the bge.events docs mentioned bge.keys, when it should have been bge.events
  * Created two aliases to bge.events.RETKEY: ENTERKEY and RETURNKEY
  * ENTERKEY and RETURNKEY have been added to the docs and RETKEY marked as deprecated
  * Added an example of using bge.logic.keyboard to the bge.events docs
2010-10-05 05:44:15 +00:00
Campbell Barton
ab8aa13b82 bugfix [#24087] Blender can not install add-ons unless running with root priviledges
now addon path is created using the same path functions and selecting where to save the startup.blend

also made some minor changes to path handling funcs.
2010-10-03 20:00:22 +00:00
Nathan Letwory
ab5b95d148 * Update BGE for change in r32001
* Fix var declaration in bpy_interface.c
* Remove forward declarations from py_capi_utils.h: they are unnecessary and break compiles (there were probably many warnings about this during compile with GCC).
2010-09-18 19:38:27 +00:00
Campbell Barton
9b518710c6 update for MingW/CMake
- ignore MSVC warnings when FREE_WINDOWS is defined to quiet warnings.
- the CMake flags were not being set correctly making blender have weirdo colors (no -funsigned-char).
2010-09-15 16:13:32 +00:00
Dalai Felinto
3a2fc4d6dc BGE module reshuffling - VideoTexture -> bge.texture
this was the one module left to be renamed.

We didn't get to any conclusion in the mailing list, but Campbell suggested texture and I think its a good name. We can change any time before next Beta, but for now I think it's handy to have something.

The original proposal is from May:
http://lists.blender.org/pipermail/bf-committers/2010-May/027587.html
2010-09-11 19:38:11 +00:00
Mitchell Stokes
b1302c3c04 After talking with Campbell, we came to the conclusion that it was probably best not to auto-import modules. To this end, I'm removing the automatic import of the bge module. 2010-08-28 08:00:37 +00:00
Mitchell Stokes
5c23537daa Committing patch [#23278] (by me)
This patch allows a user to pass binary data to LibLoad() to load a blend file from memory instead of a file path. I don't know how useful this will be for others, but I've used it so far for:
  * Decrypting .blend files and loading them without having to store the .blend on the hard drive
  * Pulling .blend data out of an archive and loading it (again skipping the hard drive)

So, it seems the biggest use for this is skipping a bit of file IO (and possibly some security problems).

Example usage:
import bge

with f as open('myfile.blend', 'rb'):
    data = f.read()

bge.logic.LibLoad('Name', 'Scene', data)
2010-08-28 02:07:55 +00:00
Joerg Mueller
26809f38aa Audaspace: This should fix all missing python includes now once for all... 2010-08-16 20:05:59 +00:00
Joerg Mueller
47d38dbd20 svn merge -r 31211:31313 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2010-08-13 10:50:29 +00:00
Joerg Mueller
fd2a9a0ed0 Blender Py API: GameLogic -> bge.logic 2010-08-11 12:14:16 +00:00
Campbell Barton
ad4fc20ec9 moved idcode functions into their own file (was added as a todo in the comments), these were mixed in with file reading code - BLO_readfile.h bot these functions are not spesific to reading. 2010-08-10 15:14:19 +00:00
Joerg Mueller
64b36ffbb3 svn merge -r 31060:31144 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2010-08-07 15:45:07 +00:00
Campbell Barton
a8129f6b41 fix for fake python bge.* module, this is really nasty temp py code! (not a good example) 2010-08-06 12:46:22 +00:00
Joerg Mueller
06d2dc86a1 svn merge -r 30954:31059 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2010-08-05 08:23:26 +00:00
Campbell Barton
a0cece42c6 bugfix [#23148] "ImportError: __import__ not found" on changing Render FPS
The BGE was getting the namespace dict directly from __main__ which conflicts
with my recent fix to get the pickle module working which to overwrote the __main__ module on script execution.

Simple fix is to have the BGE and Blender use the same method of getting namespaces.
Renamed CreateGlobalDictionary() to bpy_namespace_dict_new() and moved into bpy_internal_import.c

pickle still wont work in the BGE since we make a copy of __main__ namespace but for speed would rather not have to replace the __main__ module many times per second.
2010-08-05 03:25:45 +00:00
Joerg Mueller
3e908a8112 Moved constants names from KX_ACT_CONSTRAINT_foo to KX_CONSTRAINTACT_foo. 2010-07-21 09:46:24 +00:00
Joerg Mueller
a61e7041ce Removed stopDSP, relict from FMOD. 2010-07-14 09:01:31 +00:00
Joerg Mueller
7a89b679c9 Merging revision 30126:30261 from trunk. 2010-07-13 11:14:49 +00:00
Benoit Bolsee
44c30fbbac BGE bug #22760: VideoTexture not available when Blender is compiled without FFMPEG. VideoTexture can be used without FFMPEG, no need to disable it. 2010-07-12 13:25:57 +00:00
Joerg Mueller
9772eb4d5f Audaspace:
* Renamed AUD_Handle to AUD_Channel in the C-API to prevent errors with the C++ version of AUD_Handle.
* Added Python API!!!
2010-07-09 12:35:40 +00:00
Campbell Barton
ed338da8c9 - WITH_CXX_GUARDEDALLOC working again
- CMake building without python or fluidsim working again (broke in recent commit)
- remove BLI_short_filename(), it wasnt used anywhere.
2010-06-06 01:15:44 +00:00
Luca Bonavita
e58bb562d2 == python api docs ==
*  source/blender/python/doc/sphinx_doc_gen.py
	
	changed syntax for declating attributes type to use :type: instead of *type* os it

* source/gameengine/Ketsji/KX_PythonInit.cpp

	While documenting I've found that we have two naming conventions for constraints in BGE python api,
	example: KX_CONSTRAINTACT_DIRPZ and KX_ACT_CONSTRAINT_FHPX: the right convention is KX_CONSTRAINTACT_xxx
	After talking with dalai and cambpell we agreed that this kind of change is better suited for NExyon GSoC
	so I marked as TODO
	
	Also, found 2 duplicate rows, fixed after askin nexyon

* source/gameengine/PyDoc/bge.logic.rst

	there were 2 blocks for constraints, I've put them together in docs and fixed some other lines
	
* source/gameengine/PyDoc/bge.types.rst

	first cleanup: mainly started using ":type:", it was mixed usage of *type* and **type**
	started cleaning some bullet list in a way that varibles link to the constant in appropriate page
	I'll continue later
2010-06-02 21:28:17 +00:00
Campbell Barton
9cbbc9d3af rename some rna properties filename --> filepath
* filename == "foo.ext"
 * filepath == "/path/to/and/including/foo.ext"

this was alredy followed in some places not not everywhere.
2010-06-02 17:58:28 +00:00
Dalai Felinto
fc59a6c6c8 BGE: Moving Constraint Actuator Defines. It was leading to some errors in documentation 2010-06-02 17:38:38 +00:00
Dalai Felinto
c6bec43330 reverting previous commit from Mitchell. His commit went to the trunk instead of the branch :)
svn merge -r 29067:29066 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2010-05-29 21:31:57 +00:00
Mitchell Stokes
9d3157eed0 Reversing the last merge because I botched it. 2010-05-29 21:22:24 +00:00
Campbell Barton
b63d069055 [#22177] Adding BLF to the BGE and exposing BLF_load as blf.load
from Mitchell Stokes (moguri) 

also updated blf docs
2010-05-05 06:38:49 +00:00