Quick weighting script not working on 3ds max 2016 !

Quick weighting script not working on 3ds max 2016 !

Anonymous
Not applicable
1,344 Views
1 Reply
Message 1 of 2

Quick weighting script not working on 3ds max 2016 !

Anonymous
Not applicable

in case you don't know , the quck weighting script allows you to press a key (that you'll set in costume user interface ) then move your mouse to change the weight value on any selected vertexes .

if you ever made a rig , or tried making one , you'd know how tedious it is , this script can be a real time saved .

macroScript QuickSkinVertexWeight category:"Custom Skin Tools"
tooltip:"Quick Vertex Weight Tool" 
(
                tool AssignSkinVertexWeightTool
                (
                                local original
                                fn setweight wt = (
                                                if (wt < 0) then wt = 0
                                                if (wt > 1.0) then wt = 1.0
                                                skinOps.setWeight $.modifiers[#Skin] wt
                                                $.modifiers[#Skin].effect = wt
                                )                                   
                                on mousePoint clickno do (                         
                                                if clickno > 1 then return #stop                  
                                                original = $.modifiers[#Skin].effect
                                )
                                on mouseAbort clickno do (
                                                setweight original
                                )
                                on mouseMove clickno do (
                                                newval = (original + (gridDist.x  * 0.01))
                                                setweight newval
                                )
                )
                startTool AssignSkinVertexWeightTool prompt:"Set Vertex Weight"
)

when using it , a message appears saying " --No ""+"" function for undefined " , as you can see in the attached pic

if you want to see what happens when it works : https://youtu.be/Ya02rmjNsUM?t=6m26s

 

0 Likes
1,345 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

I am a noob as scripter in MaxScript though maneged to fix it somehow, works for me in 3ds max 2018.

 

macroScript QuickSkinVertexWeight category:"Custom Skin Tools"
tooltip:"Quick Vertex Weight Tool" 
(
                tool AssignSkinVertexWeightTool
                (
                                local original
                                fn setweight wt = (
                                                if (wt < 0) then wt = 0
                                                if (wt > 1.0) then wt = 1.0
						skinOps.setWeight selection[1].skin wt
						selection[1].skin.effect  = wt
                                )                                   
                                on mousePoint clickno do (                         
                                                if clickno > 1 then return #stop                  
                                                original = selection[1].skin.effect
                                )
                                on mouseAbort clickno do (
						original = selection[1].skin.effect
						setweight original
                                )
                                on mouseMove clickno do (
						original = selection[1].skin.effect
                                                newval = (original + (gridDist.x  * 0.01))
						setweight newval
                                )
                )
                startTool AssignSkinVertexWeightTool prompt:"Set Vertex Weight"
)
0 Likes