[Bf-committers] User-defined Material Properties

Campbell Barton cbarton at metavr.com
Thu Oct 13 00:31:41 CEST 2005

Greg MacDonald wrote:
> Hi Ton,
> Thanks for responding.
> On 10/12/05, *Ton Roosendaal* <ton at blender.org 
> <mailto:ton at blender.org>> wrote:
>     Hi,
>     Yes, having custom properties for (most of) Blender's internal data is
>     on the wishlist already for long. :)
>     It should also be used - for example - by yafray or other external
>     render modules or game engine exporters. We still have to meet
>     with the
>     developers about that topic.
> How does that work? On IRC?
>     How it would integrate in the UI is also an issue... at this moment I
>     would prefer to do this work in a way other projects benefit from as
>     well.
>     For example; one could execute a script (or we do it builtin for a
>     couple) that creates by default the preset properties for a specific
>     purpose. So, instead of a Yafray Panel in Lamp buttons now, a
>     "Custom"
>     Panel can be used, then filled with the options Yafray likes to extend
>     lamps with.
>     Taking the idea further, it could work well if the property system can
>     become hierarchical, or at least grouped in multiple lists. That way
>     you can have a group of Yafray properties, Crystal Space properties,
>     OpenFlight properties... for each group you can also define to have it
>     filling a new Panel in the buttons menus, with a nice clear title.
>     Oh, and then the Property system should become a bit more
>     flexible, for
>     example to define types of buttons, or layouts... or, we let Python
>     draw such property Panels.
> I think we could do this in steps:
> 1) Add the property type that's currently being used for game 
> properties to as many DNA structs as makes sense.
> 2) Add custom panels where appropriate, that would take care of the 
> ui. (Maya does it this way with an 'Extra' tab off of each node.)
> 3) Expose all properties to python scripts.
> 4) Add the ability for python to create panels and buttons.
> 5) Add the ability for python to add custom menus. For example, an 
> entry could be added to the ADD toolbox menu to execute a script and 
> add a custom object. Maybe this could be setup in a config file.
> I'm confident I can handle steps 1-3. I think those steps are pretty 
> straight forward.
> 4 and 5 should probably be done by someone who understands the gui 
> better and could do some neat things like allow python to draw with 
> opengl inside a panel.
> I really would like to start working on this ASAP. But I'm not about 
> to start without everyone's blessing. It would be very depressing to 
> spend months on this only to have it discarded. If wanted an excercise 
> in futility I could try and write my own 3D package, in assembly, and 
> for a VAX.
> So how should I proceed? Should I attend the IRC sunday meetings? Or 
> is just getting feedback here good enough?
> -Greg

Hi Grag, the way I see it- adding a linked list of properties to the ID 
struct is a good way to start.
These properties could be string, int, float, vector? and parent,  where 
parents can hold a  subdir of properties.

If you can do 1,2 & 3 then this should be enough to commit an initial 
milestone, it will allow python to access and change properties used by 
python scripts.
The simulation industry is just waiting for something like Blender to 
come along, many people are not happy with MultiGen Creator- and as Greg 
pointed out it feels like windows 3.11 and more pricy then Maya.

Since Greg is keen to work on this,
Can we make 1,2,3 a milestone, only if it meets the bf-commiters 
standards of course.
Many python scripts could then make immediate use  of the properties, 
and a generic python properties editor could be used initially before 
Blender has it integrated.

Greg, Sunday Meetings are fro discussing pending patches, releases... 
but you can often catch developers before/after the IRC meeting.

#4 may be a nasty poser, probably need somebody experienced to work on 
this one.

#5 is just a matter of copy and paste the right code, Python/Blender 
alredy has an "Add" menu  slot,  its just not  included in the normal 
add menu.

- Cam

> ------------------------------------------------------------------------
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers

Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241

More information about the Bf-committers mailing list