[Bf-committers] Render Plugin Development

Campbell Barton cbarton at metavr.com
Wed Aug 15 17:50:23 CEST 2007

how about this - example is for render but this could apply to other 
plugin types?

Each render plugin has a slot in its struct for panel drawing function

if (render->pluginEnabled)
     for (panel = render->panels->material; panel; panel++) {....
          panel(..) /* draw the panel */

So each plugin can define any number of panels, lets ignore if blenders 
are removed or not (for now)

The panel funcs can draw the UI and manage settings. If the render 
plugin is disabled, it will not be in the button types draw loop.

Bobby Parker wrote:
> I wasn't suggesting that it be put in place immediately, but that some
> initial planning (and idea bantering) be done. We all know how
> software development and design works, and how hard it can be to
> force-fit something designed for one thing into a different
> model/paradigm. So I think while we have the opportunity to influence
> the design process to create a system that's as flexible as possible
> (within the bounds of what blender's intended for), that we should
> take that opportunity.
>> * As for render specific settings, I always imagined an extra panel that
>> would be used to select custom renderer settings.
>> However, the downside of this is the user would be faces with a large
>> number of settings and only a small number would be used in the final
>> output.
>>From the renderman perspective, not just render-specific settings
> (i.e. scene global) but object-level settings will need to be added
> for truly flexible support, so that would be *two* extra panels, if
> not more. I'm not terribly up-to-date on what other renderers might
> need, but I see the possibility for a range of object-level options,
> not just when it comes to Renderman.
> I don't know if the argument of a "large number of settings, and only
> a small number would be used" is necessarily correct. Depending upon
> the scene, they could all be used...but I have a suggestion:
> Instead of a panel that contains *all* settings, why not allow a user
> to ADD a given setting to an object's "custom properties" panel? ID
> Props provides us a usable framework to effect this, so we'd be
> dealing with a simple extension of that, perhaps by having a
> "RenderPlugin" subcategory of ID Props.
> I think about it working in much the same way you can add actions and
> constraints in the gaming engine.
> If we allow the export plugin to register a group of options that show
> up in a combo-box or something, the user can then choose the option to
> add, and voila', done. This will keep "option bloat" to a minimum and
> maybe result in a less cumbersome UI...not to mention it'll be less
> visually complex when troubleshooting a scene.

Campbell J Barton (ideasman42)

More information about the Bf-committers mailing list