-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Uniformize layer names, script methods and documentation #51532
Conversation
23ad4e8
to
a9a9027
Compare
doc/classes/Camera3D.xml
Outdated
<description> | ||
Enables or disables the given [code]layer[/code] in the [member cull_mask]. | ||
Sets the specified [code]value[/code] of the [member cull_mask] to [code]true[/code] or [code]false[/code], given a [code]layer_number[/code] between 1 and 20. |
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 description doesn't make much sense because [code]value[/code]
refers to the passed bool, not to the value in cull_mask
associated with the given layer. So I'd change it to something like:
Sets the specified [code]value[/code] of the [member cull_mask] to [code]true[/code] or [code]false[/code], given a [code]layer_number[/code] between 1 and 20. | |
Sets the specified value in the [member cull_mask] to [code]value[/code], given a [code]layer_number[/code] between 1 and 20. |
or:
Sets the specified [code]value[/code] of the [member cull_mask] to [code]true[/code] or [code]false[/code], given a [code]layer_number[/code] between 1 and 20. | |
Sets the value for the specified layer in [member cull_mask] to [code]value[/code], given a [code]layer_number[/code] between 1 and 20. |
or:
Sets the specified [code]value[/code] of the [member cull_mask] to [code]true[/code] or [code]false[/code], given a [code]layer_number[/code] between 1 and 20. | |
Based on [code]value[/code], enables or disables the specified layer in the [member cull_mask], given a [code]layer_number[/code] between 1 and 20. |
The same issue is present in other similar changes (I'm not commenting them one by one though).
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.
Makes sense! I've updated the documentation based on your third suggestion, and also updated the get_
functions to use similar wording.
- Back to 1-based layer names to make it clearer in editor UI - Layer bit accessors are renamed to layer value and 1-based too - Uniform errors and documentation in render and physics - Fix a few remaining collision_layer used in place of collision_mask
a9a9027
to
989acbb
Compare
Thanks! |
Change based on discussion started in #44809 (comment), in order to solve godotengine/godot-proposals#2050 and still keep the editor layer mask UI intuitive.
set/get_layer_mask_bit(bit)
functions are renamed toset/get_layer_mask_value(layer_number)
and they use 1-based indices toocollision_layer
used in place ofcollision_mask
in physics