-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPipo.py
1193 lines (756 loc) · 52.8 KB
/
Pipo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#coding: utf-8
#PIPELINE MANAGER
#Copyright 2023, Robin Delaporte AKA Quazar, All rights reserved.
#archive documentation : https://realpython.com/python-zipfile/
import threading
import maya.cmds as mc
import pymel.core as pm
import os
import ctypes
import sys
import json
import pickle
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
from time import sleep
from functools import partial
from datetime import datetime
def onMayaDroppedPythonFile(*args):
#create the path for all the functions
path = '/'.join(__file__.replace("", "/").split("/")[:-1])
sys.path.append(path)
"""
if (os.getcwd() in sys.path)==False:
sys.path.append(os.getcwd())
"""
from Pipo.Modules.PipoM import PipelineApplication
from Pipo.Modules.PipoRenderM import PipelineRenderApplication
from Pipo.Modules.PipoObserverM import PipelineObserverApplication
#from Pipo.Modules.PipoObserverM import MyHandler
class PipelineGuiApplication(PipelineApplication, PipelineRenderApplication, PipelineObserverApplication):
def create_script_button_function(self):
#try to detect all the scripts presents in the script folder of Pipo Pipeline Manager folder
#check if Pipo's shelf exists
if not mc.shelfLayout("PipoShelf",exists=True):
mc.warning("Impossible to import external scripts!")
return
if os.path.isdir(os.path.join(self.project_path, "PipelineManagerData/scripts"))==True:
#print all scripts that are present in the folder
elements = os.listdir(os.path.join(self.project_path, "PipelineManagerData/scripts"))
for element in elements:
if os.path.splitext(element)[1] != ".py":
elements.remove(element)
print("\nScripts detected in Pipeline Folder")
"""
for each script try to create a button and launch an exec function
"""
for script in elements:
print("Creating button for script [%s]"%script)
script_name = os.path.splitext(script)[0]
button_name_list = []
try:
for name in mc.shelfLayout("PipoShelf", query=True, childArray=True):
button_name_list.append(mc.shelfButton(name, query=True, label=True))
except:
pass
if (script_name in button_name_list)==False:
if os.path.isfile(os.path.join(self.project_path, "PipelineManagerData/scripts/icons/%s.png"%script_name))==True:
image = (os.path.join(self.project_path, "PipelineManagerData/scripts/icons/%s.png"%script_name))
with open(os.path.join(self.project_path, "PipelineManagerData/scripts/%s.py"%script_name), "r") as read_file:
script_content = read_file.read()
button = mc.shelfButton(
label=script_name,
annotation=script_name,
image=image,
style="iconAndTextCentered",
parent=self.pipo_shelf,
command=script_content,
)
print("Image detected [%s.png]"%script_name)
else:
mc.warning("Impossible to create a button for that script!\nNo icon detected!")
else:
print("A button already exists for the script [%s]"%script_name)
def __init__(self):
self.moment1 = datetime.now()
self.bright_color = [0.118,0.027,0.251]
self.dark_color = [0.118,0.027,0.251]
#self.bright_color = [0.570, 0.166, 0.0855]
#self.dark_color = [0.250, 0.158, 0.140]
print("Pipo Launching...")
self.current_name = None
self.current_type = None
self.current_seq = None
self.current_shot = None
#define the program folder
self.program_folder = None
for path in sys.path:
if os.path.isdir(os.path.join(path, "Pipo"))==True:
os.chdir(os.path.join(path, "Pipo"))
self.program_folder = os.path.join(path, "Pipo")
mc.warning("Program folder defined")
if self.program_folder == None:
mc.warning("The program folder wasn't defined!")
return
#create interface shelf on maya
if not mc.shelfLayout("PipoShelf",exists=True):
#create button to execute the program
#read the content of Pipo's code
print(os.getcwd())
if os.path.isfile("Data/icons/PipoIcon.png")==False:
mc.warning("Impossible to load icon for Pipo button!")
elif (os.path.isfile("Pipo.py")==False):
mc.warning("Impossible to create Pipo button!")
else:
self.pipo_shelf = mc.shelfLayout("PipoShelf",p="ShelfLayout")
with open("Pipo.py", "r") as read_script:
pipo_script = read_script.read()
#pipo_script = mc.runTimeCommand( annotation='Print the word "Hello"', command='print "Hello\\n"', MyHelloCommand )
button = mc.shelfButton(
label="PipoMain",
image=os.path.join(os.getcwd(),"Data/icons/PipoIcon.png"),
style="iconOnly",
width=32,
parent=self.pipo_shelf,
command=pipo_script
)
#sys.exit()
else:
self.pipo_shelf = mc.shelfLayout("PipoShelf", query=True, fullPathName=True)
#check if the module list file exist
#self.project_path = mc.workspace(query=True, rd=True)
self.project_path = None
self.window_width = 550
self.window_height=450
letter = 'abcdefghijklmnopqrstuvwxyz'
figure = '0123456789'
self.list_letter = list(letter)
self.list_capital = list(letter.upper())
self.list_figure = list(figure)
self.texture_folder_list = {}
self.texture_list = {}
self.folder_path = os.getcwd()
self.item_type_list = [
".ma",
".mb",
".obj",
".tex",
".exr",
".tif",
".png",
".vdb"]
self.log_list_content = []
self.texture_to_connect_list = []
#load settings stored in files
#if the file doesn't exist
#create a new file with default settings
#check the current project of maya
if os.path.isdir("Data/icons/")==False:
mc.warning("Impossible to find icons folder!")
self.icons_folder=False
else:
print("Icons folder found!")
self.icons_folder=True
if os.path.isfile("Data/PipelineData.dll")==True:
try:
with open("Data/PipelineData.dll", "rb") as read_file:
self.project_path = pickle.load(read_file)
if type(self.project_path)==list:
self.project_path = self.project_path[0]
if os.path.isdir(self.project_path)==False:
mc.warning("The saved project folder doesn't exist with the same path on that computer!")
self.project_path = "None"
else:
mc.warning("Project Path loaded!")
except:
mc.error("Impossible to read the pipeline data file!")
self.project_path = "None"
else:
self.project_path = "None"
mc.warning("No informations loaded!")
print("PROJECT PATH :")
print(self.project_path)
self.create_script_button_function()
#launch the function that check
#if the shader settings file exists
#if it doesn't create it
#self.shader_init_function()
self.settings = {}
self.settings_dictionnary = {}
self.additionnal_settings = {}
self.texture_settings = {}
self.user_settings = {}
self.settings, self.settings_dictionnary, self.additionnal_settings, self.texture_settings, self.user_settings = self.load_settings_function()
print(self.settings)
print(self.settings_dictionnary)
self.archive_data = {}
if os.path.isdir(self.project_path)==True:
try:
with open(os.path.join(self.project_path, "PipelineManagerData/ArchiveData.dll"), "rb") as read_file:
self.archive_data = pickle.load(read_file)
except:
mc.warning("Impossible to load archive data!")
try:
with open(os.path.join(self.project_path, "PipelineManagerData/PipelineIndex.json"), 'r') as read_file:
content = json.load(read_file)
self.settings_mirror = content["mirrorSettings"]
self.settings_dictionnary_mirror = content["mirrorSettingsDictionnary"]
self.pipeline_index = content["pipelineIndex"]
self.create_pipeline_index_thread = threading.Thread(target=partial(self.create_pipeline_index_function, self.project_path))
self.create_pipeline_index_thread.start()
except:
self.settings_mirror = {}
self.settings_dictionnary_mirror = {}
self.pipeline_index = {}
self.create_pipeline_index_thread = threading.Thread(target=partial(self.create_pipeline_index_function, self.project_path))
self.create_pipeline_index_thread.start()
#CREATE LISTENER
self.watchdog_thread = threading.Thread(target=self.watch_folder, args=(self.project_path,))
self.watchdog_thread.start()
#IMPORTANTS VARIABLES
self.receive_notification = True
self.message_thread_status = True
self.window_name = None
self.pack_function_list = {}
self.file_type = ["mod", "rig", "groom", "cloth", "lookdev", "layout", "camera", "anim", "render", "compositing"]
self.variable_list = ["[key]", "[project]", "[type]", "[state]", "[version]", "[sqversion]", "[shversion]"]
self.default_folder_list = []
self.new_step_list = []
self.new_type_list = []
self.name_list_value = []
self.type_list_value = []
self.file_list_value = []
self.result_list_value = []
self.previous_log_team = []
self.launch_message_thread = False
self.default_render_spliting_method = None
self.default_render_nomenclature = None
self.root_render_folder = None
self.build_pipeline_interface_function()
def resize_command_function(self):
#get the window width
width = mc.window(self.main_window, query=True, width=True)
height= mc.window(self.main_window, query=True, height=True)
def build_pipeline_interface_function(self):
self.main_window = mc.window(sizeable=True, title="Pipo - Written by Quazar", width=self.window_width, height=self.window_height)
#self.scrollbar = mc.scrollLayout(width=self.window_width + 40, parent=self.main_window, resizeCommand=self.resize_command_function)
self.main_column = mc.columnLayout(adjustableColumn=True, parent=self.main_window)
self.add_log_content_function("Interface built")
#self.main_window = mc.window(title="PipelineManager", sizeable=True, height=self.window_height, width=self.window_width)
self.pack_function_list["Pipeline"] = ["PipelineManagerTool"]
#self.main_column = mc.columnLayout(adjustableColumn=True)
self.form_pipeline = mc.formLayout(parent=self.main_column)
self.tabs = mc.tabLayout(innerMarginWidth=5, innerMarginHeight=5, parent=self.form_pipeline)
mc.formLayout(self.form_pipeline, edit=True, attachForm=((self.tabs,"top",0), (self.tabs, "bottom",0),(self.tabs,"left",0),(self.tabs,"right",0)))
"""
ASSETS
character, props, sets, fx
mod, rig, groom, cloth, lookdev, alembic
SHOTS
sequence, shots
layout, camera, matte painting, anim, render
POSTPROD
sequence, shots
renders, compositing
"""
#main scroll layout of the asset page
self.prod_column = mc.columnLayout(adjustableColumn=True, parent=self.tabs)
#self.asset_main_scroll = mc.scrollLayout(horizontalScrollBarThickness=1, width=self.window_width+16, parent=self.prod_column, resizeCommand=self.resize_command_function, height=self.window_height)
#DEFINE PROJECT FOLDER
mc.separator(style="none", height=15, parent=self.prod_column)
self.project_columns = mc.rowColumnLayout(numberOfColumns=4, parent=self.prod_column, columnWidth=((1, self.window_width/2)))
self.project_label = mc.textField(editable=False, backgroundColor=[0.2, 0.2, 0.2], parent=self.project_columns, text=self.project_path)
if self.icons_folder == False:
mc.button(label="Set Project Folder", parent=self.project_columns, command=partial(self.define_project_path_ui_function, "project"))
mc.button(label="Set Other Folder", parent=self.project_columns, command=partial(self.define_project_path_ui_function, "folder"))
else:
mc.iconTextButton(style="iconOnly", width=60, parent=self.project_columns, image1="Data/icons/project_icon.png", command=partial(self.define_project_path_ui_function, "event", "project"))
mc.iconTextButton(style="iconOnly", width=60, parent=self.project_columns, image1="Data/icons/folder_icon.png", command=partial(self.define_project_path_ui_function, "event", "folder"))
self.loading_status = mc.text(label="")
mc.separator(style="singleDash", height=25, parent=self.prod_column)
#self.assets_search_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Search for assets", parent=self.prod_column, collapsable=True, collapse=False, width=self.window_width)
self.assets_main_rowcolumn = mc.rowColumnLayout(parent=self.prod_column, numberOfColumns=2, columnWidth=((1, self.window_width/3)))
self.assets_main_leftcolumn = mc.columnLayout(adjustableColumn=True, parent=self.assets_main_rowcolumn)
self.assets_main_rightcolumn = mc.columnLayout(adjustableColumn=True, parent=self.assets_main_rowcolumn)
mc.rowColumnLayout(self.assets_main_rowcolumn, edit=True, adjustableColumn=2)
if self.project_path !="None":
for key, value in self.settings.items():
self.type_list_value.append(key)
self.note_column = mc.columnLayout(adjustableColumn=True, parent=self.assets_main_rightcolumn)
self.favorite_frame = mc.frameLayout(backgroundColor=self.bright_color, parent=self.note_column, label="Favorite scenes", collapsable=True, collapse=True)
self.favorite_list = mc.textScrollList(numberOfRows=8, parent=self.favorite_frame, doubleClickCommand=partial(self.open_location_function, "open", "event"))
mc.button(label="Delete Favorite", parent=self.favorite_frame, command=self.delete_favorite_file_function)
mc.separator(style="singleDash", height=15, parent=self.favorite_frame)
self.note_textfield = mc.scrollField(parent=self.note_column, height=40, wordWrap=True, font="plainLabelFont", enterCommand=self.save_note_function)
self.assets_prod_column = mc.rowColumnLayout(numberOfColumns=4, parent=self.assets_main_rightcolumn, columnWidth=((1, self.window_width*2/9), (2, self.window_width*2/9), (3, self.window_width*2/9)))
self.type_list=mc.textScrollList(allowMultiSelection=True, numberOfRows=13,parent=self.assets_prod_column, selectCommand=self.display_new_list_function, append=self.type_list_value)
self.assets_center_column = mc.columnLayout(adjustableColumn=True, parent=self.assets_prod_column)
self.assets_center_frame_name = mc.frameLayout(parent=self.assets_center_column, label="Name list", collapsable=True, collapse=False)
self.name_list=mc.textScrollList(allowMultiSelection=True, numberOfRows=20, height=180, parent=self.assets_center_frame_name, selectCommand=self.display_new_list_function)
self.assets_center_frame_seq = mc.frameLayout(parent=self.assets_center_column, label="Shot manager", collapsable=True, collapse=True)
self.assets_center_frame_row = mc.rowColumnLayout(numberOfColumns=2, parent=self.assets_center_frame_seq, columnWidth=((1, self.window_width*1/9), (2, self.window_width*1/9)))
self.seq_list = mc.textScrollList(numberOfRows=15, parent=self.assets_center_frame_row, selectCommand=self.display_new_list_function)
self.shot_list = mc.textScrollList(numberOfRows=15, parent=self.assets_center_frame_row, selectCommand=self.display_new_list_function)
self.kind_list=mc.textScrollList(allowMultiSelection=True, numberOfRows=13, parent=self.assets_prod_column, selectCommand=self.display_new_list_function, append=self.file_type)
self.result_list=mc.textScrollList(allowMultiSelection=True, numberOfRows=10, parent=self.assets_main_rightcolumn, doubleClickCommand=partial(self.open_file_function, "event"), selectCommand=self.search_for_thumbnail_function)
mc.rowColumnLayout(self.assets_prod_column, edit=True, adjustableColumn=4)
#SEARCHBAR
self.searchbar_limit_frame = mc.frameLayout(backgroundColor=self.bright_color, parent=self.assets_main_leftcolumn, label="Research settings", collapsable=True, collapse=True)
self.index_checkbox = mc.checkBox(label="Use Index file", value=True, parent=self.searchbar_limit_frame, changeCommand=partial(self.save_additionnal_settings_function, None))
mc.button(label="Refresh Index file", parent=self.searchbar_limit_frame, command=self.call_index_file_function)
self.projectcontent_checkbox = mc.checkBox(label="Only display project name", value=True, parent=self.searchbar_limit_frame, changeCommand=partial(self.save_additionnal_settings_function, None))
mc.separator(style="singleDash", height=5, parent=self.searchbar_limit_frame)
self.searchbar_checkbox = mc.checkBox(label="Limit research to project", value=False, parent=self.searchbar_limit_frame, changeCommand=partial(self.save_additionnal_settings_function, "none"), onCommand=partial(self.save_additionnal_settings_function, "project"))
self.folder_checkbox = mc.checkBox(label="Limit research to default\nfolder", value=False, parent=self.searchbar_limit_frame, changeCommand=partial(self.save_additionnal_settings_function, "none"), onCommand=partial(self.save_additionnal_settings_function, "folder"))
mc.separator(style="singleDash", height=5, parent=self.searchbar_limit_frame)
self.scenes_checkbox = mc.checkBox(label="Search for 3D Scenes", value=True, parent=self.searchbar_limit_frame, changeCommand=partial(self.save_additionnal_settings_function, None))
self.items_checkbox = mc.checkBox(label="Search for 3D Items", value=False, parent=self.searchbar_limit_frame, changeCommand=partial(self.save_additionnal_settings_function, None))
self.textures_checkbox = mc.checkBox(label="Search for Textures", value=False, parent=self.searchbar_limit_frame, changeCommand=partial(self.save_additionnal_settings_function, None))
mc.separator(style="singleDash", parent=self.searchbar_limit_frame)
self.displayonlylastsyntax_checkbox = mc.checkBox(label="Display only last nomenclature", value=False, parent=self.searchbar_limit_frame, changeCommand=partial(self.save_additionnal_settings_function, None))
mc.text(label="Minimum LOD value", parent=self.searchbar_limit_frame, align="left")
self.lodminimumvalue_intfield = mc.intField(parent=self.searchbar_limit_frame, minValue=0, value=self.additionnal_settings["lodInterval"][0], changeCommand=partial(self.save_additionnal_settings_function, "lod_minimum"))
mc.text(label="Maximum LOD value", parent=self.searchbar_limit_frame, align="left")
self.lodmaximumvalue_intfield = mc.intField(parent=self.searchbar_limit_frame, minValue=1, value=self.additionnal_settings["lodInterval"][1], changeCommand=partial(self.save_additionnal_settings_function, "lod_maximum"))
mc.separator(style="singleDash", parent=self.searchbar_limit_frame)
self.old_lodmaximum_value = self.additionnal_settings["lodInterval"][1]
mc.text(label="Searchbar", parent=self.assets_main_leftcolumn)
self.main_assets_searchbar = mc.textField(parent=self.assets_main_leftcolumn, changeCommand=self.searchbar_function, enterCommand=self.searchbar_function)
mc.text(label="3D Scene extension", parent=self.searchbar_limit_frame)
self.assets_scene_extension_textfield = mc.textField(parent=self.searchbar_limit_frame, enterCommand=partial(self.save_additionnal_settings_function, None))
mc.text(label="3D Exported Items extension", parent=self.searchbar_limit_frame)
self.assets_items_extension_textfield = mc.textField(parent=self.searchbar_limit_frame, enterCommand=partial(self.save_additionnal_settings_function, None))
mc.text(label="Textures extension", parent=self.searchbar_limit_frame)
self.assets_textures_extension_textfield = mc.textField(parent=self.searchbar_limit_frame, enterCommand=partial(self.save_additionnal_settings_function, None))
"""
if self.additionnal_settings != None:
mc.checkBox(self.searchbar_checkbox, edit=True, value=self.additionnal_settings["checkboxValues"][0])
mc.checkBox(self.folder_checkbox, edit=True, value=self.additionnal_settings["checkboxValues"][1])
"""
#IMAGE BOX
mc.separator(style="none", height=10)
self.image_box = mc.image(parent=self.assets_main_leftcolumn, visible=True, backgroundColor=self.dark_color, height=self.window_width/5, width=self.window_width/5)
mc.button(label="Save Thumbnail", parent=self.assets_main_leftcolumn, command=self.take_picture_function)
mc.separator(style="none", height=10, parent=self.assets_main_leftcolumn)
mc.button(label="Save Scene", parent=self.assets_main_leftcolumn, command=self.save_current_scene_function)
mc.button(label="Set Project", parent=self.assets_main_leftcolumn, command=self.set_project_function)
mc.button(label="Open scene folder", parent=self.assets_main_leftcolumn, command=partial(self.open_location_function, "folder"))
mc.button(label="Add scenes to favorites", parent=self.assets_main_leftcolumn, command=self.add_to_favorite_scene_function)
mc.separator(style="singleDash", height=25, parent=self.assets_main_leftcolumn)
mc.button(label="Add Script to Shelf", parent=self.assets_main_leftcolumn, command=self.add_script_to_shelf_function)
#RENAME
self.assets_rename_frame = mc.frameLayout(backgroundColor=self.bright_color,label = "Rename files", parent=self.assets_main_leftcolumn, collapsable=True, collapse=True)
mc.text(label="Content to rename", parent=self.assets_rename_frame)
self.rename_oldcontent_textfield = mc.textField(parent=self.assets_rename_frame)
mc.text(label="New content", parent=self.assets_rename_frame)
self.rename_newcontent_textfield = mc.textField(parent=self.assets_rename_frame)
mc.text(label="Prefix", parent=self.assets_rename_frame)
self.rename_prefix_textfield = mc.textField(parent=self.assets_rename_frame)
mc.text(label="Suffix", parent=self.assets_rename_frame)
self.rename_suffix_textfield = mc.textField(parent=self.assets_rename_frame)
mc.button(label="Rename", parent=self.assets_rename_frame, command=partial(self.rename_filename_function, "RENAME"))
self.hardrename_checkbox_file = mc.checkBox(label="Include files", parent=self.assets_rename_frame, changeCommand=partial(self.save_additionnal_settings_function, "none"))
self.hardrename_checkbox_folder = mc.checkBox(label="Include folders", parent=self.assets_rename_frame, changeCommand=partial(self.save_additionnal_settings_function, "none"))
mc.button(label="Hard Rename in Pipeline", enable=False, command=partial(self.rename_filename_function, "HARDRENAME"))
#IMPORT
self.assets_import_frame = mc.frameLayout(backgroundColor=self.bright_color, label = "Import files", parent=self.assets_main_leftcolumn, collapsable=True, collapse=True)
mc.button(label="Import in scene", parent=self.assets_import_frame, command=partial(self.import_in_scene_function, False))
mc.button(label="Import as reference", parent=self.assets_import_frame, command=partial(self.import_in_scene_function, True))
self.assets_archive_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Archive files", parent=self.assets_main_leftcolumn, collapsable=True, collapse=True)
mc.text(label="Archive name", parent=self.assets_archive_frame)
self.archivemenu_textfield = mc.textField(parent=self.assets_archive_frame)
self.archivemenu_textscrolllist = mc.textScrollList(numberOfRows=8, parent=self.assets_archive_frame)
mc.text(label="Archive saved at", align="left",parent=self.assets_archive_frame)
self.archivemenu_projectcheckbox = mc.checkBox(label="project root", value=False, parent=self.assets_archive_frame, changeCommand=partial(self.update_archive_checkbox_function, "project"))
self.archivemenu_pipelinecheckbox = mc.checkBox(label="pipeline root",value=True, parent=self.assets_archive_frame, changeCommand=partial(self.update_archive_checkbox_function, "pipeline"))
mc.button(label="Create archive from files", parent=self.assets_archive_frame, command=self.create_archive_from_files_function)
mc.button(label="Add files to archive", parent=self.assets_archive_frame, command=self.add_files_to_archive_function)
self.exportselection_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Export selection to Project", parent=self.assets_main_leftcolumn, collapsable=True, collapse=True)
#auto export at initial version (1 or 0)
#not supposed to export sequence or shot! only props or items
self.exportselectionmove_checkbox = mc.checkBox(label="Move to\nworld center", value=False, parent=self.exportselection_frame)
self.exportselectionreplace_checkbox = mc.checkBox(label="Replace by\nnew reference", value=False, parent=self.exportselection_frame)
mc.separator(style="none", height=5, parent=self.exportselection_frame)
mc.button(label="Export Selection\nTo Pipeline", parent=self.exportselection_frame, command=self.export_selection_in_project_function)
if (self.project_path != None) and (self.additionnal_settings!= None):
"""
mc.checkBox(self.searchbar_checkbox, edit=True, value=self.additionnal_settings["checkboxValues"][0])
mc.checkBox(self.scenes_checkbox, edit=True, value=self.additionnal_settings["checkboxValues"][1])
mc.checkBox(self.items_checkbox, edit=True, value=self.additionnal_settings["checkboxValues"][2])
mc.checkBox(self.textures_checkbox, edit=True, value=self.additionnal_settings["checkboxValues"][3])
mc.checkBox(self.folder_checkbox, edit=True, value=self.additionnal_settings["checkboxValues"][4])"""
mc.textField(self.assets_scene_extension_textfield, edit=True, text=";".join(self.additionnal_settings["3dSceneExtension"]))
mc.textField(self.assets_items_extension_textfield, edit=True, text=";".join(self.additionnal_settings["3dItemExtension"]))
mc.textField(self.assets_textures_extension_textfield, edit=True, text=";".join(self.additionnal_settings["texturesExtension"]))
"""
except:
mc.warning("Impossible to launch GUI Presets on Mai page!")
"""
self.logs_column = mc.columnLayout(adjustableColumn=True, parent=self.tabs)
self.logs_rowcolumn = mc.rowColumnLayout(numberOfColumns=2, columnWidth=((1, self.window_width/3)))
self.logs_leftcolumn = mc.columnLayout(adjustableColumn=True, parent=self.logs_rowcolumn)
self.logs_rightcolumn = mc.columnLayout(adjustableColumn=True, parent=self.logs_rowcolumn)
self.logs_notificationallow = mc.checkBox(label="Enable notifications", value=True, parent=self.logs_leftcolumn)
self.logs_notificationforall = mc.checkBox(label="Notification when all tags", value=False, parent=self.logs_leftcolumn)
self.logs_displaynotification = mc.checkBox(label="Display notification as message", value=True, parent=self.logs_leftcolumn)
mc.separator(style="singleDash", height=10, parent=self.logs_leftcolumn)
mc.text(label="Kind Taglist", parent=self.logs_leftcolumn)
self.logs_kindlist = mc.textScrollList(numberOfRows=8, parent=self.logs_leftcolumn)
self.logs_leftrowcolumn = mc.rowColumnLayout(numberOfColumns=2, columnWidth=( (1, self.window_width/6), (2, self.window_width/6)), parent=self.logs_leftcolumn)
self.logs_leftrowcolumnleft = mc.columnLayout(adjustableColumn=True, parent=self.logs_leftrowcolumn)
self.logs_leftrowcolumnright = mc.columnLayout(adjustableColumn=True, parent=self.logs_leftrowcolumn)
mc.text(label="Type Taglist", parent=self.logs_leftrowcolumnleft)
self.logs_typelist = mc.textScrollList(numberOfRows=8, parent=self.logs_leftrowcolumnleft)
mc.text(label="State Taglist", parent=self.logs_leftrowcolumnright)
self.logs_statelist = mc.textScrollList(numberOfRows=8, parent=self.logs_leftrowcolumnright)
self.logs_loglist = mc.textScrollList(numberOfRows= 15, parent=self.logs_rightcolumn)
"""
INSTEAD OF DELETING FILES
OR IF SOME FILES ARE TOO HEAVY TO BE TRANSPORTED
"""
#ARCHIVE
"""
create archive in the pipeline (empty)
create archive from a (parallel process) folder
create archive of the (parallel process) pipeline
move files inside of the archive
move files out of the archive
read the content of the archive
"""
self.archive_column = mc.columnLayout(adjustableColumn=True, parent=self.tabs)
self.archive_rowcolumn = mc.rowColumnLayout(numberOfColumns=3, columnWidth=((1, self.window_width/3), (2, self.window_width*(1/3)), (3, self.window_width*(1/3))))
self.archive_leftcolumn = mc.columnLayout(adjustableColumn=True, parent=self.archive_rowcolumn)
self.archive_centercolumn = mc.columnLayout(adjustableColumn=True, parent=self.archive_rowcolumn)
self.archive_rightcolumn = mc.columnLayout(adjustableColumn=True, parent=self.archive_rowcolumn)
mc.separator(style="none", height=20, parent=self.archive_leftcolumn)
#mc.button(label="Scan pipeline\nto find archives", parent=self.archive_leftcolumn)
mc.button(label="Tidy files in pipeline", parent=self.archive_leftcolumn, command=self.archive_tidy_files_function)
#mc.button(label="Import files in current project", parent=self.archive_leftcolumn)
mc.button(label="Generate download link\nfrom archive", parent=self.archive_leftcolumn)
mc.button(label="Delete archive", parent=self.archive_leftcolumn, command=self.delete_archive_function)
mc.text(label="Archive list", parent=self.archive_centercolumn)
self.archive_archivelist_textscrolllist = mc.textScrollList(numberOfRows=15, parent=self.archive_centercolumn, selectCommand=self.display_archive_content_function)
mc.text(label="Archive content", parent=self.archive_rightcolumn)
self.archive_archivecontent_textscrolllist = mc.textScrollList(numberOfRows=15, parent=self.archive_rightcolumn, allowMultiSelection=True)
archive_key = list(self.archive_data.keys())
#for i in range(0, len(archive_key)):
# archive_key[i] = archive_key[i].replace("PipoArchive_", "")
self.refresh_archive_list_function("content")
"""
RENDERS PANEL
MISSING FRAMES CHECKING
logs box
check for missing frames button
[send notification on discord checkbox]
"""
self.render_column = mc.columnLayout(adjustableColumn=True, parent=self.tabs)
self.render_texture_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Texture linking", parent=self.render_column, collapsable=True, collapse=False)
self.render_texture_rowcolumn = mc.rowColumnLayout(numberOfColumns=2, columnWidth=((1, self.window_width/4)), parent=self.render_texture_frame)
self.render_texture_leftcolumn = mc.columnLayout(adjustableColumn=True, parent=self.render_texture_rowcolumn)
self.render_texture_rightcolumn = mc.columnLayout(adjustableColumn=True, parent=self.render_texture_rowcolumn)
mc.text(label="Texture preset name", parent=self.render_texture_leftcolumn)
self.render_texture_preset_textfield = mc.textField(parent=self.render_texture_leftcolumn)
mc.button(label="Create texture preset", parent=self.render_texture_leftcolumn, command=self.create_texture_preset_function)
mc.separator(style="singleDash", height=15, parent=self.render_texture_leftcolumn)
mc.button(label="Delete texture preset", parent=self.render_texture_leftcolumn, command=self.delete_texture_preset_function)
mc.separator(style="singleDash", height=15, parent=self.render_texture_leftcolumn)
mc.button(label="Refresh textures", parent=self.render_texture_leftcolumn, command=self.load_texture_in_project_function)
mc.separator(style="singleDash", height=15, parent=self.render_texture_leftcolumn)
mc.text(label="Preset list", parent=self.render_texture_leftcolumn)
self.render_preset_textscrolllist = mc.textScrollList(numberOfRows=8, parent=self.render_texture_leftcolumn)
self.render_udim_checkbox = mc.checkBox(label="Check for UDIM's", value=True, parent=self.render_texture_leftcolumn)
mc.button(label="Create shader from\nTexture selection", parent=self.render_texture_leftcolumn, command=self.create_shader_from_texture_function)
self.render_texture_rowcolumn2 = mc.rowColumnLayout(parent=self.render_texture_rightcolumn,numberOfColumns=2, columnWidth=((1, self.window_width*3/8), (2, self.window_width*3/8)))
self.render_texture_leftcolumn2 = mc.columnLayout(adjustableColumn=True, parent=self.render_texture_rowcolumn2)
self.render_texture_rightcolumn2 = mc.columnLayout(adjustableColumn=True, parent=self.render_texture_rowcolumn2)
mc.text(label="Texture folder in project", parent=self.render_texture_leftcolumn2)
mc.text(label="Texture channel list", parent=self.render_texture_rightcolumn2)
self.texture_folder_textscrolllist = mc.textScrollList(numberOfRows=8, parent=self.render_texture_leftcolumn2, selectCommand=self.search_textures_function)
self.texture_channel_textscrolllist = mc.textScrollList(numberOfRows=8, parent=self.render_texture_rightcolumn2, allowMultiSelection=True, selectCommand=self.search_textures_function)
mc.text(label="Texture file found", parent=self.render_texture_rightcolumn)
self.texture_result_textscrolllist = mc.textScrollList(numberOfRows=8, allowMultiSelection=True, parent=self.render_texture_rightcolumn)
self.load_texture_data_funtion()
self.load_channel_data_function()
#self.load_texture_in_project_function()
self.render_missingframes_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Checking for missing frames", parent=self.render_column, collapsable=True, collapse=True)
self.render_missingframes_rowcolumn=mc.rowColumnLayout(numberOfColumns=2, columnWidth=((1, self.window_width/3), (2, int(self.window_width - self.window_width/3))), parent=self.render_missingframes_frame)
self.render_missingframes_leftcolumn = mc.columnLayout(adjustableColumn=True, parent=self.render_missingframes_rowcolumn)
self.render_missingframes_rightcolumn = mc.columnLayout(adjustableColumn=True, parent=self.render_missingframes_rowcolumn)
mc.button(label="Define render folder", parent=self.render_missingframes_leftcolumn, command=self.checking_frame_define_folder_function)
mc.separator(style="none", height=10, parent=self.render_missingframes_leftcolumn)
mc.text(label="Starting frame", parent=self.render_missingframes_leftcolumn)
self.render_startingframe_textfield = mc.intField(parent=self.render_missingframes_leftcolumn)
mc.text(label="Ending frame", parent=self.render_missingframes_leftcolumn)
self.render_endingframe_textfield = mc.intField(parent=self.render_missingframes_leftcolumn)
mc.separator(style="none", height=10)
self.render_checking_checkbox = mc.checkBox(label="Send message on discord", changeCommand=partial(self.save_additionnal_settings_function, "none"), parent=self.render_missingframes_leftcolumn, value=True)
mc.button(label="CHECK MISSING FRAMES", command=self.detect_missing_frames_function, parent=self.render_missingframes_leftcolumn)
self.render_renderlog_textscrolllist = mc.textScrollList(numberOfRows=15, parent=self.render_missingframes_rightcolumn)
self.render_shaderlibrary_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Shader library", parent=self.render_column, collapsable=True, collapse=True)
"""
list of saved shaders
list of current shaders
"""
self.render_shaderlibrary_rowcolumn = mc.rowColumnLayout(parent=self.render_shaderlibrary_frame,numberOfColumns=3, columnWidth=((1, self.window_width/3), (2, self.window_width/3), (3, self.window_width/3)))
self.render_shaderlibrary_leftcolumn = mc.columnLayout(adjustableColumn=True, parent=self.render_shaderlibrary_rowcolumn)
self.render_shaderlibrary_centercolumn = mc.columnLayout(adjustableColumn=True, parent=self.render_shaderlibrary_rowcolumn)
self.render_shaderlibrary_rightcolumn = mc.columnLayout(adjustableColumn=True, parent=self.render_shaderlibrary_rowcolumn)
mc.text(label="Shaders in current scene", parent=self.render_shaderlibrary_centercolumn)
mc.text(label="Saved shaders", parent=self.render_shaderlibrary_rightcolumn)
self.current_shader_textscrolllist = mc.textScrollList(allowMultiSelection=True, parent=self.render_shaderlibrary_centercolumn, numberOfRows=15)
self.saved_shader_textscrolllist = mc.textScrollList(parent=self.render_shaderlibrary_rightcolumn, allowMultiSelection=True, numberOfRows=15)
mc.separator(style="none", height=15, parent=self.render_shaderlibrary_leftcolumn)
mc.button(label="REFRESH", parent=self.render_shaderlibrary_leftcolumn, command=self.refresh_shaderlibrary_function)
mc.button(label="Save shader", parent=self.render_shaderlibrary_leftcolumn, command=self.save_in_shaderlibrary_function)
mc.button(label="Import shader", parent=self.render_shaderlibrary_leftcolumn, command=self.import_from_shaderlibrary_function)
self.refresh_shaderlibrary_function("event")
self.export_column = mc.columnLayout(adjustableColumn=True, parent=self.tabs)
#self.export_scroll = mc.scrollLayout(horizontalScrollBarThickness=16, parent=self.export_column, height=self.window_height, resizeCommand=self.resize_command_function)
self.export_rowcolumn = mc.rowColumnLayout(numberOfColumns=2, columnWidth=((1, self.window_width*(1/3)), (2, self.window_width*(2/3))), parent=self.export_column)
self.export_leftcolumn = mc.columnLayout(adjustableColumn=True, parent=self.export_rowcolumn)
self.export_rightcolumn = mc.columnLayout(adjustableColumn=True, parent=self.export_rowcolumn)
mc.separator(style="none", height=20, parent=self.export_leftcolumn)
self.export_current_folder_checkbox = mc.checkBox(label="Export in current folder",value=False, parent=self.export_leftcolumn, changeCommand=partial(self.change_export_checkbox_value_function, "current"))
self.export_custom_folder_checkbox = mc.checkBox(label="Export in custom folder", value=False, parent=self.export_leftcolumn, changeCommand=partial(self.change_export_checkbox_value_function, "custom"))
self.export_assist_folder_checkbox = mc.checkBox(label="Default folder\nlocation assist", value=True, parent=self.export_leftcolumn, changeCommand=partial(self.change_export_checkbox_value_function, "assist"))
self.export_projectassist_folder_checkbox = mc.checkBox(label="Current project\ndefault folder", value=False, parent=self.export_leftcolumn, changeCommand=partial(self.change_export_checkbox_value_function, "projectassist"))
mc.separator(style="none", height=10, parent=self.export_leftcolumn)
mc.text(label="Current artist name", parent=self.export_leftcolumn, align="left")
self.export_artist_name_textfield = mc.textField(parent=self.export_leftcolumn)
mc.separator(style="none", height=20, parent=self.export_leftcolumn)
self.export_item_checkbox = mc.checkBox(label="Export as item", changeCommand=partial(self.save_additionnal_settings_function, "none"), parent=self.export_leftcolumn)
mc.separator(style="none", height=5, parent=self.export_leftcolumn)
#CREATE NEW TEMPLATE
#SAVE NEW TEMPLATE
mc.separator(style="none", height=10, parent=self.export_leftcolumn)
self.template_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Edit Template", parent=self.export_leftcolumn, collapsable=True, collapse=True)
mc.text(parent=self.template_frame, label="New template name")
self.template_textfield = mc.textField(parent=self.template_frame)
mc.button(label="Save new template", parent=self.template_frame, command=self.create_template_function)
mc.button(label="Delete template", parent=self.template_frame, command=self.delete_template_function)
mc.separator(style="none", height=10, parent=self.template_frame)
self.template_fromselection_checkbox = mc.checkBox(label="Create from outliner selection", parent=self.template_frame, value=False)
mc.separator(style="singleDash", height=5, parent=self.template_frame)
mc.separator(style="none", height=15, parent=self.export_leftcolumn)
self.template_textscrolllist = mc.textScrollList(numberOfRows=5, parent=self.export_leftcolumn)
self.export_edit_name_checkbox = mc.checkBox(label="Keep same name", changeCommand=partial(self.save_additionnal_settings_function, "none"), value=True, parent=self.export_leftcolumn)
mc.button(label="Get current name", parent=self.export_leftcolumn, command=self.get_current_scene_name_function)
mc.separator(style="singleDash", height=10, parent=self.export_leftcolumn)
mc.text(label="Item Name", align="left", parent=self.export_leftcolumn)
self.export_edit_name_textfield = mc.textField(parent=self.export_leftcolumn)
mc.separator(style="none", height=15, parent=self.export_leftcolumn)
mc.button(label="Create New Item architecture", parent=self.export_leftcolumn, command=partial(self.create_new_item_template_function, False))
#mc.button(label="Create New Item architeture\nand Export", parent=self.export_leftcolumn, command=partial(self.create_new_item_template_function, True))
self.reload_template_function()
mc.separator(style="singleDash", height=5, parent=self.export_leftcolumn)
#self.export_lod_checkbox = mc.checkBox(label="Use Lod in name", value=True, parent=self.export_leftcolumn)
mc.text(label="Level of detail of the scene", parent=self.export_leftcolumn)
self.export_lod_intfield = mc.intField(value=self.additionnal_settings["lodInterval"][0], minValue=self.additionnal_settings["lodInterval"][0], maxValue=self.additionnal_settings["lodInterval"][1], parent=self.export_leftcolumn)
self.export_edit_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Export edit files", parent=self.export_leftcolumn, collapsable=True, collapse=True)
mc.text(label="File Version", align="left", parent=self.export_edit_frame)
#self.export_edit_version_checkbox = mc.checkBox(label="Automatic version check", value=False, parent=self.export_edit_frame)
self.export_edit_version_intfield = mc.intField(parent=self.export_edit_frame)
mc.text(label="Sequence number", align="left", parent=self.export_edit_frame)
self.export_edit_sequence_intfield = mc.intField(parent=self.export_edit_frame)
mc.text(label="Shot number", align="left", parent=self.export_edit_frame)
self.export_edit_shot_intfield = mc.intField(parent=self.export_edit_frame)
mc.button(label="Save Edit", parent=self.export_edit_frame, command=partial(self.export_edit_function, "standard"),backgroundColor=self.dark_color)
mc.button(label="Export selected", parent=self.export_edit_frame, command=partial(self.export_edit_function, "selection"))
self.export_publish_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Export publish files", parent=self.export_leftcolumn, collapsable=True, collapse=True)
self.export_backup_publish_checkbox = mc.checkBox(label="Backup existing publish", value=True)
mc.button(label="Save Publish", parent=self.export_publish_frame, command=partial(self.export_publish_function, "standard"),backgroundColor=self.dark_color)
#self.export_publish_keepname_checkbox = mc.checkBox(label="Keep item name", parent=self.export_leftcolumn)
mc.button(label="Publish selected", parent=self.export_publish_frame,command=partial(self.export_publish_function, "selection"))
self.export_shader_checkbox = mc.checkBox(value=True, parent=self.export_leftcolumn, label="Export with shader", changeCommand=partial(self.save_additionnal_settings_function, "none"))
#textscrolllist of export window
self.export_right_rowcolumn = mc.rowColumnLayout(numberOfColumns=2, columnWidth=((1, self.window_width*(2/6)), (2, self.window_width*(2/6))), parent=self.export_rightcolumn)
self.export_type_textscrolllist = mc.textScrollList(numberOfRows=25, parent=self.export_right_rowcolumn, allowMultiSelection=False, selectCommand=self.update_export_kind_information)
self.export_kind_textscrolllist = mc.textScrollList(numberOfRows=25, parent=self.export_right_rowcolumn, allowMultiSelection=False)
if self.settings != None:
mc.textScrollList(self.export_type_textscrolllist, edit=True, removeAll=True, append=list(self.settings.keys()))
"""
self.log_column = mc.columnLayout(adjustableColumn=True, parent=self.tabs, height=self.window_height)
self.log_scroll = mc.scrollLayout(horizontalScrollBarThickness=16, parent=self.log_column, height=self.window_height, resizeCommand=self.resize_command_function)
self.log_program_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Program Log", labelAlign="top", width=self.window_width, collapsable=True, collapse=True,parent=self.log_scroll)
self.log_list = mc.textScrollList(parent=self.log_program_frame, allowMultiSelection=False, enable=True, height=self.window_height/2, append=self.log_list_content)
self.log_team_frame = mc.frameLayout(backgroundColor=self.bright_color, label="Team logs", width=self.window_width, collapsable=True, collapse=True, parent=self.log_scroll)
self.lost_team_list = mc.textScrollList(parent=self.log_team_frame, allowMultiSelection=False, enable=True, height=self.window_height/2)
"""
mc.tabLayout(self.tabs, edit=True, tabLabel=((self.prod_column, "PROD ASSETS"), (self.logs_column, "LOGS"), (self.export_column, "EXPORT"), (self.render_column, "RENDER"), (self.archive_column, "ARCHIVE")))
#self.dock_control = mc.dockControl(label="Pipo - Written by Quazar", enablePopupOption=True, floating=True, area="left", content=self.main_window, allowedArea=["right", "left"])
self.get_current_scene_name_function("content")
self.apply_user_settings_function()
self.moment9 = datetime.now()
print("Launching time : %s"%(self.moment9 - self.moment1))
mc.showWindow()
def apply_user_settings_function(self):
#go through the user settings dictionnary and apply checkbox values
#get checkboxes values
checkbox_settings = self.user_settings["CheckboxValues"]
additionnal_settings = self.user_settings["AdditionalData"]
for key, value in checkbox_settings.items():
try:
exec('mc.checkBox(self.%s, edit=True, value=%s)'%(key, value))
except:
mc.warning("Checkbox skipped - %s"%key)
favorite_files = list(additionnal_settings["FavoriteFiles"].keys())
#if the list of favorites files isn't empty
#add the list to the textscrolllist related
if len(favorite_files) != 0:
mc.textScrollList(self.favorite_list, edit=True, removeAll=True, append=favorite_files)
print("Files added")
else:
print("No favorite files found!")
def update_archive_checkbox_function(self, command, event):
if command == "project":
if mc.checkBox(self.archivemenu_projectcheckbox, query=True, value=True)==True:
mc.checkBox(self.archivemenu_pipelinecheckbox, edit=True, value=False)
else:
mc.checkBox(self.archivemenu_pipelinecheckbox, edit=True, value=True)
if command == "pipeline":
if mc.checkBox(self.archivemenu_pipelinecheckbox, query=True, value=True)==True:
mc.checkBox(self.archivemenu_projectcheckbox, edit=True, value=False)
else:
mc.checkBox(self.archivemenu_projectcheckbox, edit=True, value=True)
self.save_additionnal_settings_function("none", "none")
def render_texture_change_checkbox_function(self, command, event):
if command == "manual":
if mc.checkBox(self.render_texture_manual_checkbox, query=True, value=True)==True:
mc.checkBox(self.render_texture_automatic_checkbox, edit=True, value=False)
mc.textScrollList(self.render_texture_list_channel, edit=True, allowMultiSelection=False)
if command == "automatic":
if mc.checkBox(self.render_texture_automatic_checkbox, query=True, value=True)==True: