3
$\begingroup$

I need a property that can accept the 2267538950 number, unfortunately by default Blender uses a signed int range. There was a way to set subtype="UNSIGNED" in the previous versions but it doesn't work anymore(?) and I get an error

value not in 'int' range ((-2147483647 - 1), 2147483647)

bpy.types.Scene.vertInt1 = IntProperty(
 name="Integer",
 description="Enter an integer",
 default = 2,
 subtype='UNSIGNED')
$\endgroup$
5
  • $\begingroup$ Python int can accept any size limited by memory as far as I know, so int in [-inf, inf] in documentation for maximum value (docs.blender.org/api/current/bpy.types.IntProperty.html) seems to make sense. I would report this as a bug or ask on devtalk forums. At least the documentation is wrong... In any case why do you need this? $\endgroup$ Commented Jul 13 at 16:28
  • $\begingroup$ I import values from a mesh format that uses uint for certain values and would be great to import them as is without an extra step with conversion them to something else just for blender $\endgroup$ Commented Jul 13 at 19:38
  • $\begingroup$ Okay I found it kinda works if you do it as simple code, but in the property group class where I need it, it raises this error $\endgroup$ Commented Jul 13 at 21:06
  • $\begingroup$ It did not work in any IntProperty I tested it on... $\endgroup$ Commented Jul 13 at 21:15
  • 1
    $\begingroup$ I handle this by converting to a string. $\endgroup$
    – scurest
    Commented Jul 13 at 22:05

0

You must log in to answer this question.

Browse other questions tagged .