Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-12-09 09:17:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-12-09 09:20:44 +0300
commitacc6373939d4825d9be0d8fa81e9a1a4e3dd0d27 (patch)
tree5e51a25e7e513bd0cc93ba083f6b04e2cc61ac3a /release/scripts/startup/bl_operators/wm.py
parent6c9263d817b7b4dcd4d6e1f365d1db0a83de6e51 (diff)
Fix custom-property UI allowing long names that raised errors
Rename `rna_property` to `rna_custom_property` to differentiate it from a more general property.
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r--release/scripts/startup/bl_operators/wm.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 3d8ed7ef0b5..bd1c99fdeb3 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1147,10 +1147,11 @@ rna_default = StringProperty(
maxlen=1024,
)
-rna_property = StringProperty(
+rna_custom_property = StringProperty(
name="Property Name",
description="Property name edit",
- maxlen=1024,
+ # Match `MAX_IDPROP_NAME - 1` in Blender's source.
+ maxlen=63,
)
rna_min = FloatProperty(
@@ -1196,7 +1197,7 @@ class WM_OT_properties_edit(Operator):
bl_options = {'REGISTER', 'INTERNAL'}
data_path: rna_path
- property: rna_property
+ property: rna_custom_property
value: rna_value
default: rna_default
min: rna_min
@@ -1552,7 +1553,7 @@ class WM_OT_properties_remove(Operator):
bl_options = {'UNDO', 'INTERNAL'}
data_path: rna_path
- property: rna_property
+ property: rna_custom_property
def execute(self, context):
from rna_prop_ui import (