conform hierarchy : first working version for collection. UI wip
This commit is contained in:
@@ -420,9 +420,9 @@ def show_and_active_object(obj, make_active=True, select=True, unhide=True):
|
||||
if select:
|
||||
obj.select_set(True)
|
||||
|
||||
def show_message_box(_message = "", _title = "Message Box", _icon = 'INFO'):
|
||||
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 message is a list of lists:
|
||||
if sublist have 2 element:
|
||||
considered a label [text, icon]
|
||||
if sublist have 3 element:
|
||||
@@ -433,7 +433,7 @@ def show_message_box(_message = "", _title = "Message Box", _icon = 'INFO'):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
for l in _message:
|
||||
for l in message:
|
||||
if isinstance(l, str):
|
||||
layout.label(text=l)
|
||||
elif len(l) == 2: # label with icon
|
||||
@@ -446,9 +446,9 @@ def show_message_box(_message = "", _title = "Message Box", _icon = 'INFO'):
|
||||
row.label(text=l[2], icon=l[3])
|
||||
row.prop(l[0], l[1], text='')
|
||||
|
||||
if isinstance(_message, str):
|
||||
_message = [_message]
|
||||
bpy.context.window_manager.popup_menu(draw, title = _title, icon = _icon)
|
||||
if isinstance(message, str):
|
||||
message = [message]
|
||||
bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)
|
||||
|
||||
|
||||
def get_rightmost_number_in_string(string) -> str:
|
||||
|
||||
Reference in New Issue
Block a user