summaryrefslogtreecommitdiffstats
path: root/scene/3d/gpu_particles_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/gpu_particles_3d.cpp')
-rw-r--r--scene/3d/gpu_particles_3d.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp
index 2cef607d29..be927c2871 100644
--- a/scene/3d/gpu_particles_3d.cpp
+++ b/scene/3d/gpu_particles_3d.cpp
@@ -414,6 +414,10 @@ AABB GPUParticles3D::capture_aabb() const {
}
void GPUParticles3D::_validate_property(PropertyInfo &p_property) const {
+ if (p_property.name == "emitting") {
+ p_property.hint = one_shot ? PROPERTY_HINT_ONESHOT : PROPERTY_HINT_NONE;
+ }
+
if (p_property.name.begins_with("draw_pass_")) {
int index = p_property.name.get_slicec('_', 2).to_int() - 1;
if (index >= draw_passes.size()) {
@@ -742,7 +746,7 @@ void GPUParticles3D::_bind_methods() {
ADD_SIGNAL(MethodInfo("finished"));
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting", PROPERTY_HINT_ONESHOT), "set_emitting", "is_emitting");
ADD_PROPERTY_DEFAULT("emitting", true); // Workaround for doctool in headless mode, as dummy rasterizer always returns false.
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_RANGE, "1,1000000,1,exp"), "set_amount", "get_amount");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "amount_ratio", PROPERTY_HINT_RANGE, "0,1,0.0001"), "set_amount_ratio", "get_amount_ratio");