-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Camera3D preview in Inspector #90778
Conversation
We've been waiting for this PR, and it's finally here! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool approach to enable viewing a camera preview without splitting the viewport.
} | ||
|
||
bool EditorInspectorPluginCamera3DPreview::can_handle(Object *p_object) { | ||
return Object::cast_to<Camera3D>(p_object) != nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to collapse the preview or toggle it on and off?
For example, I might be editing on mobile and don't want the performance overhead of rendering an additional camera at its full resolution.
Or, perhaps I know what I want to edit and wish to reduce visual noise on the inspector so I can more easily find other properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be handled in TexturePreview code.
I think one use case covered by the picture-in-picture approach as implemented in https://twitter.com/anthonyec/status/1747254280518865349 is that you can pin the preview, and do operations on other nodes in the tree. With the preview in the inspector, aren't we limited to seeing it only when the Camera3D is selected in the scene tree? |
Yeah, that's the limitation. Feature wise, I think it's the same as spliting the viewport and checking "Preview". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally (rebased on top of master
557f63d), it works as expected in all rendering methods.
I'd like to be able to resize the preview vertically (so it can be made larger/smaller depending on dock width), but this isn't essential for a first iteration of the feature.
Tested (didn't rebase), works mostly as expected There's a small problem when the camera is first selected the preview isn't immediately rendered and it needs something to happen that refreshes the UI (I assume): pv.mp4Instead of using preview in the viewport I usually use Align Transform With View on cameras, but the inspector preview could be convenient to quickly check the frame with the camera FOV Btw speaking of Align Transform With View it needs to have the default shortcut fixed: #94026 |
I think we can try to add this to 4.4 dev, for general testing |
Thanks! |
An alternate solution for godotengine/godot-proposals#1017
Peek.2024-04-17.09-53.mp4
The main problem to solve is that cameras can't be transformed (inside the 3D viewport) when in preview mode. Turning split viewports on and off for a temporary operation is tedious.
Previewing in the inspector is almost the same as using picture-in-picture. But keeps UI the same as other texture previews.