Skip to content
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

Fix editor-only visibility for lights #62335

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

reduz
Copy link
Member

@reduz reduz commented Jun 23, 2022

  • Update visibility again for editor-only lights if owner changes.

Fixes #26399, supersedes #52327

* Update visibility again for editor-only lights if owner changes.

Fixes godotengine#26399, supersedes godotengine#52327
@reduz reduz requested review from a team as code owners June 23, 2022 06:20
@@ -176,6 +176,11 @@ Ref<Texture2D> Light3D::get_projector() const {
return projector;
}

void Light3D::owner_changed_notify() {
// For cases where owner changes _after_ entering tree (as example, editor editing).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a comment that should go in node.cpp/h to clarify what this core API is for.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could add one there (though the function is quite self explanatory by name), but this comment is meant specifically for these nodes, because the editor-only lights need to check the owner to verify they are in the right scene and hence see that it must be enabled or disabled.

@akien-mga akien-mga added this to the 4.0 milestone Jun 23, 2022
@akien-mga akien-mga merged commit 49d061f into godotengine:master Jun 23, 2022
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jul 2, 2022
@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicating a editor_only Light turns it dark
3 participants