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:
authorHans Goudey <h.goudey@me.com>2022-05-31 14:20:16 +0300
committerHans Goudey <h.goudey@me.com>2022-05-31 14:20:16 +0300
commit4669178fc3786e1aebb117892d8dc6a2ce4dc955 (patch)
tree3680859a3b4337bd91669bd9a048afcbe46d6ba3 /release/scripts/startup/bl_ui/properties_data_pointcloud.py
parent39c14f4e84c0813241659c9b56bef5a62d55e6c8 (diff)
Attributes: Hide internal UI attributes and disallow procedural access
This commit hides "UI attributes" described in T97452 from the UI lists in mesh, curve, and point cloud properties, and disallow accessing them in geometry nodes. Internal UI attributes like selection and hiding values should use the attribute system for simplicity and performance, but we don't want to expose those attributes in the attribute panel, which is meant for regular user interaction. Procedural access may be misleading or cause problems, as described in the design task above. These attributes are added by two upcoming patches: D14934, D14685 Differential Revision: https://developer.blender.org/D15069
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_pointcloud.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_pointcloud.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_pointcloud.py b/release/scripts/startup/bl_ui/properties_data_pointcloud.py
index 4f065a9ecfb..88d686b32f9 100644
--- a/release/scripts/startup/bl_ui/properties_data_pointcloud.py
+++ b/release/scripts/startup/bl_ui/properties_data_pointcloud.py
@@ -67,6 +67,16 @@ class POINTCLOUD_MT_add_attribute(Menu):
class POINTCLOUD_UL_attributes(UIList):
+ def filter_items(self, context, data, property):
+ attributes = getattr(data, property)
+ flags = []
+ indices = [i for i in range(len(attributes))]
+
+ for index, item in enumerate(attributes):
+ flags.append(self.bitflag_filter_item if item.is_internal else 0)
+
+ return flags, indices
+
def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index):
data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]