Jump to content

Cropped Perspective Script?


Recommended Posts

Is it possible to access the "Cropped Perspective" setting under Document Preferences with scripting so that it can be made a menu item? My end goal is to assign it to one of my 3Dconnexion mouse buttons to be able to quickly toggle it on and off. I assume the answer might involve scripting, but I don't have any experience with that.

  • Like 3
Link to comment

The following will toggle the crop on and off when you are in a perspective view.

 

SetPref(127, Not GetPref(127));

 

Copy that line, go to Tool:Plugins:Plugin Manager.  Click the New button and choose Menu Command. Click Edit Script and paste in the line above. Click OK. Click Close.

 

Edit your workspace to include the new command.

 

Let us know if you need more help.

  • Like 3
Link to comment

I've added this script as a custom command saved at the bottom of the View > Projection menu. I also assigned the shortcut "Cmd+Opt+C" to quickly toggle Cropped Perspective. Works beautifully.

 

1233304552_ScreenShot2020-07-01at10_40_08AM.thumb.png.4e7ae710a61d9e059dcd8a91a6965de0.png

 

I also added some Macros to my SpaceMouse buttons, one which switches to OpenGL/Perspective, and the other activates the toggle Cropped Perspective command.

Edited by Andy Broomell
  • Like 2
Link to comment
  • 4 years later...
On 6/19/2017 at 2:23 PM, Pat Stanford said:

Andy or Pat, how do I assign a shortcut key to the cropped perspective command? I am using 2022 and it doesn't have cropped perspective or it's somewhere I can't find it so I followed your plug-in instructions and added it to my menu like Andy did, however I do not know how to assign shortcuts. Thank you.

Frank

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...