You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Use same colors for editor and running project for collision/path debug
This harmonizes the appearance of collision shapes and paths between the editor and running project, in both 2D and 3D. This means that in 3D, paths are now green and shapes are now cyan instead of light blue.
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#include "scene/resources/surface_tool.h"
|
||||
|
||||
CollisionObject3DGizmoPlugin::CollisionObject3DGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
const Color gizmo_color = SceneTree::get_singleton()->get_debug_collisions_color();
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "scene/3d/physics/collision_polygon_3d.h"
|
||||
|
||||
CollisionPolygon3DGizmoPlugin::CollisionPolygon3DGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
const Color gizmo_color = SceneTree::get_singleton()->get_debug_collisions_color();
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
CollisionShape3DGizmoPlugin::CollisionShape3DGizmoPlugin() {
|
||||
helper.instantiate();
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
const Color gizmo_color = SceneTree::get_singleton()->get_debug_collisions_color();
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "scene/3d/physics/ray_cast_3d.h"
|
||||
|
||||
RayCast3DGizmoPlugin::RayCast3DGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
const Color gizmo_color = SceneTree::get_singleton()->get_debug_collisions_color();
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "scene/3d/physics/shape_cast_3d.h"
|
||||
|
||||
ShapeCast3DGizmoPlugin::ShapeCast3DGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
const Color gizmo_color = SceneTree::get_singleton()->get_debug_collisions_color();
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "scene/3d/soft_body_3d.h"
|
||||
|
||||
SoftBody3DGizmoPlugin::SoftBody3DGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
Color gizmo_color = SceneTree::get_singleton()->get_debug_collisions_color();
|
||||
create_material("shape_material", gizmo_color);
|
||||
create_handle_material("handles");
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ void SpringArm3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
||||
}
|
||||
|
||||
SpringArm3DGizmoPlugin::SpringArm3DGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
Color gizmo_color = SceneTree::get_singleton()->get_debug_collisions_color();
|
||||
create_material("shape_material", gizmo_color);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "scene/3d/physics/vehicle_body_3d.h"
|
||||
|
||||
VehicleWheel3DGizmoPlugin::VehicleWheel3DGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
Color gizmo_color = SceneTree::get_singleton()->get_debug_collisions_color();
|
||||
create_material("shape_material", gizmo_color);
|
||||
}
|
||||
|
||||
|
||||
@@ -1054,7 +1054,7 @@ int Path3DGizmoPlugin::get_priority() const {
|
||||
}
|
||||
|
||||
Path3DGizmoPlugin::Path3DGizmoPlugin(float p_disk_size) {
|
||||
Color path_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.9));
|
||||
Color path_color = SceneTree::get_singleton()->get_debug_paths_color();
|
||||
Color path_tilt_color = EDITOR_DEF_RST("editors/3d_gizmos/gizmo_colors/path_tilt", Color(1.0, 1.0, 0.4, 0.9));
|
||||
disk_size = p_disk_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user