diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-05 18:11:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 18:11:56 +0200 |
commit | 8804eb8c061634f740af04132b2c68e5c27c449d (patch) | |
tree | b9cdc64ce976705bec97cc6d21546c77fd6a8dfb /editor/plugins/path_editor_plugin.cpp | |
parent | 2f4912ec69a07d62a4b56a5be6d8ada59516b310 (diff) | |
parent | 4a412943d4a80703a178396be34e2576f891bc80 (diff) | |
download | redot-engine-8804eb8c061634f740af04132b2c68e5c27c449d.tar.gz |
Merge pull request #21707 from JFonS/fix_instanced_selection
Fix selection of instanced scenes in 3D
Diffstat (limited to 'editor/plugins/path_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/path_editor_plugin.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp index d74cd11cbc..df6c40ed02 100644 --- a/editor/plugins/path_editor_plugin.cpp +++ b/editor/plugins/path_editor_plugin.cpp @@ -215,8 +215,8 @@ void PathSpatialGizmo::redraw() { clear(); - Ref<SpatialMaterial> path_material = gizmo_plugin->get_material("path_material"); - Ref<SpatialMaterial> path_thin_material = gizmo_plugin->get_material("path_thin_material"); + Ref<SpatialMaterial> path_material = gizmo_plugin->get_material("path_material", this); + Ref<SpatialMaterial> path_thin_material = gizmo_plugin->get_material("path_thin_material", this); Ref<SpatialMaterial> handles_material = gizmo_plugin->get_material("handles"); Ref<Curve3D> c = path->get_curve(); @@ -641,24 +641,8 @@ String PathSpatialGizmoPlugin::get_name() const { PathSpatialGizmoPlugin::PathSpatialGizmoPlugin() { Color path_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/path", Color(0.5, 0.5, 1.0, 0.8)); - - Ref<SpatialMaterial> path_material = Ref<SpatialMaterial>(memnew(SpatialMaterial)); - path_color.a = 0.8; - path_material->set_albedo(path_color); - path_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); - path_material->set_line_width(3); - path_material->set_cull_mode(SpatialMaterial::CULL_DISABLED); - path_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true); - - Ref<SpatialMaterial> path_thin_material = Ref<SpatialMaterial>(memnew(SpatialMaterial)); + create_material("path_material", path_color); path_color.a = 0.4; - path_thin_material->set_albedo(path_color); - path_thin_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); - path_thin_material->set_line_width(1); - path_thin_material->set_cull_mode(SpatialMaterial::CULL_DISABLED); - path_thin_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true); - - add_material("path_material", path_material); - add_material("path_thin_material", path_thin_material); + create_material("path_thin_material", path_color); create_handle_material("handles"); } |