Skip to content

Commit

Permalink
ADD 3ds Max, ADD arUtil, EDIT menu_add, new/change img
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderrichter committed Aug 20, 2017
1 parent 2f58e33 commit afe925c
Show file tree
Hide file tree
Showing 82 changed files with 551 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand All @@ -47,6 +46,7 @@ software/nuke/gizmos/extern
software/houdini/plugins/*

!__init__.py
!lib/utils/ui/arUtil.ui

*.bak
*.pyc
Expand Down
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand All @@ -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**
Expand All @@ -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
Expand All @@ -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]**
Expand Down
6 changes: 3 additions & 3 deletions data/pipeline.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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']))
Expand Down
2 changes: 1 addition & 1 deletion data/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ user_data: True

PIPELINE:
name: Plex
version: 0.0.4
version: 1.0.0
61 changes: 54 additions & 7 deletions data/project/default/software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#*********************************************************************


#************************
#*****************************************************************************************************************************
# MAYA
MAYA:
version: &MAYA_VERSION 2016
Expand Down Expand Up @@ -80,7 +80,8 @@ MAYA:
unit: cm


#************************

#*****************************************************************************************************************************
# NUKE
NUKE:
version: &NUKE_VERSION 10.5
Expand All @@ -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]
Expand All @@ -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()
Expand All @@ -133,7 +134,7 @@ NUKE:



#************************
#*****************************************************************************************************************************
# HOUDINI
HOUDINI:
version: &HOUDINI_VERSION 16.0.633
Expand All @@ -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:
Expand Down
11 changes: 11 additions & 0 deletions exe/win_3dsMax.bat
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion exe/win_desktop.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion exe/win_maya.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion exe/win_nuke.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added img/btn/Thumbs.db
Binary file not shown.
Binary file modified img/software/3dsMax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/software/houdini/houdini.ico
Binary file not shown.
Binary file modified img/software/houdini/houdini_splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/software/max/max.ico
Binary file not shown.
Binary file added img/software/max/splash.bmp
Binary file not shown.
Binary file modified img/software/maya.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/software/maya/MayaEDUStartupImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/software/maya/maya.ico
Binary file not shown.
Binary file modified img/software/nuke/menu/nuke_toolbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/software/nuke/menu/writeBanner52.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/software/nuke/nuke.ico
Binary file not shown.
Binary file modified img/software/nuke/nuke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/software/nuke/nuke_splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/user/Thumbs.db
Binary file not shown.
74 changes: 52 additions & 22 deletions lib/classes/software.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion lib/libData.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,3 @@ def get_env(var):
return os.environ[var].split(';')[0]
LOG.warning('ENV doesnt exist: {}'.format(var))
return ''

2 changes: 1 addition & 1 deletion lib/libFileFolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion lib/libFunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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


Expand All @@ -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
Loading

0 comments on commit afe925c

Please sign in to comment.