Installation instructions
I reckon that this extension does not do much by itself, but now that most of the networking protocol was described in #10 I'd like to write a sample application connecting to it.
So I tried to install this addon by copying the brte folder from the cloned repo to my Blender installation addons folder. It did not appear in Blender "Add-ons" user preference, though.
Can this addon be installed as-if? If so, could you provide some instructions in this regard? If not, what is missing (and provided, I suppose, by the BlenderPanda addon) to this plugin to be able to register to Blender and accept connections?
Regards, Olivier.
brte does not register itself as a RenderEngine addon. It is mean to be subclassed and used as a basis for a an addon such as BlenderPanda. The debug folder contains a minimal example of such an addon. However, I haven't tested it in a while, and it may need to be updated.
Since your comment, I tried the following:
- upgrade my Blender install to respect the addon version constraint (
>= 2.75), - copy the contents of the
debugfolder in abrte-debugsubfolder of theaddonsfolder of my install, - copy the
brtefolder inbrte-debug, - replace
from addon import DebugEnginebyfrom .addon import DebugEngine
Following this "Render: RTE Debug" became available in the Testing category of the Add-ons dialog, as expected.
But when I tried to enable it, I got the following trace:
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\modules\addon_utils.py", line 330, in enable
mod = __import__(module_name)
File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\brte-debug\__init__.py", line 18, in <module>
from .addon import DebugEngine
File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\brte-debug\addon.py", line 6, in <module>
from .brte import engine
File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\brte-debug\brte\engine.py", line 29, in <module>
from OpenGL.GL import *
ImportError: No module named 'OpenGL'
Should I install an OpenGL binding (PyOpenGL?) in Blender's embedded Python? How does the BlenderPanda addon (which as I understand it imports the brte folder verbatim from this repo, like I did) addresses this?
I hope to get this debug addon working so that I can fiddle with the underlying protocol without having to write an addon from scratch. I have some python experience, but do not know the Blender scripting ecosystem much, nor what I can expect from the embedded python runtime.
Regards, Olivier.
brte relies PyOpenGL since Blender's bgl module was not sufficient for our needs. We're hoping that one day we wont need this (Blender 2.8 will introduce a new API, which sounds promising). BlenderPanda works around this by including PyOpenGL into its repo (see the OpenGL folder).
I am modestly progressing, but got stuck trying to get the default DummyProcessor running.
I get the following error:
File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\brte_debug\brte\engine.py", line 220, in gl_draw
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, image_ref[0], image_ref[1], 0, image_format,
TypeError: 'CArgObject' object is not subscriptable
Indeed, DummyProcessor.update does return a CArgObject, which is then received by RealTimeEngine.view_draw in image_ref and accessed by subscripts as shown above.
Should DummyProcessor be adapted to RealTimeEngine needs? If so, what type of object should it return?
Regards, Olivier.