[Bf-committers] User data for external renderers, et. al.
Robert Wenzlaff
bf-committers@blender.org
Fri, 19 Sep 2003 18:38:02 -0400
One of the problems with using external renderers with blender, it that the
current material system's parameters don't neccessarily corespond to the
external renderer's (I will use for example here, Index of Refraction).
I propose implimenting a new data type, UserData. It will be a linked list
struct consisting of two char*'s. the fist is the "key", the second is the
data. The user can put arbitrary strings in here and Blender will ignore
them, except that they will be available to the conversion routines that
export to external renderers (either python, or built in such as the RIB
interface.) Each type of Blender object would then be extended to have a
pointer to a UserData object.
So to make a leaded glass material for Yafray, I would add a userdata value of
("IOR", "2.30") to the Blender material. It would be up to the Yafray
script to convert that to what Yafray needs. It could also be used for
simulation data, (each mesh passed to the Topix lib could have different
properties, for example.)
The UI could be handled like vertex groups. A pulldown button allows you to
select the currently displayed member, and a Shift-LMB allows you to type a
value.
Thought? Or should I just code it up for Tuhopuu?
--
**************************************************
Three rings for the Elven Kings....
after that, their answering machine picks up.
**************************************************
Robert Wenzlaff rwenzlaff@soylent-green.con