creating a short cut key - Boolean
All  1-5  6-9

Previous
Next
 From:  Michael Gibson
8438.6 In reply to 8438.5 
Hi peter, I"m glad that you're getting up to speed and that MoI is being helpful for you!

For the "on surface" snap, if you right-click on the snap for "on surface", that's a built in shortcut which will turn on just that one snap and turn off all the others. Then later on when want to turn them all on right-click on it again.

It is also possible to set up a keyboard shortcut to do it too, for that copy/paste the following script code in as the command part of the shortcut key:

script: /* Switch between only onsrf osnap on or all on */ var snaps = ['objectSnapOrigin', 'objectSnapAxis', 'objectSnapEnd', 'objectSnapMid', 'objectSnapCen', 'objectSnapInt', 'objectSnapQuad', 'objectSnapPt', 'objectSnapOn', 'objectSnapOnSrf', 'objectSnapPerp', 'objectSnapTan', 'objectSnapPerpPerp', 'objectSnapTanTan']; var da = moi.drawingAids; var allon = true; for ( var i = 0; i < snaps.length; ++i ) { if ( !da[snaps[i]] ) allon = false; } for ( var i = 0; i < snaps.length; ++i ) { da[snaps[i]] = !allon; } if ( allon ) da.objectSnapOnSrf = true;

- 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
Next
 From:  peterk
8438.7 In reply to 8438.6 
Hi Michael,

Thank you for that though unfortunately I have no idea of how to add a script in terms of where to put it and then access it. The right click on object snap has served wonders, very well thought out in terms of usability!
  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:  Frenchy Pilou (PILOU)
8438.8 In reply to 8438.7 
http://moi3d.com/3.0/docs/moi_command_reference11.htm#shortcutkeys

You have just to Press the key(s) that you have defined !
  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:  Michael Gibson
8438.9 In reply to 8438.7 
Hi peter, to set up the script first go to the Options dialog, the button for it is on the bottom toolbar right-hand side. The left-hand side of the Options dialog has different categories listed, click on the "Shortcut keys" label. Now you're in the list of shortcut keys and you can click the "Add" button to add in a new shortcut key at the top of the list.

A shortcut key is made up of 2 text fields, a "Key" field on the left column and a "Command" field on the right column. You put whatever keyboard key you want to use in the "Key" column, for example if you want this snap script to run when you push the S key then just type in S for the Key part.

Then for the Command part that's where you should paste in the script from above, highlight the chunk of text that starts with script: in your web browser, copy that then click in the Command field for your new shortcut key and paste.

- 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1-5  6-9