Auto Snap Mode

3 votes
Version: 
3
Date Updated: 
11/11/2016
Author Name: 
Shawn Olson

This is a simple (free) script that detects viewport changes. It will automatically set the current snap mode to 3D snaps when the current viewport is perspective, camera, etc; it will switch to either 2D/2.5D if the current viewport is set to standard orthographic projections.

The function only changes the current snap mode if:

1: Snaps are On
2: Either the target snap mode is 2/2.5 and the current snap mode is 3D OR the target snap mode is 3D and it isn't currently set to 3D. (In other words, for top/left/front the mode won't change if it is 2 or 2.5--it uses the current 2 or 2.5.)

Version 2: Already updated after some feedback. Now converted to a MacroScript and has some options. See Additional info.

Additional Info: 

This script is included in Wall Worm tools for Source as well as a separate download.

To install separately from WW, copy the script to your 3ds Max/scripts/startup folder and restart 3ds Max.

If you want to control the settings (default 2D/2.5D) run this in the MAXScript listener:

::WallWormViewPortController.loadSettings()

Version Requirement: 
Probably Any Version
Other Software Required: 
None

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mischesn's picture

Great and useful script

Thanks for this great script. Works in 2017 without a problem so far and it has already saved me I don't know how much time.
It never ceases to amaze me how Autodesk seems to not care at all about actually trying to make our lives easier by improving essential tools like Snap by small(in appearance) but smart things like your script does.

vfga10's picture

Works

Brilliant Script, so useful

lightcube's picture

Fixed the config setting

Fixed the config setting sanitizing function from always being set to true.

_______________________

Shawn Olson

Developer of Wall Worm

lightcube's picture

Ahhh. I stopped testing

Ahhh. I stopped testing anything in FF this last year. As my web development work has been replaced with 3D it's become too time consuming to test in all browsers. I guess I'll give that a look soon.

_______________________

Shawn Olson

Developer of Wall Worm

miauu's picture

.

Strange, it works with IE, but not with Firefox.

With IE I see two files:

StartAutoSnapMode2017.ms
ViewportAutoDimensionSnap.ms

With Firefox v.49.0.2 I see:
NaN error

lightcube's picture

Hmmm. Maybe that was when I

Hmmm. Maybe that was when I deleted and reloaded the file with an update (as I changed the script to have a macroscript and config settings). I just tested the page with chrome, IE and Edge and it worked here. You shouldn't need to login.

_______________________

Shawn Olson

Developer of Wall Worm

miauu's picture

.

Hi, Shawn!

When I follow the download link and go to Download Tab I see NAN error message. Do I have to be logged in to your site to be able to download the script?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.