Bump node-Slider control

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Bump node-Slider control

Post by Racleborg »

Hi

I'm finding that when there is a value of -.01 in the Bump node's Bump Height, then the slider control for that value stops working, and if a new value is required it has to be typed in.

Thanks
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Bump node-Slider control

Post by B.Y.O.B. »

This property is defined like this:
https://github.com/LuxCoreRender/BlendL ... ump.py#L10

Code: Select all

    # Allow negative values for inverting the bump. These values are in meters.
    default_value = FloatProperty(default=0.001, soft_min=-0.01, soft_max=0.01,
                                  precision=3,
                                  subtype="DISTANCE", description="Bump height")
So -0.01 is the soft minimum, meaning the point where the slider ends. If you want values lower than this, you have to type them in manually.
This is because the value is in meters and when I wrote this code, I assumed that most bump heights will be in the range 0 to 1 cm, that's why I picked those as the end points of the slider.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Bump node-Slider control

Post by Racleborg »

BYOB

Thanks for the explanation.

So without the SHIFT key, then it will go from -.01 to .01 without any increments. Is that correct?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Bump node-Slider control

Post by B.Y.O.B. »

No, it should behave like a slider.
But thanks to you I noticed that this doesn't work because the default step is a lot larger than the range we are using here, so the value only jumps between -0.01 and 0.01 if you click and drag.
I specified a step of 1 mm, so it should now work like expected.
https://github.com/LuxCoreRender/BlendL ... c32c152ec4

By the way, if you encounter much different ranges in your work, you can also suggest different values for the soft_min and soft_max arguments.
Maybe it should be 5 cm instead of 1 cm?
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Bump node-Slider control

Post by Racleborg »

That's great, thank you.

I don't think I need values outside the ones you have already specified.

I'm still on that learning curve, and having fun-thanks again.
Post Reply