-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move "Create Debug Tangents" on MeshInstance3D into an editor plugin #62188
Conversation
Oops I should've ran the format myself, my bad it's kinda late here, added a git-hook so it won't happen again |
19f95d1
to
b089a8a
Compare
Third attempt! Now compiles with tools=off |
@@ -383,13 +383,13 @@ void MeshInstance3D::_mesh_changed() { | |||
update_gizmos(); | |||
} | |||
|
|||
void MeshInstance3D::create_debug_tangents() { | |||
MeshInstance3D *MeshInstance3D::create_debug_tangents_node() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest making create_debug_tangents return the mesh instance it creates and adds as a child, but I think that would require me to open a GIP
Needs squash and rebase btw. |
4606cc9
to
cb3f284
Compare
Instead of exporting the "create_debug_tangents" function via METHOD_FLAG_EDITOR it gets executed by an editor plugin. This moves it from the "Manage object properties" menu into a mesh menu. It also adds undo/redo functionality to the create debug tangents option.
} | ||
|
||
add_child(mi, true); | ||
if (is_inside_tree() && this == get_tree()->get_edited_scene_root()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously wrapped in #ifdef TOOLS_ENABLED
, but I think it's fine to leave it, because get_edited_scene_root()
just returns null in non-editor builds.
Thanks! And congrats for your first merged Godot contribution 🎉 |
Thanks for your patience with me ^^ @KoBeWi |
This closes #50158