I was originally going to call it ViewCube, but many other programs already call it that. So, Iām taking a chance. āLet a die be cast.ā So thatās how I have a reason to āplayā.
One of the things that inspired me was AutoCAD and other programs that use it. I made a basic version when Overlay came out, but it never worked properly, so it just sat in a drawer. The second thing was when Eneroth released North Arrow and Axes Overlay, I took mine out from a mist, and gave it a little play.
That is - you can see the beta version - here.
ViewDice Ā©Dezmo
ViewDice is primarily designed for the Overlays feature released in SU2023.
But I try to push its boundaries by allowing it to be used interactively alongside other Tools.
The idea is to automatically switch to tool mode when you hover your mouse on the characteristic point of the cube or the icons, so you can use your mouse/keyboard events to control the views, then āthe controlā will be returned to the tool currently in use.
However for some cases - see below - you need to use an assigned keyboard shortcut - instead of mouse click - to utilize the corresponding command. You might need to get used to pressing a button instead of a click, but thatās exactly the trick!
The assigned keyboard shortcut can always be used instead of a mouse click.
(This is changed in RC1, compared to Beta1- so you can not switch to Tool mode manually anymore.)
So, the features are:
(see additional features added in later releases bellow)
- Keep track of your model orientation including North angle and axes, with a simple rotating cube (dice), compass and some icons.
- 42 predefined āStandard Viewā.
- actually, you can double the above, because it can be set to use - display the dice according to - the global axis or the actual, user defined (or current context) axes.
- set view by cardinal directions (North, West, East, South)
- display the compass according of Solar North of the model (The compass plane always oriented by Global axes)
- opposite view
- change between perspective and parallel projection camera
Limitless possibility camera rotations:
-
around the global or actual origin, using axes as pivot axes.
-
around the camera target (aka center of screen) using the camera direction (and the axes derived therefrom) as pivot axes.
-
placing a selected (hovered) point of the model in the center of the screen (pan) and zooming, so that the target remains in the center. This one can be switched off (via Setting, Function Tab) , because it may disturb another Tool UI.
-Note: This command is not possible to execute by mouse click, only available by pressing keyboard shortcut! (Or in Tool mode in earlier version of SU) -
And last but not least, a āgameā. I only give you one dice (not like in Vegas, two), but this one can stand on its edges and corners too. So, pushing on the dice icon randomly puts the camera to one of the 26 currently reachable top and bottomāish or sideāis view.
It may not be super useful, but for example you can admire your model at the end of the day from different random perspectivesā¦ it only cost a few extra lines of code and an hour of image editing, which I enjoyed anyway.
Configurable parameters and User Interface:
- two kind of zoom method, zooming factor, rotation angles
- set the tilt angle of the top and bottomāish views
- Set the model Solar North angle
- 7 color-scheme (relatively easy to add more)
- adjustable UI size and location
- adjust the keyboard repeat sensitivity
- animated camera transaction (experimental, not stable, save/backup your model before use)
- set the hover sensitivity (experimental, might only be there for a betas)
Usage :
The menu is located under the main menu Camera.
(On Windows it should be the 3rd one, on Mac -most likely will be the last)
If the ViewDice overlay is not enabled, the menu/toolbar icon will enable it. (It is the same as if you tick the box in an Overlays Tray.)
If the ViewDice overlay is enabled, clicking on this menu/toolbar icon wonāt do anything.*
You can switch ViewDice off (and of course, on) on the Overlay Tray.
As mentioned, some commands may only be available only by a keyboard shortcut.
Therefore, it is one of the essential part of this plugin to set your preferred letter (keystrokes) of the keyboard as a shortcut first. Really! Please, set the shortcut for:
*Menu>>Windows>>Preferences>> Shortcuts: Camera/ViewDice
*If the ViewDice overlay is not enabled, the keyboard shortcut will enable it. (It is the same as if you tick the box in an Overlays Tray.)
If the ViewDice overlay is enabled, when you move the mouse cursor over the cube-compass figure or one of the icons in the corner, a description of the command will appear next to the icons, at which point you need left click with mouse or press the aforementioned assigned key on the keyboard.
The standard view commands are on the corners, edges and faces of the cube and on the letters on the compass circle.
On the icons -where the Ā± signs are- the rotation and zoom commands are placed. The small triangle represents the opposite view.
The axes icon āstarā at the very corner will be colored by red-green-blue if you have adjusted the drawing axes or you are in a component, group editing context and its axes location or directions are different from the Global axes. If the current drawing axes are not different from the Global axes the āstarā lines will get the theme color.
If you initiate the command, hovering on the axes icon you can change to display and set the views by Global or local axes. The open circle around the āstarā will represent the Global, without the circle being local.
The rectangle -trapeze icon does the same thing as the camera menu perspective / parallel command.
You can have an imagination about the Dice icon, since I talked about the āgameā above.
The gear icon, as you guess, opens the setting and parameter dialog.
Some usage, parameter explanation (video):
Tool mode: only for SketchUp 2020 to 2022.
You can activate the Viewdice Tool by the menu/Toolbar icon. (Similar as above).
It is not āmandatoryā here, but if you assign a keyboard shortcut to it, this shortcut can be used instead of mouse left click if the ViewDice Tool is already active, similar as mentioned in Overlay mode above.
A Tool mode is a little special, like the other native camera related tools (Orbit, Pan, Zoomā¦) you can activate it during another Tool operation and by pressing Esc it will handle back the control to the previous Tool to its suspended stateā¦
SketchUp 2023.0. or newer required for Overlay function. Changed in RC1 to: You Canāt run as Tool.
Will run on SketchUp 2020 to 2022 as a Tool.
Will not work on older versions than these.
Known issues & to-doās:
-
The zoom-in doesnāt work as I imagined, but at least I gave two -not that bad - methodsā¦ Iāll continue to investigate the matter.
-
If another Tool is active and it draws something on the screen, it may flicker. (E.g., the Selection tool rectangle.). This is improved in RC1.
-
In some cases, the used Tool does not fully hand over control to ViewDice - e.g. the second phase of the Scale Toolā¦ In this case, mouse events are not available, but the assigned keyboard shortcut can be used.
Some UI tuning might be necessary.
- The settings window isā¦improved a lot in RC1
- The command hover sensitivity needs to be aligned to the screen-resolution, scaling, compass sizeā¦ Currently the user can influence it a bit in settings. It seems that the icon hover sensitivity is okay now In RC1, the setting influencing the dice figure hovers only.
- There are some visual glitches here and there. (I hope you donāt notice them allā¦)
- Typos, grammar, spellingā¦
Others:
-
Setting the north angle does not create an undoable action. You have to remember yourself. (Actually, this is a fact, it cannot be changed.)
-
If the animation transitions time is set more than 0 to the new camera (new view), it is unpredictable when it will really finish. It depends on the model, computer, whateverā¦)
This causes ViewDice to not show the correct command until you move the mouse - or other unexpected behavior if you try to repeat the same command. Specially it is problematic in new RC1 mouse wheel rotation.
I have had a few rare cases after using lots of transitions - where Sketchup would crash, however Iām not 100% sure if the crashes are actually related, but it only happened when the transition time was set.
I might remove this feature completely, even though the transition looks coolā¦
-__-
New in RC1:
-
When the mouse cursor is on the side of the cube (or on one of the side view arrows), you can use the mouse wheel or enter the rotation angle to rotate the view.
-This will rotate the view around the target point (center of the screen), using the corresponding axis as the pivot axis of rotation. Apparently, the ācorresponding axisā will be what you set for the ViewDice (local or global).
Note: When you are using the āRotate by ā¦ axis ā¦ā icons instead, the pivot point will be the origin of axes, which is - in most cases - different than above. -
A mouse wheel and manually entering the rotation angle - or zooming factor, are also utilized if you hover your mouse cursor over the icons Ā± signs.
-
The wheel up or down roll will be always considered, so it doesnāt matter if you are over the + or the - sign. The + or the - sign only matters for click or keyboard shortcut.
-
You will see a label of the measurement box, when you can manually enter the value.
-Should be 0.1<Zoom factor <100 and not 0. (+ or - sign will be ignored)
The rotation angle should be number, non zero, positive or negative, the remainder of dividing by 360 will be taken into account. -
Added modifier keys. If the mouse is over one of the āstandardā view commands, you can influence whether to do Zoom Extents, Zoom Selection or Center Selection after the standard direction is set.
If there is a selection:
Hold SHIFT for Center Selection, CTRL for Zoom Extents, both for Zoom Selection.
If there no selection:
Hold CTRL to Zoom Extents
You will see those advice at the Prompt line, at the bottom when relevant. -
(Without the modifier keys, it will work almost the same as the Built-in Standard views. That is, the zoom level will not change, and the new target will be calculated based on the bounding box of the objects currently fully visible on the screen.)
-
The settings window has been better arranged/categorized now, using tabs.
-
Added setting for different rotation angles/ zoom factor for click and for mouse wheel.
So, e.g. you can use the wheel for bigger steps of rotation/zooming and fine tune it by mouse clicks (or keyboard shortcut). Sure, you can freely adjust it according to your taste in settings.
Dont forget, that you also will be able to enter the rotation angle / and zoom factor manually, at once instead using steps. -
Added settings for background opacity around the Dice / Compass figure. (Appearance/ Dice bg. opacity) So if the mouse cursor is there this opacity is considered. If the cursor is not close to Dice, or opacity is 0 the the background of figures are transparent.
-
It is reported on Mac, that it crashes SketchUp on startup if the Overlay panel is opened. I added a code if it is a Mac platform ViewDice will be switched off right after initialization. So it wonāt remember its last state, you will always need to enable it manually. Unfortunately I have no idea about the Mac version, but perhaps it helpsā¦
-__-
And as usual:
Tested on Windows only, mainly on SU 2023 (W11) and SU2021 (W10).
( Itās a terrible pain to use the SU2024 on my dual-screen laptop. I deleted it permanently. I donāt see any chance of me testing anything on it. )
This extension is not signed, so you need to enable Unrestricted in Extension Manager>Settings, Loading Policy.
SketchUp 2023.0. or newer required for Overlay function.
Will run on SketchUp 2020 to 2022 as a Tool only.
Will not work on older versions than these.
No Warranty. Use at your own risk!
Nevertheless, I did my best not to cause any inconvenience.
I look forward to your feedback! Especially from Mac and SU2024 users.
Have fun!
The rbz file:
Important:
If you had Beta 1 installed, uninstall that first, restart SU and install this new version and restart SU again. Assign your keyboard shortcut again as mentioned above. (If you get, ignore the warning about the shortcut already assigned to ViewDice ā¦)
Dezmo_ViewDice_Beta1_2024_11_29_0606.rbz (959.1 KB)
Dezmo_ViewDiceRC1_2024_12_06_1942.rbz (976.4 KB)