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
Forum topic · Scripts Wanted
need help please...
By titane357 · 2011-05-13
Comments (6)
Comment policy
BitArray.NumberSet
Hi Titane,
shortly getFaceSelection() return BitArray.
I think this example will explain what you need:
Cheers!
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
---
problem is : the selection order is not conserved....
so, the job done :)
Working with BitArrays is more faster than Arrays,
but use what you like and found as easy ;)
Example
Cheers!
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