NodeBox for OpenGL is a free, cross-platform library for generating 2D animations with Python programming code. It is built on Pyglet and adopts the drawing API from NodeBox for Mac OS X ( ). Screenshot: examples/07-filter/03-mirror.py Quick overview It has built-in support for paths, layers, motion tweening, hardware-accelerated image effects, simple physics and interactivity. You'll need a 32-bit Python (version 2.5 or 2.6) and Pyglet to run it. NodeBox for OpenGL does not have a built-in code editor. You can use the IDLE editor bundled with Python. Users are assumed to have knowledge of Python (functions & classes) and NodeBox (the original docs are more verbose). The documentation works in conjunction with the examples folder: subjects are touched here and demonstrated in more detail across various examples.įrom the command line, you can run a script with: python example.py (or command-R in TextMate). This will open an application window with the output of your script. To get started, try out some examples, or open and edit examples/test.py.īelow is a typical NodeBox script. It imports the aphics module with the standard set of drawing commands. Not optimal, but case solved.It opens the main application window with n().įrom import Flock It defines a draw() function and attaches it to the canvas, so that it will be drawn each animation frame. I gave up :/ workaround: c# communicating with nodebox over xml and filesystemwatchers. ![]() how do i implement it now?!įixed by surfing: link text and adding unicodedata.py and '.pyd to C# Projectfolder. Start a discussion in 'NodeBox 3' Your Name Email Subject No formatting (switch to Markdown ) Attach File You can attach files up to 10MB Verify Human If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam. No module named unicodedata, but in Python26/DLLs is only a *.pyd file`. Updating with results.įixed by adding following line right after first line in C#-Code: setup.Options = true Now the following Error: 'module' object has no attribute '_getframe' Fixed it by just using the line: from pyglet.gl.lib_wgl import link_GL, link_GLU, link_WGL SampleCode Python (test.py): from aphics import *įrom import Vector, Boid, Flock, Obstacleįlock = Flock(50, x=-50, y=-50, width=700, height=400)įlock.update(separation=0.4, cohesion=0.6, alignment=0.1, teleport=True) ScriptScope scope = engine.CreateScope() ScriptSource source = engine.CreateScriptSourceFromFile("test.py") ScriptEngine engine = Python.GetEngine(runtime) ScriptRuntime runtime = new ScriptRuntime(setup) SampleCode C#: ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null) How do i include them in my c# project to be called? No idea so far. Problem is in pyglet and referenced c-Objects. Updated my sourcecode with a small pyglet window-rendering example. ![]() Have read some articles about Tao-Opengl and OpenTK but can't find a good solution. Is there a certain workaround for my problem or a fix for the library-folder missmatch. ![]() Thats why i have copied all my modules into the project-folder and would like to keep it that or a similar way. The project needs to stay as small as possible without installing new packages. It seems that the pyglet module needs a reference to GL/gl.h, but can't find it due to IronPython behaviour. I have already included all python-modules needed, but im still getting a I'm trying to setup my C# project to communicate with Nodebox to call a certain function which populates a graph and draws it in a new window.Ĭurrent situation:
0 Comments
Leave a Reply. |