Hello
I need a script to move up selected polys with step(to make stairs)
Best should be to move selected elements with a UI to give the value... (stairs can have multiples polys)
Sorry, but I need this, and I can't do it myself, if somebody can help ? :-) Thanks
Comments
BitArray.NumberSet
Hi Titane,
shortly getFaceSelection() return BitArray.
I think this example will explain what you need:
Cheers!
my recent MAXScripts RSS (archive here)
Hello ! Perhaps not very
Hello !
Perhaps not very elegant, but it works... I don't know how to use bitarray, so I convert to array...
Thanks ! :-)
-----
h=0
poly = selection[1]
fSel = polyop.getFaceSelection poly
classOf fSel -- BitArray
fSelA = fSel as array
for a=1 to fSel.numberSet do
(
h+=10
print fSel.numberSet
vList = polyop.getVertsUsingFace poly fSelA[a]
polyop.moveVert poly vList [0,0,h]
)
update poly
---
so, the job done :)
Working with BitArrays is more faster than Arrays,
but use what you like and found as easy ;)
my recent MAXScripts RSS (archive here)
problem is : the selection
problem is : the selection order is not conserved....
Example
Cheers!
my recent MAXScripts RSS (archive here)
Hello Anubis ! Thanks for
Hello Anubis !
Thanks for help but I don't understand something.
I need to make a loop to move up each face with an incremental value.
Can I tape : "fSel.count" ? because fSel.count give me total faces, not just selected faces.
I know that I'm a poor scripter but I don't understand what is wrong with the following...
h=0
poly = selection[1]
fSel = polyop.getFaceSelection poly
for a=1 to fSel.count do
(
h+=1
vList = polyop.getVertsUsingFace poly fSel[a]
polyop.moveVert poly vList [0,0,h]
)
update poly