View Full Version : IS there any lscript programmer here that can help me out please

10-10-2012, 01:24 PM
Hey guys n girls

Ime looking for someone here who is into lscripting
for a small script, so if anyone have the time and want to help
i would like to hear from you

BEst regards


10-10-2012, 01:26 PM
What are you trying to get help on?

10-10-2012, 01:32 PM
well ime not a programmer and ive been doing some searching but my brain seems not to be helping :/

when i model especialy with subpatching i use Connect alot
connect between points and edges and polygons

the problem is if i select points and then connect, the points is still selected so i need to deselect them
after i have connected each time, Very anoying
same goes for polygons.
edges deselect fine

so ime thinking if someone could make a small lscript or somthing
that could call the two internal modeler commands
so first Connect and after that deselect some how
so i can put that on a shortcut insted of the standart connect.

Making any sense ?

10-10-2012, 02:15 PM
I don't lscript in Modeler much so use this at your own risk.

10-10-2012, 02:29 PM
Thanks man, ill test it out right away :)

10-10-2012, 02:34 PM
awesome, seems to work very well

Thanks a bunch man

10-10-2012, 02:39 PM

The code is commented so you can see what it's doing.

10-10-2012, 02:56 PM
Thanks, for your fast and effective support

10-10-2012, 03:24 PM
Do file a feature request anyway (NT seldom consider workflow issues actual bugs if past reports are anything to go by). That selection remains for such an operation goes against what I would claim to be the standard behaviour/workflow in Modeler. And I can't figure out a good motivation why it this should be different from the norm.

10-10-2012, 03:30 PM
The only thing one might add to the script is to figure out what selection mode one is in, so you don't clear selection for the mode you are not in*. Some workflows do include storing a selection in one mode for later use, while performing edits in another mode. Which is another workflow issue some kungfu tools have - when you undo them, they don't restore the initial selection.

*This is not readily possible in lscript as there are no statechecks available for selection mode... but you should be able to determine this by checking point/polycount under different modes. Probably lots of gotchas doing that though.

10-10-2012, 03:56 PM
Well thing is right now as a hobbyist i dont have the money to update to lw 11 :(
so if i filed it and they made it i wouldnt get it but for future
and for helping others yes it might be a good ideer.

Ime though not experienced in filing stuff
What do i do to do so ?

10-10-2012, 03:59 PM
evenflcw what about "Drop Current Selection" command? It doesn't mess with the selection in other modes, just the current one.

Though if tools start to evolve by defining axis and origins with secondary selections there it is again.

10-10-2012, 04:48 PM
Can't find "Drop Current Selection" in list of callable commands, unfortunately. I think some guy on the forum might have provided an lscript library (c compiled using sdk) that provides the state of the current selection mode. The drawback is that, being c compiled, this library is not platform independent, as the lscript is. But with python now available and shaped after the sdk, the current selmode should be possible to query from platform independent non-compiled code. So either one codes the whole thing in python, or just the query part (execute the python script from lscript which write selmode status to file and then read it from the lscript). Not as neat as a proper lscript library, but it is possible without compiling anything.

Don't quote me on this... I'm only assuming it's possible to check selection mode in python, as it is from c-sdk, and the former takes after the later. It might not have been implemented yet, for all I know.

10-10-2012, 04:52 PM
cool, also check >

Lightwave plugin - cp MergeDeselect

Can't find "Drop Current Selection" in list of callable commands, unfortunately.
what about > selpolygon(CLEAR);

10-10-2012, 04:58 PM
thats a cool script " both " you could merge them no pun intended

10-10-2012, 05:06 PM
Erikals... the problem is that connect works in both point and polygon selection mode and from lscript there is no direct or easy way to determine what mode you are in. You want to call either selpolygon(CLEAR) or selpoint(CLEAR), not both, depending on what the selection mode is. For the most part (probably 95%) Nickdigitals script is fine though and few will be bothered by both being called. I'm perhaps just nitpicking (about his script, not about the original tools behaviour).

10-10-2012, 05:07 PM

I thought about the selection check as I did see that this would bork what someone has selected in another mode. Unfortunately I doubt I'll get to it. I'm better with Layout in lscript than Modeler and free time is a rarity right now If someone wants to take it and run with it then by all means go for it.

Trying to address mis' challenge was a 10 minute lscript challenge for me. :)

10-10-2012, 05:28 PM
A hack workaround would be to clone the script and remove the code that clears the specific selection. Then you can have one for points and one for polygons. But then you have multiple tools when ideally it should just be one.

10-10-2012, 11:12 PM
well i can see how to some the deselecting of all selections could be hmmmm
but to me its really not a problem as it is now
however making it in python would only make it lw 11 compatible right
then all other lw versions wouldnt have any use of the script
wich would be sad

10-15-2012, 02:41 PM
OKay i used it for a project today and its really great though theres one tricky bit with it
cause it release both points an polys, and by doing that
it shifts to polys each time its used
also if ime in point mode
so i need to change back to point mode each time hmmmm

10-15-2012, 04:31 PM
Per evenflcw's earlier post I'm not sure I can fix that but I can look at it...just not sure when that'll happen. I wonder if changing the order of the clear commands will mean you switch to points mode after running the script.

10-15-2012, 04:49 PM
that might bee but again then the problem is back if you connect polys cause then it will switch to points as they where last in the list then

10-15-2012, 05:32 PM
that might bee but again then the problem is back if you connect polys cause then it will switch to points as they where last in the list then

Well the hack workaround for now is to remove the sel clear command based on what you don't want deselected. However the connect command will still work either way. See the two attached. So if you run ConnectPlusPolys it won't switch to points mode and vice versa. Not really an elegant solution but at the very least it gives you a tool that you can use.

10-16-2012, 11:29 AM
So I found the "Deselect All" command in Modeler. The updated lscript is attached. I just did a quick test and it'll only deselect what you have currently selected when you run Connect. However edges still get deselected as it looks like doing that is part of the Connect operation.

10-16-2012, 11:51 AM
great stuff..!
i might be tweaking some Modeler tools now with these functions... :]


