0
$\begingroup$

Referring to this question, I am trying to build a custom interface starting from the final model "All in One". The problem is that I want to add into my interface a FloatVectorProperty. So, I inserted that into my "My Setting" class, into the "OBJECT_PT_my_panel" class and I am trying to print its values. But when I add this FloatVectorProperty, the other parameters just disappear and the compiler says to me that "ValueError: bpy_struct "MySettings" registration error: my_vector_property could not register"

That's how I defined the vector property inside the MySetting class:

my_floatVectorProperty = FloatVectorProperty(
    description="Something",
    default=(0.0, 0.0, 0.0), 
    min=(0.0,0.0,0.0),
    max=(100.0,100.0,100.0),
) 

Is there a way to fix that so I can add a FloatVectorProperty to the panel and print its values?

$\endgroup$
2
  • 1
    $\begingroup$ According to the API, min and max are floats - extended example. $\endgroup$
    – p2or
    May 17, 2017 at 10:57
  • $\begingroup$ Oh man, you're right. Stupid mistake. It worked. I was convinced that because the default is a vector, so is the minimum and the maximum. Thanks. $\endgroup$
    – Rexam
    May 17, 2017 at 12:01

1 Answer 1

0
$\begingroup$

According to the API, min and max are floats so the correct definition is:

my_floatVectorProperty = FloatVectorProperty(
  description="Something",
  default=(0.0, 0.0, 0.0), 
  min=0.0,
  max=100.0
) 
$\endgroup$

You must log in to answer this question.

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