blender/source/gameengine/VideoTexture
Campbell Barton 8d2cb5bea4 BGE Python API
This changes how the BGE classes and Python work together, which hasnt changed since blender went opensource.
The main difference is PyObjectPlus - the base class for most game engine classes, no longer inherit from PyObject, and cannot be cast to a PyObject.

This has the advantage that the BGE does not have to keep 2 reference counts valid for C++ and Python.

Previously C++ classes would never be freed while python held a reference, however this reference could be problematic eg: a GameObject that isnt in a scene anymore should not be used by python, doing so could even crash blender in some cases.

Instead PyObjectPlus has a member "PyObject *m_proxy" which is lazily initialized when python needs it. m_proxy reference counts are managed by python, though it should never be freed while the C++ class exists since it holds a reference to avoid making and freeing it all the time.
When the C++ class is free'd it sets the m_proxy reference to NULL, If python accesses this variable it will raise a RuntimeError, (check the isValid attribute to see if its valid without raising an error).
- This replaces the m_zombie bool and IsZombie() tests added recently.

In python return values that used to be..
 return value->AddRef();
Are now
 return value->GetProxy();
or...
 return value->NewProxy(true); // true means python owns this C++ value which will be deleted when the PyObject is freed
2009-04-19 12:46:39 +00:00
..
BlendType.h VideoTexture module. 2008-10-31 22:35:52 +00:00
blendVideoTex.cpp VideoTexture: new ImageMirror class for easy mirror (and portal) creation 2008-12-04 16:07:46 +00:00
CMakeLists.txt VideoTexture: reactivate VideoTexture for scons/cmake/makefile compilation systems, fix video streaming, fix camera support in Linux, add multi-thread cache service, fix crash when a VideoFFmpeg object could not be created. 2009-03-05 15:16:43 +00:00
Common.h VideoTexture module. 2008-10-31 22:35:52 +00:00
Exception.cpp VideoTexture: new ImageMirror class for easy mirror (and portal) creation 2008-12-04 16:07:46 +00:00
Exception.h VideoTexture: new ImageMirror class for easy mirror (and portal) creation 2008-12-04 16:07:46 +00:00
FilterBase.cpp remove warnings for the BGE 2009-02-25 03:26:02 +00:00
FilterBase.h VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterBlueScreen.cpp VideoTexture: Bug report #17946: add (char*) casting to fix compile error with Python get-set method and module object. 2008-11-04 09:21:27 +00:00
FilterBlueScreen.h VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterColor.cpp VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterColor.h VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterNormal.cpp VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterNormal.h VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterSource.cpp VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterSource.h BGE Python API 2009-04-19 12:46:39 +00:00
ImageBase.cpp VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3 2008-11-02 18:02:31 +00:00
ImageBase.h VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3 2008-11-02 18:02:31 +00:00
ImageBuff.cpp VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
ImageBuff.h VideoTexture module. 2008-10-31 22:35:52 +00:00
ImageMix.cpp VideoTexture: Bug report #17946: add (char*) casting to fix compile error with Python get-set method and module object. 2008-11-04 09:21:27 +00:00
ImageMix.h VideoTexture module. 2008-10-31 22:35:52 +00:00
ImageRender.cpp BGE Python API 2009-04-19 12:46:39 +00:00
ImageRender.h ImageMirror: add clip attribute to limit clipping distance of mirror rendering 2008-12-09 14:16:10 +00:00
ImageViewport.cpp VideoTexture: new ImageRender class for Render To Texture 2008-11-26 17:47:42 +00:00
ImageViewport.h VideoTexture: new ImageRender class for Render To Texture 2008-11-26 17:47:42 +00:00
Makefile VideoTexture: reactivate VideoTexture for scons/cmake/makefile compilation systems, fix video streaming, fix camera support in Linux, add multi-thread cache service, fix crash when a VideoFFmpeg object could not be created. 2009-03-05 15:16:43 +00:00
PyTypeList.cpp VideoTexture: Bug report #17946: add (char*) casting to fix compile error with Python get-set method and module object. 2008-11-04 09:21:27 +00:00
PyTypeList.h VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3 2008-11-02 18:02:31 +00:00
SConscript VideoTexture: reactivate VideoTexture for scons/cmake/makefile compilation systems, fix video streaming, fix camera support in Linux, add multi-thread cache service, fix crash when a VideoFFmpeg object could not be created. 2009-03-05 15:16:43 +00:00
Texture.cpp VideoTexture: VideoTexture.materialID() can now take texture image name. 2008-11-07 10:54:32 +00:00
Texture.h VideoTexture: new ImageMirror class for easy mirror (and portal) creation 2008-12-04 16:07:46 +00:00
VideoBase.cpp Added m_zombie to the base python class (PyObjectPlus), when this is set all the subclasses will raise an error on access to their members. 2009-04-17 20:06:06 +00:00
VideoBase.h VideoTexture: Preserve alpha channel if present in video, images and sequences. Better detection of end of video. 2008-11-09 21:42:30 +00:00
VideoFFmpeg.cpp VideoTexture: reactivate VideoTexture for scons/cmake/makefile compilation systems, fix video streaming, fix camera support in Linux, add multi-thread cache service, fix crash when a VideoFFmpeg object could not be created. 2009-03-05 15:16:43 +00:00
VideoFFmpeg.h == FFMPEG == 2009-03-22 19:19:21 +00:00