diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/icons/VisibleOnScreenEnabler2D.svg (renamed from editor/icons/VisibilityEnabler2D.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisibleOnScreenEnabler3D.svg (renamed from editor/icons/VisibilityEnabler3D.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisibleOnScreenNotifier2D.svg (renamed from editor/icons/VisibilityNotifier2D.svg) | 0 | ||||
-rw-r--r-- | editor/icons/VisibleOnScreenNotifier3D.svg (renamed from editor/icons/VisibilityNotifier3D.svg) | 0 | ||||
-rw-r--r-- | editor/node_3d_editor_gizmos.cpp | 32 | ||||
-rw-r--r-- | editor/node_3d_editor_gizmos.h | 6 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 2 |
7 files changed, 20 insertions, 20 deletions
diff --git a/editor/icons/VisibilityEnabler2D.svg b/editor/icons/VisibleOnScreenEnabler2D.svg index 989675f44f..989675f44f 100644 --- a/editor/icons/VisibilityEnabler2D.svg +++ b/editor/icons/VisibleOnScreenEnabler2D.svg diff --git a/editor/icons/VisibilityEnabler3D.svg b/editor/icons/VisibleOnScreenEnabler3D.svg index 6923bcb46b..6923bcb46b 100644 --- a/editor/icons/VisibilityEnabler3D.svg +++ b/editor/icons/VisibleOnScreenEnabler3D.svg diff --git a/editor/icons/VisibilityNotifier2D.svg b/editor/icons/VisibleOnScreenNotifier2D.svg index 13df19be56..13df19be56 100644 --- a/editor/icons/VisibilityNotifier2D.svg +++ b/editor/icons/VisibleOnScreenNotifier2D.svg diff --git a/editor/icons/VisibilityNotifier3D.svg b/editor/icons/VisibleOnScreenNotifier3D.svg index 2fdf784701..2fdf784701 100644 --- a/editor/icons/VisibilityNotifier3D.svg +++ b/editor/icons/VisibleOnScreenNotifier3D.svg diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp index 5c69a1e975..19663e46e1 100644 --- a/editor/node_3d_editor_gizmos.cpp +++ b/editor/node_3d_editor_gizmos.cpp @@ -55,7 +55,7 @@ #include "scene/3d/spring_arm_3d.h" #include "scene/3d/sprite_3d.h" #include "scene/3d/vehicle_body_3d.h" -#include "scene/3d/visibility_notifier_3d.h" +#include "scene/3d/visible_on_screen_notifier_3d.h" #include "scene/3d/voxel_gi.h" #include "scene/resources/box_shape_3d.h" #include "scene/resources/capsule_shape_3d.h" @@ -2127,7 +2127,7 @@ bool SoftBody3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_giz /////////// -VisibilityNotifier3DGizmoPlugin::VisibilityNotifier3DGizmoPlugin() { +VisibleOnScreenNotifier3DGizmoPlugin::VisibleOnScreenNotifier3DGizmoPlugin() { Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/visibility_notifier", Color(0.8, 0.5, 0.7)); create_material("visibility_notifier_material", gizmo_color); gizmo_color.a = 0.1; @@ -2135,19 +2135,19 @@ VisibilityNotifier3DGizmoPlugin::VisibilityNotifier3DGizmoPlugin() { create_handle_material("handles"); } -bool VisibilityNotifier3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { - return Object::cast_to<VisibilityNotifier3D>(p_spatial) != nullptr; +bool VisibleOnScreenNotifier3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { + return Object::cast_to<VisibleOnScreenNotifier3D>(p_spatial) != nullptr; } -String VisibilityNotifier3DGizmoPlugin::get_gizmo_name() const { - return "VisibilityNotifier3D"; +String VisibleOnScreenNotifier3DGizmoPlugin::get_gizmo_name() const { + return "VisibleOnScreenNotifier3D"; } -int VisibilityNotifier3DGizmoPlugin::get_priority() const { +int VisibleOnScreenNotifier3DGizmoPlugin::get_priority() const { return -1; } -String VisibilityNotifier3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { +String VisibleOnScreenNotifier3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { switch (p_idx) { case 0: return "Size X"; @@ -2166,13 +2166,13 @@ String VisibilityNotifier3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo return ""; } -Variant VisibilityNotifier3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { - VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node()); +Variant VisibleOnScreenNotifier3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { + VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_spatial_node()); return notifier->get_aabb(); } -void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { - VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node()); +void VisibleOnScreenNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { + VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_spatial_node()); Transform3D gt = notifier->get_global_transform(); @@ -2223,8 +2223,8 @@ void VisibilityNotifier3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int } } -void VisibilityNotifier3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { - VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node()); +void VisibleOnScreenNotifier3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { + VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_spatial_node()); if (p_cancel) { notifier->set_aabb(p_restore); @@ -2238,8 +2238,8 @@ void VisibilityNotifier3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, ur->commit_action(); } -void VisibilityNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { - VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node()); +void VisibleOnScreenNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { + VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_spatial_node()); p_gizmo->clear(); diff --git a/editor/node_3d_editor_gizmos.h b/editor/node_3d_editor_gizmos.h index 8a0e10241a..6f071859ec 100644 --- a/editor/node_3d_editor_gizmos.h +++ b/editor/node_3d_editor_gizmos.h @@ -218,8 +218,8 @@ public: SoftBody3DGizmoPlugin(); }; -class VisibilityNotifier3DGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(VisibilityNotifier3DGizmoPlugin, EditorNode3DGizmoPlugin); +class VisibleOnScreenNotifier3DGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(VisibleOnScreenNotifier3DGizmoPlugin, EditorNode3DGizmoPlugin); public: bool has_gizmo(Node3D *p_spatial) override; @@ -232,7 +232,7 @@ public: void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) override; void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false) override; - VisibilityNotifier3DGizmoPlugin(); + VisibleOnScreenNotifier3DGizmoPlugin(); }; class CPUParticles3DGizmoPlugin : public EditorNode3DGizmoPlugin { diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 60cc0a0a2a..726f74e67f 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6492,7 +6492,7 @@ void Node3DEditor::_register_all_gizmos() { add_gizmo_plugin(Ref<RayCast3DGizmoPlugin>(memnew(RayCast3DGizmoPlugin))); add_gizmo_plugin(Ref<SpringArm3DGizmoPlugin>(memnew(SpringArm3DGizmoPlugin))); add_gizmo_plugin(Ref<VehicleWheel3DGizmoPlugin>(memnew(VehicleWheel3DGizmoPlugin))); - add_gizmo_plugin(Ref<VisibilityNotifier3DGizmoPlugin>(memnew(VisibilityNotifier3DGizmoPlugin))); + add_gizmo_plugin(Ref<VisibleOnScreenNotifier3DGizmoPlugin>(memnew(VisibleOnScreenNotifier3DGizmoPlugin))); add_gizmo_plugin(Ref<GPUParticles3DGizmoPlugin>(memnew(GPUParticles3DGizmoPlugin))); add_gizmo_plugin(Ref<GPUParticlesCollision3DGizmoPlugin>(memnew(GPUParticlesCollision3DGizmoPlugin))); add_gizmo_plugin(Ref<CPUParticles3DGizmoPlugin>(memnew(CPUParticles3DGizmoPlugin))); |