Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Conversation

@chixvv1
Copy link
Contributor

@chixvv1 chixvv1 commented May 10, 2022

Add the feature that you can save the zoom and ratation with Numpad 0 to restore them the next time you enable the ortho view, which makes it possible to capture the same entity or structure with the same size and ratation.

Copy link
Owner

@pascallj pascallj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, a very useful feature, thank you! Some minor comments below.

}
zoom = zoomSaved;
xRot = xRotSaved;
yRot = yRotSaved;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, it is more intuitive to add the structure like this (and also saves an assignment):

if camSaved then
  stuff = stuffSaved
else 
  stuff = defaults
fi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, when camSaved is false, both stuff and stuffSaved need to be changed, which is the function of Alt+0

Copy link
Owner

@pascallj pascallj May 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no camera saved, why do have to initialize the stuffSaved variables to the defaults then? Because the next time you want to save a camera, these are overwritten anyway. And reset() is called every time the othogonal view is enabled.

The only other time these variables are used, is in the setZoom calls, but these seem redundant to me.

xRot = 0;
yRot = mod ? -90 : 90;
} else if (keyRotateS.isPressed()) {
setZoom(zoomSaved);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do all the setZoom calls accomplish here? To me this has an additional downside that the zoomlevel is reset every time you want to switch between these standard views.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants