Notifications
Clear all
[Closed] What kind of plugin to add an additional rollout to materials, etc?
Mar 05, 2014 11:49 pm
Like how mental ray attaches additional rollouts to certain classes, etc. What classes should I be looking at that do this, vs. creating an entirely new object? I want to add, for example, presets to vray materials that would just add a presets rollout.
2 Replies
1 Reply
This is the one of meny concepts for the start
–CA definition
--CA definition
materialNote = attributes mtlNote
(
parameters notesParm rollout:notesRoll
(
--note type:#string ui:et_note
)
rollout notesRoll "Material Presets"
(
listbox lb_mtl "Materials List:" pos:[4,5] width:158 height:10
listbox lb_shd "Shaders List:" pos:[163,5] width:158 height:10
--edittext et_note "" pos:[0,5] height:17
)
)
-- example (you can use any material from ME, from object, from library)
mtl = meditMaterials[1] = VRayMtl()
-- the next line will assigne new rollout to material only if not exists
if not (isProperty mtl #mtlNote) do custAttributes.add mtl materialNote
-- now you can get/set some text
--mtl.mtlNote.note = "Standard gray material"
--or if you want to extend existing note
--mtl.mtlNote.note += "
Standard gray material"
-- open material editor and look "Material Note" rollout inside first matrial.