cascade file checks
0.9.5 - added: `check for problems` button also propose to run GP toolbox's file checker (if addon is enabled) to perform generic file checks - changed: `check for problems` skip check for opacity on 'MA_' prefixed layers
This commit is contained in:
@@ -835,8 +835,12 @@ def normalize_layer_name(layer, prefix='', desc='', suffix='', lower=True, dash_
|
||||
print(f' - updated in {ob.name} modifier {m.name}')
|
||||
m.layer = new
|
||||
|
||||
## confirm pop-up message:
|
||||
""" # old show message gox without operator support
|
||||
def show_message_box(_message = "", _title = "Message Box", _icon = 'INFO'):
|
||||
'''get a str to display or a list of [str, str]
|
||||
can have an icon [[str, icon], str, [str, icon]]
|
||||
'''
|
||||
|
||||
def draw(self, context):
|
||||
for l in _message:
|
||||
if isinstance(l, str):
|
||||
@@ -847,6 +851,31 @@ def show_message_box(_message = "", _title = "Message Box", _icon = 'INFO'):
|
||||
if isinstance(_message, str):
|
||||
_message = [_message]
|
||||
bpy.context.window_manager.popup_menu(draw, title = _title, icon = _icon)
|
||||
"""
|
||||
|
||||
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:
|
||||
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
|
||||
|
||||
if isinstance(_message, str):
|
||||
_message = [_message]
|
||||
bpy.context.window_manager.popup_menu(draw, title = _title, icon = _icon)
|
||||
|
||||
|
||||
def get_bbox_3d(ob):
|
||||
|
||||
Reference in New Issue
Block a user