diff options
author | jfons <joan.fonssanchez@gmail.com> | 2020-04-06 12:40:52 +0200 |
---|---|---|
committer | jfons <joan.fonssanchez@gmail.com> | 2020-04-07 10:02:18 +0200 |
commit | 3841a64703a9f22bcbc71327c31edac891274780 (patch) | |
tree | e2a5aa5d17b7542eb536b85ecde246ff567733d3 /editor/plugins | |
parent | 11f31a732922571bf6e0398a5192132ae67aee16 (diff) |
Rename all gizmo classes, using the 4.0 node names.
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 34 | ||||
-rw-r--r-- | editor/plugins/path_3d_editor_plugin.cpp | 26 | ||||
-rw-r--r-- | editor/plugins/path_3d_editor_plugin.h | 12 |
3 files changed, 36 insertions, 36 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 2a27332051..1ebcd3abfd 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -5907,28 +5907,28 @@ void Node3DEditor::_node_removed(Node *p_node) { } void Node3DEditor::_register_all_gizmos() { - add_gizmo_plugin(Ref<CameraNode3DGizmoPlugin>(memnew(CameraNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<LightNode3DGizmoPlugin>(memnew(LightNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<AudioStreamPlayer3DNode3DGizmoPlugin>(memnew(AudioStreamPlayer3DNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<MeshInstanceNode3DGizmoPlugin>(memnew(MeshInstanceNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<SoftBodyNode3DGizmoPlugin>(memnew(SoftBodyNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<Sprite3DNode3DGizmoPlugin>(memnew(Sprite3DNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<SkeletonNode3DGizmoPlugin>(memnew(SkeletonNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<Position3DNode3DGizmoPlugin>(memnew(Position3DNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<RayCastNode3DGizmoPlugin>(memnew(RayCastNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<SpringArmNode3DGizmoPlugin>(memnew(SpringArmNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<VehicleWheelNode3DGizmoPlugin>(memnew(VehicleWheelNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<VisibilityNotifierGizmoPlugin>(memnew(VisibilityNotifierGizmoPlugin))); + add_gizmo_plugin(Ref<Camera3DGizmoPlugin>(memnew(Camera3DGizmoPlugin))); + add_gizmo_plugin(Ref<Light3DGizmoPlugin>(memnew(Light3DGizmoPlugin))); + add_gizmo_plugin(Ref<AudioStreamPlayer3DGizmoPlugin>(memnew(AudioStreamPlayer3DGizmoPlugin))); + add_gizmo_plugin(Ref<MeshInstance3DGizmoPlugin>(memnew(MeshInstance3DGizmoPlugin))); + add_gizmo_plugin(Ref<SoftBody3DGizmoPlugin>(memnew(SoftBody3DGizmoPlugin))); + add_gizmo_plugin(Ref<Sprite3DGizmoPlugin>(memnew(Sprite3DGizmoPlugin))); + add_gizmo_plugin(Ref<Skeleton3DGizmoPlugin>(memnew(Skeleton3DGizmoPlugin))); + add_gizmo_plugin(Ref<Position3DGizmoPlugin>(memnew(Position3DGizmoPlugin))); + 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<GPUParticles3DGizmoPlugin>(memnew(GPUParticles3DGizmoPlugin))); add_gizmo_plugin(Ref<CPUParticles3DGizmoPlugin>(memnew(CPUParticles3DGizmoPlugin))); add_gizmo_plugin(Ref<ReflectionProbeGizmoPlugin>(memnew(ReflectionProbeGizmoPlugin))); add_gizmo_plugin(Ref<GIProbeGizmoPlugin>(memnew(GIProbeGizmoPlugin))); // add_gizmo_plugin(Ref<BakedIndirectLightGizmoPlugin>(memnew(BakedIndirectLightGizmoPlugin))); - add_gizmo_plugin(Ref<CollisionShapeNode3DGizmoPlugin>(memnew(CollisionShapeNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<CollisionPolygonNode3DGizmoPlugin>(memnew(CollisionPolygonNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<NavigationMeshNode3DGizmoPlugin>(memnew(NavigationMeshNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<JointNode3DGizmoPlugin>(memnew(JointNode3DGizmoPlugin))); - add_gizmo_plugin(Ref<PhysicalBoneNode3DGizmoPlugin>(memnew(PhysicalBoneNode3DGizmoPlugin))); + add_gizmo_plugin(Ref<CollisionShape3DGizmoPlugin>(memnew(CollisionShape3DGizmoPlugin))); + add_gizmo_plugin(Ref<CollisionPolygon3DGizmoPlugin>(memnew(CollisionPolygon3DGizmoPlugin))); + add_gizmo_plugin(Ref<NavigationRegion3DGizmoPlugin>(memnew(NavigationRegion3DGizmoPlugin))); + add_gizmo_plugin(Ref<Joint3DGizmoPlugin>(memnew(Joint3DGizmoPlugin))); + add_gizmo_plugin(Ref<PhysicalBone3DGizmoPlugin>(memnew(PhysicalBone3DGizmoPlugin))); } void Node3DEditor::_bind_methods() { diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index 3ee8225418..d3ece9556d 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -34,7 +34,7 @@ #include "node_3d_editor_plugin.h" #include "scene/resources/curve.h" -String PathNode3DGizmo::get_handle_name(int p_idx) const { +String Path3DGizmo::get_handle_name(int p_idx) const { Ref<Curve3D> c = path->get_curve(); if (c.is_null()) @@ -57,7 +57,7 @@ String PathNode3DGizmo::get_handle_name(int p_idx) const { return n; } -Variant PathNode3DGizmo::get_handle_value(int p_idx) { +Variant Path3DGizmo::get_handle_value(int p_idx) { Ref<Curve3D> c = path->get_curve(); if (c.is_null()) @@ -84,7 +84,7 @@ Variant PathNode3DGizmo::get_handle_value(int p_idx) { return ofs; } -void PathNode3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) { +void Path3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_point) { Ref<Curve3D> c = path->get_curve(); if (c.is_null()) @@ -154,7 +154,7 @@ void PathNode3DGizmo::set_handle(int p_idx, Camera3D *p_camera, const Point2 &p_ } } -void PathNode3DGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_cancel) { +void Path3DGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_cancel) { Ref<Curve3D> c = path->get_curve(); if (c.is_null()) @@ -217,7 +217,7 @@ void PathNode3DGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_ } } -void PathNode3DGizmo::redraw() { +void Path3DGizmo::redraw() { clear(); @@ -286,7 +286,7 @@ void PathNode3DGizmo::redraw() { } } -PathNode3DGizmo::PathNode3DGizmo(Path3D *p_path) { +Path3DGizmo::Path3DGizmo(Path3D *p_path) { path = p_path; set_spatial_node(p_path); @@ -563,7 +563,7 @@ Path3DEditorPlugin::Path3DEditorPlugin(EditorNode *p_node) { mirror_handle_angle = true; mirror_handle_length = true; - Ref<PathNode3DGizmoPlugin> gizmo_plugin; + Ref<Path3DGizmoPlugin> gizmo_plugin; gizmo_plugin.instance(); Node3DEditor::get_singleton()->add_gizmo_plugin(gizmo_plugin); @@ -627,24 +627,24 @@ Path3DEditorPlugin::Path3DEditorPlugin(EditorNode *p_node) { Path3DEditorPlugin::~Path3DEditorPlugin() { } -Ref<EditorNode3DGizmo> PathNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial) { - Ref<PathNode3DGizmo> ref; +Ref<EditorNode3DGizmo> Path3DGizmoPlugin::create_gizmo(Node3D *p_spatial) { + Ref<Path3DGizmo> ref; Path3D *path = Object::cast_to<Path3D>(p_spatial); - if (path) ref = Ref<PathNode3DGizmo>(memnew(PathNode3DGizmo(path))); + if (path) ref = Ref<Path3DGizmo>(memnew(Path3DGizmo(path))); return ref; } -String PathNode3DGizmoPlugin::get_name() const { +String Path3DGizmoPlugin::get_name() const { return "Path3D"; } -int PathNode3DGizmoPlugin::get_priority() const { +int Path3DGizmoPlugin::get_priority() const { return -1; } -PathNode3DGizmoPlugin::PathNode3DGizmoPlugin() { +Path3DGizmoPlugin::Path3DGizmoPlugin() { Color path_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.8)); create_material("path_material", path_color); diff --git a/editor/plugins/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h index 715f8d1bb5..3f18cadacd 100644 --- a/editor/plugins/path_3d_editor_plugin.h +++ b/editor/plugins/path_3d_editor_plugin.h @@ -34,9 +34,9 @@ #include "editor/node_3d_editor_gizmos.h" #include "scene/3d/path_3d.h" -class PathNode3DGizmo : public EditorNode3DGizmo { +class Path3DGizmo : public EditorNode3DGizmo { - GDCLASS(PathNode3DGizmo, EditorNode3DGizmo); + GDCLASS(Path3DGizmo, EditorNode3DGizmo); Path3D *path; mutable Vector3 original; @@ -50,12 +50,12 @@ public: virtual void commit_handle(int p_idx, const Variant &p_restore, bool p_cancel = false); virtual void redraw(); - PathNode3DGizmo(Path3D *p_path = nullptr); + Path3DGizmo(Path3D *p_path = nullptr); }; -class PathNode3DGizmoPlugin : public EditorNode3DGizmoPlugin { +class Path3DGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(PathNode3DGizmoPlugin, EditorNode3DGizmoPlugin); + GDCLASS(Path3DGizmoPlugin, EditorNode3DGizmoPlugin); protected: Ref<EditorNode3DGizmo> create_gizmo(Node3D *p_spatial); @@ -63,7 +63,7 @@ protected: public: String get_name() const; int get_priority() const; - PathNode3DGizmoPlugin(); + Path3DGizmoPlugin(); }; class Path3DEditorPlugin : public EditorPlugin { |