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:
authorYimingWu <xp8110@outlook.com>2021-06-28 10:46:26 +0300
committerYimingWu <xp8110@outlook.com>2021-06-28 10:51:34 +0300
commitc297769d2249b2fa3c34eb36aee7631ca5278383 (patch)
tree7ebd13bcf2a87717f034cd6eb30988d534a72437 /release/scripts/startup
parentbb2648ebf0022186bdd27e451194388d1fd4cce0 (diff)
UI: Hide collection tab when scene master collection is active
CollectionLineart does not care about the configurations in master collection. Other options are not applicaple for master collection as well. Hence hiding it. Reviewed by Dalai Felinto (dfelinto) Differential Revision: https://developer.blender.org/D11702
Diffstat (limited to 'release/scripts/startup')
-rw-r--r--release/scripts/startup/bl_ui/properties_collection.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py
index c5c35121135..5a98e638992 100644
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ b/release/scripts/startup/bl_ui/properties_collection.py
@@ -25,6 +25,10 @@ class CollectionButtonsPanel:
bl_region_type = 'WINDOW'
bl_context = "collection"
+ @classmethod
+ def poll(cls, context):
+ return context.collection != context.scene.collection
+
def lineart_make_line_type_entry(col, line_type, text_disp, expand, search_from):
col.prop(line_type, "use", text=text_disp)
@@ -38,12 +42,6 @@ def lineart_make_line_type_entry(col, line_type, text_disp, expand, search_from)
class COLLECTION_PT_collection_flags(CollectionButtonsPanel, Panel):
bl_label = "Restrictions"
- @classmethod
- def poll(cls, context):
- vl = context.view_layer
- vlc = vl.active_layer_collection
- return (vlc.name != 'Master Collection')
-
def draw(self, context):
layout = self.layout
layout.use_property_split = True