Selection Thoughts
All  1-3  4-6

Previous
Next
 From:  Marc (TELLIER)
1073.4 In reply to 1073.2 
Hi Michael,

Thanks again for the scripts, the behavior of "lock objects with show points" script is just what I was looking for.


"Normally I'd recommend hiding other objects that are in the way, but this may be useful as well."

Hiding other objects is a very useful and quick workflow but I often find I do adjustments on my curves or profiles in relation with existing geometry, especially with sweep lofts, etc...


I there a simple way to tweak the script to behave like this?;
-Command would trigger "show points"
-Selection set would be locked (as in script).
-Escape two times would exit the script. (Like current show points behavior) and therefore unlock the selection.


For the lock selection set feature, I was initially thinking of a toggle On-Off lock that would lock selection and prevent adding other object, similar to the "show points lock" script you have made.

Regards,

Marc

EDITED: 31 Oct 2007 by TELLIER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1073.5 In reply to 1073.4 
Hi Marc,

> I there a simple way to tweak the script to behave like this?;
> -Command would trigger "show points"
> -Selection set would be locked (as in script).
> -Escape two times would exit the script. (Like current show
> points behavior) and therefore unlock the selection.

There is for the first 2 things, that would be this:
code:
script:moi.geometryDatabase.showPoints(); var objs = moi.geometryDatabase.getObjects(), locked = moi.geometryDatabase.createObjectList(); for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( !obj.showPoints ) locked.addObject( obj ); } locked.lockSelection();

So that turns on the special "locked points" mode with one key.

But for the moment Escape won't work to exit this mode, you will need to use this on a different key instead:
code:
script:moi.geometryDatabase.getObjects().unlockSelection();

However, I have tuned up Escape for the next release to handle this - if nothing is selected when you push Escape (which will be the case on the second time that you push it), it will look to see if there is any locked selection and if there is it will clear the locked selection.


> For the lock selection set feature, I was initially thinking of a toggle
> On-Off lock that would lock selection and prevent adding other object,
> similar to the "show points lock" script you have made.

Then I guess that means locking all the objects that are _not_ currently selected... That would be this:
code:
script:var objs = moi.geometryDatabase.getObjects(), locked = moi.geometryDatabase.createObjectList(); for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( !obj.selected ) locked.addObject( obj ); } locked.lockSelection();

I'm not quite sure if that is what you wanted?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Marc (TELLIER)
1073.6 In reply to 1073.5 
This works great, many thanks Michael!

With Autohotkey, I have assigned my escape key to send two keystroke simultaneously in moi.
One is the normal escape key and the other is my shortkey to unlock (ctrl+k).

I will test drive some more when I get some time, but it seems to work A-1.

Regards,

Marc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4-6