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 comments and indentation in .gdshaderinc files #79158

Merged
merged 1 commit into from
Jul 8, 2023

Conversation

jpcerrone
Copy link
Contributor

@jpcerrone jpcerrone commented Jul 7, 2023

Fixes #78205

The handling of comments and indentation in the shader editor wasn't considering shader include files.
It was using a shader.is_null() call to check if a shader file was empty before doing the comments/indentation, but, when using a shader include file, the shader property will be null even when the file isn't empty, and that would cause an early exit from the comments/indentation handling.

Testing:

shaderincludes_bug

Fixes godotengine#78205
The handling of comments and indentation in the shader editor
wasn't considering shader include files.
@jpcerrone jpcerrone requested a review from a team as a code owner July 7, 2023 14:26
@AThousandShips AThousandShips added this to the 4.2 milestone Jul 7, 2023
@akien-mga akien-mga added the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jul 7, 2023
@akien-mga akien-mga merged commit bdcbfd7 into godotengine:master Jul 8, 2023
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jul 10, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.1.

@akien-mga akien-mga changed the title Fix comments and indentation in .gdshaderinc files Fix comments and indentation in .gdshaderinc files Jul 11, 2023
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.

Ctrl+K to comment lines in shader editor isn't working if the shader is a .gdshaderinc
4 participants