PDA

View Full Version : Could someone explain...



Karl Hansson
03-26-2003, 11:14 AM
Could someone explain the differance between selmode(DIRECT) and selmode(USER)? I dont understand it the way the manual explains it.:confused:

Lynx3d
03-26-2003, 01:23 PM
Did you check out the LScript reference too?
It says:

GLOBAL: All elements, whether or not they’re selected by the user.
USER: Only those elements selected by the user. This includes the
implicit selection of all elements when nothing is explicitly
selected, and selections by volume.
DIRECT: Elements selected directly with the point or polygon
selection tools. This applies to both points and polygons regardless
of which is currently active in the interface.
The selection commands selpoint() and selpolygon() will
not function unless the USER selection mode is active.

So from what i understand:
USER: The things the user selected before running the script.
Direct: The things your script selected using the mentioned tools...but i'm not really sure if that is correct :D

Karl Hansson
03-26-2003, 03:41 PM
I didnt read the reference manual:rolleyes:.

DIRECT: Elements selected directly with the point or polygon
selection tools. This applies to both points and polygons regardless
of which is currently active in the interface.
The selection commands selpoint() and selpolygon() will
not function unless the USER selection mode is active.

Im really new to all this so bare with me. Hm... the selmode(DIRECT) is when the selection is made from the script...right? The selpoint() and selpolygon() functions is the selection tools within the script...right...? But those are only available in the USER mode?!? This is all very confusing.:confused: :)

wiffzack
03-27-2003, 01:20 AM
Yes i am confUsed too, I think it doesn t matter which one you choose (if your script don t select anything) ??

Lynx3d
03-27-2003, 02:43 AM
No, it definitely DOES make a difference...

I don't see anything that would keep you from changing the selection mode during your script...
but actually i have only written one script so far (uses selmode(USER) btw. you can get it here (http://www.bingo-ev.de/~mw1299/tutorials/uv_assimi.htm) ), and because even for that script had to accept compromises i straightly learned C and the SDK...(however 2.6 [if finally bugfree] would be able to do what i wanted back then...)

I guess the guys on the mailing list can help you much quicker and better...

Karl Hansson
03-27-2003, 11:21 AM
Where can I find this mailing list?

Lynx3d
03-27-2003, 11:35 AM
Here:

http://www.lightwave-outpost.com/mailinglists.html
(hm, pretty well hidden now, but at least i can now find the developer pages without google *lol*)

Tom Speed
03-31-2003, 09:00 PM
Hi,

USER mode will return the global count if there is no selection. What I do is use DIRECT mode to get an exact count, then switch to USER mode if I'll be selecting/deselecting later on.

Cya!
Tom