"hard_min" and "hard_max" in API documentation: are they valid?

Hi!

I was reading the API documentation about IntProperty, and I saw the properties hard_min and hard_max.

So naturally, as I thought I needed those, I used them in my script. And I got these kind of errors in return:

TypeError: 'hard_min' is an invalid keyword argument for IntProperty()
ValueError: bpy_struct "VIEW3D_OT_incease_gizmo_size" registration error: inc could not register

Turns out I can just use min and max instead. But…

  • are they the same thing?
  • if hadr_min/max doesn’t work, why? Are they valid?
  • if not, should the API documentation be updated so?

Thanks!

That page documents the attributes of bpy.types.IntProperty class, not the arguments to the bpy.props.IntProperty() function:
https://docs.blender.org/api/current/bpy.props.html?highlight=intproperty#bpy.props.IntProperty

2 Likes

Oh I see, sorry for the mistake. Thanks!