summaryrefslogtreecommitdiffstats
path: root/scene/3d/gpu_particles_3d.cpp
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-11-26 19:30:58 +0000
committerGitHub <noreply@github.com>2024-11-26 19:30:58 +0000
commitb06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e (patch)
tree79c2a4c34f2d888ff962d76edf474c518d1abdea /scene/3d/gpu_particles_3d.cpp
parentc5b1645e60a59c0292c04bece3fdb0715a61afea (diff)
parente58e18261ea7ed3978146ef8d77a900be2601be3 (diff)
downloadredot-engine-b06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e.tar.gz
Merge pull request #885 from Spartan322/merge/d09d82d
Merge commit godotengine/godot@d09d82d
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 83609dfa91..95e183f302 100644
--- a/scene/3d/gpu_particles_3d.cpp
+++ b/scene/3d/gpu_particles_3d.cpp
@@ -416,6 +416,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()) {
@@ -746,7 +750,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");