0
$\begingroup$

In my first Blender script, I'm asking how can I control the slider value with min and max values without using FloatProperty.

box1 = layout.box()
box1.label("Span (Z) profiles positions:")
box1.prop(obj, "location", index = 2, text = "Span")
$\endgroup$

1 Answer 1

0
$\begingroup$

After looking at the documentation, I do not think there is a built-in option for an object's location (some other Blender values may be, but you could check on Blender's API docs). It would be best to use a FloatProperty or FloatVectorProperty. You could use a setter so it updates the object's location whenever the value changes, but that would also require some way to keep track of the object for the property.

$\endgroup$
1
  • $\begingroup$ Thanks for your answer. I will see in details the blender's API docs. If I found that is possible to do it, it will be more easy for me because I used FloatPoperty in my program but the values are not apdated ! I always look first for the easiest solution. $\endgroup$ Commented May 10, 2020 at 11:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .