Notifications
Clear all
[Closed] Mapbutton usage?
Nov 05, 2010 2:08 pm
Hi,
I have a scripted material plugin that is supposed to feature custom map buttons. Some of those mapbuttons shall be used to delegate the picked maps to the map slots of the extended standard material.
My problem is, that the “on picked” method does not work at all since I connected the mapbutton to the rollout parameters.
parameters main rollout:rMaps
(
useMultiTex type:#boolean default:false ui:chkMultiTex
multiTexMode type:#integer default: 1 ui:ddlMultitex
useDiffuseMap type:#Boolean default:false ui:cbUseDiffuseMap
mapDiffuse type:#textureMap ui:mbSelectDiffuseMap
mapMulti type:#textureMap ui:mbSelectMultiMap
)
rollout rMaps "Maps"
(
checkbox cbUseDiffuseMap "Diffuse"
align: #left
triState: 0
label labDMap "Map:"
align:#left
offset:[100,-20]
triState: 0
enabled:true
mapbutton mbSelectDiffuseMap "None"
align:#right
width:150
offset:[0,-20]
height:18
group "Multi Texturing"
(
checkBox chkMultiTex "Use"
align:#left
label labMTMode "Mode:"
align:#left
offset:[100,-20]
dropDownList ddlMultiTex ""
items:#("ENV_MAPPING","TEX_PAINT","ADD_BLEND","BUMP_MAP","LIGHT_MAP","NRM_MAP_DIR_AND_POS","NRM_MAP_DIR")
align:#right
offset:[0,-21]
width:150
enabled:true
label labMMap "Map:"
align:#left
offset:[100,0]
triState: 0
enabled:true
mapbutton mbSelectMultiMap "None"
align:#right
width:150
offset:[0,-20]
height:18
)
on mbSelectDiffuseMap picked map do
(
print "hello"
delegate.diffuseMap = map
delegate.diffuseMapEnable = true
)
I’m getting no “hello” when I pick a map
Suggestions anyone? Thanks in advance!
Bye,
Marco
edit: Actually I’d like to completely reject the “on picked” functionality and have the mapbutton directly connected to the delegated diffuse channel of the extended material.
1 Reply
Nov 05, 2010 2:08 pm
Ok, I think I found a solution:
parameters main rollout:rMaps
(
useMultiTex type:#boolean default:false ui:chkMultiTex
multiTexMode type:#integer default: 1 ui:ddlMultitex
useDiffuseMap type:#Boolean default:false ui:cbUseDiffuseMap
mapDiffuse type:#textureMap ui:mbSelectDiffuseMap
mapMulti type:#textureMap ui:mbSelectMultiMap
on mapDiffuse set val do delegate.diffuseMap = val
on useDiffuseMap set val do delegate.diffuseMapEnable = val
)