Texture Nodes: the option to use nodes was also visible for textures
on world, lamp, brush. Since it only works for Materials now, I've made
the button disappear then.
- when the attribute check function failed it didnt set an error raising a SystemError instead
- Rasterizer.getMaterialMode would never return KX_BLENDER_MULTITEX_MATERIAL
- PropertySensor value attribute checking function was always returning a fail.
- Vertex Self Shadow python script didnt update for meshes with modifiers.
- Added support for any number of attributes, this means packages are supported automatically.
so as well as "myModule.myFunc" you can do "myPackage.myModule.myFunc", nested packages work too.
- pass the controller to the python function as an argument for functions that take 1 arg, this check is only done at startup so it wont slow things down.
added support for
- Vast performance increase when removing scene containing large number of
objects: the sensor/controller map was updated for each deleted object,
causing massive slow down when the number of objects was large (O(n^2)).
- Use reference when scanning the sensor map => avoid useless copy.
- Remove dynamically the object bounding box from the DBVT when the object
is invisible => faster culling.
This function sets the maximum number of logic frame executed per render frame.
Valid values: 1..5
This function is useful to control the amount of processing consumed by logic.
By default, up to 5 logic frames can be executed per render frame. This is fine
as long as the time spent on logic is negligible compared to the render time.
If it's not the case, the default value will drag the performance of the game
down by executing unnecessary logic frames that take up most of the CPU time.
You can avoid that by lowering the value with this function.
The drawback is less precision in the logic system to physics and I/O activity.
Note that it does not affect the physics system: physics will still run
at full frame rate (actually up to 5 times the ticrate).
You can further control the render frame rate with GameLogic.setLogicTicRate().
sys.path is the search path for python modules. This is useful so people making games can put all their scripts in a folder and be sure they will always load into the BGE.
for each blend file a scripts directory is added to the path
/home/me/foo.blend
will look for modules in...
/home/me/scripts/*.py
It could also default to look for modules in the same directory as the blend file but I think this is messy.
Added a note in the tooltip about //scripts so its not such a hidden feature.
This works by storing the original sys.path, then adding the paths for the blendfile and all its libs,
when a new blendfile is loaded, the original sys.path is restored before adding the blendfiles paths again so the sys.path wont get junk in it.
One problem with this - when using linked libs the module names must be unique else it will load the wrong module for one of the controllers.
also fixed 2 bugs
- sys.path in the blenderplayer was growing by 1 for every file load in blenderplayer
- the relative path (gp_GamePythonPath), wasnt being set when loading files in the blenderlayer (as I wrongly said in the last commit).
The solution is a hack. It's a workaround for another bug (#18655).
Now it's working in all modes: fullscreen, maximized screen and gameplayer.
* small change to always set the perspective mode as true during dome mode.
- the gp_GamePythonPath relative path variable wasnt updated when loading new files.
- missing NULL check for scene crashed blender when it failed to load a file.
Both problems dont affect blenderplayer
I added module clearing before there was checks for invalid python objects, so now its not needed for BGE Builtin types at least.
also made the builtin modules get re-used if they already exist and clear all user modules when the game engine finishes so with Module-Py-Controllers the referenced modules are at least up to date when pressing Pkey.
armatures. Not sure it actually fixes the problem because I can't
test this on Win 64, but this fixes use of unitialized memory at
least. Mat4MulMat34 only sets the 3x3 part of the 4x4 matrix, which
may lead to a NaN bone roll value.
Scrub frames in Sequencer image window stopped working. Was in a commit
from Joshua last july, with greasepencil fixes. No idea why he disabled
it, doesn't seem to harm gpencil at all (not in sequencer supported).
Blender crashed, when started in debug -d, with compositor, after render.
Reason was the BKE_image_print_memlist() which reads the ibuf->rect from
all images, but for Image types "VIEWER" that's not valid, this data is
coming from other sources.
I've managed to find a basic fail-safe method to prevent using the read
data with an OK popup. I then still will read the file, but wait for user
confirmation to continue, or just free the database.
The pupup tells the user that at least animation data will be lost.
For background renders of 2.5+ things are more tricky, so here I've added
a default failure to read, returning 0, which will typically gracefully
quit blender.
Option to run a function in a module rather then a script from a python controller, this has a number of advantages.
- No allocating and freeing the namespace dictionary for every time its triggered
(hard to measure the overhead here, but in a test with calling 42240 scripts a second each defining 200 vars, using modules was ~25% faster)
- Ability to use external python scripts for game logic.
- Convenient debug option that lets you edit scripts while the game engine runs.
This fixes a commit from Peter, revision 12931, Dec 17 2007
He added quick image scaling code, derived from ppmqscale,
http://libdv.sf.net
This implementation gave ugly banding. especially visible on
dark colors or byte images with very close colors.
Solution is to add correct rounding, seems to me normal for such
fixed point magic. Optimizing code and keeping quality is tricky
dudes! Results for scaling down in sequencer were bad for over a
year (2.47 and 2.48 both wrong).