Fix Ring-Axis parameter being always visible

(cherry picked from commit 2f69caaff3)
This commit is contained in:
Raffaele Picca 2021-12-03 16:32:24 +01:00 committed by Rémi Verschelde
parent 2c7f6832ae
commit 47f9a316ce
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

View file

@ -144,7 +144,7 @@
<member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture">
Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
</member>
<member name="emission_ring_axis" type="Vector3" setter="set_emission_ring_axis" getter="get_emission_ring_axis" default="Vector3( 0, 0, 1 )">
<member name="emission_ring_axis" type="Vector3" setter="set_emission_ring_axis" getter="get_emission_ring_axis">
The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING].
</member>
<member name="emission_ring_height" type="float" setter="set_emission_ring_height" getter="get_emission_ring_height">

View file

@ -1128,7 +1128,7 @@ void ParticlesMaterial::_validate_property(PropertyInfo &property) const {
property.usage = 0;
}
if ((property.name == "emission_ring_radius" || property.name == "emission_ring_height" || property.name == "emission_ring_inner_radius") && emission_shape != EMISSION_SHAPE_RING) {
if (property.name.begins_with("emission_ring_") && emission_shape != EMISSION_SHAPE_RING) {
property.usage = 0;
}