You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
Rework scene preview thumbnails
This commit is contained in:
@@ -66,7 +66,24 @@ public:
|
||||
class EditorPackedScenePreviewPlugin : public EditorResourcePreviewGenerator {
|
||||
GDCLASS(EditorPackedScenePreviewPlugin, EditorResourcePreviewGenerator);
|
||||
|
||||
float preview_3d_fov = 30.0;
|
||||
mutable bool aborted = false;
|
||||
mutable DrawRequester draw_requester;
|
||||
|
||||
protected:
|
||||
void _setup_scene_3d(Node *p_node) const;
|
||||
void _setup_scene_2d(Node *p_node) const;
|
||||
void _count_node_types(Node *p_node, int &r_c2d, int &r_c3d, int &r_clight3d) const;
|
||||
void _calculate_scene_rect(Node *p_node, Rect2 &r_rect) const;
|
||||
void _calculate_scene_aabb(Node *p_node, AABB &r_aabb) const;
|
||||
Transform3D _get_global_transform_3d(Node *p_n3d) const;
|
||||
void _hide_node_2d_in_scene(Node *p_node) const;
|
||||
void _hide_gui_in_scene(Node *p_node) const;
|
||||
bool _setup_packed_scene(Ref<PackedScene> p_pack) const;
|
||||
void _wait_frame() const;
|
||||
|
||||
public:
|
||||
virtual void abort() override;
|
||||
virtual bool handles(const String &p_type) const override;
|
||||
virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size, Dictionary &p_metadata) const override;
|
||||
virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size, Dictionary &p_metadata) const override;
|
||||
|
||||
Reference in New Issue
Block a user