summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-08 10:54:42 +0200
committerGitHub <noreply@github.com>2020-04-08 10:54:42 +0200
commitd89dc5794aeb77c77c2a29ff3ff8a340ff61a631 (patch)
treeadce76858fb06a30523cad0e5bc95996b3ce9c97 /editor
parent8ef9fc37195df7915ef6a8b06fb948722c23b110 (diff)
parent3841a64703a9f22bcbc71327c31edac891274780 (diff)
Merge pull request #37644 from JFonS/gizmos_rename
Rename all gizmo classes, using the 4.0 node names.
Diffstat (limited to 'editor')
-rw-r--r--editor/node_3d_editor_gizmos.cpp250
-rw-r--r--editor/node_3d_editor_gizmos.h102
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp34
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp26
-rw-r--r--editor/plugins/path_3d_editor_plugin.h12
5 files changed, 212 insertions, 212 deletions
diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp
index ab43e45af7..c06e5f3741 100644
--- a/editor/node_3d_editor_gizmos.cpp
+++ b/editor/node_3d_editor_gizmos.cpp
@@ -796,7 +796,7 @@ Vector3 EditorNode3DGizmo::get_handle_pos(int p_idx) const {
//// light gizmo
-LightNode3DGizmoPlugin::LightNode3DGizmoPlugin() {
+Light3DGizmoPlugin::Light3DGizmoPlugin() {
// Enable vertex colors for the materials below as the gizmo color depends on the light color.
create_material("lines_primary", Color(1, 1, 1), false, false, true);
@@ -811,19 +811,19 @@ LightNode3DGizmoPlugin::LightNode3DGizmoPlugin() {
create_handle_material("handles_billboard", true);
}
-bool LightNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool Light3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<Light3D>(p_spatial) != nullptr;
}
-String LightNode3DGizmoPlugin::get_name() const {
- return "Lights";
+String Light3DGizmoPlugin::get_name() const {
+ return "Light3D";
}
-int LightNode3DGizmoPlugin::get_priority() const {
+int Light3DGizmoPlugin::get_priority() const {
return -1;
}
-String LightNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
+String Light3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
if (p_idx == 0)
return "Radius";
@@ -831,7 +831,7 @@ String LightNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo,
return "Aperture";
}
-Variant LightNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant Light3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
if (p_idx == 0)
@@ -871,7 +871,7 @@ static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vec
return a * 180.0 / Math_PI;
}
-void LightNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void Light3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
Transform gt = light->get_global_transform();
@@ -919,7 +919,7 @@ void LightNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, C
}
}
-void LightNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
+void Light3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
if (p_cancel) {
@@ -943,7 +943,7 @@ void LightNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx
}
}
-void LightNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
@@ -1086,7 +1086,7 @@ void LightNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
//////
//// player gizmo
-AudioStreamPlayer3DNode3DGizmoPlugin::AudioStreamPlayer3DNode3DGizmoPlugin() {
+AudioStreamPlayer3DGizmoPlugin::AudioStreamPlayer3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1));
@@ -1096,29 +1096,29 @@ AudioStreamPlayer3DNode3DGizmoPlugin::AudioStreamPlayer3DNode3DGizmoPlugin() {
create_handle_material("handles");
}
-bool AudioStreamPlayer3DNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool AudioStreamPlayer3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<AudioStreamPlayer3D>(p_spatial) != nullptr;
}
-String AudioStreamPlayer3DNode3DGizmoPlugin::get_name() const {
+String AudioStreamPlayer3DGizmoPlugin::get_name() const {
return "AudioStreamPlayer3D";
}
-int AudioStreamPlayer3DNode3DGizmoPlugin::get_priority() const {
+int AudioStreamPlayer3DGizmoPlugin::get_priority() const {
return -1;
}
-String AudioStreamPlayer3DNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
+String AudioStreamPlayer3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
return "Emission Radius";
}
-Variant AudioStreamPlayer3DNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant AudioStreamPlayer3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
return player->get_emission_angle();
}
-void AudioStreamPlayer3DNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void AudioStreamPlayer3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
@@ -1157,7 +1157,7 @@ void AudioStreamPlayer3DNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo
}
}
-void AudioStreamPlayer3DNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
+void AudioStreamPlayer3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
@@ -1175,7 +1175,7 @@ void AudioStreamPlayer3DNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gi
}
}
-void AudioStreamPlayer3DNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
const AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
@@ -1233,7 +1233,7 @@ void AudioStreamPlayer3DNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
//////
-CameraNode3DGizmoPlugin::CameraNode3DGizmoPlugin() {
+Camera3DGizmoPlugin::Camera3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8));
@@ -1241,19 +1241,19 @@ CameraNode3DGizmoPlugin::CameraNode3DGizmoPlugin() {
create_handle_material("handles");
}
-bool CameraNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool Camera3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<Camera3D>(p_spatial) != nullptr;
}
-String CameraNode3DGizmoPlugin::get_name() const {
+String Camera3DGizmoPlugin::get_name() const {
return "Camera3D";
}
-int CameraNode3DGizmoPlugin::get_priority() const {
+int Camera3DGizmoPlugin::get_priority() const {
return -1;
}
-String CameraNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
+String Camera3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
@@ -1264,7 +1264,7 @@ String CameraNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo
}
}
-Variant CameraNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant Camera3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
@@ -1276,7 +1276,7 @@ Variant CameraNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, in
}
}
-void CameraNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void Camera3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
@@ -1307,7 +1307,7 @@ void CameraNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx,
}
}
-void CameraNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
+void Camera3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
@@ -1339,7 +1339,7 @@ void CameraNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_id
}
}
-void CameraNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
@@ -1489,26 +1489,26 @@ void CameraNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
//////
-MeshInstanceNode3DGizmoPlugin::MeshInstanceNode3DGizmoPlugin() {
+MeshInstance3DGizmoPlugin::MeshInstance3DGizmoPlugin() {
}
-bool MeshInstanceNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool MeshInstance3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<MeshInstance3D>(p_spatial) != nullptr && Object::cast_to<SoftBody3D>(p_spatial) == nullptr;
}
-String MeshInstanceNode3DGizmoPlugin::get_name() const {
+String MeshInstance3DGizmoPlugin::get_name() const {
return "MeshInstance3D";
}
-int MeshInstanceNode3DGizmoPlugin::get_priority() const {
+int MeshInstance3DGizmoPlugin::get_priority() const {
return -1;
}
-bool MeshInstanceNode3DGizmoPlugin::can_be_hidden() const {
+bool MeshInstance3DGizmoPlugin::can_be_hidden() const {
return false;
}
-void MeshInstanceNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void MeshInstance3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
MeshInstance3D *mesh = Object::cast_to<MeshInstance3D>(p_gizmo->get_spatial_node());
@@ -1526,26 +1526,26 @@ void MeshInstanceNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
/////
-Sprite3DNode3DGizmoPlugin::Sprite3DNode3DGizmoPlugin() {
+Sprite3DGizmoPlugin::Sprite3DGizmoPlugin() {
}
-bool Sprite3DNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool Sprite3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<Sprite3D>(p_spatial) != nullptr;
}
-String Sprite3DNode3DGizmoPlugin::get_name() const {
+String Sprite3DGizmoPlugin::get_name() const {
return "Sprite3D";
}
-int Sprite3DNode3DGizmoPlugin::get_priority() const {
+int Sprite3DGizmoPlugin::get_priority() const {
return -1;
}
-bool Sprite3DNode3DGizmoPlugin::can_be_hidden() const {
+bool Sprite3DGizmoPlugin::can_be_hidden() const {
return false;
}
-void Sprite3DNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void Sprite3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Sprite3D *sprite = Object::cast_to<Sprite3D>(p_gizmo->get_spatial_node());
@@ -1559,7 +1559,7 @@ void Sprite3DNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
///
-Position3DNode3DGizmoPlugin::Position3DNode3DGizmoPlugin() {
+Position3DGizmoPlugin::Position3DGizmoPlugin() {
pos3d_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
cursor_points = Vector<Vector3>();
@@ -1592,19 +1592,19 @@ Position3DNode3DGizmoPlugin::Position3DNode3DGizmoPlugin() {
pos3d_mesh->surface_set_material(0, mat);
}
-bool Position3DNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool Position3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<Position3D>(p_spatial) != nullptr;
}
-String Position3DNode3DGizmoPlugin::get_name() const {
+String Position3DGizmoPlugin::get_name() const {
return "Position3D";
}
-int Position3DNode3DGizmoPlugin::get_priority() const {
+int Position3DGizmoPlugin::get_priority() const {
return -1;
}
-void Position3DNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void Position3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->clear();
p_gizmo->add_mesh(pos3d_mesh);
@@ -1613,25 +1613,25 @@ void Position3DNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
-SkeletonNode3DGizmoPlugin::SkeletonNode3DGizmoPlugin() {
+Skeleton3DGizmoPlugin::Skeleton3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/skeleton", Color(1, 0.8, 0.4));
create_material("skeleton_material", gizmo_color);
}
-bool SkeletonNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool Skeleton3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<Skeleton3D>(p_spatial) != nullptr;
}
-String SkeletonNode3DGizmoPlugin::get_name() const {
+String Skeleton3DGizmoPlugin::get_name() const {
return "Skeleton3D";
}
-int SkeletonNode3DGizmoPlugin::get_priority() const {
+int Skeleton3DGizmoPlugin::get_priority() const {
return -1;
}
-void SkeletonNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Skeleton3D *skel = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node());
@@ -1822,23 +1822,23 @@ void SkeletonNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
////
-PhysicalBoneNode3DGizmoPlugin::PhysicalBoneNode3DGizmoPlugin() {
+PhysicalBone3DGizmoPlugin::PhysicalBone3DGizmoPlugin() {
create_material("joint_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1)));
}
-bool PhysicalBoneNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool PhysicalBone3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<PhysicalBone3D>(p_spatial) != nullptr;
}
-String PhysicalBoneNode3DGizmoPlugin::get_name() const {
- return "PhysicalBones";
+String PhysicalBone3DGizmoPlugin::get_name() const {
+ return "PhysicalBone3D";
}
-int PhysicalBoneNode3DGizmoPlugin::get_priority() const {
+int PhysicalBone3DGizmoPlugin::get_priority() const {
return -1;
}
-void PhysicalBoneNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void PhysicalBone3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->clear();
@@ -1864,12 +1864,12 @@ void PhysicalBoneNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
switch (physical_bone->get_joint_type()) {
case PhysicalBone3D::JOINT_TYPE_PIN: {
- JointNode3DGizmoPlugin::CreatePinJointGizmo(physical_bone->get_joint_offset(), points);
+ Joint3DGizmoPlugin::CreatePinJointGizmo(physical_bone->get_joint_offset(), points);
} break;
case PhysicalBone3D::JOINT_TYPE_CONE: {
const PhysicalBone3D::ConeJointData *cjd(static_cast<const PhysicalBone3D::ConeJointData *>(physical_bone->get_joint_data()));
- JointNode3DGizmoPlugin::CreateConeTwistJointGizmo(
+ Joint3DGizmoPlugin::CreateConeTwistJointGizmo(
physical_bone->get_joint_offset(),
physical_bone->get_global_transform() * physical_bone->get_joint_offset(),
pb->get_global_transform(),
@@ -1882,7 +1882,7 @@ void PhysicalBoneNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
case PhysicalBone3D::JOINT_TYPE_HINGE: {
const PhysicalBone3D::HingeJointData *hjd(static_cast<const PhysicalBone3D::HingeJointData *>(physical_bone->get_joint_data()));
- JointNode3DGizmoPlugin::CreateHingeJointGizmo(
+ Joint3DGizmoPlugin::CreateHingeJointGizmo(
physical_bone->get_joint_offset(),
physical_bone->get_global_transform() * physical_bone->get_joint_offset(),
pb->get_global_transform(),
@@ -1897,7 +1897,7 @@ void PhysicalBoneNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
case PhysicalBone3D::JOINT_TYPE_SLIDER: {
const PhysicalBone3D::SliderJointData *sjd(static_cast<const PhysicalBone3D::SliderJointData *>(physical_bone->get_joint_data()));
- JointNode3DGizmoPlugin::CreateSliderJointGizmo(
+ Joint3DGizmoPlugin::CreateSliderJointGizmo(
physical_bone->get_joint_offset(),
physical_bone->get_global_transform() * physical_bone->get_joint_offset(),
pb->get_global_transform(),
@@ -1913,7 +1913,7 @@ void PhysicalBoneNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
case PhysicalBone3D::JOINT_TYPE_6DOF: {
const PhysicalBone3D::SixDOFJointData *sdofjd(static_cast<const PhysicalBone3D::SixDOFJointData *>(physical_bone->get_joint_data()));
- JointNode3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
+ Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
physical_bone->get_joint_offset(),
physical_bone->get_global_transform() * physical_bone->get_joint_offset(),
@@ -1957,7 +1957,7 @@ void PhysicalBoneNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
-RayCastNode3DGizmoPlugin::RayCastNode3DGizmoPlugin() {
+RayCast3DGizmoPlugin::RayCast3DGizmoPlugin() {
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
@@ -1966,19 +1966,19 @@ RayCastNode3DGizmoPlugin::RayCastNode3DGizmoPlugin() {
create_material("shape_material_disabled", gizmo_color_disabled);
}
-bool RayCastNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool RayCast3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<RayCast3D>(p_spatial) != nullptr;
}
-String RayCastNode3DGizmoPlugin::get_name() const {
+String RayCast3DGizmoPlugin::get_name() const {
return "RayCast3D";
}
-int RayCastNode3DGizmoPlugin::get_priority() const {
+int RayCast3DGizmoPlugin::get_priority() const {
return -1;
}
-void RayCastNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void RayCast3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
RayCast3D *raycast = Object::cast_to<RayCast3D>(p_gizmo->get_spatial_node());
@@ -1998,7 +1998,7 @@ void RayCastNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
-void SpringArmNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void SpringArm3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
SpringArm3D *spring_arm = Object::cast_to<SpringArm3D>(p_gizmo->get_spatial_node());
@@ -2015,44 +2015,44 @@ void SpringArmNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_collision_segments(lines);
}
-SpringArmNode3DGizmoPlugin::SpringArmNode3DGizmoPlugin() {
+SpringArm3DGizmoPlugin::SpringArm3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
}
-bool SpringArmNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool SpringArm3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<SpringArm3D>(p_spatial) != nullptr;
}
-String SpringArmNode3DGizmoPlugin::get_name() const {
+String SpringArm3DGizmoPlugin::get_name() const {
return "SpringArm3D";
}
-int SpringArmNode3DGizmoPlugin::get_priority() const {
+int SpringArm3DGizmoPlugin::get_priority() const {
return -1;
}
/////
-VehicleWheelNode3DGizmoPlugin::VehicleWheelNode3DGizmoPlugin() {
+VehicleWheel3DGizmoPlugin::VehicleWheel3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
}
-bool VehicleWheelNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool VehicleWheel3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<VehicleWheel3D>(p_spatial) != nullptr;
}
-String VehicleWheelNode3DGizmoPlugin::get_name() const {
+String VehicleWheel3DGizmoPlugin::get_name() const {
return "VehicleWheel3D";
}
-int VehicleWheelNode3DGizmoPlugin::get_priority() const {
+int VehicleWheel3DGizmoPlugin::get_priority() const {
return -1;
}
-void VehicleWheelNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void VehicleWheel3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
VehicleWheel3D *car_wheel = Object::cast_to<VehicleWheel3D>(p_gizmo->get_spatial_node());
@@ -2108,29 +2108,29 @@ void VehicleWheelNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
///////////
-SoftBodyNode3DGizmoPlugin::SoftBodyNode3DGizmoPlugin() {
+SoftBody3DGizmoPlugin::SoftBody3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
create_handle_material("handles");
}
-bool SoftBodyNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool SoftBody3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<SoftBody3D>(p_spatial) != nullptr;
}
-String SoftBodyNode3DGizmoPlugin::get_name() const {
+String SoftBody3DGizmoPlugin::get_name() const {
return "SoftBody3D";
}
-int SoftBodyNode3DGizmoPlugin::get_priority() const {
+int SoftBody3DGizmoPlugin::get_priority() const {
return -1;
}
-bool SoftBodyNode3DGizmoPlugin::is_selectable_when_hidden() const {
+bool SoftBody3DGizmoPlugin::is_selectable_when_hidden() const {
return true;
}
-void SoftBodyNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void SoftBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2161,28 +2161,28 @@ void SoftBodyNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_collision_triangles(tm);
}
-String SoftBodyNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
+String SoftBody3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
return "SoftBody3D pin point";
}
-Variant SoftBodyNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant SoftBody3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
return Variant(soft_body->is_point_pinned(p_idx));
}
-void SoftBodyNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
+void SoftBody3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
soft_body->pin_point_toggle(p_idx);
}
-bool SoftBodyNode3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int idx) const {
+bool SoftBody3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int idx) const {
SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
return soft_body->is_point_pinned(idx);
}
///////////
-VisibilityNotifierGizmoPlugin::VisibilityNotifierGizmoPlugin() {
+VisibilityNotifier3DGizmoPlugin::VisibilityNotifier3DGizmoPlugin() {
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;
@@ -2190,19 +2190,19 @@ VisibilityNotifierGizmoPlugin::VisibilityNotifierGizmoPlugin() {
create_handle_material("handles");
}
-bool VisibilityNotifierGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool VisibilityNotifier3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<VisibilityNotifier3D>(p_spatial) != nullptr;
}
-String VisibilityNotifierGizmoPlugin::get_name() const {
+String VisibilityNotifier3DGizmoPlugin::get_name() const {
return "VisibilityNotifier3D";
}
-int VisibilityNotifierGizmoPlugin::get_priority() const {
+int VisibilityNotifier3DGizmoPlugin::get_priority() const {
return -1;
}
-String VisibilityNotifierGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
+String VisibilityNotifier3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
switch (p_idx) {
case 0: return "Size X";
@@ -2216,12 +2216,12 @@ String VisibilityNotifierGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p
return "";
}
-Variant VisibilityNotifierGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant VisibilityNotifier3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node());
return notifier->get_aabb();
}
-void VisibilityNotifierGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+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());
@@ -2274,7 +2274,7 @@ void VisibilityNotifierGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p
}
}
-void VisibilityNotifierGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
+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());
@@ -2290,7 +2290,7 @@ void VisibilityNotifierGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, in
ur->commit_action();
}
-void VisibilityNotifierGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void VisibilityNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
VisibilityNotifier3D *notifier = Object::cast_to<VisibilityNotifier3D>(p_gizmo->get_spatial_node());
@@ -3034,7 +3034,7 @@ void BakedIndirectLightGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
#endif
////
-CollisionShapeNode3DGizmoPlugin::CollisionShapeNode3DGizmoPlugin() {
+CollisionShape3DGizmoPlugin::CollisionShape3DGizmoPlugin() {
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
const float gizmo_value = gizmo_color.get_v();
@@ -3043,19 +3043,19 @@ CollisionShapeNode3DGizmoPlugin::CollisionShapeNode3DGizmoPlugin() {
create_handle_material("handles");
}
-bool CollisionShapeNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool CollisionShape3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<CollisionShape3D>(p_spatial) != nullptr;
}
-String CollisionShapeNode3DGizmoPlugin::get_name() const {
+String CollisionShape3DGizmoPlugin::get_name() const {
return "CollisionShape3D";
}
-int CollisionShapeNode3DGizmoPlugin::get_priority() const {
+int CollisionShape3DGizmoPlugin::get_priority() const {
return -1;
}
-String CollisionShapeNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
+String CollisionShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const {
const CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
@@ -3091,7 +3091,7 @@ String CollisionShapeNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo
return "";
}
-Variant CollisionShapeNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
+Variant CollisionShape3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
@@ -3131,7 +3131,7 @@ Variant CollisionShapeNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_g
return Variant();
}
-void CollisionShapeNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
+void CollisionShape3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
@@ -3244,7 +3244,7 @@ void CollisionShapeNode3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int
cs2->set_height(d * 2.0);
}
}
-void CollisionShapeNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
+void CollisionShape3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
@@ -3351,7 +3351,7 @@ void CollisionShapeNode3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo,
ur->commit_action();
}
}
-void CollisionShapeNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
@@ -3663,7 +3663,7 @@ void CollisionShapeNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
-CollisionPolygonNode3DGizmoPlugin::CollisionPolygonNode3DGizmoPlugin() {
+CollisionPolygon3DGizmoPlugin::CollisionPolygon3DGizmoPlugin() {
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
const float gizmo_value = gizmo_color.get_v();
@@ -3671,19 +3671,19 @@ CollisionPolygonNode3DGizmoPlugin::CollisionPolygonNode3DGizmoPlugin() {
create_material("shape_material_disabled", gizmo_color_disabled);
}
-bool CollisionPolygonNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool CollisionPolygon3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<CollisionPolygon3D>(p_spatial) != nullptr;
}
-String CollisionPolygonNode3DGizmoPlugin::get_name() const {
+String CollisionPolygon3DGizmoPlugin::get_name() const {
return "CollisionPolygon3D";
}
-int CollisionPolygonNode3DGizmoPlugin::get_priority() const {
+int CollisionPolygon3DGizmoPlugin::get_priority() const {
return -1;
}
-void CollisionPolygonNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void CollisionPolygon3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
CollisionPolygon3D *polygon = Object::cast_to<CollisionPolygon3D>(p_gizmo->get_spatial_node());
@@ -3713,26 +3713,26 @@ void CollisionPolygonNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
////
-NavigationMeshNode3DGizmoPlugin::NavigationMeshNode3DGizmoPlugin() {
+NavigationRegion3DGizmoPlugin::NavigationRegion3DGizmoPlugin() {
create_material("navigation_edge_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge", Color(0.5, 1, 1)));
create_material("navigation_edge_material_disabled", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge_disabled", Color(0.7, 0.7, 0.7)));
create_material("navigation_solid_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid", Color(0.5, 1, 1, 0.4)));
create_material("navigation_solid_material_disabled", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid_disabled", Color(0.7, 0.7, 0.7, 0.4)));
}
-bool NavigationMeshNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool NavigationRegion3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<NavigationRegion3D>(p_spatial) != nullptr;
}
-String NavigationMeshNode3DGizmoPlugin::get_name() const {
+String NavigationRegion3DGizmoPlugin::get_name() const {
return "NavigationRegion3D";
}
-int NavigationMeshNode3DGizmoPlugin::get_priority() const {
+int NavigationRegion3DGizmoPlugin::get_priority() const {
return -1;
}
-void NavigationMeshNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
NavigationRegion3D *navmesh = Object::cast_to<NavigationRegion3D>(p_gizmo->get_spatial_node());
@@ -4078,25 +4078,25 @@ void JointGizmosDrawer::draw_cone(const Transform &p_offset, const Basis &p_base
////
-JointNode3DGizmoPlugin::JointNode3DGizmoPlugin() {
+Joint3DGizmoPlugin::Joint3DGizmoPlugin() {
create_material("joint_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1)));
create_material("joint_body_a_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint_body_a", Color(0.6, 0.8, 1)));
create_material("joint_body_b_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint_body_b", Color(0.6, 0.9, 1)));
}
-bool JointNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+bool Joint3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<Joint3D>(p_spatial) != nullptr;
}
-String JointNode3DGizmoPlugin::get_name() const {
- return "Joints";
+String Joint3DGizmoPlugin::get_name() const {
+ return "Joint3D";
}
-int JointNode3DGizmoPlugin::get_priority() const {
+int Joint3DGizmoPlugin::get_priority() const {
return -1;
}
-void JointNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Joint3D *joint = Object::cast_to<Joint3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -4242,7 +4242,7 @@ void JointNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
}
-void JointNode3DGizmoPlugin::CreatePinJointGizmo(const Transform &p_offset, Vector<Vector3> &r_cursor_points) {
+void Joint3DGizmoPlugin::CreatePinJointGizmo(const Transform &p_offset, Vector<Vector3> &r_cursor_points) {
float cs = 0.25;
r_cursor_points.push_back(p_offset.translated(Vector3(+cs, 0, 0)).origin);
@@ -4253,7 +4253,7 @@ void JointNode3DGizmoPlugin::CreatePinJointGizmo(const Transform &p_offset, Vect
r_cursor_points.push_back(p_offset.translated(Vector3(0, 0, -cs)).origin);
}
-void JointNode3DGizmoPlugin::CreateHingeJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
+void Joint3DGizmoPlugin::CreateHingeJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
r_common_points.push_back(p_offset.translated(Vector3(0, 0, 0.5)).origin);
r_common_points.push_back(p_offset.translated(Vector3(0, 0, -0.5)).origin);
@@ -4285,7 +4285,7 @@ void JointNode3DGizmoPlugin::CreateHingeJointGizmo(const Transform &p_offset, co
}
}
-void JointNode3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_angular_limit_lower, real_t p_angular_limit_upper, real_t p_linear_limit_lower, real_t p_linear_limit_upper, Vector<Vector3> &r_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
+void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_angular_limit_lower, real_t p_angular_limit_upper, real_t p_linear_limit_lower, real_t p_linear_limit_upper, Vector<Vector3> &r_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
p_linear_limit_lower = -p_linear_limit_lower;
p_linear_limit_upper = -p_linear_limit_upper;
@@ -4345,7 +4345,7 @@ void JointNode3DGizmoPlugin::CreateSliderJointGizmo(const Transform &p_offset, c
true);
}
-void JointNode3DGizmoPlugin::CreateConeTwistJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_swing, real_t p_twist, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
+void Joint3DGizmoPlugin::CreateConeTwistJointGizmo(const Transform &p_offset, const Transform &p_trs_joint, const Transform &p_trs_body_a, const Transform &p_trs_body_b, real_t p_swing, real_t p_twist, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
if (r_body_a_points)
JointGizmosDrawer::draw_cone(
@@ -4364,7 +4364,7 @@ void JointNode3DGizmoPlugin::CreateConeTwistJointGizmo(const Transform &p_offset
*r_body_b_points);
}
-void JointNode3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
+void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
const Transform &p_offset,
const Transform &p_trs_joint,
const Transform &p_trs_body_a,
diff --git a/editor/node_3d_editor_gizmos.h b/editor/node_3d_editor_gizmos.h
index f8339b4c6c..889b0e8315 100644
--- a/editor/node_3d_editor_gizmos.h
+++ b/editor/node_3d_editor_gizmos.h
@@ -36,9 +36,9 @@
class Camera3D;
-class LightNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class Light3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(LightNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(Light3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -51,12 +51,12 @@ public:
void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false);
void redraw(EditorNode3DGizmo *p_gizmo);
- LightNode3DGizmoPlugin();
+ Light3DGizmoPlugin();
};
-class AudioStreamPlayer3DNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class AudioStreamPlayer3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(AudioStreamPlayer3DNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(AudioStreamPlayer3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -69,12 +69,12 @@ public:
void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false);
void redraw(EditorNode3DGizmo *p_gizmo);
- AudioStreamPlayer3DNode3DGizmoPlugin();
+ AudioStreamPlayer3DGizmoPlugin();
};
-class CameraNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class Camera3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(CameraNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(Camera3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -87,12 +87,12 @@ public:
void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false);
void redraw(EditorNode3DGizmo *p_gizmo);
- CameraNode3DGizmoPlugin();
+ Camera3DGizmoPlugin();
};
-class MeshInstanceNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class MeshInstance3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(MeshInstanceNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(MeshInstance3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -101,12 +101,12 @@ public:
bool can_be_hidden() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- MeshInstanceNode3DGizmoPlugin();
+ MeshInstance3DGizmoPlugin();
};
-class Sprite3DNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class Sprite3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(Sprite3DNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(Sprite3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -115,12 +115,12 @@ public:
bool can_be_hidden() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- Sprite3DNode3DGizmoPlugin();
+ Sprite3DGizmoPlugin();
};
-class Position3DNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class Position3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(Position3DNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(Position3DGizmoPlugin, EditorNode3DGizmoPlugin);
Ref<ArrayMesh> pos3d_mesh;
Vector<Vector3> cursor_points;
@@ -131,12 +131,12 @@ public:
int get_priority() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- Position3DNode3DGizmoPlugin();
+ Position3DGizmoPlugin();
};
-class SkeletonNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class Skeleton3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(SkeletonNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(Skeleton3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -144,12 +144,12 @@ public:
int get_priority() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- SkeletonNode3DGizmoPlugin();
+ Skeleton3DGizmoPlugin();
};
-class PhysicalBoneNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class PhysicalBone3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(PhysicalBoneNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(PhysicalBone3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -157,12 +157,12 @@ public:
int get_priority() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- PhysicalBoneNode3DGizmoPlugin();
+ PhysicalBone3DGizmoPlugin();
};
-class RayCastNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class RayCast3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(RayCastNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(RayCast3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -170,12 +170,12 @@ public:
int get_priority() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- RayCastNode3DGizmoPlugin();
+ RayCast3DGizmoPlugin();
};
-class SpringArmNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class SpringArm3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(SpringArmNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(SpringArm3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -183,12 +183,12 @@ public:
int get_priority() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- SpringArmNode3DGizmoPlugin();
+ SpringArm3DGizmoPlugin();
};
-class VehicleWheelNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class VehicleWheel3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(VehicleWheelNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(VehicleWheel3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -196,12 +196,12 @@ public:
int get_priority() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- VehicleWheelNode3DGizmoPlugin();
+ VehicleWheel3DGizmoPlugin();
};
-class SoftBodyNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class SoftBody3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(SoftBodyNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(SoftBody3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -215,12 +215,12 @@ public:
void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel);
bool is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int idx) const;
- SoftBodyNode3DGizmoPlugin();
+ SoftBody3DGizmoPlugin();
};
-class VisibilityNotifierGizmoPlugin : public EditorNode3DGizmoPlugin {
+class VisibilityNotifier3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(VisibilityNotifierGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(VisibilityNotifier3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -233,7 +233,7 @@ public:
void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point);
void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false);
- VisibilityNotifierGizmoPlugin();
+ VisibilityNotifier3DGizmoPlugin();
};
class CPUParticles3DGizmoPlugin : public EditorNode3DGizmoPlugin {
@@ -322,9 +322,9 @@ public:
BakedIndirectLightGizmoPlugin();
};
#endif
-class CollisionShapeNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class CollisionShape3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(CollisionShapeNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(CollisionShape3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -337,23 +337,23 @@ public:
void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point);
void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false);
- CollisionShapeNode3DGizmoPlugin();
+ CollisionShape3DGizmoPlugin();
};
-class CollisionPolygonNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(CollisionPolygonNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+class CollisionPolygon3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+ GDCLASS(CollisionPolygon3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
String get_name() const;
int get_priority() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- CollisionPolygonNode3DGizmoPlugin();
+ CollisionPolygon3DGizmoPlugin();
};
-class NavigationMeshNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class NavigationRegion3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(NavigationMeshNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(NavigationRegion3DGizmoPlugin, EditorNode3DGizmoPlugin);
struct _EdgeKey {
@@ -369,7 +369,7 @@ public:
int get_priority() const;
void redraw(EditorNode3DGizmo *p_gizmo);
- NavigationMeshNode3DGizmoPlugin();
+ NavigationRegion3DGizmoPlugin();
};
class JointGizmosDrawer {
@@ -387,9 +387,9 @@ public:
static void draw_cone(const Transform &p_offset, const Basis &p_base, real_t p_swing, real_t p_twist, Vector<Vector3> &r_points);
};
-class JointNode3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+class Joint3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(JointNode3DGizmoPlugin, EditorNode3DGizmoPlugin);
+ GDCLASS(Joint3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial);
@@ -428,7 +428,7 @@ public:
Vector<Vector3> *r_body_a_points,
Vector<Vector3> *r_body_b_points);
- JointNode3DGizmoPlugin();
+ Joint3DGizmoPlugin();
};
#endif // SPATIAL_EDITOR_GIZMOS_H
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 {