godot icon indicating copy to clipboard operation
godot copied to clipboard

Fix various editor easing property issues

Open jaydensipe opened this issue 1 year ago • 1 comments

Fixes #94778, #74316.

This commit fixes various issues with the easing property in the editor. Tested with various PROPERTY_HINT_EXP_EASING properties, in AnimationPlayer and @export_exp_easing.

  • Fixes setting easing to 0 (from default value) without slider.
  • Fixes undo not reverting to default value correctly.
  • Removes 2 unneeded queue_redraws()
Before After

jaydensipe avatar Oct 03 '24 00:10 jaydensipe

#94778 mentions the "range for particles" for GPUParticlesAttractor3D should be looked at as well, to ensure it does not go below negative, but the docs specify "Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges."

So I am not sure if we want to include that not being able to be set to negative or to just leave it.

jaydensipe avatar Oct 03 '24 00:10 jaydensipe

This doesn't seem to fix #74316. I have simple @export_exp_easing var variable, when I type 0 it doesn't actually set 0, but some 1e-05 (as saved in scene).

Other than that the fix looks fine. You can either modify it to fix the issue or remove the link.

KoBeWi avatar Oct 14 '25 19:10 KoBeWi

@KoBeWi looks this it was this piece of code causing that. I've gone ahead and removed that, and the @export_exp_easing var now works, it seems like removing this would be alright??

// 0 is a singularity, but both positive and negative values
// are otherwise allowed. Enforce 0+ as workaround.
if (Math::is_zero_approx(p_value)) {
	p_value = 0.00001;
}

jaydensipe avatar Oct 14 '25 22:10 jaydensipe

It was introduced in #41103 I think it's fine to remove, there is a similar piece of code in dragging method, which I think is the important one.

CC @Calinou

KoBeWi avatar Oct 14 '25 22:10 KoBeWi

Thanks!

Repiteo avatar Oct 28 '25 17:10 Repiteo