0
$\begingroup$

Is there a string length limit for the descriptions of properties? I assume there is. Does anyone know what that length is, and is there a safety mechanism to catch strings that are too long?

ScenePos : BoolProperty(
    name="title",
    description="this string is not very long",
    default=False
    )
$\endgroup$
  • 2
    $\begingroup$ If I'm not mistaken by a quick look at the code, there doesn't seem to be a hard limit for properties, because they are PyObjects. This matches brockmann's test, which suggest that allocation simply fails at some very high number of bytes. For menus and operators there is a hard coded limit defined by RNA_DYN_DESCR_MAX which is 240. $\endgroup$ – Robert Gützkow Sep 11 at 17:36
  • $\begingroup$ Yeah makes sense. Thanks for looking into the source and confirming that @rjg $\endgroup$ – brockmann Sep 11 at 19:28
2
$\begingroup$

Blender becomes laggy at 1000000000 and crashes at 10000000000 characters on my machine (64bit):

my_int: IntProperty(
    name = "Int Value",
    description=1000000000*"A",
    default = 23,
    min = 10,
    max = 100
    )
$\endgroup$
  • $\begingroup$ Haha, wow. I also tested this way, but I wasn't sure if they were error checking it. Are we positive the string isn't being written to unowned memory once it exceeds a certain threshold? I've seen overruns like that work correctly before. $\endgroup$ – Robert Sep 11 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.