-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdataline.py
More file actions
1880 lines (1265 loc) · 69.9 KB
/
dataline.py
File metadata and controls
1880 lines (1265 loc) · 69.9 KB
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
#--------Author Info-----------------------
print("------------------------------------------------------- \n ================= Hakuna Matata | It Means no Worries ================= \n-------------------------------------------------------")
print(" Dataline : the DBMS®️ - Project Pipeline Management System \n author : ©️ Ritwik Giri \n Connect : www.linkedin.com/in/ritwik-giri-gaffer \n Visit : www.ritwik-gaffer.art \n email : light@ritwik-gaffer.art ")
print("-------------------------------------------- \n progress.....")
# Dataline_CustomTKinter_GUI
# import Required Libreries
import customtkinter as ctk
import os
import sys
import subprocess
from PIL import Image, ImageTk
from customtkinter import filedialog , CTkImage
################################################################### UI Design Starts here ##############################################################
# main window size and title
root = ctk.CTk()
root.geometry("1255x750")
root.resizable(0,0)
root.title("DATALINE Kisholoy(1.0.0)") #dded blank space to get the title in center
root.iconbitmap('sourceImages/clapStick.ico') #If We keep any Image; Application Will always search for the Images in given Path
ctk.set_appearance_mode("dark") # this is to define Theme (dark | light | Systemdefault)
"""
Root Path Entry
"""
# RootDirectory Label Frame
projectDir_frame = ctk.CTkFrame(root, width=200,height=28, corner_radius=3, fg_color="#343638")
projectDir_frame.grid(row=0, column=0, padx=15, pady=8)
# RootDirectory Label
projectDir_label = ctk.CTkLabel(root, text="Root Directory", text_color="#b3b3b3", bg_color="#343638", font=ctk.CTkFont(size=13, weight='normal'))
projectDir_label.grid(row=0, column=0, padx=15, pady=8)
# RootDirectory path Entry
projectDir_entry = ctk.CTkEntry(root, width=960, height=28, corner_radius=3, border_width=1, placeholder_text="X:\ECP_contents", placeholder_text_color="#707070", state='normal')
projectDir_entry.place(x=230, y=8)
"""
Add Path/Copy Folder Path Button
"""
def addPath():
return filedialog.askdirectory(title = "Copy Root Directory Path")
addPath_button = ctk.CTkButton(root, text="+", width=30, fg_color="#333333", bg_color="#333333", corner_radius=3,border_width=1,command=addPath )
addPath_button.place(x=1200, y=8)
# Left pannel librerry Frame
leftPannelLib_frame = ctk.CTkFrame(root, width=200, height=700, corner_radius=3, fg_color="#343638", border_width=1)
leftPannelLib_frame.grid(row=1, column=0,)
# Left pannel librerry entries
# projectCode label
projectCode_label = ctk.CTkLabel(leftPannelLib_frame, text="enterProjectName | Code", text_color="#b3b3b3", bg_color="#343638", font=ctk.CTkFont(size=12, weight='normal'))
projectCode_label.place(x=32, y=10)
# projectCode entry
projectCode_entry = ctk.CTkEntry(leftPannelLib_frame, width=130, height=28, corner_radius=2, border_width=1, fg_color="#333333", placeholder_text="eg: EYE", placeholder_text_color="#707070", state='normal', justify='center')
projectCode_entry.place(x=35, y=40)
# Discipline/pipelineStructure_lbl
dccContainer_label = ctk.CTkLabel(leftPannelLib_frame, text="Core\nPipeline Structure", text_color="#b3b3b3", bg_color="#343638", font=ctk.CTkFont(size=12, weight='normal'))
dccContainer_label.place(x=55, y=80)
structure_image = ctk.CTkImage(light_image=Image.open("sourceImages/DATALINE tree_A.png"),size=(140, 500))
structure_image_label = ctk.CTkLabel(leftPannelLib_frame,text_color="#333333", font=ctk.CTkFont(size=1, weight='normal'), image=structure_image)
structure_image_label.place(x=28.5, y=120)
"""
Button to Enlarge PIPELINE Structure Image
by clicking on the + icon/button It opens the Image File/Pdf File from File system
"""
def Expand():
# Create a new window
image_window = ctk.CTkToplevel(root)
image_window.title("PIPELINE Structure")
# Load and display the image
img = Image.open("sourceImages/DATALINE tree_low.png")
img = ImageTk.PhotoImage(img)
label = ctk.CTkLabel(image_window, text_color="#333333", font=ctk.CTkFont(size=1, weight='normal'), image=img)
label.pack()
expand_button = ctk.CTkButton(leftPannelLib_frame, text="+", width=30, fg_color="#333333", bg_color="#333333", corner_radius=1,command= Expand )
expand_button.place(x=130, y=580)
#Tool Credits
toolCredits_frame = ctk.CTkFrame(leftPannelLib_frame, width=180, height=60, fg_color="#323232", border_width=1, border_color="black", corner_radius=3)
toolCredits_frame.place(x=10, y=630)
creditText_lable = ctk.CTkLabel(toolCredits_frame, text="(c)- RITWIK GIRI \n 2024 All Rights Reserved \n Please DON'T re-distribute", text_color="#808080", bg_color="#323232", font=ctk.CTkFont(size=12, weight='normal'), justify='center')
creditText_lable.place(x=18, y=10)
"""
Core Operational Entry
"""
# operation pannel Frame (rightSide)
operationPannel_frame = ctk.CTkFrame(root, width=1000, height=700, fg_color="#343638", corner_radius=3, border_width=1)
operationPannel_frame.grid(row=1, column=1)
# input_operations (bulk)
seqName_label = ctk.CTkLabel(operationPannel_frame, text="enterSeqName", text_color="#b3b3b3", bg_color="#343638", font=ctk.CTkFont(size=12, weight='normal'))
seqName_label.place(x=60, y=10)
seqName_entry = ctk.CTkEntry(operationPannel_frame, width=130, height=28, corner_radius=2, border_width=1, fg_color="#333333", placeholder_text="eg: 010_EB", placeholder_text_color="#707070", state='normal', justify='center')
seqName_entry.place(x=35, y=40)
shotNamePrefix_label = ctk.CTkLabel(operationPannel_frame, text="shotNamePrefix", text_color="#b3b3b3", bg_color="#343638", font=ctk.CTkFont(size=12, weight='normal'))
shotNamePrefix_label.place(x=300, y=10)
shotName_entry = ctk.CTkEntry(operationPannel_frame, width=130, height=28, corner_radius=2, border_width=1, fg_color="#333333", placeholder_text="eg: EB OR empty" ,placeholder_text_color="#707070", state='normal', justify='center')
shotName_entry.place(x=280, y=40)
# combobox var
shotNumVar = ctk.IntVar(value="03") #03 is default, Others are selectable from the dropdown list
shotCombobox_label = ctk.CTkLabel(operationPannel_frame, text="numberOfShots", text_color="#b3b3b3", bg_color="#343638", font=ctk.CTkFont(size=12, weight='normal'))
shotCombobox_label.place(x=440, y=10)
shotCombobox_entry = ctk.CTkComboBox(operationPannel_frame, width=130, height=28, corner_radius=2, border_width=1, button_color="#444444", dropdown_text_color="#757575", font=ctk.CTkFont(size=12), variable=shotNumVar, values=["01","02", "03", "04","05", "06", "07","08","09","10",], justify='center')
shotCombobox_entry.place(x=420,y=40)
"""
Exclussive Entry
"""
# exclussive_box
exclussiveBox_frame = ctk.CTkFrame(operationPannel_frame, width=980, height=150, fg_color="#323232", border_width=1, border_color="black", corner_radius=3)
exclussiveBox_frame.place(x=10, y=140)
# PathEntry Exclussive
exclussivePath_label = ctk.CTkLabel(exclussiveBox_frame, text="* this is wild card entry. Doesn't depend upon root entries || just enter show level directory path", text_color="grey", bg_color="#323232", font=ctk.CTkFont(size=12, weight='normal'))
exclussivePath_label.place(x=22, y=0.5)
exclussivePath_entry = ctk.CTkEntry(exclussiveBox_frame, width=920, height=28, corner_radius=3, border_width=1,fg_color="#222222", placeholder_text="X:\ECP_contents\show", placeholder_text_color="#707070", state='normal')
exclussivePath_entry.place(x=18, y=28)
"""
Add Path/Copy Folder Path Button
"""
def addExclussivePath():
return filedialog.askdirectory(title = "Copy Folder Path Show Level")
addExclussivePath_button = ctk.CTkButton(exclussiveBox_frame, text="+", width=30, fg_color="#333333", bg_color="#333333", corner_radius=3,border_width=1,command=addExclussivePath )
addExclussivePath_button.place(x=942, y=28)
"""
#################################
"""
# exclussive_input_operaions
seqNameExclussive_label = ctk.CTkLabel(exclussiveBox_frame, text="enterExclussiveSeqName", text_color="#b3b3b3", bg_color="#323232", font=ctk.CTkFont(size=12, weight='normal'))
seqNameExclussive_label.place(x=22, y=65)
seqNameExclussive_entry = ctk.CTkEntry(exclussiveBox_frame, width=130, height=28, corner_radius=2, border_width=1, fg_color="#333333", placeholder_text="eg: 005_TS", placeholder_text_color="#707070", state='normal', justify='center')
seqNameExclussive_entry.place(x=25, y=100)
shotNamePrefixExclussive_label = ctk.CTkLabel(exclussiveBox_frame, text="shotNamePrefix", text_color="#b3b3b3", bg_color="#323232", font=ctk.CTkFont(size=12, weight='normal'))
shotNamePrefixExclussive_label.place(x=290, y=65)
shotNameExclussive_entry = ctk.CTkEntry(exclussiveBox_frame, width=130, height=28, corner_radius=2, border_width=1, fg_color="#333333", placeholder_text="eg: TS", placeholder_text_color="#707070", state='normal', justify='center')
shotNameExclussive_entry.place(x=270, y=100)
# comboboxExclussive var
shotNumExclussiveVar = ctk.IntVar(value="01") #01 is default, Others are selectable from the dropdown list
shotExclussiveCombobox_label = ctk.CTkLabel(exclussiveBox_frame, text="numberOfShots", text_color="#b3b3b3", bg_color="#323232", font=ctk.CTkFont(size=12, weight='normal'))
shotExclussiveCombobox_label.place(x=450, y=65)
shotExclussiveCombobox_entry = ctk.CTkComboBox(exclussiveBox_frame, width=130, height=28, corner_radius=2, border_width=1, button_color="#444444", dropdown_text_color="#757575", font=ctk.CTkFont(size=12), variable=shotNumExclussiveVar, values=["01","02", "03", "04","05", "06", "07","08","09","10",], justify='center')
shotExclussiveCombobox_entry.place(x=430, y=100)
"""
guideBox Log
"""
# guide_box
guidebox_frame = ctk.CTkFrame(operationPannel_frame, width=900, height=370, fg_color="#323232", border_width=1, border_color="orange", corner_radius=3)
guidebox_frame.place(x=50, y=320)
# guideText
guideText_lable = ctk.CTkLabel(guidebox_frame, text="Tip:\n1-The first rule is to enter the project root directory and project code (for the bulk generation only_no need for Exclussive entry).\n2-Enter a seq name (as hinted in UI) & number of shots.Hit generate, it will generate shots in bulk number.\n3-To generate on by one seq >> shots, enter previously created show path in the exclussive section, No need to enter root directry and project code and bulk shot sec.\n4-enter seq name and shot name as hinted in UI (in exclussive sec) to generate one by one shot generaion exclussively with the second Generate button", text_color="#808080", bg_color="#323232", font=ctk.CTkFont(size=12, weight='normal'), justify='left')
guideText_lable.place(x=10, y=10)
# terminalLogUI
terminalLog_frame = ctk.CTkScrollableFrame(guidebox_frame, orientation = "vertical", width=800, height=0, label_text="Validation <> Log", label_text_color="orange", )
terminalLog_frame.place(x=40, y=100)
terminalLog_frame._parent_canvas.yview_moveto(-1)
################################################# Core UI design ends here check Button Functions at the end of Core Operations ###############################################################
"""
GenBulk Button Function/Core Operation
"""
# button function Bulk Folders Creation
def genBulk():
dirPath = projectDir_entry.get()
showCode = projectCode_entry.get()
rootPath = f"{dirPath}\{showCode}"
seqName = seqName_entry.get()
seqPath = f"{rootPath}\{seqName}"
shotName = shotName_entry.get()
shotNumber = shotCombobox_entry.get()
shotPath = f"{seqPath}\{shotName}"
print(f"Directory '{rootPath}' --proceeding...")
# *******UI_LOG****** #
log_lableA = ctk.CTkLabel(terminalLog_frame, text=(rootPath,'--proceeding...PLEASE_CHECK_TERMINAL_FOR_DETAILED_LOG'), text_color='#FFE87C', font=ctk.CTkFont(size=11, weight='normal'), justify='left' )
log_lableA.pack()
##### Validation And Function
if dirPath:
# if dirPath is valid then go ahed and proceed to Create the directory
create_directory(rootPath)
else:
print("ERROR:No directory selected. Enter Valid File System Path")
# *******UI_LOG****** #
log_lableB = ctk.CTkLabel(terminalLog_frame, text=('No directory Selected. Enter valid FileSystem Path'), text_color='red', font=ctk.CTkFont(size=12, weight='normal'), justify='left' )
log_lableB.pack()
if showCode:
# if showCode is valid then go ahed and proceed to Create the directory
print("(-_-)", "|| ☢️ ♾️ ☣️ ")
else:
print("ERROR:Plase enter Show Name.")
# *******UI_LOG****** #
log_lableC = ctk.CTkLabel(terminalLog_frame, text=('Please Enter Show Name'), text_color='dark Orange', font=ctk.CTkFont(size=11, weight='normal'), justify='left' )
log_lableC.pack()
if seqName:
print()
else:
print("ERROR:Please Enter a Seq Name to Create Seq_shots.")
#clear_Entries ############
"""
projectCode_entry.delete(0, ctk.END)
projectDir_entry.delete(0, ctk.END)
"""
"""
Proceed with creating core directories
"""
def create_directory(rootPath):
dirPath = projectDir_entry.get()
showCode = projectCode_entry.get()
rootPath = f"{dirPath}\{showCode}"
seqName = seqName_entry.get()
seqPath = f"{rootPath}\{seqName}"
shotName = shotName_entry.get()
shotNumber = shotCombobox_entry.get()
shotPath = f"{seqPath}\{shotName}"
try:
# try if all entries above fns are valid then go ahed and MAKE the directory
os.makedirs(name=rootPath)
print(f"Directory- {rootPath} --created successfully.")
log_lableD = ctk.CTkLabel(terminalLog_frame, text=(f"Directory- {rootPath} --created successfully."), text_color='green', font=ctk.CTkFont(size=11, weight='normal'), justify='left' )
log_lableD.pack()
# changing Dir/entering into Project leaf to create leaf dirs
os.chdir(rootPath)
print(f"CHANGING DIRECTORY PATH TO CREATE CHILD FOLDERS.....\n{os.getcwd()}\ \n--creating Folders under project dir...")
# AMS core operation Starts here **********************************************************************************************************************************************************************
# creating leafDirs per stream/decepline
# parent Directories
os.makedirs(name='buildAssets', mode=0o777 , exist_ok=False)
os.makedirs(name='bakeAssets', mode=0o777 , exist_ok=False)
os.makedirs(name='refRnd', mode=0o777 , exist_ok=False)
os.makedirs(name='editPreviz', mode=0o777 , exist_ok=False)
os.makedirs(name='diReMaster', mode=0o777 , exist_ok=False)
os.makedirs(name='renderElements', mode=0o777 , exist_ok=False)
os.makedirs(name='tools', mode=0o777 , exist_ok=False)
os.makedirs(name='projectTracking', mode=0o777 , exist_ok=False)
print(f"{os.getcwd()} \ parent Dirs - Created SUCCESSFULLY.....")
# child Directories
# ****** assets *******
os.chdir("buildAssets")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
# create build deceiplines
list = ['3dModel','environment','anim','rigging','techAnim','groom','pantry','lookdev','lighting','fx','comp','utils']
for buidDeceplineList in list:
os.makedirs(buidDeceplineList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()} \ build deceplines ('3dModel','environment','anim','rigging','techAnim','groom','pantry','lookdev','lighting','fx','comp','utils') - Created SUCCESSFULLY.....")
##################### Assets 3D Model, Sclupting #########################################
os.chdir("3dModel")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
# create build DCC directories
list = ['blender','Maya','zBrush','houdini','megascans']
for buildDccList in list:
os.makedirs(buildDccList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()} \ build DCCs ('blender','Maya','zBrush','houdini','megascans') - Created SUCCESSFULLY.....")
os.chdir('../')
###################### rigging #####################################
#print(f"directory Changed to One Step UP--- {os.getcwd()}") # to check if the directory actually got changed *UP 1 Step*
os.chdir("rigging")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
os.makedirs(name='maya', mode=0o777 , exist_ok=False)
print(f"{os.getcwd()}\maya - Created SUCCESSFULLY.....")
os.chdir('../')
############################### texturing ######################################
#print(f"directory Changed to One Step UP--- {os.getcwd()}") # to check if the directory actually got changed *UP 1 Step*
os.chdir("pantry")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
# create pantry deceplines
list = ['hdri', 'mari','photoshop','substance','tex','tx']
for pantryDeceplineList in list:
os.makedirs(pantryDeceplineList, mode=0o777 , exist_ok=False)
print(f"{os.getcwd()} ('hdri', 'mari','photoshop','substance','tex','tx') - Created SUCCESSFULLY.....")
os.chdir('../')
################################ grooming #######################################
#print(f"directory Changed to One Step UP--- {os.getcwd()}") # to check if the directory actually got changed *UP 1 Step*
os.chdir("groom")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
# create groom deceplines
list = ['cloth', 'hair','fur','folliage','muscle']
for groomList in list:
os.makedirs(groomList, mode=0o777 , exist_ok=False)
print(f"{os.getcwd()} ('cloth', 'hair','fur','folliage','muscle') - Created SUCCESSFULLY.....")
os.chdir('../')
################################### anim ######################################
#print(f"directory Changed to One Step UP--- {os.getcwd()}") # to check if the directory actually got changed *UP 1 Step*
os.chdir("anim")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
os.makedirs(name='maya', mode=0o777 , exist_ok=False)
print(f"{os.getcwd()}\maya - Created SUCCESSFULLY.....")
os.chdir('../')
######################## TechAnim, CFX-Dynamics-Simulation ##############################
#print(f"directory Changed to One Step UP--- {os.getcwd()}") # to check if the directory actually got changed *UP 1 Step*
os.chdir("techAnim")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
# create cfx deceplines
list = ['clothSim', 'hairSim','furSim','envDynamics','muscleSim']
for cfxList in list:
os.makedirs(cfxList, mode=0o777 , exist_ok=False)
print(f"{os.getcwd()} ('clothSim', 'hairSim','furSim','envDynamics','muscleSim') - Created SUCCESSFULLY.....")
# clothSim
os.chdir("clothSim")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['maya','houdini']
for clothSimList in list:
os.makedirs(clothSimList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('maya','houdini') - Created SUCCESSFULLY.....")
# hairSim
os.chdir('../')
os.chdir("hairSim")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['maya','houdini','yeti']
for hairSimList in list:
os.makedirs(hairSimList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('maya','houdini','yeti') - Created SUCCESSFULLY.....")
# furSim
os.chdir('../')
os.chdir("furSim")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['maya','houdini','yeti']
for furSimList in list:
os.makedirs(furSimList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('maya','houdini','yeti') - Created SUCCESSFULLY.....")
# muscleSim
os.chdir('../')
os.chdir("muscleSim")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['maya','houdini','ziva']
for muscleSimList in list:
os.makedirs(muscleSimList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('maya','houdini','ziva') - Created SUCCESSFULLY.....")
#envDynamics
os.chdir('../')
os.chdir("envDynamics")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['maya','houdini',]
for envDynList in list:
os.makedirs(envDynList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('maya','houdini') - Created SUCCESSFULLY.....")
os.chdir('../../')
############################## fxSimulation ##################################
os.chdir("fx")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['maya','houdini',]
for fxSimList in list:
os.makedirs(fxSimList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('maya','houdini') - Created SUCCESSFULLY.....")
os.chdir('../')
################################## lookdev ########################################
os.chdir("lookdev")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['maya', 'katana','houdini']
for ldvDccList in list:
os.makedirs(ldvDccList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('maya','katana','houdini') - Created SUCCESSFULLY.....")
os.chdir('../')
################################## lighting #######################################
os.chdir("lighting")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['maya', 'katana','houdini']
for lgtDccList in list:
os.makedirs(lgtDccList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('maya','katana','houdini') - Created SUCCESSFULLY.....")
os.chdir("maya")
os.makedirs(name='mayaSceneFile', mode=0o777, exist_ok=False)
os.chdir('../')
os.chdir("houdini")
os.makedirs(name='hipFile', mode=0o777, exist_ok=False)
os.chdir('../')
os.chdir("katana")
os.makedirs(name='katanaProject', mode=0o777, exist_ok=False)
os.chdir('../../')
################################## comp ########################################
os.chdir("comp")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
os.makedirs(name='preComp', mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('preComp') - Created SUCCESSFULLY.....")
os.chdir('../')
######################### utils #############################################
os.chdir("utils")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['renderStats', 'misc']
for utilsList in list:
os.makedirs(utilsList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('renderStats','misc') - Created SUCCESSFULLY.....")
os.chdir('../../')
# ******** rnd *********
# refRndData
os.chdir("refRnd")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['confluence', 'pureRef']
for refRndList in list:
os.makedirs(refRndList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('confluence', 'pureRef') - Created SUCCESSFULLY.....")
os.chdir('../')
# ********** releaseBakePublish **********
# releaseBakePublish
os.chdir("bakeAssets")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['animCache','camCache','dynamicsCache','fxCache','geoCache','groomCache','katanaPublishes','shaderExport','USD']
for publishList in list:
os.makedirs(publishList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('animCache','camCache','dynamicsCache','fxCache','geoCache','groomCache','katanaPublishes','shaderExport','USD') - Created SUCCESSFULLY.....")
os.chdir("dynamicsCache")
list = ['clothCache', 'hairCache','furCache','envDynamicsCache','muscleCache']
for dynamicsCacheList in list:
os.makedirs(dynamicsCacheList, mode=0o777, exist_ok=False)
os.chdir('../')
os.chdir("katanaPublishes")
list = ['katanaLookfile','katanaLivegrp']
for katanaPublishesList in list:
os.makedirs(katanaPublishesList, mode=0o777, exist_ok=False)
os.chdir('../../')
# ********** editPreviz **********
# editorial
os.chdir("editPreviz")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['nukeStudio', 'premierePro','resolve','rvTimeline']
for editPrevizList in list:
os.makedirs(editPrevizList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('nukeStudio', 'premierePro','resolve','rvTimeline') - Created SUCCESSFULLY.....")
os.chdir('../')
# ********** renders_Elements **********
# diRemastering
os.chdir("renderElements")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['playblasts', 'hwRender','ldv','fxFlips','lsc','comp','rvAnnotations','edit','di','delivery']
for renderElementsList in list:
os.makedirs(renderElementsList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('playblasts', 'hwRender','ldv','fxFlips','lsc','comp','rvAnnotations','edit','di','delivery') - Created SUCCESSFULLY.....")
os.chdir('../')
# ********** DI-Color_ReMaster **********
# renderElements
os.chdir("diReMaster")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
os.makedirs(name='resolve', mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('resolve') - Created SUCCESSFULLY.....")
os.chdir('../')
# ********** tools **********
# toolsScripts
os.chdir("tools")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['arnold','prman', 'maya','katana','houdini','mari','nuke','ziva','substance','rv','projectEnvVar','scripts']
for toolsList in list:
os.makedirs(toolsList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('arnold','prman', 'maya','katana','houdini','mari','nuke','ziva','substance','rv','projectEnvVar','scripts') - Created SUCCESSFULLY.....")
os.chdir('../')
# ********** projectTracking **********
# tracking
os.chdir("projectTracking")
print(f"directory Changed to--- {os.getcwd()}") # to check if the directory actually got changed
list = ['shotgun','excel','confluence','googlesheet']
for projectTrackingList in list:
os.makedirs(projectTrackingList, mode=0o777, exist_ok=False)
print(f"{os.getcwd()}\ ('shotgun','excel','confluence','googlesheet') - Created SUCCESSFULLY.....")
os.chdir('../')
# AMS core operation Ends here ********************************************************************************************************************************************************************
print(f"{os.getcwd()} Proceeding with Sequence_Shot Directories")
# **********************************Seq_Shot Directory Starts here *******************************************
os.chdir(rootPath)
os.makedirs(name=seqPath, mode=0o777, exist_ok=False)
os.chdir(seqPath)
print(f"{os.getcwd()} - Created SUCCESSFULLY..... ")
print(f"{os.getcwd()}\ creating Shot folders", file=sys.stdout, flush=False)
if shotNumber: ####### if shot Number Entry is valid or at-Least 01 then proceed Else Print
######################## this is shot Core folder Structure ###############
def shotCore(): #call shotCore() to create the shot level child directories under each Shot
coreList = ['bakeShot', 'editPreviz','diReMaster','renderElements','anim','techAnim','groom','envDmp','fx','lighting','compositing','rpm']
for parentDept in coreList:
os.makedirs(parentDept, mode=0o777 , exist_ok=False)
os.chdir("bakeShot")
list = ['animCache','camCache','dynamicsCache','fxCache','geoCache','groomCache','katanaPublishes','shaderExport','USD']
for publishList in list:
os.makedirs(publishList, mode=0o777, exist_ok=False)
os.chdir("dynamicsCache")
list = ['clothCache', 'hairCache','furCache','envDynamicsCache','muscleCache']
for dynamicsCacheList in list:
os.makedirs(dynamicsCacheList, mode=0o777, exist_ok=False)
os.chdir('../')
os.chdir("katanaPublishes")
list = ['katanaLookfile','katanaLivegrp']
for katanaPublishesList in list:
os.makedirs(katanaPublishesList, mode=0o777, exist_ok=False)
os.chdir('../../')
os.chdir('renderElements')
list = ['animQC','lightQC','groomQC','fxQC','taQC','envQC','dmp','rpm','fx','comp','lighting','lsc','lookdev','edit','di']
for shotRenderElementList in list:
os.makedirs(shotRenderElementList, mode=0o777, exist_ok=False)
os.chdir('../')
os.chdir('groom')
groomList = ['cloth', 'hair','fur','folliage','muscle']
for groomDept in groomList:
os.makedirs(groomDept, mode=0o777 , exist_ok=False)
os.chdir('../')
os.chdir('lighting')
lightingDccList = ['maya','katana','houdini']
for lightingDcc in lightingDccList:
os.makedirs(lightingDcc, mode=0o777, exist_ok=False)
os.chdir('../')
os.chdir('compositing')
compList = ['lsc','comp']
for compDeptList in compList:
os.makedirs(compDeptList, mode=0o777 , exist_ok=False)
os.chdir('../')
os.chdir('rpm')
rpmDeptList = ['track','roto','prep','matchMove']
for rpmDept in rpmDeptList:
os.makedirs(rpmDept, mode=0o777, exist_ok=False)
os.chdir('../')
##########################################################################
###### if chosen shot number/range/list is 01 then make directory as listed below
if shotNumber == "01":
list = ['01','seq']
for bulkShotList in list:
os.makedirs(name=f"{shotName}_{bulkShotList}")
os.chdir(f"{shotName}_01")
print(f"{os.getcwd()}")
shotCore() # for shot number 01
os.chdir('../')
os.chdir(f"{shotName}_seq") # for seq
shotCore()
###### if chosen shot number/range/list is 02 then make directory as listed below
elif shotNumber == "02":
list = ['01','02','seq']
for bulkShotList in list:
os.makedirs(name=f"{shotName}_{bulkShotList}")
os.chdir(f"{shotName}_01")
print(f"{os.getcwd()}")
shotCore() # for shot number 01
os.chdir('../')
os.chdir(f"{shotName}_02")
print(f"{os.getcwd()}")
shotCore() # for shot number 02
os.chdir('../')
os.chdir(f"{shotName}_seq")
print(f"{os.getcwd()}")
shotCore() # for seq
os.chdir('../')
#print(f"{os.getcwd()}")
###### if chosen shot number/range/list is 03 then make directory as listed below
elif shotNumber == "03":
list = ['01','02','03','seq']
for bulkShotList in list:
os.makedirs(name=f"{shotName}_{bulkShotList}")
os.chdir(f"{shotName}_01")
print(f"{os.getcwd()}")
shotCore() # for shot number 01
os.chdir('../')
os.chdir(f"{shotName}_02")
print(f"{os.getcwd()}")
shotCore() # for shot number 02
os.chdir('../')
os.chdir(f"{shotName}_03")
print(f"{os.getcwd()}")
shotCore() # for shot number 03
os.chdir('../')
os.chdir(f"{shotName}_seq")
print(f"{os.getcwd()}")
shotCore() # for seq
os.chdir('../')
#print(f"{os.getcwd()}")
###### if chosen shot number/range/list is 04 then make directory as listed below
elif shotNumber == "04":
list = ['01','02','03','04','seq']
for bulkShotList in list:
os.makedirs(name=f"{shotName}_{bulkShotList}")
os.chdir(f"{shotName}_01")
print(f"{os.getcwd()}")
shotCore() # for shot number 01
os.chdir('../')
os.chdir(f"{shotName}_02")
print(f"{os.getcwd()}")
shotCore() # for shot number 02
os.chdir('../')
os.chdir(f"{shotName}_03")
print(f"{os.getcwd()}")
shotCore() # for shot number 03
os.chdir('../')
os.chdir(f"{shotName}_04")
print(f"{os.getcwd()}")
shotCore() # for shot number 04
os.chdir('../')
os.chdir(f"{shotName}_seq")
print(f"{os.getcwd()}")
shotCore() # for seq
os.chdir('../')
#print(f"{os.getcwd()}")
###### if chosen shot number/range/list is 05 then make directory as listed below
elif shotNumber == "05":
list = ['01','02','03','04','05','seq']
for bulkShotList in list:
os.makedirs(name=f"{shotName}_{bulkShotList}")
os.chdir(f"{shotName}_01")
print(f"{os.getcwd()}")
shotCore() # for shot number 01
os.chdir('../')
os.chdir(f"{shotName}_02")
print(f"{os.getcwd()}")
shotCore() # for shot number 02
os.chdir('../')
os.chdir(f"{shotName}_03")
print(f"{os.getcwd()}")
shotCore() # for shot number 03
os.chdir('../')
os.chdir(f"{shotName}_04")
print(f"{os.getcwd()}")
shotCore() # for shot number 04
os.chdir('../')
os.chdir(f"{shotName}_05")
print(f"{os.getcwd()}")
shotCore() # for shot number 05
os.chdir('../')
os.chdir(f"{shotName}_seq")
print(f"{os.getcwd()}")
shotCore() # for seq
os.chdir('../')
#print(f"{os.getcwd()}")
###### if chosen shot number/range/list is 06 then make directory as listed below
elif shotNumber == "06":
list = ['01','02','03','04','05','06','seq']
for bulkShotList in list:
os.makedirs(name=f"{shotName}_{bulkShotList}")
os.chdir(f"{shotName}_01")
print(f"{os.getcwd()}")
shotCore() # for shot number 01
os.chdir('../')
os.chdir(f"{shotName}_02")
print(f"{os.getcwd()}")
shotCore() # for shot number 02
os.chdir('../')
os.chdir(f"{shotName}_03")
print(f"{os.getcwd()}")
shotCore() # for shot number 03
os.chdir('../')
os.chdir(f"{shotName}_04")
print(f"{os.getcwd()}")
shotCore() # for shot number 04
os.chdir('../')
os.chdir(f"{shotName}_05")
print(f"{os.getcwd()}")
shotCore() # for shot number 05
os.chdir('../')
os.chdir(f"{shotName}_06")
print(f"{os.getcwd()}")
shotCore() # for shot number 06
os.chdir('../')
os.chdir(f"{shotName}_seq")
print(f"{os.getcwd()}")
shotCore() # for seq
os.chdir('../')
#print(f"{os.getcwd()}")
###### if chosen shot number/range/list is 07 then make directory as listed below
elif shotNumber == "07":
list = ['01','02','03','04','05','06','07','seq']
for bulkShotList in list:
os.makedirs(name=f"{shotName}_{bulkShotList}")
os.chdir(f"{shotName}_01")
print(f"{os.getcwd()}")
shotCore() # for shot number 01
os.chdir('../')
os.chdir(f"{shotName}_02")
print(f"{os.getcwd()}")
shotCore() # for shot number 02
os.chdir('../')
os.chdir(f"{shotName}_03")
print(f"{os.getcwd()}")
shotCore() # for shot number 03
os.chdir('../')
os.chdir(f"{shotName}_04")
print(f"{os.getcwd()}")
shotCore() # for shot number 04
os.chdir('../')
os.chdir(f"{shotName}_05")
print(f"{os.getcwd()}")
shotCore() # for shot number 05
os.chdir('../')
os.chdir(f"{shotName}_06")
print(f"{os.getcwd()}")
shotCore() # for shot number 06
os.chdir('../')
os.chdir(f"{shotName}_07")
print(f"{os.getcwd()}")
shotCore() # for shot number 07
os.chdir('../')
os.chdir(f"{shotName}_seq")
print(f"{os.getcwd()}")
shotCore() # for seq
os.chdir('../')
#print(f"{os.getcwd()}")