I'm trying to access this function via maxscript, but I can't find it documented anywhere at all and the quad menu is a dead end. Anybody used this before, or know where I should start looking?
(
curObj = selection[1]
if classOf curObj == splineShape or classof curObj == Line then
(
-- get the indexes of selected knots
selKnot = getKnotSelection $ 1
if selKnot.count != 0 then
(
-- get knot type
knotType = for k in selKnot collect (getKnotType $ 1 k)
if selKnot != undefined do
(
for i in selKnot do setKnotType $ 1 i #smooth
updateshape $
)
-- set the knot type
for k=1 to knotType.count do setKnotType $ 1 selKnot[k] knotType[k]
updateshape $
)
else
messagebox "Select some knots!" title:"miauu Script Error!!!"
)
else
messagebox "Select only one spline!" title:"miauu Script Error!!!"
)
renderhjs, the link is added to the description. marks,is the code work for you or not? Now I see that the script can be optimized -there is no need for second check of selKnot.
Funnily enough thats exactly what our TA suggested trying, convert knot type to smooth and then back to bezier. I'll need to hack up the code to plug it into another function but it looks like it should work fine, thanks for the help - much appreciated.
Replies
This is the code:
marks,is the code work for you or not? Now I see that the script can be optimized -there is no need for second check of selKnot.