Check file visibility conflicts check

1.7.2

- added: `Object visibility conflict` in file check
  - print in console when object have render activated but not viewport (& vice-versa)
  - Standalone ops "List Object Visibility Conflicts" (`gp.list_object_visibility`)
- added: `GP Modifier visibility conflict` in file check.
  - print in console when gp modifiers have render activated but not viewport (& vice-versa)
  - Standalone ops "List GP Modifiers Visibility Conflicts" (`gp.list_modifier_visibility`)
- code: show_message_box utils can now receive operator in sublist (if 3 element)
This commit is contained in:
Pullusb
2021-10-20 20:54:59 +02:00
parent b62a23858c
commit 4c6bd20b60
6 changed files with 220 additions and 47 deletions
+18 -1
View File
@@ -715,12 +715,29 @@ def convert_attr(Attr):
## confirm pop-up message:
def show_message_box(_message = "", _title = "Message Box", _icon = 'INFO'):
'''Show message box with element passed as string or list
if _message if a list of lists:
if sublist have 2 element:
considered a label [text,icon]
if sublist have 3 element:
considered as an operator [ops_id_name, text, icon]
'''
def draw(self, context):
for l in _message:
if isinstance(l, str):
self.layout.label(text=l)
else:
self.layout.label(text=l[0], icon=l[1])
if len(l) == 2: # label with icon
self.layout.label(text=l[0], icon=l[1])
elif len(l) == 3: # ops
self.layout.operator_context = "INVOKE_DEFAULT"
self.layout.operator(l[0], text=l[1], icon=l[2], emboss=False) # <- highligh the entry
## offset pnale when using row...
# row = self.layout.row()
# row.label(text=l[1])
# row.operator(l[0], icon=l[2])
if isinstance(_message, str):
_message = [_message]