BUG? When Isocurve density is zet to 0 and turned off, it's... -1?

Hi, not sure if this is a bug or a very strange feature, but on the Properties panel when I set the Isocurve density to 0 and then turn it off, it gets greyed out and change into -1 (minus one). Then I turned on the Isocurve density and tried numbers such like 1, 2, 3 etc, but after turning it off again the number changes to -1, -2 and -3 (with a minus before the number). It’s kind of confusing, because when it’s 0 it changes to -1, thus it will not show the actual number that was turned off just before that (like the example pictured below).

Cheers,

Bobi

My guess is the sign of the isocurve density is used to determine if isocurves are displayed. Negative isocurve density is interpreted internally in code to not display isocurves. The isocurve density is effectively multiplied by -1 whenever the isocurve on/off switch is toggled. The alternates the isocurve density between positive (on) and negative (off).

But a problem arises when the density is set to 0. Because -0 (due to the method used internally to represent integers) an isocurve density of 0 is set to -1 to turn it off. The downside of this is when the isocurve display is toggled from off to on if the density is -1 it is changed to 1 even if it was originally 0 before display was turned off.

1 Like

Yeah, it’s pity that when I set the isocurve density to be 0, then turn it off and turn it on again, it automatically changes to 1. This problem is especially big when I have a bunch of objects with different isocurve settings and then I want to temporarily show their isocurve to sheck something about their shape; then at the moment I turn off their isocurve, any surface that previously had Isocurve density of 0 now loses that setting and has a value of 1 instead. Then it’s impossible to guess which object had 0 isocurve density and which had 1.
For example, if I have 3 objects and set their Isocurve density to be 0, 1 and 2, respectively, then select them all and click on “Show surface isocurve”, that will hide their isocurves. However, at the moment I click again on that option, these object’s isocurve settings will be changed to 2, 1 and 2, respectively (the object that previously had isocurve density of 0 now changes its value to 2).