PDA

View Full Version : Get-Selection-Region-Mode: Missing API?


Mr-BlueSummers
04-10-2008, 07:02 AM
Hey fellas,

How would you get the state of the selection region type? I.E. Box, circle, lasso, polygon, paint selection. There's a way to cycle through them [max cycle select], but is there any way to know what's currently in effect? Is there any way to change directly to Lasso or Paint selection?

Thanks!

Mr-BlueSummers
04-12-2008, 03:22 AM
Anyone? Is this really not exposed at all?
<Sorry, I should really wait more time>

ZeBoxx2
04-12-2008, 10:17 PM
can't say I've spotted anything with regards to getting/setting the mode... there's the cycle, and there's a toggle for the window/cross mode - but nothing on the shape.

EricDLegare
04-13-2008, 01:50 AM
I'm parking myself here waiting to see if it's possible... ( would be much useful ...)
:beer:

Mr-BlueSummers
04-14-2008, 12:17 AM
Glad to see I'm not the only one who wishes this was in the scripting language.

It's irritating that Autodesk developers aren't using the same APIs or tools that the rest of us have to use. It makes me want to switch to XSI to see what thier dev support is like...

Anyway; maybe there's a workaround?

Mr-BlueSummers
04-15-2008, 02:15 AM
I'm close to a potential workaround, but I'm missing one more thing. Is there any way to create a callback for a keypress (i.e. when keypressed "x" do ... : where the keystroke is not part of a textbox)?

Mr-BlueSummers
04-15-2008, 02:31 AM
Actually, the macrorecorder gave me a good lead. Here's the macro that hitting Q calls:


macroScript SmartSelect
enabledIn:#("max", "viz", "vizr") --pfb: 2003.12.12 added product switch
category:"Selection"
internalcategory:"Selection"
toolTip:"Smart Select"
buttontext:"Smart Select"
Icon:#("Maintoolbar",11)
(
Try
(
if toolmode.commandmode == #select then max cycle select
Else max select
)
Catch ()
)


Interesting. Rather than trying to get a callback when the user hits Q we can get a callback when the Q keystroke calls this macroscript. The file dir is

<maxroot>\UI\MacroScripts\Macro_Transforms.mcr


For example, and this goes for many UI bound macroscripts, we could include a global declaration such that "SelectionModeState" = 1 and is controlled by this macroscript. Now if you ever need to know what the selection mode state is you can call the global variable.

CGTalk Moderation
04-15-2008, 02:31 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.