Hey guys, got a small MAXScript problem.
rollout test "Select Morph Target"
(
--Create filter for selecting an object with a morpher modifier
fn morphFilter obj = classOf obj.modifiers[1] == Morpher
--Pick button for object
pickbutton pickMesh "Select Obj With Morphs" width:140 height:40 filter:morphFilter
--List for morph slots to be filled
dropdownlist meshMorphs items:#() enabled:false
--Picked
on pickMesh picked obj do
(
--Ensure that nothing interrupted the picking
if obj != undefined then
(
meshMorphs.enabled = true
for i = 1 to 100 do
(
if WM3_MC_HasData obj.Morpher i == true then
(
append meshMorphs.items i
)
)
)
)
)
createDialog test 175 150
It should be pretty clear what I'm trying to do with the comments. I've done a little digging and found someone saying that you need to add a callback for this, but I've struggled getting it into my code without it erroring. If anyone could give me some tips I'd appreciate it a lot. Thanks.
Replies