PDA

View Full Version : connect then deselect



lertola2
12-02-2010, 02:57 PM
Hello,

I have a project where I will need to split complex polygons into quads. What I do is select two points on the polygon, split it with the Connect tool, deselect the points and then select two more points and do it again. I would like to speed this process up a bit by writing a script that will invoke the Connect tool and then deselect the points in one operation. Unfortunately I don't know much about lscript. How would I go about activating the Connect tool from an lscript? And how do you deselect points using lscript? Any help would be appreciated.

Thanks,
-Joe Lertola

Lewis
12-02-2010, 03:35 PM
Hmm, I'm not sure I understand it since i wonder why would it be faster to deselect points with Lscript than with one key shortcut as it's now ?

lertola2
12-02-2010, 03:53 PM
Well I want to turn a two keystroke operation into a one keystroke operation. Now I have to press my keyboard shortcut for connect and then press the slash key to deselect. This would be twice as fast if I had an lscript that did both of those operations at once. Another advantage would be that I could keep my hand on the one key and my eye on the screen. I currently have to look down from the screen to the keyboard to to find the slash key.

-Joe

Lewis
12-02-2010, 04:26 PM
then maybe current (until you master LScript :)) fastest way would be to program you mouse buttons for both operations. I have programmed my mouse to drop tool and deselect all at thumb buttons so it's very fast process :).

You also could buy keyboard wtht programmable (macro) keys and put it there or use those Foot Step programmable pads so you could work with legs also (no kidding it's really cool tool).

check out how my mouse is set in LWmodeler.

lertola2
12-02-2010, 05:54 PM
That looks cool. But it seems that you would still have to press two buttons. I want a script where I can do it with one key press.

evenflcw
12-02-2010, 06:18 PM
Just put this in a file, name it whatever and install it. (Name will be the same as the filename).


@version 2.3
@warnings
@script modeler

main
{
selmode(USER);
cmdseq("Connect");
selpoint(CLEAR);
}

NT should have designed this tool to automatically deselect. Imho, for this type of case, that is the proper LW tool response/workflow. But NT seemingly has not cared to analyze what the cornerstones of the Modelers workflow really are (or have developed into). Personally I think we've needed such a document for way long, for NT and 3rd parties alike to adhere to. Oh well...

evenflcw
12-02-2010, 07:50 PM
Meah... looks like the function is dirty in more ways than one. It seems to put two entries on the undo stack in polygon and edge mode and when called through script it only makes things worse. It's also inconsistent in that under edge mode it does deselect edges. The real fix is for NT or someone else to rewrite it proper.

evenflcw
12-02-2010, 07:53 PM
Lewis, you're a heavy polymodeler (cars and all) and must have uses for a fast cutting tool like connect. It never bothered you that it kept and made all those selections? Or have you perhaps even found this useful more than 60% of the time?

lertola2
12-02-2010, 08:36 PM
Just put this in a file, name it whatever and install it. (Name will be the same as the filename).


@version 2.3
@warnings
@script modeler

main
{
selmode(USER);
cmdseq("Connect");
selpoint(CLEAR);
}

NT should have designed this tool to automatically deselect. Imho, for this type of case, that is the proper LW tool response/workflow. But NT seemingly has not cared to analyze what the cornerstones of the Modelers workflow really are (or have developed into). Personally I think we've needed such a document for way long, for NT and 3rd parties alike to adhere to. Oh well...

Thanks so much. This makes using the connect tool much faster. I really appreciate it.

-Joe

mikadit
12-02-2010, 10:13 PM
It's possible to change the selection mode to be able to fast deselect any selection. The main point would be to store the current selection mode before starting the script, but I think that someone would like this way too, otherwise would need 3 script, one for each selection mode.
Would be interesting to know a way to detect and store the selection mode.

@version 2.3
@warnings
@script modeler

main
{
selmode(USER);
cmdseq("Connect");
selpoint(CLEAR);
cmdseq("Sel Polys"); // last selection mode: Polygons
cmdseq("Deselect All");
cmdseq("Sel Edges"); // last selection mode: Edges
//cmdseq("Sel Points"); // last selection mode: Points
// add or remove the double slash at the beginning of the command to ignore or not that line
}

Foud this thread, about the selection mode:
http://www.newtek.com/forums/showthread.php?t=338

Lewis
12-03-2010, 12:22 AM
Lewis, you're a heavy polymodeler (cars and all) and must have uses for a fast cutting tool like connect. It never bothered you that it kept and made all those selections? Or have you perhaps even found this useful more than 60% of the time?

I'm usually using "CUT tool" and that one has it's own set of setting sin "tool options" menu. And usually i do need points selected after it which i can transfer to edges selection or so. But then you are right it could be smarter and allow settings for keeping selections and loosing them like "make poly" tool which has that option in "edit modeler tools" panel.

probiner
05-24-2011, 01:23 AM
Just put this in a file, name it whatever...

Great, now when i want to connect things i run whatever.ls... :D

Thanks for this