10-16-2012, 12:18 PM
Great :) Thanks

02-13-2013, 03:23 AM

any way to make this work with BandSaw Pro?

strangely it works with BandSaw, but not BandSaw Pro... http://www.deviantart.com/download/155470212/Wag_Finger_by_Mirz123.gif

02-13-2013, 06:12 AM
...just cloned the function to QuickCut...

Lightwave plugin - QuickCut_D

02-13-2013, 06:29 AM
...same, just for > Cut...

Lightwave plugin - Cut_D

02-13-2013, 10:40 AM
Very cool erikals!

02-14-2013, 04:20 PM
Thanks, though i should thank you :king:

07-09-2014, 03:44 AM
That selection remains for such an operation goes against what I would claim to be the standard behaviour/workflow in Modeler. And I can't figure out a good motivation why it this should be different from the norm.

Do a poly loop selection, run the connect tool several times, makes for a really fast way to add edge loops. I use it all the time.

07-09-2014, 04:50 AM

This issue has also something to do with LW selection model.

Imagine that if you are going to select some polys on a mesh with a selection already, the previous selection is dropped:

Now with this you don't make people want to drop selection all the time, because there's no need if they just want to move on to something else. Shift still would work to Add to the selection and Ctrl to Remove from the selection.
Because right now, if you do a selection you're locked on it, left clicking will just deselect polys from the current selection and that could be easily done with a modifier.
Well and Undo for selections... that would be a big one right now.

But this way there would be much less need to drop selections, but you could still do your example of running the Connect tool several times to add loops.


07-09-2014, 05:07 AM
Essentially you're suggesting changing Modeler's selection model, that many have become accustomed to.

07-09-2014, 05:13 AM
Essentially I'm talking about a toggle option in the settings,
You see people making a bunch of small scripts to accommodate drop selection (connect, merge) because they are not completely happy. And this suggestions is much less "destructive" than making a tool drop the selection.

Anyways I belive this would help in such cases, maybe I'm wrong. But this is definitely adding something and taking nothing, other than muscle memory.