You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
SpatialEditorPlugin should only handle Spatial
This commit is contained in:
@@ -7270,13 +7270,14 @@ void SpatialEditorPlugin::edit(Object *p_object) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SpatialEditorPlugin::handles(Object *p_object) const {
|
bool SpatialEditorPlugin::handles(Object *p_object) const {
|
||||||
if (p_object->is_class("Spatial") || p_object->is_class("Resource")) {
|
if (p_object->is_class("Spatial")) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
}
|
||||||
|
if (!p_object->is_class("Resource")) {
|
||||||
// This ensures that gizmos are cleared when selecting a non-Spatial node.
|
// This ensures that gizmos are cleared when selecting a non-Spatial node.
|
||||||
const_cast<SpatialEditorPlugin *>(this)->edit((Object *)nullptr);
|
const_cast<SpatialEditorPlugin *>(this)->edit((Object *)nullptr);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary SpatialEditorPlugin::get_state() const {
|
Dictionary SpatialEditorPlugin::get_state() const {
|
||||||
|
|||||||
Reference in New Issue
Block a user