diff --git a/data/pipeline.py b/data/pipeline.py index 04fe3b1..8929063 100644 --- a/data/pipeline.py +++ b/data/pipeline.py @@ -117,7 +117,7 @@ def set_pipeline_env(self): self.add_env('PYTHONPATH', os.environ['IMG_PATH']) self.add_env('PYTHONPATH', os.environ['UTILS_PATH']) self.add_env('PYTHONPATH', os.environ['CLASSES_PATH']) - self.add_env('PYTHONPATH', os.environ['SOFTWARE_PATH'] ) + # self.add_env('PYTHONPATH', os.environ['SOFTWARE_PATH']) import libLog LOG = libLog.init(script=TITLE) diff --git a/data/project/default/folder_template/00_pipeline/.gitkeep b/data/project/default/folder_template/00_pipeline/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/00_pipeline/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/05_user/.gitkeep b/data/project/default/folder_template/05_user/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/05_user/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/05_user/arichter/.gitkeep b/data/project/default/folder_template/05_user/arichter/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/05_user/arichter/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/10_preproduction/.gitkeep b/data/project/default/folder_template/10_preproduction/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/10_preproduction/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/10_preproduction/animatic/.gitkeep b/data/project/default/folder_template/10_preproduction/animatic/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/10_preproduction/animatic/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/10_preproduction/concept/.gitkeep b/data/project/default/folder_template/10_preproduction/concept/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/10_preproduction/concept/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/10_preproduction/reference/.gitkeep b/data/project/default/folder_template/10_preproduction/reference/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/10_preproduction/reference/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/10_preproduction/rnd/.gitkeep b/data/project/default/folder_template/10_preproduction/rnd/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/10_preproduction/rnd/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/10_preproduction/screenplay/.gitkeep b/data/project/default/folder_template/10_preproduction/screenplay/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/10_preproduction/screenplay/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/10_preproduction/storyboard/.gitkeep b/data/project/default/folder_template/10_preproduction/storyboard/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/10_preproduction/storyboard/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/20_footage/.gitkeep b/data/project/default/folder_template/20_footage/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/20_footage/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/20_footage/SCENE/.gitkeep b/data/project/default/folder_template/20_footage/SCENE/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/20_footage/SCENE/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/20_footage/SHD/.gitkeep b/data/project/default/folder_template/20_footage/SHD/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/20_footage/SHD/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/20_footage/hdri/.gitkeep b/data/project/default/folder_template/20_footage/hdri/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/20_footage/hdri/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/20_footage/tex/.gitkeep b/data/project/default/folder_template/20_footage/tex/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/20_footage/tex/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/30_assets/.gitkeep b/data/project/default/folder_template/30_assets/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/30_assets/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/30_assets/assetName/.gitkeep b/data/project/default/folder_template/30_assets/assetName/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/30_assets/assetName/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/30_assets/assetName/GEO/.gitkeep b/data/project/default/folder_template/30_assets/assetName/GEO/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/30_assets/assetName/GEO/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/30_assets/assetName/RIG/.gitkeep b/data/project/default/folder_template/30_assets/assetName/RIG/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/30_assets/assetName/RIG/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/30_assets/assetName/SHD/.gitkeep b/data/project/default/folder_template/30_assets/assetName/SHD/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/30_assets/assetName/SHD/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/40_shots/.gitkeep b/data/project/default/folder_template/40_shots/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/40_shots/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/40_shots/s010/.gitkeep b/data/project/default/folder_template/40_shots/s010/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/40_shots/s010/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/40_shots/s010/ANIM/.gitkeep b/data/project/default/folder_template/40_shots/s010/ANIM/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/40_shots/s010/ANIM/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/40_shots/s010/ANIM/PUBLISH/.gitkeep b/data/project/default/folder_template/40_shots/s010/ANIM/PUBLISH/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/40_shots/s010/ANIM/PUBLISH/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/40_shots/s010/ANIM/WORK/.gitkeep b/data/project/default/folder_template/40_shots/s010/ANIM/WORK/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/40_shots/s010/ANIM/WORK/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/40_shots/s010/COMP/.gitkeep b/data/project/default/folder_template/40_shots/s010/COMP/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/40_shots/s010/COMP/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/40_shots/s010/FX/.gitkeep b/data/project/default/folder_template/40_shots/s010/FX/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/40_shots/s010/FX/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/40_shots/s010/LGT/.gitkeep b/data/project/default/folder_template/40_shots/s010/LGT/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/40_shots/s010/LGT/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/45_render/.gitkeep b/data/project/default/folder_template/45_render/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/45_render/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/45_render/s010/.gitkeep b/data/project/default/folder_template/45_render/s010/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/45_render/s010/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/45_render/s010/ANIM/.gitkeep b/data/project/default/folder_template/45_render/s010/ANIM/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/45_render/s010/ANIM/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/50_post/.gitkeep b/data/project/default/folder_template/50_post/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/50_post/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/50_post/edit/music/.gitkeep b/data/project/default/folder_template/50_post/edit/music/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/50_post/edit/music/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/50_post/edit/sound/.gitkeep b/data/project/default/folder_template/50_post/edit/sound/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/50_post/edit/sound/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/50_post/final/.gitkeep b/data/project/default/folder_template/50_post/final/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/50_post/final/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/50_post/grade/.gitkeep b/data/project/default/folder_template/50_post/grade/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/50_post/grade/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/50_post/mov/.gitkeep b/data/project/default/folder_template/50_post/mov/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/50_post/mov/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/60_planning/.gitkeep b/data/project/default/folder_template/60_planning/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/60_planning/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/60_planning/makingOf/.gitkeep b/data/project/default/folder_template/60_planning/makingOf/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/60_planning/makingOf/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/60_planning/meetings/.gitkeep b/data/project/default/folder_template/60_planning/meetings/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/60_planning/meetings/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/60_planning/presentation/.gitkeep b/data/project/default/folder_template/60_planning/presentation/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/60_planning/presentation/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/folder_template/60_planning/promotion/.gitkeep b/data/project/default/folder_template/60_planning/promotion/.gitkeep new file mode 100644 index 0000000..a60141c --- /dev/null +++ b/data/project/default/folder_template/60_planning/promotion/.gitkeep @@ -0,0 +1 @@ +"" diff --git a/data/project/default/software.yml b/data/project/default/software.yml index 46199b3..d4eab01 100644 --- a/data/project/default/software.yml +++ b/data/project/default/software.yml @@ -26,6 +26,7 @@ MAYA: ENV: # Added BEFORE software start PYTHONPATH: + - !env_first [SOFTWARE_PATH] - !env_first [SOFTWARE_PATH, /scripts] - !env_first [SOFTWARE_PATH, /plugins] - !env_first [SOFTWARE_PATH, /shelf] @@ -64,13 +65,18 @@ MAYA: # NUKE NUKE: version: &NUKE_VERSION 10.5 - version_long: &NUKE_VERSION_LONG !join [*NUKE_VERSION, v2] + version_long: &NUKE_VERSION_LONG !join [*NUKE_VERSION, v1] start: !join ['start "" Nuke', *NUKE_VERSION ,'.exe --nukex "{}"'] path: !join ["C:/Program Files/Nuke", *NUKE_VERSION_LONG,/Nuke, *NUKE_VERSION, .exe] ENV: + PYTHONPATH: + - !env_first [SOFTWARE_PATH, /scripts] + - !env_first [SOFTWARE_PATH, /plugins] + - !env_first [SOFTWARE_PATH, /shelf] + NUKE_PATH: - !env [PIPELINE_PATH] - !env [SOFTWARE_PATH] @@ -114,3 +120,13 @@ HOUDINI: renderer: renderer_path: + + +RV: + version: + path: "C:/Program Files/Tweak/RV/bin/rv.exe" + + start: + + renderer: + renderer_path: diff --git a/img/btn/btnFolder48c.png b/img/btn/btnFolder48c.png new file mode 100644 index 0000000..ea7afe1 Binary files /dev/null and b/img/btn/btnFolder48c.png differ diff --git a/img/program/3dCoat.png b/img/software/3dCoat.png similarity index 100% rename from img/program/3dCoat.png rename to img/software/3dCoat.png diff --git a/img/program/3dsMax.png b/img/software/3dsMax.png similarity index 100% rename from img/program/3dsMax.png rename to img/software/3dsMax.png diff --git a/img/program/CPlusPlus.png b/img/software/CPlusPlus.png similarity index 100% rename from img/program/CPlusPlus.png rename to img/software/CPlusPlus.png diff --git a/img/program/afterEffects.png b/img/software/afterEffects.png similarity index 100% rename from img/program/afterEffects.png rename to img/software/afterEffects.png diff --git a/img/program/alembic.png b/img/software/alembic.png similarity index 100% rename from img/program/alembic.png rename to img/software/alembic.png diff --git a/img/program/arnold.png b/img/software/arnold.png similarity index 100% rename from img/program/arnold.png rename to img/software/arnold.png diff --git a/img/program/bridge.png b/img/software/bridge.png similarity index 100% rename from img/program/bridge.png rename to img/software/bridge.png diff --git a/img/program/cinema4d.png b/img/software/cinema4d.png similarity index 100% rename from img/program/cinema4d.png rename to img/software/cinema4d.png diff --git a/img/program/csharp.png b/img/software/csharp.png similarity index 100% rename from img/program/csharp.png rename to img/software/csharp.png diff --git a/img/program/davinci.png b/img/software/davinci.png similarity index 100% rename from img/program/davinci.png rename to img/software/davinci.png diff --git a/img/program/default.png b/img/software/default.png similarity index 100% rename from img/program/default.png rename to img/software/default.png diff --git a/img/program/folder.png b/img/software/folder.png similarity index 100% rename from img/program/folder.png rename to img/software/folder.png diff --git a/img/program/houdini.png b/img/software/houdini.png similarity index 100% rename from img/program/houdini.png rename to img/software/houdini.png diff --git a/img/program/katana.png b/img/software/katana.png similarity index 100% rename from img/program/katana.png rename to img/software/katana.png diff --git a/img/program/mari.png b/img/software/mari.png similarity index 100% rename from img/program/mari.png rename to img/software/mari.png diff --git a/img/program/maxScript.png b/img/software/maxScript.png similarity index 100% rename from img/program/maxScript.png rename to img/software/maxScript.png diff --git a/img/program/maya.png b/img/software/maya.png similarity index 100% rename from img/program/maya.png rename to img/software/maya.png diff --git a/img/software/maya/MayaEDUStartupImage.png b/img/software/maya/MayaEDUStartupImage.png index de060ed..ef8749c 100644 Binary files a/img/software/maya/MayaEDUStartupImage.png and b/img/software/maya/MayaEDUStartupImage.png differ diff --git a/img/program/mel.png b/img/software/mel.png similarity index 100% rename from img/program/mel.png rename to img/software/mel.png diff --git a/img/program/mentalray.png b/img/software/mentalray.png similarity index 100% rename from img/program/mentalray.png rename to img/software/mentalray.png diff --git a/img/program/motionbuilder.png b/img/software/motionbuilder.png similarity index 100% rename from img/program/motionbuilder.png rename to img/software/motionbuilder.png diff --git a/img/program/motive.png b/img/software/motive.png similarity index 100% rename from img/program/motive.png rename to img/software/motive.png diff --git a/img/program/nuke.png b/img/software/nuke.png similarity index 100% rename from img/program/nuke.png rename to img/software/nuke.png diff --git a/img/software/nuke/nuke_splash.png b/img/software/nuke/nuke_splash.png index 0f9b65b..8fc2dcb 100644 Binary files a/img/software/nuke/nuke_splash.png and b/img/software/nuke/nuke_splash.png differ diff --git a/img/program/pdf.png b/img/software/pdf.png similarity index 100% rename from img/program/pdf.png rename to img/software/pdf.png diff --git a/img/program/pftrack.png b/img/software/pftrack.png similarity index 100% rename from img/program/pftrack.png rename to img/software/pftrack.png diff --git a/img/program/photoscan.png b/img/software/photoscan.png similarity index 100% rename from img/program/photoscan.png rename to img/software/photoscan.png diff --git a/img/program/photoshop.png b/img/software/photoshop.png similarity index 100% rename from img/program/photoshop.png rename to img/software/photoshop.png diff --git a/img/program/premiere.png b/img/software/premiere.png similarity index 100% rename from img/program/premiere.png rename to img/software/premiere.png diff --git a/img/program/ptex.png b/img/software/ptex.png similarity index 100% rename from img/program/ptex.png rename to img/software/ptex.png diff --git a/img/program/python.png b/img/software/python.png similarity index 100% rename from img/program/python.png rename to img/software/python.png diff --git a/img/program/pythonBG.png b/img/software/pythonBG.png similarity index 100% rename from img/program/pythonBG.png rename to img/software/pythonBG.png diff --git a/img/program/qt.png b/img/software/qt.png similarity index 100% rename from img/program/qt.png rename to img/software/qt.png diff --git a/img/program/quicktimeplayer.png b/img/software/quicktimeplayer.png similarity index 100% rename from img/program/quicktimeplayer.png rename to img/software/quicktimeplayer.png diff --git a/img/program/redshift.png b/img/software/redshift.png similarity index 100% rename from img/program/redshift.png rename to img/software/redshift.png diff --git a/img/program/renderman.png b/img/software/renderman.png similarity index 100% rename from img/program/renderman.png rename to img/software/renderman.png diff --git a/img/program/rv.png b/img/software/rv.png similarity index 100% rename from img/program/rv.png rename to img/software/rv.png diff --git a/img/program/unity.png b/img/software/unity.png similarity index 100% rename from img/program/unity.png rename to img/software/unity.png diff --git a/img/program/vlc.png b/img/software/vlc.png similarity index 100% rename from img/program/vlc.png rename to img/software/vlc.png diff --git a/img/program/vray.png b/img/software/vray.png similarity index 100% rename from img/program/vray.png rename to img/software/vray.png diff --git a/img/program/yeti.png b/img/software/yeti.png similarity index 100% rename from img/program/yeti.png rename to img/software/yeti.png diff --git a/img/program/zbrush.png b/img/software/zbrush.png similarity index 100% rename from img/program/zbrush.png rename to img/software/zbrush.png diff --git a/lib/classes/3960fc68-c127-4ea1-a87d-b7d86570c9f1.dmp b/lib/classes/3960fc68-c127-4ea1-a87d-b7d86570c9f1.dmp new file mode 100644 index 0000000..a1e4398 Binary files /dev/null and b/lib/classes/3960fc68-c127-4ea1-a87d-b7d86570c9f1.dmp differ diff --git a/lib/classes/software.py b/lib/classes/software.py index 1f18c05..fe8ec5b 100644 --- a/lib/classes/software.py +++ b/lib/classes/software.py @@ -77,10 +77,13 @@ def add_env(self): #************************ # SOFTWARE - def start(self, open_file=''): + def start(self, software='', open_file=''): + if software: self.setup(software) self.add_env() cmd = self._software_data['start'].format(open_file) + if self._software == 'maya' and not open_file: + cmd = cmd.split('-file')[0] LOG.debug(cmd) subprocess.Popen(cmd, shell=True, env=os.environ) @@ -136,17 +139,24 @@ def add_menu(self, menu_node, new_command): continue self.add_menu(sub_menu, item) else: - eval('menu_node.{}'.format(item)) + if self._software == 'maya': + import maya.cmds as cmds + cmd = ('cmds.{}'.format(item)).format(menu_node) + LOG.debug(cmd) + eval(cmd) + if self._software == 'nuke': + eval('menu_node.{}'.format(item)) def print_header(self): space = (20-int(len(os.getenv('PROJECT_NAME'))/2)) - 1 - # project name & user namse + # project name print('') print(chr(218) + chr(196)*38 + chr(191)) print(chr(179) + ' '*space + os.getenv('PROJECT_NAME') + ' '*space + chr(179)) print(chr(192) + chr(196)*38 + chr(217)) + # user name print ('\n' + ' '*12 + 'Welcome ' + getpass.getuser() + '\n') print('PATHS') @@ -163,7 +173,6 @@ def print_header(self): if self._software == 'nuke': print(' {} ON - software/{}/gizmos'.format(chr(254), self._software)) - print('') # ******************** print('SCRIPTS') diff --git a/lib/classes/tank.py b/lib/classes/tank.py index 1c243ef..a3f18bf 100644 --- a/lib/classes/tank.py +++ b/lib/classes/tank.py @@ -1,6 +1,8 @@ import os +import libData + from users import User from software import Software from context import Context @@ -13,7 +15,8 @@ class Tank(Singleton): def init_os(self): # self._notificator = Notificator() # self._notificator.setup() - pass + self._user = User() + self._user.setup() def init_software(self): @@ -39,3 +42,7 @@ def user(self): @property def context(self): return self._context + + @property + def data(self): + return libData.get_data() diff --git a/lib/classes/users.py b/lib/classes/users.py index d8e5cae..bb2956b 100644 --- a/lib/classes/users.py +++ b/lib/classes/users.py @@ -25,10 +25,11 @@ LOG = libLog.init(script=TITLE) class User(Singleton): - def setup(user_id): + def setup(self, user_id=os.getenv('username')): # get user data and set # if not create create - pass + self.create() + def create(self, user_id=os.getenv('username'), name=os.getenv('username'), settings = {}, rights = 'artist'): self._id = user_id # arichter diff --git a/lib/utils/arDesktop.py b/lib/utils/arDesktop.py index 789e488..b7affcb 100644 --- a/lib/utils/arDesktop.py +++ b/lib/utils/arDesktop.py @@ -23,6 +23,7 @@ import libLog import libData import libFunc +from tank import Tank from software import Software TITLE = os.path.splitext(os.path.basename(__file__))[0] @@ -33,15 +34,16 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon): def __init__(self, parent=None): + Tank().init_os() QtGui.QSystemTrayIcon.__init__(self, parent) #self.activated.connect(self.showMainWidget) - self.setIcon(QtGui.QIcon(libData.get_img_path('program/default'))) + self.setIcon(QtGui.QIcon(libData.get_img_path('software/default'))) + self.user = Tank().user self.parent = parent - menu = QtGui.QMenu() - self.user = users.User() + menu = QtGui.QMenu() - self.config_data = libData.get_data() + self.config_data = Tank().data menu.setStyleSheet(self.config_data['style']['arDesktop']['menu']) # ADMIN UI @@ -79,11 +81,11 @@ def __init__(self, parent=None): subMenu.setStyleSheet(self.config_data['style']['arDesktop']['menu']) menu.addMenu(subMenu) - menuItem = subMenu.addAction(QtGui.QIcon(libData.get_img_path('program/maya')), 'Maya') + menuItem = subMenu.addAction(QtGui.QIcon(libData.get_img_path('software/maya')), 'Maya') QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_btnOpenMaya) - menuItem = subMenu.addAction(QtGui.QIcon(libData.get_img_path('program/nuke')), 'Nuke') + menuItem = subMenu.addAction(QtGui.QIcon(libData.get_img_path('software/nuke')), 'Nuke') QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_btnOpenNuke) - # menuItem = subMenu.addAction(QtGui.QIcon(libData.get_img_path('program/houdini')), 'Houdini') + # menuItem = subMenu.addAction(QtGui.QIcon(libData.get_img_path('software/houdini')), 'Houdini') # QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_btnOpenHoudini) menu.addSeparator() @@ -112,11 +114,11 @@ def startArNotificator(self): # PRESS_TRIGGER def press_btnShowUserData(self): LOG.debug('showUserData') - webbrowser.open(libData.getEnv('PROJECT_USER_PATH')) + webbrowser.open(libData.get_env('PROJECT_USER_PATH')) def press_btnOpenProjectPath(self): LOG.debug('openProjectPath') - webbrowser.open(libData.getEnv('PROJECT_PATH')) + webbrowser.open(libData.get_env('PROJECT_PATH')) #------------------------------ def press_btnProject(self): import arProject @@ -124,23 +126,22 @@ def press_btnProject(self): #------------------------------ def press_btnOpenMaya(self): LOG.debug('Maya') - Software('maya').start_software() + Software().start('maya') def press_btnOpenNuke(self): LOG.debug('Nuke') - Software('nuke').start_software() - + Software().start('nuke') def press_btnOpenHoudini(self): LOG.debug('Houdini') - Software().start_software() + Software().start('houdini') #------------------------------ def press_btnOpenProjectLog(self): - webbrowser.open(libData.getEnv('DATA_PROJECT_PATH')) + webbrowser.open(libData.get_env('DATA_PROJECT_PATH')) def press_btnOpenLocalLog(self): - webbrowser.open(libData.getEnv('DATA_USER_PATH')) + webbrowser.open(libData.get_env('DATA_USER_PATH')) def press_btnWriteReminder(self): LOG.debug('writeReminder') diff --git a/software/maya/userSetup.py b/software/maya/userSetup.py index 53794b9..377b9a0 100644 --- a/software/maya/userSetup.py +++ b/software/maya/userSetup.py @@ -18,21 +18,21 @@ import maya.cmds as cmds import libLog -from software import Software +from tank import Tank -TITLE = os.path.splitext(os.path.basename(__file__))[0] +TITLE = 'userSetup' # os.path.splitext(os.path.basename(__file__))[0] LOG = libLog.init(script=TITLE) #************************ # PRINT CONSOLE -Software.print_header() +Tank().init_software() print "" print "MENU" try: - cmds.evalDeferred("from scripts import menu\nmenu.arMenuLoad()") + cmds.evalDeferred("from scripts import menu\nmenu.load_menu()") print " ON - menu" print " ON - shelf" except: diff --git a/software/nuke/gizmos/arWrite.gizmo b/software/nuke/gizmos/arWrite.gizmo index cc7de17..c553679 100644 --- a/software/nuke/gizmos/arWrite.gizmo +++ b/software/nuke/gizmos/arWrite.gizmo @@ -1,17 +1,17 @@ -#! C:/Program Files/Nuke9.0v7/nuke-9.0.7.dll -nx -version 9.0 v7 +#! C:/Program Files/Nuke10.5v1/nuke-10.5.1.dll -nx +version 10.5 v1 Gizmo { - help "Plex\nv0.0.1\n© Alexander Richter" - onCreate writeNode.nodeCreate() - knobChanged "\n\ncurrentNode = nuke.thisNode()\n\n# EXR\nif currentNode\[\"chbExr\"].getValue():\n currentNode\[\"exrPath\"].setEnabled(True) \n currentNode\[\"exrRv\"].setEnabled(True) \n currentNode\[\"exrFolder\"].setEnabled(True)\nelse:\n currentNode\[\"exrPath\"].setEnabled(False) \n currentNode\[\"exrRv\"].setEnabled(False) \n currentNode\[\"exrFolder\"].setEnabled(False) \n\n# JPG\nif currentNode\[\"chbJpg\"].getValue():\n currentNode\[\"jpgPath\"].setEnabled(True) \n currentNode\[\"jpgRv\"].setEnabled(True) \n currentNode\[\"jpgFolder\"].setEnabled(True)\nelse:\n currentNode\[\"jpgPath\"].setEnabled(False) \n currentNode\[\"jpgRv\"].setEnabled(False) \n currentNode\[\"jpgFolder\"].setEnabled(False) \n\n# TIF\nif currentNode\[\"chbTif\"].getValue():\n currentNode\[\"tifPath\"].setEnabled(True) \n currentNode\[\"tifRv\"].setEnabled(True) \n currentNode\[\"tifFolder\"].setEnabled(True)\nelse:\n currentNode\[\"tifPath\"].setEnabled(False) \n currentNode\[\"tifRv\"].setEnabled(False) \n currentNode\[\"tifFolder\"].setEnabled(False) \n\n# RATIO\nif currentNode\[\"letterbox\"].value() == \"custom\":\n currentNode\[\"resolutionX\"].setEnabled(True) \n currentNode\[\"resolutionY\"].setEnabled(True) \n\nelse:\n currentNode\[\"resolutionX\"].setEnabled(False) \n currentNode\[\"resolutionY\"].setEnabled(False)\n\n ratio = int(currentNode\[\"letterbox\"].value().split(\":\")\[0]) / int(currentNode\[\"letterbox\"].value().split(\":\")\[1])\n\n if (currentNode.width() / currentNode.height()) == ratio:\n currentNode\[\"resolutionX\"].setValue(currentNode.width())\n currentNode\[\"resolutionY\"].setValue(currentNode.height())\n elif (currentNode.width() / currentNode.height()) < ratio:\n currentNode\[\"resolutionX\"].setValue(currentNode.width())\n currentNode\[\"resolutionY\"].setValue(currentNode.width() / ratio)\n elif ratio == 1.0:\n currentNode\[\"resolutionX\"].setValue(currentNode.height())\n currentNode\[\"resolutionY\"].setValue(currentNode.height())\t\n else:\n currentNode\[\"resolutionX\"].setValue(currentNode.width() / ratio)\n currentNode\[\"resolutionY\"].setValue(currentNode.height() )\n\n\n# FRAME RANGE\nif currentNode\[\"frameRangeMode\"].value() == \"custom\":\n currentNode\[\"frameStart\"].setEnabled(True) \n currentNode\[\"frameEnd\"].setEnabled(True) \n\nelse:\n currentNode\[\"frameStart\"].setEnabled(False) \n currentNode\[\"frameEnd\"].setEnabled(False)\n currentNode\[\"frameStart\"].setValue(int(nuke.Root()\['first_frame'].getValue()))\n currentNode\[\"frameEnd\"].setValue(int(nuke.Root()\['last_frame'].getValue()))\n\n\n# META\nif currentNode\[\"meta\"].getValue():\n #currentNode\[\"status\"].setEnabled(True) \n currentNode\[\"comment\"].setEnabled(True) \nelse:\n #currentNode\[\"status\"].setEnabled(False) \n currentNode\[\"comment\"].setEnabled(False) \n\n# THREADS\nif currentNode\[\"submit\"].getValue() == 0.0:\n currentNode\[\"threads\"].setVisible(True)\n currentNode\[\"space01\"].setVisible(True)\nelse:\n currentNode\[\"threads\"].setVisible(False)\n currentNode\[\"space01\"].setVisible(False)\n\n" + help "Plex\nv0.1.0\n© Alexander Richter" + onCreate write_node.nodeCreate() + knobChanged "\n\ncurrentNode = nuke.thisNode()\n\n# EXR\nif currentNode\[\"chbExr\"].getValue():\n currentNode\[\"exrPath\"].setEnabled(True) \n currentNode\[\"exrRv\"].setEnabled(True) \n currentNode\[\"exrFolder\"].setEnabled(True)\nelse:\n currentNode\[\"exrPath\"].setEnabled(False) \n currentNode\[\"exrRv\"].setEnabled(False) \n currentNode\[\"exrFolder\"].setEnabled(False) \n\n# JPG\nif currentNode\[\"chbJpg\"].getValue():\n currentNode\[\"jpgPath\"].setEnabled(True) \n currentNode\[\"jpgRv\"].setEnabled(True) \n currentNode\[\"jpgFolder\"].setEnabled(True)\nelse:\n currentNode\[\"jpgPath\"].setEnabled(False) \n currentNode\[\"jpgRv\"].setEnabled(False) \n currentNode\[\"jpgFolder\"].setEnabled(False) \n\n# TIF\nif currentNode\[\"chbTif\"].getValue():\n currentNode\[\"tifPath\"].setEnabled(True) \n currentNode\[\"tifRv\"].setEnabled(True) \n currentNode\[\"tifFolder\"].setEnabled(True)\nelse:\n currentNode\[\"tifPath\"].setEnabled(False) \n currentNode\[\"tifRv\"].setEnabled(False) \n currentNode\[\"tifFolder\"].setEnabled(False) \n\n# RATIO\nif currentNode\[\"letterbox\"].value() == \"custom\":\n currentNode\[\"resolutionX\"].setEnabled(True) \n currentNode\[\"resolutionY\"].setEnabled(True) \n\nelse:\n currentNode\[\"resolutionX\"].setEnabled(False) \n currentNode\[\"resolutionY\"].setEnabled(False)\n\n ratio = int(currentNode\[\"letterbox\"].value().split(\":\")\[0]) / int(currentNode\[\"letterbox\"].value().split(\":\")\[1])\n\n if (currentNode.width() / currentNode.height()) == ratio:\n currentNode\[\"resolutionX\"].setValue(currentNode.width())\n currentNode\[\"resolutionY\"].setValue(currentNode.height())\n elif (currentNode.width() / currentNode.height()) < ratio:\n currentNode\[\"resolutionX\"].setValue(currentNode.width())\n currentNode\[\"resolutionY\"].setValue(currentNode.width() / ratio)\n elif ratio == 1.0:\n currentNode\[\"resolutionX\"].setValue(currentNode.height())\n currentNode\[\"resolutionY\"].setValue(currentNode.height())\t\n else:\n currentNode\[\"resolutionX\"].setValue(currentNode.width() / ratio)\n currentNode\[\"resolutionY\"].setValue(currentNode.height() )\n\n\n# FRAME RANGE\nif currentNode\[\"customRange\"].getValue():\n currentNode\[\"frameStart\"].setEnabled(True) \n currentNode\[\"frameEnd\"].setEnabled(True) \n\nelse:\n currentNode\[\"frameStart\"].setEnabled(False) \n currentNode\[\"frameEnd\"].setEnabled(False)\n currentNode\[\"frameStart\"].setValue(int(nuke.Root()\['first_frame'].getValue()))\n currentNode\[\"frameEnd\"].setValue(int(nuke.Root()\['last_frame'].getValue()))\n\n\n# META\nif currentNode\[\"meta\"].getValue():\n #currentNode\[\"status\"].setEnabled(True) \n currentNode\[\"comment\"].setEnabled(True) \nelse:\n #currentNode\[\"status\"].setEnabled(False) \n currentNode\[\"comment\"].setEnabled(False) \n\n# THREADS\nif currentNode\[\"submit\"].getValue() == 0.0:\n currentNode\[\"threads\"].setVisible(True)\n currentNode\[\"space01\"].setVisible(True)\nelse:\n currentNode\[\"threads\"].setVisible(False)\n currentNode\[\"space01\"].setVisible(False)\n\n" tile_color 0xff5106ff addUserKnob {20 arWrite} - addUserKnob {52 knobChangedCode T "nuke.thisNode().knob('knobChanged').setValue('''\n\ncurrentNode = nuke.thisNode()\n\n# EXR\nif currentNode\[\"chbExr\"].getValue():\n currentNode\[\"exrPath\"].setEnabled(True) \n currentNode\[\"exrRv\"].setEnabled(True) \n currentNode\[\"exrFolder\"].setEnabled(True)\nelse:\n currentNode\[\"exrPath\"].setEnabled(False) \n currentNode\[\"exrRv\"].setEnabled(False) \n currentNode\[\"exrFolder\"].setEnabled(False) \n\n# JPG\nif currentNode\[\"chbJpg\"].getValue():\n currentNode\[\"jpgPath\"].setEnabled(True) \n currentNode\[\"jpgRv\"].setEnabled(True) \n currentNode\[\"jpgFolder\"].setEnabled(True)\nelse:\n currentNode\[\"jpgPath\"].setEnabled(False) \n currentNode\[\"jpgRv\"].setEnabled(False) \n currentNode\[\"jpgFolder\"].setEnabled(False) \n\n# TIF\nif currentNode\[\"chbTif\"].getValue():\n currentNode\[\"tifPath\"].setEnabled(True) \n currentNode\[\"tifRv\"].setEnabled(True) \n currentNode\[\"tifFolder\"].setEnabled(True)\nelse:\n currentNode\[\"tifPath\"].setEnabled(False) \n currentNode\[\"tifRv\"].setEnabled(False) \n currentNode\[\"tifFolder\"].setEnabled(False) \n\n# RATIO\nif currentNode\[\"letterbox\"].value() == \"custom\":\n currentNode\[\"resolutionX\"].setEnabled(True) \n currentNode\[\"resolutionY\"].setEnabled(True) \n\nelse:\n currentNode\[\"resolutionX\"].setEnabled(False) \n currentNode\[\"resolutionY\"].setEnabled(False)\n\n ratio = int(currentNode\[\"letterbox\"].value().split(\":\")\[0]) / int(currentNode\[\"letterbox\"].value().split(\":\")\[1])\n\n if (currentNode.width() / currentNode.height()) == ratio:\n currentNode\[\"resolutionX\"].setValue(currentNode.width())\n currentNode\[\"resolutionY\"].setValue(currentNode.height())\n elif (currentNode.width() / currentNode.height()) < ratio:\n currentNode\[\"resolutionX\"].setValue(currentNode.width())\n currentNode\[\"resolutionY\"].setValue(currentNode.width() / ratio)\n elif ratio == 1.0:\n currentNode\[\"resolutionX\"].setValue(currentNode.height())\n currentNode\[\"resolutionY\"].setValue(currentNode.height())\t\n else:\n currentNode\[\"resolutionX\"].setValue(currentNode.width() / ratio)\n currentNode\[\"resolutionY\"].setValue(currentNode.height() )\n\n\n# FRAME RANGE\nif currentNode\[\"frameRangeMode\"].value() == \"custom\":\n currentNode\[\"frameStart\"].setEnabled(True) \n currentNode\[\"frameEnd\"].setEnabled(True) \n\nelse:\n currentNode\[\"frameStart\"].setEnabled(False) \n currentNode\[\"frameEnd\"].setEnabled(False)\n currentNode\[\"frameStart\"].setValue(int(nuke.Root()\['first_frame'].getValue()))\n currentNode\[\"frameEnd\"].setValue(int(nuke.Root()\['last_frame'].getValue()))\n\n\n# META\nif currentNode\[\"meta\"].getValue():\n #currentNode\[\"status\"].setEnabled(True) \n currentNode\[\"comment\"].setEnabled(True) \nelse:\n #currentNode\[\"status\"].setEnabled(False) \n currentNode\[\"comment\"].setEnabled(False) \n\n# THREADS\nif currentNode\[\"submit\"].getValue() == 0.0:\n currentNode\[\"threads\"].setVisible(True)\n currentNode\[\"space01\"].setVisible(True)\nelse:\n currentNode\[\"threads\"].setVisible(False)\n currentNode\[\"space01\"].setVisible(False)\n\n''')" +STARTLINE} - addUserKnob {52 GroupHelpIcon T "nuke.thisNode().knob('help').setValue(\"Plex\\nv0.5.0\\n© Alexander Richter\")" +STARTLINE} + addUserKnob {52 knobChangedCode T "nuke.thisNode().knob('knobChanged').setValue('''\n\ncurrentNode = nuke.thisNode()\n\n# EXR\nif currentNode\[\"chbExr\"].getValue():\n currentNode\[\"exrPath\"].setEnabled(True) \n currentNode\[\"exrRv\"].setEnabled(True) \n currentNode\[\"exrFolder\"].setEnabled(True)\nelse:\n currentNode\[\"exrPath\"].setEnabled(False) \n currentNode\[\"exrRv\"].setEnabled(False) \n currentNode\[\"exrFolder\"].setEnabled(False) \n\n# JPG\nif currentNode\[\"chbJpg\"].getValue():\n currentNode\[\"jpgPath\"].setEnabled(True) \n currentNode\[\"jpgRv\"].setEnabled(True) \n currentNode\[\"jpgFolder\"].setEnabled(True)\nelse:\n currentNode\[\"jpgPath\"].setEnabled(False) \n currentNode\[\"jpgRv\"].setEnabled(False) \n currentNode\[\"jpgFolder\"].setEnabled(False) \n\n# TIF\nif currentNode\[\"chbTif\"].getValue():\n currentNode\[\"tifPath\"].setEnabled(True) \n currentNode\[\"tifRv\"].setEnabled(True) \n currentNode\[\"tifFolder\"].setEnabled(True)\nelse:\n currentNode\[\"tifPath\"].setEnabled(False) \n currentNode\[\"tifRv\"].setEnabled(False) \n currentNode\[\"tifFolder\"].setEnabled(False) \n\n# RATIO\nif currentNode\[\"letterbox\"].value() == \"custom\":\n currentNode\[\"resolutionX\"].setEnabled(True) \n currentNode\[\"resolutionY\"].setEnabled(True) \n\nelse:\n currentNode\[\"resolutionX\"].setEnabled(False) \n currentNode\[\"resolutionY\"].setEnabled(False)\n\n ratio = int(currentNode\[\"letterbox\"].value().split(\":\")\[0]) / int(currentNode\[\"letterbox\"].value().split(\":\")\[1])\n\n if (currentNode.width() / currentNode.height()) == ratio:\n currentNode\[\"resolutionX\"].setValue(currentNode.width())\n currentNode\[\"resolutionY\"].setValue(currentNode.height())\n elif (currentNode.width() / currentNode.height()) < ratio:\n currentNode\[\"resolutionX\"].setValue(currentNode.width())\n currentNode\[\"resolutionY\"].setValue(currentNode.width() / ratio)\n elif ratio == 1.0:\n currentNode\[\"resolutionX\"].setValue(currentNode.height())\n currentNode\[\"resolutionY\"].setValue(currentNode.height())\t\n else:\n currentNode\[\"resolutionX\"].setValue(currentNode.width() / ratio)\n currentNode\[\"resolutionY\"].setValue(currentNode.height() )\n\n\n# FRAME RANGE\nif currentNode\[\"customRange\"].getValue():\n currentNode\[\"frameStart\"].setEnabled(True) \n currentNode\[\"frameEnd\"].setEnabled(True) \n\nelse:\n currentNode\[\"frameStart\"].setEnabled(False) \n currentNode\[\"frameEnd\"].setEnabled(False)\n currentNode\[\"frameStart\"].setValue(int(nuke.Root()\['first_frame'].getValue()))\n currentNode\[\"frameEnd\"].setValue(int(nuke.Root()\['last_frame'].getValue()))\n\n\n# META\nif currentNode\[\"meta\"].getValue():\n #currentNode\[\"status\"].setEnabled(True) \n currentNode\[\"comment\"].setEnabled(True) \nelse:\n #currentNode\[\"status\"].setEnabled(False) \n currentNode\[\"comment\"].setEnabled(False) \n\n# THREADS\nif currentNode\[\"submit\"].getValue() == 0.0:\n currentNode\[\"threads\"].setVisible(True)\n currentNode\[\"space01\"].setVisible(True)\nelse:\n currentNode\[\"threads\"].setVisible(False)\n currentNode\[\"space01\"].setVisible(False)\n\n''')" +STARTLINE} + addUserKnob {52 GroupHelpIcon T "nuke.thisNode().knob('help').setValue(\"Plex\\nv0.1.0\\n© Alexander Richter\")" +STARTLINE} addUserKnob {26 banner l @writeBanner52.png t " arWRITE
pipeline write node
" T " arWRITE
pipeline write node
"} addUserKnob {26 ""} addUserKnob {2 rootPath l INVISIBLE +INVISIBLE} - rootPath P:/project/shots/s0010/comp/s0010_COMP_v001_ar.%04d.exr + rootPath C:/Users/arichter/Desktop/RENDER/test/exr/test.%04d.exr addUserKnob {4 status l Status M {" " "plate " preViz postViz preComp postComp comp final "" "" ""}} addUserKnob {26 space4 l "" -STARTLINE T " | "} addUserKnob {6 chbPublish l PUBLISH t "Publish for EDIT (overwrite old publish)" -STARTLINE} @@ -20,63 +20,63 @@ Gizmo { addUserKnob {6 chbExr l " " -STARTLINE} chbExr true addUserKnob {2 exrPath l "" -STARTLINE} - exrPath P:/project/shots/s0010/comp/s0010_COMP_v001_ar.%04d.exr - addUserKnob {22 exrFolder l @btnFolder48.png t "open render folder" -STARTLINE T "reload(writeNode)\nwriteNode.openFolder(nuke.thisNode()\[\"exrPathComment\"].getValue())"} - addUserKnob {22 exrRv l @rv.png t "open rendering in rv player" -STARTLINE T "reload(writeNode)\nwriteNode.openRV(nuke.thisNode()\[\"exrPathComment\"].getValue())"} + exrPath C:/Users/arichter/Desktop/RENDER/test/exr/test.%04d.exr + addUserKnob {22 exrFolder l @btnFolder48c.png t "open render folder" -STARTLINE T "write_node.openFolder(nuke.thisNode()\[\"exrPath\"].getValue())"} + addUserKnob {22 exrRv l @rv.png t "open rendering in rv player" -STARTLINE T "write_node.openRV(nuke.thisNode()\[\"exrPath\"].getValue())"} addUserKnob {26 lblJpg l "JPG " T ""} addUserKnob {6 chbJpg l " " -STARTLINE} chbJpg true addUserKnob {2 jpgPath l "" -STARTLINE} - jpgPath M:/LosMariachis/project/episode01/shots/sWin001002003/images/sWin010_COMP_v001_ar/jpg/sWin010_COMP_v001_ar.%04d.jpg - addUserKnob {22 jpgFolder l @btnFolder48.png t "open render folder" -STARTLINE T "reload(writeNode)\nwriteNode.openFolder(nuke.thisNode()\[\"jpgPathComment\"].getValue())"} - addUserKnob {22 jpgRv l @rv.png t "open rendering in rv player" -STARTLINE T "reload(writeNode)\nwriteNode.openRV(nuke.thisNode()\[\"jpgPathComment\"].getValue())"} + jpgPath C:/Users/arichter/Desktop/RENDER/test/jpg/test.%04d.jpg + addUserKnob {22 jpgFolder l @btnFolder48c.png t "open render folder" -STARTLINE T "write_node.openFolder(nuke.thisNode()\[\"jpgPath\"].getValue())"} + addUserKnob {22 jpgRv l @rv.png t "open rendering in rv player" -STARTLINE T "write_node.openRV(nuke.thisNode()\[\"jpgPath\"].getValue())"} addUserKnob {26 lblTif l "TIF " T ""} addUserKnob {6 chbTif l " " -STARTLINE} addUserKnob {2 tifPath l "" -STARTLINE +DISABLED} - tifPath M:/LosMariachis/project/episode01/shots/sWin001002003/images/sWin010_COMP_v001_ar/tif/sWin010_COMP_v001_ar.%04d.tif - addUserKnob {22 tifFolder l @btnFolder48.png t "open render folder" -STARTLINE +DISABLED T "reload(writeNode)\nwriteNode.openFolder(nuke.thisNode()\[\"tifPathComment\"].getValue())"} - addUserKnob {22 tifRv l @rv.png t "open rendering in rv player" -STARTLINE +DISABLED T "reload(writeNode)\nwriteNode.openRV(nuke.thisNode()\[\"tifPathComment\"].getValue())"} + tifPath C:/Users/arichter/Desktop/RENDER/test/tif/test.%04d.tif + addUserKnob {22 tifFolder l @btnFolder48c.png t "open render folder" -STARTLINE +DISABLED T "write_node.openFolder(nuke.thisNode()\[\"tifPath\"].getValue())"} + addUserKnob {22 tifRv l @rv.png t "open rendering in rv player" -STARTLINE +DISABLED T "write_node.openRV(nuke.thisNode()\[\"tifPath\"].getValue())"} addUserKnob {1 exrPathComment l INVISIBLE +INVISIBLE} exrPathComment P:/project/shots/s0010/comp/s0010_COMP_v001_ar.%04d.exr addUserKnob {1 jpgPathComment l INVISIBLE +INVISIBLE} - jpgPathComment M:/LosMariachis/project/episode01/shots/sWin001002003/images/sWin010_COMP_v001_ar/jpg/sWin010_COMP_v001_ar.%04d.jpg + jpgPathComment P:/project/shots/s0010/comp/s0010_COMP_v001_ar.%04d.jpg addUserKnob {1 tifPathComment l INVISIBLE +INVISIBLE} - tifPathComment M:/LosMariachis/project/episode01/shots/sWin001002003/images/sWin010_COMP_v001_ar/tif/sWin010_COMP_v001_ar.%04d.tif + tifPathComment P:/project/shots/s0010/comp/s0010_COMP_v001_ar.%04d.tif addUserKnob {26 ""} addUserKnob {3 resolutionX l Resolution +DISABLED} - resolutionX 1920 + resolutionX 822.8571429 addUserKnob {3 resolutionY l "x " -STARTLINE +DISABLED} - resolutionY 1080 + resolutionY 817 addUserKnob {26 space7 l "" -STARTLINE T " | "} addUserKnob {4 letterbox l "Letterbox " -STARTLINE M {1:1 4:3 14:9 16:9 21:9 custom "" "" "" "" "" "" ""}} - letterbox 16:9 + letterbox 21:9 addUserKnob {6 reformat l Reformat -STARTLINE} - reformat true addUserKnob {3 frameStart l "Frame Range" +DISABLED} frameStart 1 addUserKnob {3 frameEnd l "- " -STARTLINE +DISABLED} - frameEnd 46 + frameEnd 104 addUserKnob {26 space14 l "" -STARTLINE T " | "} - addUserKnob {4 frameRangeMode l "Mode " -STARTLINE M {shot custom "" "" "" "" "" "" "" "" "" ""}} + addUserKnob {6 customRange l "custom range" -STARTLINE} addUserKnob {26 ""} addUserKnob {26 lblMeta l "Meta " T ""} addUserKnob {6 meta l "" t "with or without meta informations" -STARTLINE} + meta true addUserKnob {26 space06 l "" -STARTLINE T " | "} - addUserKnob {1 comment l "Comment " -STARTLINE +DISABLED} + addUserKnob {1 comment l "Comment " -STARTLINE} addUserKnob {26 ""} addUserKnob {4 submit l Submit M {renderthreads rrSubmit local}} addUserKnob {26 space01 l "" -STARTLINE T " | "} addUserKnob {3 threads l Threads -STARTLINE} threads 12 addUserKnob {26 ""} - addUserKnob {22 render l RENDER T "reload(writeNode)\nwriteNode.render()" +STARTLINE} + addUserKnob {22 render l RENDER T write_node.render() +STARTLINE} addUserKnob {26 ""} - addUserKnob {26 copyright l "" +STARTLINE T "Plex | v0.0.1 | © Alexander Richter | 2017"} + addUserKnob {26 copyright l "" +STARTLINE T "Plex | v0.1.0 | © Alexander Richter | 2017"} addUserKnob {20 metaTab l Meta} addUserKnob {7 meta_opacity l "Opacity (Meta)"} - meta_opacity 0.5 + meta_opacity 0.415 addUserKnob {7 opacityLetterbox l "Opacity (Letterbox)"} - opacityLetterbox 0.6 + opacityLetterbox 1 addUserKnob {26 ""} addUserKnob {6 meta_project l Project +STARTLINE} meta_project true @@ -107,29 +107,13 @@ Gizmo { addUserKnob {7 jpgQuality l jpg} jpgQuality 0.75 } - Text { - inputs 0 - opacity {{"\[value parent.meta_opacity]" x1 0.2}} - message "\[file rootname \[file tail \[value root.name] ] ]" - font C:/Windows/Fonts/impact.ttf - size {{curve x1 40}} - xjustify center - yjustify center - box {516 1091 1540 1137} - center {1024 576} - name text_master - tile_color 0x1fff00ff - xpos -219 - ypos -85 - disable {{curve x1 0}} - } Input { inputs 0 name Input1 xpos -42 ypos -180 } -set N8dbd8800 [stack 0] +set Ncc011000 [stack 0] Dot { name Dot4 xpos -184 @@ -148,7 +132,7 @@ set N8dbd8800 [stack 0] name text_user xpos -218 ypos -135 - disable {{"!\[value parent.meta_frames]"}} + disable {{"!\[value parent.meta_user]" x57 1}} } Text { opacity {{text_master.opacity}} @@ -163,7 +147,7 @@ set N8dbd8800 [stack 0] name text_file xpos -340 ypos -135 - disable {{"!\[value parent.meta_file]"}} + disable {{"!\[value parent.meta_file]" x57 1}} } Text { opacity {{text_master.opacity}} @@ -178,11 +162,11 @@ set N8dbd8800 [stack 0] name text_comment xpos -340 ypos -90 - disable {{"!\[value parent.meta_comment]"}} + disable {{"!\[value parent.meta_comment]" x57 1}} } Text { opacity {{text_master.opacity}} - message "\[python \{s.PROJECT_NAME\}]" + message "\[python \{os.getenv('PROJECT_NAME')\}]" font C:/Windows/Fonts/impact.ttf size {{text_master.size}} yjustify top @@ -200,7 +184,7 @@ set N8dbd8800 [stack 0] font_height_toolbar 100 opacity {{text_master.opacity}} message "\[date %d.%m.%Y] \[date %H:%M]" - old_message {{49 54 46 48 51 46 50 48 49 54 32 32 49 57 58 51 53} + old_message {{50 57 46 48 54 46 50 48 49 55 32 32 49 52 58 51 54} } old_expression_markers {{0 9 12 16} } @@ -237,7 +221,7 @@ set N8dbd8800 [stack 0] name text_status xpos -333 ypos 11 - disable {{"!\[value parent.meta_status]"}} + disable {{"!\[value parent.meta_status]" x57 1}} } Text { opacity {{text_master.opacity}} @@ -247,35 +231,36 @@ set N8dbd8800 [stack 0] xjustify right yjustify top Transform 1 - box {{"\[value input.width] / 2 - 244" x1 768.3573967 x301 816} -72 {"\[value input.width] / 2 + 210" x301 1106} -34} + box {{"\[value input.width] / 2 - 100" x1 768.3573967 x301 816} -72 {"\[value input.width] / 2 + 100" x301 1106} -34} scale {1 0.8600000143} center {1024 576} name text_frames xpos -333 ypos 60 - disable {{"!\[value parent.meta_frames]" x301 1}} + disable {{"!\[value parent.meta_frames]" x57 1 x301 1}} } Text { opacity {{text_master.opacity}} - message "\[value parent.resolutionX] x \[value parent.resolutionY]" + message "\[value parent.resolutionX] x \[value parent.resolutionY]\n" font C:/Windows/Fonts/impact.ttf size {{text_master.size}} xjustify right yjustify center Transform 1 - box {1574 56 1907 20} + box {1574 0 1907 20} center {1024 576} name text_resolution + selected true xpos -219 ypos 10 - disable {{"!\[value parent.meta_frames]"}} + disable {{"!\[value parent.meta_resolution]" x57 1}} } Dot { name Dot5 xpos -185 ypos 110 } -push $N8dbd8800 +push $Ncc011000 Switch { inputs 2 which {{"\[value parent.meta]"}} @@ -288,20 +273,19 @@ push $N8dbd8800 xpos -8 ypos 132 } -set Na1f31800 [stack 0] +set N22e14400 [stack 0] Dot { name Dot7 xpos 96 ypos 250 } -set Na1f31400 [stack 0] -push $Na1f31800 +set N22e14000 [stack 0] +push $N22e14400 Crop { box {{"(input.width - parent.resolutionX) / 2" x113 0 x122 0} {"(input.height - parent.resolutionY) / 2" x122 0} {"parent.resolutionX + (input.width - parent.resolutionX) / 2" x113 1920 x122 1920} {"input.height - (input.height - parent.resolutionY) / 2" x113 1080 x122 1080}} reformat {{parent.reformat x40 0}} crop false name crop1 - selected true xpos -42 ypos 182 } @@ -313,7 +297,7 @@ push $Na1f31800 xpos -42 ypos 246 } -push $Na1f31400 +push $N22e14000 Switch { inputs 2 which 1 @@ -321,58 +305,79 @@ push $Na1f31400 xpos -42 ypos 324 } -set Na1f30800 [stack 0] +set Nfc5a0d80 [stack 0] + Output { + name Output1 + xpos -42 + ypos 467 + } + Text { + inputs 0 + opacity {{"\[value parent.meta_opacity]" x1 0.2}} + message "\[file rootname \[file tail \[value root.name] ] ]" + font C:/Windows/Fonts/impact.ttf + size {{curve x1 40}} + xjustify center + yjustify center + box {516 1091 1540 1137} + center {1024 576} + name text_master + tile_color 0x1fff00ff + xpos -219 + ypos -85 + disable {{curve x1 0 x57 0}} + } +push $Nfc5a0d80 Dot { name Dot1 xpos 269 ypos 328 } -set Na1f30400 [stack 0] +set N12017400 [stack 0] Write { - file "\[value parent.jpgPathComment]" - file_type jpeg - _jpeg_quality {{parent.jpgQuality}} + file "\[value parent.jpgPath]" checkHashOnRead false version 1 - afterRender "writeNode.publishRender(\"jpg\")" + afterRender "write_node.publishRender(\"jpg\")" name Write_JPG xpos 379 ypos 294 disable {{!parent.chbJpg}} postage_stamp true + addUserKnob {20 caravr l CaraVR} + addUserKnob {4 viewPresets l "View Presets" M {main stereo cams all}} + addUserKnob {22 set l Set -STARTLINE T "w = nuke.thisNode()\nscriptViews = nuke.views()\nviewPreset = w\['viewPresets'].getValue()\nselectedViews = None\nif viewPreset == 0:\n selectedViews = \['main']\nif viewPreset == 1:\n stereoViews = \['left', 'right']\n if set(stereoViews).issubset(set(scriptViews)):\n selectedViews = stereoViews\n else:\n selectedViews = None\nelif viewPreset == 2:\n selectedViews = \[v for v in scriptViews if 'cam' in v.lower()]\nelif viewPreset == 3:\n selectedViews = scriptViews\nif selectedViews:\n w\['views'].fromScript(' '.join(selectedViews))\n"} } -push $Na1f30400 +push $N12017400 Write { channels rgba - file "\[value parent.tifPathComment]" - colorspace sRGB - file_type tiff - checkHashOnRead false + file "\[value parent.exrPath]" version 1 - afterRender "writeNode.publishRender(\"exr\")" - name Write_Tif + afterRender "write_node.publishRender(\"exr\")" + name Write_EXR xpos 235 - ypos 405 - disable {{!parent.chbTif}} + ypos 177 + disable {{!parent.chbExr}} postage_stamp true + addUserKnob {20 caravr l CaraVR} + addUserKnob {4 viewPresets l "View Presets" M {main stereo cams all}} + addUserKnob {22 set l Set -STARTLINE T "w = nuke.thisNode()\nscriptViews = nuke.views()\nviewPreset = w\['viewPresets'].getValue()\nselectedViews = None\nif viewPreset == 0:\n selectedViews = \['main']\nif viewPreset == 1:\n stereoViews = \['left', 'right']\n if set(stereoViews).issubset(set(scriptViews)):\n selectedViews = stereoViews\n else:\n selectedViews = None\nelif viewPreset == 2:\n selectedViews = \[v for v in scriptViews if 'cam' in v.lower()]\nelif viewPreset == 3:\n selectedViews = scriptViews\nif selectedViews:\n w\['views'].fromScript(' '.join(selectedViews))\n"} } -push $Na1f30800 - Output { - name Output1 - xpos -42 - ypos 467 - } -push $Na1f30400 +push $N12017400 Write { channels rgba - file "\[value parent.exrPathComment]" - file_type exr + file "\[value parent.tifPath]" + colorspace sRGB + checkHashOnRead false version 1 - afterRender "writeNode.publishRender(\"exr\")" - name Write_EXR + afterRender "write_node.publishRender(\"exr\")" + name Write_Tif xpos 235 - ypos 177 - disable {{!parent.chbExr}} + ypos 405 + disable {{!parent.chbTif x57 0}} postage_stamp true + addUserKnob {20 caravr l CaraVR} + addUserKnob {4 viewPresets l "View Presets" M {main stereo cams all}} + addUserKnob {22 set l Set -STARTLINE T "w = nuke.thisNode()\nscriptViews = nuke.views()\nviewPreset = w\['viewPresets'].getValue()\nselectedViews = None\nif viewPreset == 0:\n selectedViews = \['main']\nif viewPreset == 1:\n stereoViews = \['left', 'right']\n if set(stereoViews).issubset(set(scriptViews)):\n selectedViews = stereoViews\n else:\n selectedViews = None\nelif viewPreset == 2:\n selectedViews = \[v for v in scriptViews if 'cam' in v.lower()]\nelif viewPreset == 3:\n selectedViews = scriptViews\nif selectedViews:\n w\['views'].fromScript(' '.join(selectedViews))\n"} } end_group diff --git a/software/nuke/init.py b/software/nuke/init.py index 548c692..6b79d26 100644 --- a/software/nuke/init.py +++ b/software/nuke/init.py @@ -18,8 +18,6 @@ import nuke import libLog -import libData -import libFunc from tank import Tank TITLE = os.path.splitext(os.path.basename(__file__))[0] @@ -28,7 +26,7 @@ #************************ # PIPELINE -all_data = libData.get_data() +all_data = Tank().data project_data = all_data['project'] software_data = all_data['software'] RESOLUTION = (' ').join([str(project_data['resolution'][0]), @@ -55,6 +53,21 @@ def createWriteDir(): Tank().init_software() +try: + print('arWRITE IS ON MAN') + from scripts import write_node + +except: + LOG.warning('FAILED loading write_node') + +# LOAD paths +try: + for paths in os.getenv('SOFTWARE_SUB_PATH').split(';'): + nuke.pluginAddPath(paths) +except: + LOG.warning('FAILED loading SOFTWARE_SUB_PATH') + + print('SETTINGS') # FPS *********************************** try: @@ -84,3 +97,4 @@ def createWriteDir(): print('') # ******************** + diff --git a/software/nuke/menu.py b/software/nuke/menu.py index d4342a5..14f6ee4 100644 --- a/software/nuke/menu.py +++ b/software/nuke/menu.py @@ -17,10 +17,9 @@ import webbrowser import libLog -import libData import libFunc import libFileFolder -from software import Software +from tank import Tank TITLE = os.path.splitext(os.path.basename(__file__))[0] LOG = libLog.init(script=TITLE) @@ -32,13 +31,12 @@ def add_gizmo_menu(menu): for file in os.listdir(paths): if file.endswith('.gizmo'): gizmo = file.replace('.gizmo', '') - menu.addCommand('Gizmos/' + gizmo, 'nuke.tcl({})'.format(gizmo)) + menu.addCommand('Gizmos/' + gizmo, 'nuke.tcl("{}")'.format(gizmo)) def add_write_node(): - from scripts.write import writeNode write = nuke.allNodes('arWrite') for currentNode in write: - writeNode.nodeCreate(currentNode) + write_node.nodeCreate(currentNode) def add_plugin_paths(): # ADD all IMG paths @@ -55,14 +53,14 @@ def add_plugin_paths(): # TOOLBAR add_plugin_paths() -project_data = libData.get_data() -menu_data = project_data['software']['NUKE']['MENU'] -menuNode = nuke.menu('Nodes').addMenu(project_data['project']['name'], icon = 'nuke.ico') +project_data = Tank().data +menu_data = project_data['software']['NUKE']['MENU'] +menuNode = nuke.menu('Nodes').addMenu(project_data['project']['name'], icon = 'nuke.ico') -# nuke.addOnScriptSave(add_write_node) +nuke.addOnScriptSave(add_write_node) for menu_item in menu_data: - Software().add_menu(menuNode, menu_item) + Tank().software.add_menu(menuNode, menu_item) menuNode.addSeparator() @@ -87,6 +85,7 @@ def load(): #******************************** def arWrite(): + reload(write_node) nuke.createNode('arWrite') LOG.info('arWrite') diff --git a/software/nuke/scripts/arWrite.py b/software/nuke/scripts/write_node.py similarity index 53% rename from software/nuke/scripts/arWrite.py rename to software/nuke/scripts/write_node.py index eff8d90..f09bd0c 100644 --- a/software/nuke/scripts/arWrite.py +++ b/software/nuke/scripts/write_node.py @@ -21,92 +21,89 @@ import libLog import libFileFolder +from tank import Tank TITLE = os.path.splitext(os.path.basename(__file__))[0] LOG = libLog.init(script=TITLE) + #************************ # INIT #************************ -def nodeCreate(currentNode=''): - - if currentNode == '': - currentNode = nuke.thisNode() +def nodeCreate(this_node=''): + if this_node == '': this_node = nuke.thisNode() - if currentNode["frameRangeMode"].value() != "custom": - currentNode["frameStart"].setValue(int(nuke.Root()['first_frame'].getValue())) - currentNode["frameEnd"].setValue(int(nuke.Root()['last_frame'].getValue())) + if this_node["customRange"].getValue(): + this_node["frameStart"].setValue(int(nuke.Root()['first_frame'].getValue())) + this_node["frameEnd"].setValue(int(nuke.Root()['last_frame'].getValue())) - currentNode["resolutionX"].setValue(currentNode.width()) - currentNode["resolutionY"].setValue(currentNode.height()) + this_node["resolutionX"].setValue(this_node.width()) + this_node["resolutionY"].setValue(this_node.height()) - fileName = os.path.basename(nuke.root().name()).split(".")[0] - renderPath = os.path.dirname(nuke.root().name()) + "/RENDER/" + fileName + "/exr/" + fileName + ".%04d.exr" + fileName = os.path.basename(nuke.root().name()).split(".")[0] + renderPath = os.path.dirname(nuke.root().name()) + "/RENDER/" + fileName + "/exr/" + fileName + ".%04d.exr" - currentNode["rootPath"].setValue(renderPath) - currentNode["exrPath"].setValue(renderPath) - currentNode["jpgPath"].setValue(renderPath.replace("exr","jpg")) - currentNode["tifPath"].setValue(renderPath.replace("exr","tif")) + this_node["rootPath"].setValue(renderPath) + this_node["exrPath"].setValue(renderPath) + this_node["jpgPath"].setValue(renderPath.replace("exr","jpg")) + this_node["tifPath"].setValue(renderPath.replace("exr","tif")) - # setCommentPath() - LOG.info("START : " + fileName) + LOG.info("START : " + fileName) -def openRV (renderPath): - if not os.path.exists(os.path.dirname(renderPath)) or not os.listdir(os.path.dirname(renderPath)): - LOG.warning("FOLDER : NOT EXISTS : " + renderPath) - return "WARNING: path doesnt exist: " + renderPath +def openRV(path): + if not os.path.exists(os.path.dirname(path)) or not os.listdir(os.path.dirname(path)): + LOG.warning("FOLDER : NOT EXISTS : " + path) + return - os.system('start '' "RV" ' + renderPath) - LOG.info("RV : OPEN : " + renderPath) + os.system('start "" "' + Tank().data['software']['RV']['path'] + '" ' + path) def openFolder(path): - renderPath = os.path.dirname(path).replace("/","\\") + path = os.path.dirname(path).replace("/","\\") - if not os.path.exists(renderPath) or not os.listdir(renderPath): - LOG.warning("FOLDER : NOT EXISTS : " + renderPath) - return "WARNING: path doesnt exist: " + renderPath + if not os.path.exists(path) or not os.listdir(path): + LOG.warning("FOLDER : NOT EXISTS : " + path) + return - webbrowser.open(renderPath) - - LOG.info("FOLDER : OPEN :" + renderPath) + webbrowser.open(path) def render(): - cn = nuke.thisNode() + this_node = nuke.thisNode() setCommentPath() - frameStart = int(cn["frameStart"].getValue()) - frameEnd = int(cn["frameEnd"].getValue()) + frameStart = int(this_node["frameStart"].getValue()) + frameEnd = int(this_node["frameEnd"].getValue()) - if cn["submit"].getValue() == 0.0: - threads = int(cn["threads"].getValue()) + if this_node["submit"].getValue() == 0.0: from plugins.vuRenderThreads.plugin_nuke import plugin_nuke - plugin_nuke.createThreads(frameStart, frameEnd, threads, [cn.name()]) - LOG.info("END : RENDERTHREADS : " + cn["exrPathComment"].getValue()) - elif cn["submit"].getValue() == 1.0: + threads = int(this_node["threads"].getValue()) + plugin_nuke.createThreads(frameStart, frameEnd, threads, [this_node.name()]) + LOG.info("END : RENDERTHREADS : " + this_node["exrPathComment"].getValue()) + + elif this_node["submit"].getValue() == 1.0: import rrenderSubmit nuke.load('rrenderSubmit') - rrenderSubmit.rrSubmit_Nuke_Node(cn, frameStart, frameEnd) - LOG.info("END : RRSUBMIT : " + cn["exrPathComment"].getValue()) + rrenderSubmit.rrSubmit_Nuke_Node(this_node, frameStart, frameEnd) + LOG.info("END : RRSUBMIT : " + this_node["exrPathComment"].getValue()) else: try: nuke.execute(nuke.thisNode(), start=frameStart, end=frameEnd, incr=1) - LOG.info("END : LOCAL : " + cn["exrPathComment"].getValue()) + LOG.info("END : LOCAL : " + this_node["exrPathComment"].getValue()) except: print "END : LOCAL : Execution failed" - LOG.error("END : LOCAL : " + cn["exrPathComment"].getValue(), exc_info=True) + LOG.error("END : LOCAL : " + this_node["exrPathComment"].getValue(), exc_info=True) def setCommentPath(): - cn = nuke.thisNode() + this_node = nuke.thisNode() - if cn["status"].value() != " " or cn["chbPublish"].value(): + if this_node["status"].value() != " " or this_node["chbPublish"].value(): - if cn["chbPublish"].value(): + if this_node["chbPublish"].value(): comment = "PUBLISH" # delete publish @@ -119,40 +116,40 @@ def setCommentPath(): LOG.error("Delete : Failed : " + publishPath, exc_info=True) else: - comment = cn["status"].value() + comment = this_node["status"].value() print "STATUS: " + comment - exrPath = cn["exrPath"].getValue().split("/") + exrPath = this_node["exrPath"].getValue().split("/") fileName = exrPath[-1].split(".") newName = fileName[0] + "_" + comment - newPath = cn["exrPath"].getValue().replace(fileName[0], newName) + newPath = this_node["exrPath"].getValue().replace(fileName[0], newName) - cn["exrPathComment"].setValue(newPath) + this_node["exrPathComment"].setValue(newPath) - jpgPath = cn["jpgPath"].getValue().split("/") + jpgPath = this_node["jpgPath"].getValue().split("/") fileName = jpgPath[-1].split(".") newName = fileName[0] + "_" + comment - newPath = cn["jpgPath"].getValue().replace(fileName[0], newName) + newPath = this_node["jpgPath"].getValue().replace(fileName[0], newName) - cn["jpgPathComment"].setValue(newPath) + this_node["jpgPathComment"].setValue(newPath) - tifPath = cn["tifPath"].getValue().split("/") + tifPath = this_node["tifPath"].getValue().split("/") fileName = tifPath[-1].split(".") newName = fileName[0] + "_" + comment - newPath = cn["tifPath"].getValue().replace(fileName[0], newName) + newPath = this_node["tifPath"].getValue().replace(fileName[0], newName) - cn["tifPathComment"].setValue(newPath) + this_node["tifPathComment"].setValue(newPath) else: - cn["exrPathComment"].setValue(cn["exrPath"].getValue()) - cn["jpgPathComment"].setValue(cn["jpgPath"].getValue()) - cn["tifPathComment"].setValue(cn["tifPath"].getValue()) + this_node["exrPathComment"].setValue(this_node["exrPath"].getValue()) + this_node["jpgPathComment"].setValue(this_node["jpgPath"].getValue()) + this_node["tifPathComment"].setValue(this_node["tifPath"].getValue()) def publishRender(writeNode): - cn = nuke.thisGroup() + this_node = nuke.thisGroup() - if cn["chbPublish"].value(): + if this_node["chbPublish"].value(): print "PUBLISH" fileName = [] @@ -165,7 +162,7 @@ def publishRender(writeNode): fileName = ("_").join(fileName) publishPath = os.path.dirname(os.path.dirname(nuke.root().name())) + "/PUBLISH/exr" - oldPath = os.path.dirname(cn["exrPathComment"].getValue()) + oldPath = os.path.dirname(this_node["exrPathComment"].getValue()) if writeNode == "exr": if not os.path.exists(publishPath): @@ -185,7 +182,7 @@ def publishRender(writeNode): shutil.copyfile(oldFrame, newFrame) - oldPath = os.path.dirname(cn["jpgPathComment"].getValue()) + oldPath = os.path.dirname(this_node["jpgPathComment"].getValue()) if writeNode == "jpg":