[Bf-blender-cvs] [49f7ca3b9dd] blender2.8: Add overridable control to 'edit' feature of custom props.

Bastien Montagne noreply at git.blender.org
Tue Apr 17 18:10:04 CEST 2018


Commit: 49f7ca3b9dd0601d622aab510975472a691e2745
Author: Bastien Montagne
Date:   Tue Apr 17 18:06:41 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB49f7ca3b9dd0601d622aab510975472a691e2745

Add overridable control to 'edit' feature of custom props.

===================================================================

M	release/scripts/startup/bl_operators/wm.py

===================================================================

diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 9183c69b207..84857170f27 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1089,6 +1089,11 @@ rna_use_soft_limits = BoolProperty(
         name="Use Soft Limits",
         )
 
+rna_is_overridable_static = BoolProperty(
+        name="Is Statically Overridable",
+        default=False,
+        )
+
 
 class WM_OT_properties_edit(Operator):
     bl_idname = "wm.properties_edit"
@@ -1102,6 +1107,7 @@ class WM_OT_properties_edit(Operator):
     min = rna_min
     max = rna_max
     use_soft_limits = rna_use_soft_limits
+    is_overridable_static = rna_is_overridable_static
     soft_min = rna_min
     soft_max = rna_max
     description = StringProperty(
@@ -1154,6 +1160,9 @@ class WM_OT_properties_edit(Operator):
         # print(exec_str)
         exec(exec_str)
 
+        exec_str = "item.property_overridable_static_set('[\"%s\"]', %s)" % (prop, self.is_overridable_static)
+        exec(exec_str)
+
         rna_idprop_ui_prop_update(item, prop)
 
         self._last_prop[:] = [prop]
@@ -1281,7 +1290,9 @@ class WM_OT_properties_edit(Operator):
         row.prop(self, "min")
         row.prop(self, "max")
 
-        layout.prop(self, "use_soft_limits")
+        row = layout.row()
+        row.prop(self, "use_soft_limits")
+        row.prop(self, "is_overridable_static")
 
         row = layout.row(align=True)
         row.enabled = self.use_soft_limits



More information about the Bf-blender-cvs mailing list