The issue was caused by the following construction:
def = env['SOMETHING']
defs.append('SOMETHING_MORE')
Since first assignment was actually referencing environment option it was totally
polluted hawing weird and wonderful side effects on all other areas of Blender.
The expression module now uses an EXP prefix and it follows a
distribution similar to blender.
Additionally the hash function in EXP_HashedPtr.h was simplified and the
files EXP_C-Api.h &.EXP_C-Api.cpp were deleted because were unused.
Reviewers: campbellbarton, moguri, sybren, hg1
Projects: #game_engine
Differential Revision: https://developer.blender.org/D1221
This patch attempts to improve and review the documentation of bge.texture, as requested in the [[ http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/GameEngine#Video_Texture | TODO list ]].
More specifically, it
- fixes the rst syntax, including titles of the examples bge.texture.py and bge.texture.1.py;
- adds, standardizes and reviews description of the API elements, particularly signatures, types, etc.
- adds SOURCE_* constants to the doc
- splits the doc into thematical parts (Video, Image, Texture, and Filter Classes, Functions, Constants).
Notes:
- The parameter "mode" of ImageBuff.plot has to be described better. Actually, the whole set of IMB_BLEND_* constants (from IMB_imbuf.h) should be exposed to Python. I'll do that in a future diff, and complete the doc at the same moment (adding those IMB_BLEND_* constants to the Constants part of this doc).
- The option of using webcams in VideoFFmpeg is still particularly not well documented. I am planning to make a proposal about fixing T18634 (and its corresponding TODO in the list) by integrating OpenCV in the BGE (and Blender?). The idea would then probably be to add a new class, f.ex. ImageWebcam, making this functionnality more specialized. So for now I don't think it is worth to document that part much.
This patch fixes T44284 too.
Reviewers: moguri, kupoman, campbellbarton, panzergame, lordloki
Reviewed By: panzergame, lordloki
Subscribers: hg1
Projects: #game_engine, #game_python, #documentation
Maniphest Tasks: T44284
Differential Revision: https://developer.blender.org/D1352
This is essential for video projection, and the alternative until now was to manually change the projection matrix via Python.
( http://www.blender.org/manual/game_engine/camera/introduction.html#camera-lens-shift
- this page will be removed as soon as I commit this)
Also this is working for perspective and orto cameras BUT if the sensor is not AUTO it will only look correct in blenderplayer (this is an unrelated bug, but just in case someone runs into it while testing this, now you know why you got the issue).
Kudos for the BlenderVR project for supporting this feature development.
Differential Revision: https://developer.blender.org/D1379
Now we use color converted (if we do a color management) by the setter for background color in VideoTexture (ImageRender & ImageMirror).
Reviewers:panzergame
Now internally the variables are processed as floats avoiding int->float->char conversions that are causing precision lost.
A check for int numbers is maintained to keep compatibility with old behaviour.
Reviewers: ben2610, campbellbarton, moguri, hg1
Reviewed By: moguri, hg1
Subscribers: campbellbarton
Projects: #game_engine
Differential Revision: https://developer.blender.org/D1301
rendering
Make scene background color as default for render-to-texture instead of
current blue color (0, 0, 255).
It is very useful for mirrors setups.
Reviewers: moguri, ben2610, sybren, panzergame, hg1
Reviewed By: panzergame, hg1, moguri
Subscribers: mpan3
Differential Revision: https://developer.blender.org/D1287
In quad-buffer stereo mode, the GE render pass ends with the right eye on the right buffer, but we need to draw on the left buffer to capture the render.
Reviewed By: agoose77, HG1
Code clean up for BGE world mist, background and global ambient color.
Move mist render update to BlenderWolrdInfo
Reviewers: moguri, brecht
Reviewed By: moguri, brecht
Differential Revision: https://developer.blender.org/D152
All of the initXPythonBinding functions are changed to always creating the module instead of importing if previously existing.
I can instead only remove the module return when the import is ok, so that it always inits. But then, I don't see the point in importing.
I make sure that these functions are called only once per run, inside initBGE.
This was not the case with GameTypes. I moved initPyTypes inside of initGameTypesPythonBinding due to that.
I reorganized initGamePlayerPythonScripting and initGamePythonScripting so that they run things in the same order.
initGamePlayerPythonScripting imports mathutils and aud, the other only aud. Shouldn't it be the same for both?
Reviewers: campbellbarton
Subscribers: sybren
Projects: #game_engine, #game_python
Differential Revision: https://developer.blender.org/D1070
ImageFFmpeg objects will not refresh properly because the image
file is closed immediately after creation. Therefore refresh()
should have no effect on them.
This was causing problems with ImageMix using ImageFFmpeg as
sources: refreshing the ImageMix object is required to update
the mix but it has the side effect of refreshing the underlying
sources, hence the need to skip refresh on fixed images.
Yep, at last it's here!
There are a few minor issues remaining but development can go on in
master after discussion at blender institute.
For full list of features see:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting
Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
In collaboration with Benoit Bolsee (mainly doing it under his
directions).
Note: FFmpeg lib needs to be compiled with rtsp support for this to
work.
Bug 1/2 of T41004
This is mostly the same fix as before, but now code depending on culling
checks is executed after KX_Scene->CalculateVisibleMeshes(). As a
side-effect, LoD checks and animation culling now use the current
frame's culling information rather than the previous frame's.
The ultimate goal is to only allow the rasterizer to handle OpenGL and bf_gpu
calls. This commit creates a RAS_ILightObject interface and a RAS_OpenGLLight
implementation.
Was a regression since avg_frame_rate changes.
Didn't find reliable way to get stream duration which will
work with both FFmpeg and Libav so added some freaking black
magic to distinguish one from another.
This fix is mostly based off of HG1's patch from the bug report, which had ImageRender::Render() call KX_KetsjiEngine::RenderFonts(). However, I have moved RenderFonts() from KX_KetsjiEngine to KX_Scene where all of the other font and rendering functions are. The real fix for this mess would be to not have ImageRender::Render() have so much duplicate code from KX_KetsjiEngine::Render(), but that's a code cleanup problem for another day.
consistent with projection painting.
Also did some refactoring of this code, moving the brush image creation code
out of brush.c and making it consistent with image updating code.
* 2D image painting support for masking to limit the max contribution of a stroke
to a pixel, to get it working compatible with projection painting. Not strictly
a bugfix, but the inconsistency here was annoying.
* Fix python errors in Texture Mask panel in image editor, was missing overlay
options.
* Clamp paint mask to 0..1 in case some texture exceeds it, this could give black
pixels due to integer overflow.