Detecting mode?

Detecting mode?

I'm trying to work on a simple tool to transform the current selection, be it polygon, edge, etc. My first thought was to just check the core() for a selection of each type, but then I remembered that each mode has its own persistent selection, so that wouldn't work.

Is there a way for a script to tell what mode the document is in, or will I just have to make a pulldown to choose which selection to use?
 
Hmm... am I doing something wrong? This code:
Code:
function move(tool){
  var doc = tool.document();
  var mode = doc.editMode();
  ...
comes back with the error: doc.editMode is not a function
 
Hi,
I'm sorry. I just discovered that this is a v4.0 script function. It isn't available in v3.6.

Sorry for the confusion.

Bye,
Martin
 
Back
Top