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.
Simple python benchmark shows this to be about 3x faster in the case where an update isn't needed.
This also speeds up rna function argument parsing, since each arg in a function call did 2 string lookups on the context which were never needed.
globbing vs explicit is discussed here.
http://www.cmake.org/pipermail/cmake/2008-December/025694.html
Practical implications are:
- developers need to keep CMakeLists.txt files up to date.
- Users wont get strange linking errors if they build after a file is added, since CMake detects CMakeLists.txt is modified and automatically reconfigure.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
Whenever using AddObject actuator, this feature gives you control over morbid events (a.k.a. trigger events before the object ends).
Demo file here:
http://blenderecia.orgfree.com/blender/tmp/cube_life.blend
Feature implemented as part of the BGE development workshop in BlenderPRO 2010 - Fortaleza, Brazil
* 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
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.
* 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).
- 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).
The funny thing is: I only spotted this bug in March of this year. Almost one year after the original release. I think I don't parent objects to the camera often.
In terms of code I think that I can even think in a more elegant solution. I don't really need to rotate the camera, but simply to calculate its Modelview Matrix.
"""
m_rasterizer->SetViewMatrix(viewmat, cam->NodeGetWorldOrientation(), cam->NodeGetWorldPosition(), 1.0);
cam->SetModelviewMatrix(viewmat);
"""
The reason why I originally was rotating the camera was to make sure the frustum calculation was using the right camera frustum. For the frustum it takes the camera modelviewmatrix so the rotation really shouldn't be necessary. Leaving as it's for the time being.
* Note: the bug was never officially reported
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
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)
Rough summary of fixes/changes:
- Blender Py API: GameLogic -> bge.logic
- Blender Py API: Implemented missing KX_PYATTRIBUTE_TODOs and -DUMMYs.
- Fix for [#22924] KX_PolygonMaterial.diffuse does not return expected list[r,g,b]
- Py API: Renaming _owner attribute of mathutils classes to owner.
- Fix some minor errors in mathutils and blf.
- Enabling game engine autoplay again based on a patch by Dalai:
* The biggest 3D view in the open scene is used, if there is none, blender opens the file normally and raises an error.
* The 3D view are is made fullscreen.
* Quad view, header, properties and toolbox panel are all hidden to get the maximum view.
* If the game engine full screen setting is set, the game starts in fullscreen.
- Fix for ipo conversion on file transition in the game engine.
* All audaspace changes from the GSoC branch including the aud Python module
* This commit also includes some minor changes in source/gameengine/Ketsji/KX_PythonInit.cpp:
- Fixing names of some constants
- removing outdated stopDSP() python function
- Autoinclusion of bge instead of GameLogic
- Fix for some error messages: GameLogic -> bge.logic
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.
* add support for LCMS (disabled by default, set WITH_LCMS to true to enable it)
* fixed typo that prevented TIFF support to be properly enabled
* enable ray optimization by default (scons and cmake already did this)
* fixed building with libsndfile on darwin (disabled by default)
* quicktime: use audaspace headers from $(NAN_AUDASPACE)/include instead of intern
* gameengine: add -DWITH_FFMPEG to compiler flags when building with ffmpeg support