fix: noise texture in primitive emits changed
This commit is contained in:
parent
61ba2a54f2
commit
841571cf04
|
|
@ -124,7 +124,13 @@ void NoisePrimitive::evaluate(Vector2 at, float &io_height) const {
|
|||
}
|
||||
|
||||
void NoisePrimitive::set_noise(Ref<Noise> noise) {
|
||||
if (this->noise.is_valid()) {
|
||||
this->noise->disconnect_changed(callable_mp(cast_to<Resource>(this), &Resource::emit_changed));
|
||||
}
|
||||
this->noise = noise;
|
||||
if (this->noise.is_valid()) {
|
||||
this->noise->connect_changed(callable_mp(cast_to<Resource>(this), &Resource::emit_changed));
|
||||
}
|
||||
emit_changed();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue