[Bf-committers] Declarative UI Experiment
dan at trollwerks.org
Sun Aug 8 18:19:49 CEST 2010
I, for one, welcome our new declarative UI overlords.
You could have C poll functions through something like <prop data=
"context.scene.render" ... poll="poll_panel_foo"/> and have blender look up
the function address of 'poll_panel_foo' with libffi (and cache it) and then
call it with whatever arguments you need through rna (or whatever calls the
ui drawing stuff).
Or, if this newfangled xml thing takes off you could replace the python xml
parser with a C implementation (like libplugin which I've been half-assed
getting blender to work with...ok, it works I just haven't done anything
with it yet) that already has this libffi/xml foreign function lookup
Also think it would be a lot easier for us non python/rna experts to figure
out how to pop a variable into an existing panel (with custom poll functions
even) using xml rather than using the the current system which is somewhat
confusing to put it mildly and AFAICT it isn't possible to do that currently
without modifying the python scripts directly which makes it very, very hard
to add dynamic/replaceable stuff to blender.
But, having said all that, there's always <script
type="python">print('hello, world')</script> that would be trivial to
implement with either a python or C xml parser.
More information about the Bf-committers