diff --git a/.gitignore b/.gitignore index 057f075..cdbcf6b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,6 @@ lib/utils/arReporter.py lib/utils/arSave.py lib/utils/arSaveAs.py lib/utils/arSmartLoader.py -lib/utils/arUtil.py software/maya/plugins/* @@ -47,6 +46,7 @@ software/nuke/gizmos/extern software/houdini/plugins/* !__init__.py +!lib/utils/ui/arUtil.ui *.bak *.pyc diff --git a/README.md b/README.md index 84a49aa..04c5daa 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ > ### In Development -> Still in devlopment. Check out the documentary, [**releases**](https://github.com/richteralexander/plex/releases) and **[help us to improve.](https://github.com/richteralexander/plex/wiki/How-to-Contribute)** -> +> Check out the [**documentary**](https://github.com/richteralexander/plex/wiki), [**releases**](https://github.com/richteralexander/plex/releases) and **[help us to improve.](https://github.com/richteralexander/plex/wiki/How-to-Contribute)** > [FMX 2017 Talk - Open Source Pipeline](https://www.youtube.com/watch?v=_JC0AMYX_Bw) -![plex](https://cloud.githubusercontent.com/assets/9514022/25578231/d5be91f6-2e6c-11e7-9a4b-2de3772e0fc0.png) +![splashscreen](https://user-images.githubusercontent.com/9514022/29427356-dbd29200-8389-11e7-9731-051ed39d2558.png) ## **Introduction** **Plex** is an **Animation, VFX and Games pipeline** managing important workflows during production. @@ -15,11 +14,11 @@ The basic idea is to handle the file and folder structure work, setups basic rul The main idea is to have an overall system which lays the **foundation for the modular scripts** that are plugged into the pipeline and add to its functionality and overall awesomeness. -![structure](https://cloud.githubusercontent.com/assets/9514022/25559030/6c4396a2-2d33-11e7-90a2-add01a986613.png) +[![plex_00_introduction](https://user-images.githubusercontent.com/9514022/29458175-179be8ba-841e-11e7-8be7-a83b0a37b28e.PNG)](https://youtu.be/gqRailvSmtw) ## Environment [in development] - [x] **OS**: Windows (| Linux | Mac) -- [x] **Software**: Nuke 9+ | Maya 2015+ | Houdini 15+ +- [x] **Software**: Nuke 9+ | Maya 2015+ | Houdini 15+ | 3ds Max 2015+ - [x] **Renderer**: Arnold | RenderMan | Mantra | V-Ray ## Project Features @@ -31,6 +30,8 @@ The main idea is to have an overall system which lays the **foundation for the m - [x] user-pipeline integration - [x] SSTP (simple | smart | transparent | performant) +![structure](https://cloud.githubusercontent.com/assets/9514022/25559030/6c4396a2-2d33-11e7-90a2-add01a986613.png) + ## Pipeline Features - [x] **Layered Pipeline** @@ -41,8 +42,8 @@ The main idea is to have an overall system which lays the **foundation for the m - personal (user) - [x] **Basic scripts** - save (+ publish) | load | create | render - - import | export - get, set and handle data | img | scripts + - arUtils (user, report, help, accept, comment, color code) - [x] **Workflows and Charts** - naming conventions - software pipeline @@ -55,12 +56,7 @@ The main idea is to have an overall system which lays the **foundation for the m - additional libraries - [x] **Feedback & Debug** (+ advanced logging) - inform user about processes - - debug like a king \*bow\* -- [x] **Parent Scripts** - - header (script info, user, report & help) - - footer (accept, comment, color code) - - menu (navigation) - - info (shot, asset) + - debug like a king \*bow\* ## **Projects [realized with]** diff --git a/data/pipeline.py b/data/pipeline.py index d34812c..3108c0b 100644 --- a/data/pipeline.py +++ b/data/pipeline.py @@ -1,7 +1,7 @@ #********************************************************************* # content = SET default environment paths -# version = 0.6.0 -# date = 2017-07-07 +# version = 0.7.0 +# date = 2017-08-15 # # license = MIT # copyright = Copyright 2017 Animationsinstitut @@ -77,7 +77,7 @@ def set_pipeline_env(self): self.pipeline_env.add('DATA_PROJECT_PATH', eachPath + '/data/project/' + self.pipeline_data['project']) # ADD all pipeline env - self.add_env('PIPELINE_PATH', (';').join(self.pipeline_env['PIPELINE_PATH'])) + self.add_env('PIPELINE_PATH', (';').join(self.pipeline_env['PIPELINE_PATH'])) try: self.add_env('IMG_PATH', (';').join(self.pipeline_env['IMG_PATH'])) self.add_env('LIB_PATH', (';').join(self.pipeline_env['LIB_PATH'])) diff --git a/data/pipeline.yml b/data/pipeline.yml index 49e1a5a..fc00365 100644 --- a/data/pipeline.yml +++ b/data/pipeline.yml @@ -30,4 +30,4 @@ user_data: True PIPELINE: name: Plex - version: 0.0.4 + version: 1.0.0 diff --git a/data/project/default/folder_template/00_pipeline/.gitkeep b/data/project/default/project_template/00_pipeline/.gitkeep similarity index 100% rename from data/project/default/folder_template/00_pipeline/.gitkeep rename to data/project/default/project_template/00_pipeline/.gitkeep diff --git a/data/project/default/folder_template/05_user/.gitkeep b/data/project/default/project_template/05_user/.gitkeep similarity index 100% rename from data/project/default/folder_template/05_user/.gitkeep rename to data/project/default/project_template/05_user/.gitkeep diff --git a/data/project/default/folder_template/05_user/arichter/.gitkeep b/data/project/default/project_template/05_user/arichter/.gitkeep similarity index 100% rename from data/project/default/folder_template/05_user/arichter/.gitkeep rename to data/project/default/project_template/05_user/arichter/.gitkeep diff --git a/data/project/default/folder_template/10_preproduction/.gitkeep b/data/project/default/project_template/10_preproduction/.gitkeep similarity index 100% rename from data/project/default/folder_template/10_preproduction/.gitkeep rename to data/project/default/project_template/10_preproduction/.gitkeep diff --git a/data/project/default/folder_template/10_preproduction/animatic/.gitkeep b/data/project/default/project_template/10_preproduction/animatic/.gitkeep similarity index 100% rename from data/project/default/folder_template/10_preproduction/animatic/.gitkeep rename to data/project/default/project_template/10_preproduction/animatic/.gitkeep diff --git a/data/project/default/folder_template/10_preproduction/concept/.gitkeep b/data/project/default/project_template/10_preproduction/concept/.gitkeep similarity index 100% rename from data/project/default/folder_template/10_preproduction/concept/.gitkeep rename to data/project/default/project_template/10_preproduction/concept/.gitkeep diff --git a/data/project/default/folder_template/10_preproduction/reference/.gitkeep b/data/project/default/project_template/10_preproduction/reference/.gitkeep similarity index 100% rename from data/project/default/folder_template/10_preproduction/reference/.gitkeep rename to data/project/default/project_template/10_preproduction/reference/.gitkeep diff --git a/data/project/default/folder_template/10_preproduction/rnd/.gitkeep b/data/project/default/project_template/10_preproduction/rnd/.gitkeep similarity index 100% rename from data/project/default/folder_template/10_preproduction/rnd/.gitkeep rename to data/project/default/project_template/10_preproduction/rnd/.gitkeep diff --git a/data/project/default/folder_template/10_preproduction/screenplay/.gitkeep b/data/project/default/project_template/10_preproduction/screenplay/.gitkeep similarity index 100% rename from data/project/default/folder_template/10_preproduction/screenplay/.gitkeep rename to data/project/default/project_template/10_preproduction/screenplay/.gitkeep diff --git a/data/project/default/folder_template/10_preproduction/storyboard/.gitkeep b/data/project/default/project_template/10_preproduction/storyboard/.gitkeep similarity index 100% rename from data/project/default/folder_template/10_preproduction/storyboard/.gitkeep rename to data/project/default/project_template/10_preproduction/storyboard/.gitkeep diff --git a/data/project/default/folder_template/20_footage/.gitkeep b/data/project/default/project_template/20_footage/.gitkeep similarity index 100% rename from data/project/default/folder_template/20_footage/.gitkeep rename to data/project/default/project_template/20_footage/.gitkeep diff --git a/data/project/default/folder_template/20_footage/SCENE/.gitkeep b/data/project/default/project_template/20_footage/SCENE/.gitkeep similarity index 100% rename from data/project/default/folder_template/20_footage/SCENE/.gitkeep rename to data/project/default/project_template/20_footage/SCENE/.gitkeep diff --git a/data/project/default/folder_template/20_footage/SHD/.gitkeep b/data/project/default/project_template/20_footage/SHD/.gitkeep similarity index 100% rename from data/project/default/folder_template/20_footage/SHD/.gitkeep rename to data/project/default/project_template/20_footage/SHD/.gitkeep diff --git a/data/project/default/folder_template/20_footage/hdri/.gitkeep b/data/project/default/project_template/20_footage/hdri/.gitkeep similarity index 100% rename from data/project/default/folder_template/20_footage/hdri/.gitkeep rename to data/project/default/project_template/20_footage/hdri/.gitkeep diff --git a/data/project/default/folder_template/20_footage/tex/.gitkeep b/data/project/default/project_template/20_footage/tex/.gitkeep similarity index 100% rename from data/project/default/folder_template/20_footage/tex/.gitkeep rename to data/project/default/project_template/20_footage/tex/.gitkeep diff --git a/data/project/default/folder_template/30_assets/.gitkeep b/data/project/default/project_template/30_assets/.gitkeep similarity index 100% rename from data/project/default/folder_template/30_assets/.gitkeep rename to data/project/default/project_template/30_assets/.gitkeep diff --git a/data/project/default/folder_template/30_assets/assetName/.gitkeep b/data/project/default/project_template/30_assets/assetName/.gitkeep similarity index 100% rename from data/project/default/folder_template/30_assets/assetName/.gitkeep rename to data/project/default/project_template/30_assets/assetName/.gitkeep diff --git a/data/project/default/folder_template/30_assets/assetName/GEO/.gitkeep b/data/project/default/project_template/30_assets/assetName/GEO/.gitkeep similarity index 100% rename from data/project/default/folder_template/30_assets/assetName/GEO/.gitkeep rename to data/project/default/project_template/30_assets/assetName/GEO/.gitkeep diff --git a/data/project/default/folder_template/30_assets/assetName/RIG/.gitkeep b/data/project/default/project_template/30_assets/assetName/RIG/.gitkeep similarity index 100% rename from data/project/default/folder_template/30_assets/assetName/RIG/.gitkeep rename to data/project/default/project_template/30_assets/assetName/RIG/.gitkeep diff --git a/data/project/default/folder_template/30_assets/assetName/SHD/.gitkeep b/data/project/default/project_template/30_assets/assetName/SHD/.gitkeep similarity index 100% rename from data/project/default/folder_template/30_assets/assetName/SHD/.gitkeep rename to data/project/default/project_template/30_assets/assetName/SHD/.gitkeep diff --git a/data/project/default/folder_template/40_shots/.gitkeep b/data/project/default/project_template/40_shots/.gitkeep similarity index 100% rename from data/project/default/folder_template/40_shots/.gitkeep rename to data/project/default/project_template/40_shots/.gitkeep diff --git a/data/project/default/folder_template/40_shots/s010/.gitkeep b/data/project/default/project_template/40_shots/s010/.gitkeep similarity index 100% rename from data/project/default/folder_template/40_shots/s010/.gitkeep rename to data/project/default/project_template/40_shots/s010/.gitkeep diff --git a/data/project/default/folder_template/40_shots/s010/ANIM/.gitkeep b/data/project/default/project_template/40_shots/s010/ANIM/.gitkeep similarity index 100% rename from data/project/default/folder_template/40_shots/s010/ANIM/.gitkeep rename to data/project/default/project_template/40_shots/s010/ANIM/.gitkeep diff --git a/data/project/default/folder_template/40_shots/s010/ANIM/PUBLISH/.gitkeep b/data/project/default/project_template/40_shots/s010/ANIM/PUBLISH/.gitkeep similarity index 100% rename from data/project/default/folder_template/40_shots/s010/ANIM/PUBLISH/.gitkeep rename to data/project/default/project_template/40_shots/s010/ANIM/PUBLISH/.gitkeep diff --git a/data/project/default/folder_template/40_shots/s010/ANIM/WORK/.gitkeep b/data/project/default/project_template/40_shots/s010/ANIM/WORK/.gitkeep similarity index 100% rename from data/project/default/folder_template/40_shots/s010/ANIM/WORK/.gitkeep rename to data/project/default/project_template/40_shots/s010/ANIM/WORK/.gitkeep diff --git a/data/project/default/folder_template/40_shots/s010/COMP/.gitkeep b/data/project/default/project_template/40_shots/s010/COMP/.gitkeep similarity index 100% rename from data/project/default/folder_template/40_shots/s010/COMP/.gitkeep rename to data/project/default/project_template/40_shots/s010/COMP/.gitkeep diff --git a/data/project/default/folder_template/40_shots/s010/FX/.gitkeep b/data/project/default/project_template/40_shots/s010/FX/.gitkeep similarity index 100% rename from data/project/default/folder_template/40_shots/s010/FX/.gitkeep rename to data/project/default/project_template/40_shots/s010/FX/.gitkeep diff --git a/data/project/default/folder_template/40_shots/s010/LGT/.gitkeep b/data/project/default/project_template/40_shots/s010/LGT/.gitkeep similarity index 100% rename from data/project/default/folder_template/40_shots/s010/LGT/.gitkeep rename to data/project/default/project_template/40_shots/s010/LGT/.gitkeep diff --git a/data/project/default/folder_template/45_render/.gitkeep b/data/project/default/project_template/45_render/.gitkeep similarity index 100% rename from data/project/default/folder_template/45_render/.gitkeep rename to data/project/default/project_template/45_render/.gitkeep diff --git a/data/project/default/folder_template/45_render/s010/.gitkeep b/data/project/default/project_template/45_render/s010/.gitkeep similarity index 100% rename from data/project/default/folder_template/45_render/s010/.gitkeep rename to data/project/default/project_template/45_render/s010/.gitkeep diff --git a/data/project/default/folder_template/45_render/s010/ANIM/.gitkeep b/data/project/default/project_template/45_render/s010/ANIM/.gitkeep similarity index 100% rename from data/project/default/folder_template/45_render/s010/ANIM/.gitkeep rename to data/project/default/project_template/45_render/s010/ANIM/.gitkeep diff --git a/data/project/default/folder_template/50_post/.gitkeep b/data/project/default/project_template/50_post/.gitkeep similarity index 100% rename from data/project/default/folder_template/50_post/.gitkeep rename to data/project/default/project_template/50_post/.gitkeep diff --git a/data/project/default/folder_template/50_post/edit/music/.gitkeep b/data/project/default/project_template/50_post/edit/music/.gitkeep similarity index 100% rename from data/project/default/folder_template/50_post/edit/music/.gitkeep rename to data/project/default/project_template/50_post/edit/music/.gitkeep diff --git a/data/project/default/folder_template/50_post/edit/sound/.gitkeep b/data/project/default/project_template/50_post/edit/sound/.gitkeep similarity index 100% rename from data/project/default/folder_template/50_post/edit/sound/.gitkeep rename to data/project/default/project_template/50_post/edit/sound/.gitkeep diff --git a/data/project/default/folder_template/50_post/final/.gitkeep b/data/project/default/project_template/50_post/final/.gitkeep similarity index 100% rename from data/project/default/folder_template/50_post/final/.gitkeep rename to data/project/default/project_template/50_post/final/.gitkeep diff --git a/data/project/default/folder_template/50_post/grade/.gitkeep b/data/project/default/project_template/50_post/grade/.gitkeep similarity index 100% rename from data/project/default/folder_template/50_post/grade/.gitkeep rename to data/project/default/project_template/50_post/grade/.gitkeep diff --git a/data/project/default/folder_template/50_post/mov/.gitkeep b/data/project/default/project_template/50_post/mov/.gitkeep similarity index 100% rename from data/project/default/folder_template/50_post/mov/.gitkeep rename to data/project/default/project_template/50_post/mov/.gitkeep diff --git a/data/project/default/folder_template/60_planning/.gitkeep b/data/project/default/project_template/60_planning/.gitkeep similarity index 100% rename from data/project/default/folder_template/60_planning/.gitkeep rename to data/project/default/project_template/60_planning/.gitkeep diff --git a/data/project/default/folder_template/60_planning/makingOf/.gitkeep b/data/project/default/project_template/60_planning/makingOf/.gitkeep similarity index 100% rename from data/project/default/folder_template/60_planning/makingOf/.gitkeep rename to data/project/default/project_template/60_planning/makingOf/.gitkeep diff --git a/data/project/default/folder_template/60_planning/meetings/.gitkeep b/data/project/default/project_template/60_planning/meetings/.gitkeep similarity index 100% rename from data/project/default/folder_template/60_planning/meetings/.gitkeep rename to data/project/default/project_template/60_planning/meetings/.gitkeep diff --git a/data/project/default/folder_template/60_planning/presentation/.gitkeep b/data/project/default/project_template/60_planning/presentation/.gitkeep similarity index 100% rename from data/project/default/folder_template/60_planning/presentation/.gitkeep rename to data/project/default/project_template/60_planning/presentation/.gitkeep diff --git a/data/project/default/folder_template/60_planning/promotion/.gitkeep b/data/project/default/project_template/60_planning/promotion/.gitkeep similarity index 100% rename from data/project/default/folder_template/60_planning/promotion/.gitkeep rename to data/project/default/project_template/60_planning/promotion/.gitkeep diff --git a/data/project/default/software.yml b/data/project/default/software.yml index fd52989..05dcf7a 100644 --- a/data/project/default/software.yml +++ b/data/project/default/software.yml @@ -7,7 +7,7 @@ #********************************************************************* -#************************ +#***************************************************************************************************************************** # MAYA MAYA: version: &MAYA_VERSION 2016 @@ -80,7 +80,8 @@ MAYA: unit: cm -#************************ + +#***************************************************************************************************************************** # NUKE NUKE: version: &NUKE_VERSION 10.5 @@ -95,7 +96,7 @@ NUKE: PYTHONPATH: - !env_first [SOFTWARE_PATH, /scripts] - !env_first [SOFTWARE_PATH, /plugins] - - !env_first [SOFTWARE_PATH, /shelf] + - !env_first [SOFTWARE_PATH, /gizmos] NUKE_PATH: - !env [PIPELINE_PATH] @@ -114,7 +115,7 @@ NUKE: MENU: - Plex: - open_scene_folder: addCommand('Open Scene Folder', 'import libFileFolder; libFileFolder.open_folder(nuke.root().knob("name").value())') + open_scene_folder: addCommand('Open Scene Folder', 'import libFileFolder; libFileFolder.open_folder(nuke.root().knob("name").value())') open_project_folder: addCommand('Open Project Folder', 'import libFileFolder;import libData; libFileFolder.open_folder(libData.get_data("project")["path"])') - break: addSeparator() @@ -133,7 +134,7 @@ NUKE: -#************************ +#***************************************************************************************************************************** # HOUDINI HOUDINI: version: &HOUDINI_VERSION 16.0.633 @@ -147,12 +148,58 @@ HOUDINI: ENV: PYTHONPATH: - - *HOUDINI_PATH + - !env_first [SOFTWARE_PATH] + - !env_first [SOFTWARE_PATH, /scripts] + - !env_first [SOFTWARE_PATH, /plugins] HOUDINI_SPLASH_FILE: !env [IMG_PATH, /software/houdini/houdini_splash.png] -#************************ + +#***************************************************************************************************************************** +# 3DsMax +MAX: + version: &MAX_VERSION 2017 + path: &MAX_PATH !join ["C:/Program Files/Autodesk/3ds Max ", *MAX_VERSION, /3dsmax.exe] + + start: *MAX_PATH + + renderer: + renderer_path: + + ENV: + PATH: + - !env_first [SOFTWARE_PATH] + - !env_first [SOFTWARE_PATH, /scripts] + - !env_first [SOFTWARE_PATH, /plugins] + - !env_first [IMG_PATH, /software/max] + + PYTHONPATH: + - !env_first [SOFTWARE_PATH] + - !env_first [SOFTWARE_PATH, /scripts] + - !env_first [SOFTWARE_PATH, /plugins] + - !env_first [IMG_PATH, /software/max] + + # ADSKFLEX_LICENSE_FILE: + + MENU: + - plex: + open_scene_folder: AddItem(MaxPlus.ActionFactory.Create('Open Scene Folder2', 'Open Scene Folder', max_menu.open_scene_folder)) + open_project_folder: AddItem(MaxPlus.ActionFactory.Create('Open Project Folder2', 'Open Project Folder', max_menu.open_project_folder)) + + - break: AddSeparator() + + # - Save: AddItem(MaxPlus.ActionFactory.Create('Report2', 'Report', 'import libFunc; libFunc.get_help("issues")'))) + # - Load: AddItem(MaxPlus.ActionFactory.Create('Report2', 'Report', 'import libFunc; libFunc.get_help("issues")'))) + + # - break: AddSeparator() + + - Report: "AddItem(MaxPlus.ActionFactory.Create('Report2', 'Report', max_menu.get_report))" + - Help: "AddItem(MaxPlus.ActionFactory.Create('Help2', 'Help', max_menu.get_help))" + + + +#***************************************************************************************************************************** # RV RV: version: diff --git a/exe/win_3dsMax.bat b/exe/win_3dsMax.bat new file mode 100644 index 0000000..e7d2edc --- /dev/null +++ b/exe/win_3dsMax.bat @@ -0,0 +1,11 @@ +:: 3DsMax + +:: Hide Commands +:: @echo off + +:: call %~dp0\win_env.bat + +set "newDir=%~dp0\..\data" +pythonw %newDir%\pipeline.py %1 --script software --software max + +::exit diff --git a/exe/win_desktop.bat b/exe/win_desktop.bat index edc5a9f..7ae4f82 100644 --- a/exe/win_desktop.bat +++ b/exe/win_desktop.bat @@ -3,7 +3,7 @@ :: Hide Commands @echo off -call %~dp0\win_env.bat +:: call %~dp0\win_env.bat set "newDir=%~dp0\..\data" start "" pythonw %newDir%\pipeline.py %1 --script desktop diff --git a/exe/win_maya.bat b/exe/win_maya.bat index 21eb34f..ad56b42 100644 --- a/exe/win_maya.bat +++ b/exe/win_maya.bat @@ -3,7 +3,7 @@ :: Hide Commands @echo off -call %~dp0\win_env.bat +:: call %~dp0\win_env.bat set "newDir=%~dp0\..\data" pythonw %newDir%\pipeline.py %1 --script software --software maya diff --git a/exe/win_nuke.bat b/exe/win_nuke.bat index 05be847..7907f14 100644 --- a/exe/win_nuke.bat +++ b/exe/win_nuke.bat @@ -3,7 +3,7 @@ :: Hide Commands @echo off -call %~dp0\win_env.bat +:: call %~dp0\win_env.bat set "newDir=%~dp0\..\data" pythonw %newDir%\pipeline.py %1 --script software --software nuke diff --git a/img/btn/Thumbs.db b/img/btn/Thumbs.db new file mode 100644 index 0000000..d8b0569 Binary files /dev/null and b/img/btn/Thumbs.db differ diff --git a/img/software/3dsMax.png b/img/software/3dsMax.png index 98137d4..f118d36 100644 Binary files a/img/software/3dsMax.png and b/img/software/3dsMax.png differ diff --git a/img/software/houdini/houdini.ico b/img/software/houdini/houdini.ico index f16fc33..8bc6c34 100644 Binary files a/img/software/houdini/houdini.ico and b/img/software/houdini/houdini.ico differ diff --git a/img/software/houdini/houdini_splash.png b/img/software/houdini/houdini_splash.png index a882c39..304153a 100644 Binary files a/img/software/houdini/houdini_splash.png and b/img/software/houdini/houdini_splash.png differ diff --git a/img/software/max/max.ico b/img/software/max/max.ico new file mode 100644 index 0000000..efa0851 Binary files /dev/null and b/img/software/max/max.ico differ diff --git a/img/software/max/splash.bmp b/img/software/max/splash.bmp new file mode 100644 index 0000000..bc3f5c5 Binary files /dev/null and b/img/software/max/splash.bmp differ diff --git a/img/software/maya.png b/img/software/maya.png index 75e303b..86be366 100644 Binary files a/img/software/maya.png and b/img/software/maya.png differ diff --git a/img/software/maya/MayaEDUStartupImage.png b/img/software/maya/MayaEDUStartupImage.png index ef8749c..e6a4e7b 100644 Binary files a/img/software/maya/MayaEDUStartupImage.png and b/img/software/maya/MayaEDUStartupImage.png differ diff --git a/img/software/maya/maya.ico b/img/software/maya/maya.ico index 534b5d8..20b02fb 100644 Binary files a/img/software/maya/maya.ico and b/img/software/maya/maya.ico differ diff --git a/img/software/nuke/menu/nuke_toolbar.png b/img/software/nuke/menu/nuke_toolbar.png index ff0af97..fa1789e 100644 Binary files a/img/software/nuke/menu/nuke_toolbar.png and b/img/software/nuke/menu/nuke_toolbar.png differ diff --git a/img/software/nuke/menu/writeBanner52.png b/img/software/nuke/menu/writeBanner52.png index 1ef8135..6d5c50f 100644 Binary files a/img/software/nuke/menu/writeBanner52.png and b/img/software/nuke/menu/writeBanner52.png differ diff --git a/img/software/nuke/nuke.ico b/img/software/nuke/nuke.ico index fda568b..ee13160 100644 Binary files a/img/software/nuke/nuke.ico and b/img/software/nuke/nuke.ico differ diff --git a/img/software/nuke/nuke.png b/img/software/nuke/nuke.png index ff0af97..a27ebf5 100644 Binary files a/img/software/nuke/nuke.png and b/img/software/nuke/nuke.png differ diff --git a/img/software/nuke/nuke_splash.png b/img/software/nuke/nuke_splash.png index 8fc2dcb..d71db1a 100644 Binary files a/img/software/nuke/nuke_splash.png and b/img/software/nuke/nuke_splash.png differ diff --git a/img/user/Thumbs.db b/img/user/Thumbs.db new file mode 100644 index 0000000..2654990 Binary files /dev/null and b/img/user/Thumbs.db differ diff --git a/lib/classes/software.py b/lib/classes/software.py index 874f3de..9623981 100644 --- a/lib/classes/software.py +++ b/lib/classes/software.py @@ -124,31 +124,61 @@ def renderer_path(self): #************************ # STATIC - def add_menu(self, menu_node, new_command): - try: - for keys, item in new_command.iteritems(): - if isinstance(item, dict): - if self._software == 'maya': - import maya.cmds as cmds - sub_menu = cmds.menuItem(p = menu_node, l = keys, sm = True) - elif self._software == 'nuke': - sub_menu = menu_node.addMenu(keys) - else: - LOG.debug('CANT find software: {}'.format(software)) - continue - self.add_menu(sub_menu, item) - else: - if self._software == 'maya': - import maya.cmds as cmds - cmd = ('cmds.{}'.format(item)).format(menu_node) - eval(cmd) - elif self._software == 'nuke': eval('menu_node.{}'.format(item)) - else: LOG.debug('CANT find software: {}'.format(software)) - except: - LOG.error('SOFTWARE Menu couldnt be created', exc_info=True) + def add_menu(self, menu_node): + self.add_sub_menu = [] + + for menu_item in self._software_data['MENU']: + try: self.add_menu_item(menu_node, menu_item) + except: LOG.error('SOFTWARE Menu couldnt be created', exc_info=True) + + if self._software == 'max': + import MaxPlus + main_menu = menu_node.Create(MaxPlus.MenuManager.GetMainMenu()) + for sub in self.add_sub_menu: sub.Create(main_menu, 0) + + def add_menu_item(self, menu_node, new_command): + if self._software == 'maya': import maya.cmds as cmds + elif self._software == 'max': import MaxPlus + elif self._software == 'houdini': pass + elif self._software == 'nuke': pass + else: + LOG.debug('CANT find software: {}'.format(software)) + return + + sub_menu = '' + + for keys, item in new_command.iteritems(): + if isinstance(item, dict): + if self._software == 'maya': + sub_menu = cmds.menuItem(p=menu_node, l=keys, sm=True) + elif self._software == 'max': + LOG.debug('menu_node.{}'.format("nop")) + MaxPlus.MenuManager.UnregisterMenu(unicode(keys)) + sub_menu = MaxPlus.MenuBuilder(keys) + self.add_sub_menu.append(sub_menu) + elif self._software == 'houdini': + pass + elif self._software == 'nuke': + sub_menu = menu_node.addMenu(keys) + + # ADD sub_menu + if sub_menu: self.add_menu_item(sub_menu, item) + + else: + if self._software == 'maya': + eval('cmds.{}'.format(item).format(menu_node)) + elif self._software == 'max': + import max_menu + eval('menu_node.{}'.format(item)) + elif self._software == 'houdini': + pass + elif self._software == 'nuke': + eval('menu_node.{}'.format(item)) def print_header(self): + if self._software == 'max': return + space = (20-int(len(os.getenv('PROJECT_NAME'))/2)) - 1 # project name diff --git a/lib/classes/users.py b/lib/classes/users.py index bb2956b..88372d5 100644 --- a/lib/classes/users.py +++ b/lib/classes/users.py @@ -85,7 +85,7 @@ def data_path(self): @property def user_path(self): - return "user_path" + return libData.get_data('project')['PATH']['user'] + '/' + self._id @property def local_path(self): diff --git a/lib/libData.py b/lib/libData.py index 553675e..e53312d 100644 --- a/lib/libData.py +++ b/lib/libData.py @@ -184,4 +184,3 @@ def get_env(var): return os.environ[var].split(';')[0] LOG.warning('ENV doesnt exist: {}'.format(var)) return '' - diff --git a/lib/libFileFolder.py b/lib/libFileFolder.py index 9b10805..df47dda 100644 --- a/lib/libFileFolder.py +++ b/lib/libFileFolder.py @@ -84,7 +84,7 @@ def get_deep_folder_list(path, add_path=False): #************************ # TEMP IMAGE def rm_tmp_img(): - tmpImgPath = DATA.PATH_EXTRA['img_tmp'] #temp user place (os independent) + tmpImgPath = 'C:/temp/tmp.png' #temp user place (os independent) if os.path.exists(tmpImgPath): try: os.remove(tmpImgPath) except: LOG.error('FAIL : cant delete tmpFile : ' + tmpImgPath, exc_info=True) diff --git a/lib/libFunc.py b/lib/libFunc.py index 1fbee6e..2705edc 100644 --- a/lib/libFunc.py +++ b/lib/libFunc.py @@ -18,10 +18,11 @@ import libData -def get_help(name = ''): +def get_help(name=''): project_data = libData.get_data('project')['HELP'] if not name: name = os.getenv('SOFTWARE') + if name in project_data: webbrowser.open(project_data[name]) else: @@ -34,6 +35,7 @@ def get_all_keys(key_list, dictonary=[]): dictonary.append(key) if isinstance(items, dict): get_all_keys(items, dictonary) + return dictonary @@ -47,4 +49,5 @@ def timed(*args, **kw): printResult = '%r (%r, %r) %2.2f sec' % (func.__name__, args, kw, endTime-startTime) LOG.debug(printResult) return resultTime + return timed diff --git a/lib/utils/arDesktop.py b/lib/utils/arDesktop.py index 7e1a1f4..ab33d72 100644 --- a/lib/utils/arDesktop.py +++ b/lib/utils/arDesktop.py @@ -53,18 +53,13 @@ def __init__(self, parent=None): adminMenu.setStyleSheet(self.config_data['style']['arDesktop']['menu']) menu.addMenu(adminMenu) - menuItem = adminMenu.addAction(QtGui.QIcon(libData.get_img_path('btn/btnProjectEdit48')), 'Project Data') + menuItem = adminMenu.addAction(QtGui.QIcon(libData.get_img_path('btn/btnProjectEdit48')), 'Open Project Data') QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_btnOpenProjectLog) - menuItem = adminMenu.addAction(QtGui.QIcon(libData.get_img_path('user/default.png')), 'User Data') + menuItem = adminMenu.addAction(QtGui.QIcon(libData.get_img_path('user/default.png')), 'Open User Data') QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_btnOpenLocalLog) adminMenu.addSeparator() - # menuItem = adminMenu.addAction(QtGui.QIcon(libData.get_img_path('btn/btnProject48')), 'Reminder') - # QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_btnWriteReminder) - - # menu.addSeparator() - menuItem = menu.addAction(QtGui.QIcon(libData.get_img_path('user/default')), self.user.name) QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_btnShowUserData) @@ -73,11 +68,6 @@ def __init__(self, parent=None): menu.addSeparator() - # menuItem = menu.addAction(QtGui.QIcon(libData.get_img_path('btn/btnProject48')), 'Settings') - # QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_btnProject) - - # menu.addSeparator() - subMenu = QtGui.QMenu('Software') subMenu.setStyleSheet(self.config_data['style']['arDesktop']['menu']) menu.addMenu(subMenu) @@ -104,7 +94,6 @@ def __init__(self, parent=None): QtCore.QObject.connect(menuItem, QtCore.SIGNAL('triggered()'), self.press_closeStartup) self.setContextMenu(menu) - # startarNotificator() def startArNotificator(self): import arNotificator @@ -131,7 +120,6 @@ def press_btnOpenNuke(self): def press_btnOpenHoudini(self): Software().start('houdini') - #------------------------------ def press_btnOpenProjectLog(self): libFileFolder.open_folder(libData.get_env('DATA_PROJECT_PATH')) diff --git a/lib/utils/arUtil.py b/lib/utils/arUtil.py new file mode 100644 index 0000000..61c5738 --- /dev/null +++ b/lib/utils/arUtil.py @@ -0,0 +1,303 @@ +#********************************************************************* +# content = parent widget +# version = 0.0.1 +# date = 2017-01-01 +# +# license = MIT +# copyright = Copyright 2017 Animationsinstitut +# author = Alexander Richter +#********************************************************************* +# This source file has been developed within the scope of the +# Technical Director course at Filmakademie Baden-Wuerttemberg. +# http://td.animationsinstitut.de +#********************************************************************* + +import os +import sys +import webbrowser + +from PySide import QtGui, QtCore, QtUiTools +from PySide.QtGui import QLabel + +from users import User +import libLog +import libFunc +import libData +import libFileFolder + + +#********************** +# VARIABLE +TITLE = os.path.splitext(os.path.basename(__file__))[0] +LOG = libLog.init(script=TITLE) + + +#********************** +# CLASS +class ArUtil(object): + + def __init__(self): + path_ui = ("/").join([os.path.dirname(__file__), "ui", TITLE + ".ui"]) + self.wgHeader = QtUiTools.QUiLoader().load(path_ui) + + self.path_menu_ui = ("/").join([os.path.dirname(__file__), "ui", TITLE + "_menu.ui"]) + self.path_review_ui = ("/").join([os.path.dirname(__file__), "ui", TITLE + "_preview.ui"]) + + # VAR + self.default_size = self.wgHeader.size() + self.monitor_res = QtGui.QDesktopWidget().screenGeometry() + self.monitor_size = QtCore.QSize(self.monitor_res.width(), self.monitor_res.height()) + + self.open_path = "" + User().create() + + self.wgHeader.lblProjectName.setText(TITLE) + self.wgHeader.setWindowIcon(QtGui.QPixmap(QtGui.QImage(libData.get_img_path("btn/btnProject48")))) + + # BUTTONS ICONS + # + toolTips + self.wgHeader.btnReport.setIcon(QtGui.QPixmap(QtGui.QImage(libData.get_img_path("btn/btnReport48")))) + self.wgHeader.btnHelp.setIcon(QtGui.QPixmap(QtGui.QImage(libData.get_img_path("btn/default")))) + self.wgHeader.btnOpenFolder.setIcon(QtGui.QPixmap(QtGui.QImage(libData.get_img_path("btn/btnFolder48")))) + + self.wgHeader.lblScriptImg.setPixmap(QtGui.QPixmap(QtGui.QImage(libData.get_img_path("btn/btnProject48")))) + self.wgHeader.lblArrowUp.setPixmap(QtGui.QPixmap(QtGui.QImage(libData.get_img_path("lbl/lblArrowU18")))) + + self.wgHeader.btnUser.setIcon(QtGui.QPixmap(QtGui.QImage(libData.get_img_path("user/default")))) # current user + self.wgHeader.btnUser.setToolTip(("").join(['

', + User().name, '
', + User().rights, '

'])) + + self.wgHeader.btnProject.setIcon(QtGui.QPixmap(QtGui.QImage(libData.get_img_path('software/default')))) # current user + self.wgHeader.btnProject.setToolTip(os.environ['PROJECT_NAME']) + + # SIGNAL + # clickable(self.wgHeader.wgHeader).connect(self.press_lblTitleBar) + + self.wgHeader.btnMinimize.clicked.connect(self.press_btnMinimize) + self.wgHeader.btnMaximize.clicked.connect(self.press_btnMaximize) + self.wgHeader.btnLayoutL.clicked.connect(self.press_btnLayoutL) + self.wgHeader.btnLayoutR.clicked.connect(self.press_btnLayoutR) + self.wgHeader.btnClose.clicked.connect(self.press_btnClose) + + self.wgHeader.btnAccept.clicked.connect(self.press_btnAccept) + self.wgHeader.btnAccept.setAttribute(QtCore.Qt.WA_TranslucentBackground) + self.wgHeader.btnOption.clicked.connect(self.press_btnOption) + + self.wgHeader.btnOpenFolder.clicked.connect(self.press_btnOpenFolder) + self.wgHeader.btnUser.clicked.connect(self.press_btnUser) + self.wgHeader.btnProject.clicked.connect(self.press_btnProject) + self.wgHeader.btnReport.clicked.connect(self.press_btnReport) + self.wgHeader.btnHelp.clicked.connect(self.press_btnHelp) + + # CURSOR STYLE + self.wgHeader.setCursor(QtGui.QCursor(QtCore.Qt.SizeFDiagCursor)) + self.wgHeader.wg.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor)) + self.wgHeader.wgHeader.setCursor(QtGui.QCursor(QtCore.Qt.OpenHandCursor)) + self.wgHeader.wgHeaderBtn.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor)) + + # self.wgHeader.setAttribute(QtCore.Qt.WA_TranslucentBackground) + + # SETUP + self.refreshData() + self.setStatus() + self.setOpenFolder() + #self.addPreview() + #self.addMenu() + + self.wgHeader.wgHeader.hide() + # self.wgHeader.setWindowFlags(QtCore.Qt.CustomizeWindowHint | QtCore.Qt.FramelessWindowHint) # | QtCore.Qt.Tool | QtCore.Qt.WindowStaysOnTopHint) + self.wgHeader.show() + + + def addPreview(self): + print('preview') + self.wgPreview = QtUiTools.QUiLoader().load(self.path_review_ui) + self.wgHeader.layMain.addWidget(self.wgPreview, 0, 0) + + + def addMenu(self): + self.wgMenu = QtUiTools.QUiLoader().load(self.path_menu_ui) + self.wgHeader.layMain.addWidget(self.wgMenu, 1, 1) + + menu01_img = ["btn/btnWrite48", "btn/btnArrowRight48", "btn/btnHoneypot48", "btn/btnLog48", "btn/btnInboxE48", "user/default"] + menu01_items = [self.wgMenu.btnMenu01_item01, self.wgMenu.btnMenu01_item02, self.wgMenu.btnMenu01_item03, + self.wgMenu.btnMenu01_item04, self.wgMenu.btnMenu01_item05, self.wgMenu.btnMenu01_item06] + + self.select_menu = { + "data" : self.wgMenu.btnMenu01_item01, + "path" : self.wgMenu.btnMenu01_item02, + "advanced" : self.wgMenu.btnMenu01_item03, + "log" : self.wgMenu.btnMenu01_item04, + "report" : self.wgMenu.btnMenu01_item05, + "user" : self.wgMenu.btnMenu01_item06 + } + + for index, each_item in enumerate(menu01_items): + print each_item.objectName() + each_item.setIcon(QtGui.QPixmap(QtGui.QImage(libData.get_img_path(menu01_img[index])))) + # each_item.clicked.connect(lambda: self.press_btnMenu("settings")) + + self.wgMenu.btnMenu01_item01.clicked.connect(lambda: self.press_btnMenu("data")) + self.wgMenu.btnMenu01_item02.clicked.connect(lambda: self.press_btnMenu("path")) + self.wgMenu.btnMenu01_item03.clicked.connect(lambda: self.press_btnMenu("advanced")) + self.wgMenu.btnMenu01_item04.clicked.connect(lambda: self.press_btnMenu("log")) + self.wgMenu.btnMenu01_item05.clicked.connect(lambda: self.press_btnMenu("report")) + self.wgMenu.btnMenu01_item06.clicked.connect(lambda: self.press_btnMenu("user")) + + menu01_items[0].click() + + + #********************************************************************* + # PRESS + def press_btnAccept(self): + print("Accept") + + def press_btnOption(self): + print("Cancel") + # reload data + self.setOpenFolder('C:/') + + def press_btnOpenFolder(self): + print("openfolder") + webbrowser.open(self.open_path) + + def press_btnUser(self): + libFileFolder.open_folder(User().user_path) + + def press_btnProject(self): + libFileFolder.open_folder(os.getenv('PROJECT_PATH')) + + def press_btnReport(self): + libFunc.get_help('issues') + + def press_btnHelp(self, name=''): + libFunc.get_help(TITLE) + + # MENU + def press_btnMenu(self, menu_tag): + tmp_menu = self.select_menu[menu_tag] + + for eachMenu in self.select_menu.values(): + eachMenu.setStyleSheet('') + + for i in range(self.wgMenu.layMenu02.count()): + self.wgMenu.layMenu02.itemAt(0).widget().close() + self.wgMenu.layMenu02.takeAt(0) + + tmp_menu.setStyleSheet("background-color: rgb(51, 140, 188);") + + if menu_tag == 'data': + self.config_data = libData.get_data() + for eachKey in self.config_data.keys(): + print eachKey + addButton = QtGui.QPushButton(eachKey) + addButton.clicked.connect(lambda: self.press_btnSubMenu(eachKey)) + self.wgMenu.layMenu02.addWidget(addButton) + print addButton.text() + + try: self.wgMenu.layMenu02.itemAt(0).widget().click() + except: pass + + def press_btnSubMenu(self, key): + print key + for button_index in range(self.wgMenu.layMenu02.count()): + btn_tmp = self.wgMenu.layMenu02.itemAt(button_index).widget() + btn_font = btn_tmp.font() + + if btn_tmp.text() == key: btn_font.setBold(True) + else: btn_font.setBold(False) + + btn_tmp.setFont(btn_font) + + # TOP + def press_lblTitleBar(self): + print('drag around') + + def press_btnMinimize(self): + print("minimize") + self.wgHeader.showMinimized() + + def press_btnMaximize(self): + print("maximize") + if self.wgHeader.size() == self.monitor_size: + self.wgHeader.resize(self.default_size) + self.wgHeader.move(QtGui.QApplication.desktop().screen().rect().center() - self.wgHeader.rect().center()) + else: + self.wgHeader.setGeometry(self.monitor_res) + + def press_btnLayoutL(self): + self.wgHeader.resize(self.monitor_res.width()/2, (self.monitor_res.height())) + self.wgHeader.move(0, 0) + + def press_btnLayoutR(self): + self.wgHeader.resize(self.monitor_res.width()/2, (self.monitor_res.height())) + self.wgHeader.move(self.monitor_res.width()/2, 0) + + def press_btnClose(self): + print("close") + self.wgHeader.close() + + + #********************************************************************* + # FUNCTION + def setStatus(self, msg = '', msg_type = 0): + # 0 - neutral - blue + # 1 - done - green + # 2 - warning - yellow + # 3 - failed - red + + self.wgHeader.edtComment.setText(msg) + self.wgHeader.lblCommentImg.setPixmap(QtGui.QPixmap(QtGui.QImage(libData.get_img_path(self.config_data['style']['arUtil']['progress_img'][msg_type])))) + + if not msg_type: + template_css = """QProgressBar::chunk { background: %s; }""" + css = template_css % self.config_data['style']['arUtil']['progress_color'][msg_type] + self.wgHeader.prbStatus.setStyleSheet(css) + self.setProgress(100) + + def setProgress(self, count = 0): + self.wgHeader.prbStatus.setValue(count) + + def setOpenFolder(self, path=''): + if os.path.exists(path): + # active btnOpenFolder + self.wgHeader.btnOpenFolder.setEnabled(True) + self.open_path = os.path.normpath(path) + self.wgHeader.edtPath.setText(self.open_path) + else: + # deactive btnOpenFolder + self.wgHeader.btnOpenFolder.setEnabled(False) + # LOG.info("PATH doesnt exist: {}".format(path)) + + def refreshData(self): + self.config_data = libData.get_data() + + +def clickable(widget): + class Filter(QtCore.QObject): + clicked = QtCore.Signal() + def eventFilter(self, obj, event): + if obj == widget: + if event.type() == QtCore.QEvent.MouseButtonPress: + if obj.rect().contains(event.pos()): + self.clicked.emit() + print 'press' + return True + if event.type() == QtCore.QEvent.MouseButtonRelease: + print 'release' + return False + filter = Filter(widget) + widget.installEventFilter(filter) + return filter.clicked + + +#********************** +# START UI +# def start(): +# app = QtGui.QApplication(sys.argv) +# util = ArUtil() + +# app.exec_() + +# start() diff --git a/software/max/__init__.py b/software/max/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/software/max/max_menu.py b/software/max/max_menu.py new file mode 100644 index 0000000..13eebb9 --- /dev/null +++ b/software/max/max_menu.py @@ -0,0 +1,18 @@ + +import os + +import MaxPlus + +import libFunc +import libFileFolder + +def open_scene_folder(): + libFileFolder.open_folder(MaxPlus.Core.EvalMAXScript("sceneName = maxFilePath + maxFileName").Get()) + +def open_project_folder(): + libFileFolder.open_folder(os.getenv("PROJECT_PATH")) + +def get_report(): + libFunc.get_help('issues') + +def get_help(): libFunc.get_help() diff --git a/software/max/plugins/__init__.py b/software/max/plugins/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/software/max/scripts/__init__.py b/software/max/scripts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/software/max/startup.ms b/software/max/startup.ms new file mode 100644 index 0000000..96e602d --- /dev/null +++ b/software/max/startup.ms @@ -0,0 +1,4 @@ + +-- ... because Autodesk +python.init() +python.ExecuteFile "startup.py" diff --git a/software/max/startup.py b/software/max/startup.py new file mode 100644 index 0000000..6429117 --- /dev/null +++ b/software/max/startup.py @@ -0,0 +1,75 @@ +#********************************************************************* +# content = startup 3Ds Max +# version = 0.0.1 +# date = 2017-08-15 +# +# license = MIT +# copyright = Copyright 2017 Animationsinstitut +# author = Alexander Richter +#********************************************************************* +# This source file has been developed within the scope of the +# Technical Director course at Filmakademie Baden-Wuerttemberg. +# http://td.animationsinstitut.de +#********************************************************************* + +import os + +import MaxPlus + +import libLog +import libFunc +import libFileFolder +from tank import Tank + +TITLE = os.path.splitext(os.path.basename(__file__))[0] +LOG = libLog.init(script=TITLE) + +Tank().init_software() + +menu_name = os.getenv('PROJECT_NAME') + +#************************ +# MENU +def create_menu(): + + delete_menu() + + if MaxPlus.MenuManager.MenuExists(menu_name): + print ('The menu ', menu_name, ' already exists') + else: + menu = MaxPlus.MenuBuilder(menu_name) + + Tank().software.add_menu(menu) + + # sub_menu = MaxPlus.MenuBuilder(keys) + # sub_menu.Create(menu_node) + + # menu.AddItem(MaxPlus.ActionFactory.Create('Open Scene Folder2', 'Open Scene Folder', lambda: libFileFolder.open_folder(MaxPlus.Core.EvalMAXScript("sceneName = maxFilePath + maxFileName").Get()))) + # menu.AddItem(MaxPlus.ActionFactory.Create('Open Scene Folder2', 'Open Scene Folder', lambda: libFileFolder.open_folder(MaxPlus.Core.EvalMAXScript("sceneName = maxFilePath + maxFileName").Get()))) + # menu.AddItem(MaxPlus.ActionFactory.Create('Open Project Folder2', 'Open Project Folder', lambda: libFileFolder.open_folder(os.getenv("PROJECT_PATH")))) + + + # sub_menu = MaxPlus.MenuBuilder("Plexsub") + # sub_menu.AddItem(MaxPlus.ActionFactory.Create('Report2', 'Help', libFunc.get_help)) + + # menu.AddItem(MaxPlus.ActionFactory.Create('Report2', 'Report', lambda: libFunc.get_help("issues"))) + + # menu_setup = menu.Create(MaxPlus.MenuManager.GetMainMenu()) + # main_sub_menu = sub_menu.Create(menu_setup, 0) + + +def delete_menu(): + MaxPlus.MenuManager.UnregisterMenu(unicode(menu_name)) + + +# reload(startup) +create_menu() + + + +# import MaxPlus +# print 'The Scripts directory is', MaxPlus.PathManager.GetScriptsDir() +# print 'The Temp directory is', MaxPlus.PathManager.GetTempDir() + + + diff --git a/software/maya/userSetup.py b/software/maya/userSetup.py index 5a65c94..7dac9ec 100644 --- a/software/maya/userSetup.py +++ b/software/maya/userSetup.py @@ -30,8 +30,8 @@ print "MENU" try: - cmds.evalDeferred("load_menu()") - print " ON - menu" + cmds.evalDeferred("load_menu()") + print " ON - menu" except: print " OFF - menu" print " ON - shelf" @@ -42,16 +42,15 @@ #************************* # MENU def load_menu(): - delete_menu() + delete_menu() - menu = cmds.menu(os.getenv('PROJECT_NAME').replace(' ',''), hm = 1, p = 'MayaWindow', - l = os.getenv('PROJECT_NAME').replace(' ',''), to = 1, ) + menu = cmds.menu(os.getenv('PROJECT_NAME').replace(' ',''), hm = 1, p = 'MayaWindow', + l = os.getenv('PROJECT_NAME').replace(' ',''), to = 1, ) - for menu_item in Tank().data['software']['MAYA']['MENU']: - Tank().software.add_menu(menu, menu_item) + Tank().software.add_menu(menu) def delete_menu(): - if cmds.menu(os.getenv('PROJECT_NAME').replace(' ',''), query = True, exists = True): + if cmds.menu(os.getenv('PROJECT_NAME').replace(' ',''), query = True, exists = True): cmds.deleteUI(os.getenv('PROJECT_NAME').replace(' ',''), menu = True) diff --git a/software/nuke/init.py b/software/nuke/init.py index 540ada3..5144e8f 100644 --- a/software/nuke/init.py +++ b/software/nuke/init.py @@ -42,8 +42,7 @@ def createWriteDir(): os_path = nuke.callbacks.filenameFilter(file_path) # cope with the directory existing already by ignoring that exception - try: - os.makedirs( os_path ) + try: os.makedirs( os_path ) except OSError, e: if e.errno != errno.EEXIST: raise diff --git a/software/nuke/menu.py b/software/nuke/menu.py index 0991121..27ee903 100644 --- a/software/nuke/menu.py +++ b/software/nuke/menu.py @@ -62,11 +62,9 @@ def add_plugin_paths(): nuke.addOnScriptSave(add_write_node) -for menu_item in menu_data: - Tank().software.add_menu(menuNode, menu_item) - +# ADD menu +Tank().software.add_menu(menuNode) menuNode.addSeparator() - add_gizmo_menu(menuNode)