[Closed] SpinQuads
Hi all ,
i’m looking for a scripter for make a spinQuad script , this feature is very useful and present in others 3D programs , by default in lightwave , in script in Maya etc…
I have find a spinEdges version in meshtools but i never could use it , each time i tried , max crashed … :argh:
A script who could turn automatically the shared edges between 2 polys , and keep the Quads , 3 steps will be possible .
anyone can make that ? i hope
Thanks .
little exemple :
Here you go:
http://www.scriptspot.com/bobo/mxs7/SpinEdge/SpinEdge.zip
Works when in Editable Poly base object – Edge mode in max 5,6 and 7.
Works when in Edit Poly modifier Edge mode in max 7.
Exactly ONE edge should be selected for the script to work.
Open Edges are obviously not supported.
You can press and hold SHIFT while clicking the icon to reverse the direction of the spinning. (works best when the script is placed as button on a toolbar).
Developed and tested in max 7 only. (will run it in 5 and 6 ASAP)
Please reports bugs and ideas to this thread.
Hey Bobo, damn you beat me to the punch…again. I tried your sciprt in max5 and it seems to work fine. Nice work.
Falfa- I too decided to write something like this. Bobos is a bit better though since mine only works for turning edges in the middle of a quad polygon. Mine doesn’t work with the Edit Poly modifier either. The upside is that mine can be used on multiple edges at a time, and the code is pretty short. Since I took the time of writing it I will post it here anyway, otherwise the time would be wasted. Perhaps someone can use it for reference later on.
The code as a macroscript:
Macroscript TurnEdges
category: "Rivendale"
tooltip: "TurnEdges"
(
if (selection.count == 1) and (Modpanel.getcurrentObject () == $.baseobject) and(Filters.Is_EditPoly() == true) do
(
if subobjectlevel == 2 do undo on
(
iniverts = polyop.getVertselection $.baseobject --initial vertex selection will be set at end of script
doedges = polyop.getEdgeselection $.baseobject --edges to work on
selverts = #()
okedges = #()
for i in doedges do --for all selected egdes do
(
dofaces = polyop.getFacesusingedge $.baseobject i --the faces of the edge
doverts = polyop.getVertsusingedge $.baseobject i --the verts of the edge
allverts = #()
for u in dofaces do
(
faceverts = polyop.getVertsusingFace $.baseobject u as array
for t = 1 to faceverts.count do append allverts faceverts[t] --put all verts of the 2 faces in allverts-array
)
otherv = (allverts as bitarray)-doverts -- the opposite verts from selected edge
if (otherv as array).count == 2 do (append selverts otherv ; append okedges i) --append selverts an array with 2 verts, if there is more than 2 verts, the faces were not triangular
) --finished checking all edges
polyop.setEdgeselection $.baseobject okedges
$.remove selLevel: #Edge --remove the selected edges
selvc = selverts.count
for g = 1 to selvc do --go through each array in selverts and connect the verts
(
polyop.setVertselection $.baseobject selverts[g]
$.EditablePoly.ConnectVertices ()
)
polyop.setVertselection $.baseobject iniverts --set the initial vertselection
redrawviews()
)
)
)
cheers,
CML
Thanks a lot Bobo :bowdown: , i will test it now !
Rivendale : thanks , i will test it too , it seems to be good
if i find a bug or an idea to improve i would say it to you .
Thanks again for you two
Ok , after few minutes of tests , i can say to Bobo : excellent ! that’s exactly what i need
Rivendale , unfortunatelly , when i try your script in editPoly on one edge , the edge disappear as if it were remove , i’m on Max 7 .
Aha ok, but it only works on edges that are crossing a quad, like so:
I have edited the script now so it doesn’t remove edges if you choose different kind of edge.
CML
Hey Bobo awsome my man just awsome, I did find one bug so far check out what repeat last command in Epoly does to the edge in Max 6 and 7 it generates some sort of chamfer/extrude/connect
cheers
Serge
You should not use Repeat Last Command in EPoly after using that script.
They are not compatible (RLC records the last command performed inside the EPoly, while the script performs LOTS of operations in a sequence and not just one).
I don’t think this is a bug, just don’t do it
Sounds good to me Bobo.I’ve Tagged this Bad boy of a macro to keyboard shortcut (Numpad 1) and man he works like a champ. What else can I say but bow down and say thank you, Hail to Bobo wish I had your brain power you are “The Man”
Cheers
Serge