turning diagonals of selected polys

Hey together!

Maybe someone can give me some advice:

You know the "Turn" button for editable polys, available in all selection modes, besides in vertex selection. Its a toggle button and I only can turn the diagonals one after the other by klicking on them. What I want is a script that turns the diagonals of all selected faces all at once.

I figured out the command:

<bool><EditablePoly>.TurnDiagonal <index>face <index>diagonal

Now I need to run this command on every selected face - I suppose it must be done using a loop that runs through an array of the selected faces. I'm right, am I not?

It sounds quite simple to me, but since I´m lacking coding skills, its very difficult for me to get that thing to be functioning.

If the effort is not to high, I would be very appreciated for some hints or even the explicit code.

kind regards
froyd

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Budi G's picture

it's ok, no problem :) I'm

it's ok, no problem :)
I'm glad if that helped you

froyd's picture

You are great! You saved me

You are great! You saved me hours of work!

The 2 lines at the bottom are exactly what I had in mind. The relevant meshes solely contain polys with a diagonal-index of 1, so it perfectly does the job that I'm tired of...
I thought that it must be that simple. :)

Cant thank you enough for that , mate!

.: nosce te ipsum :.

Budi G's picture

hey froyd ! try this

hey froyd !
try this one:

facesel = polyOp.getFaceSelection $.baseobject
for i in facesel do (for x=1 to 10 do $.EditablePoly.TurnDiagonal i x)

you must select any face first then run this script.

This time I don't know how to get many TurnDiagonal array in one face, but i just think it's seldom get more than 10 of Turndiagonal.

so if you think it's possible to your model, in deep looping that code, you can changed the number 10 by any number. but if get more than 10 just be careful because it's make adding burden the memory.

well, if you don't care about how many Turndiagonal .
so a simple code like this :

facesel = polyOp.getFaceSelection $.baseobject
for i in facesel do $.EditablePoly.TurnDiagonal i 1

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.