Skip to content

Commit

Permalink
added maya scripts (shelf, maya_utils, menu, settings)
Browse files Browse the repository at this point in the history
combined decorator with maya_utils
updated arDesktop with libFileFolder func
changed readme
  • Loading branch information
Alexander Richter committed Jul 9, 2017
1 parent 9d540dd commit cbbb303
Show file tree
Hide file tree
Showing 10 changed files with 473 additions and 37 deletions.
21 changes: 13 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ img/img_rc.py

data/test.py

data/exe/win_houdini.bat
data/exe/debug_win_houdini.bat
data/exe/debug_win_maya.bat
data/exe/debug_win_nuke.bat
data/exe/debug_win_arDesktop.bat
exe/win_houdini.bat
exe/debug_win_houdini.bat
exe/debug_win_maya.bat
exe/debug_win_nuke.bat
exe/debug_win_arDesktop.bat

data/project/default/history
data/project/default/hints.yml
Expand All @@ -33,8 +33,13 @@ lib/utils/arSmartLoader.py
lib/utils/arUtil.py

software/maya/plugins/*
software/maya/scripts/*
software/maya/shelf/*
software/maya/scripts/SHD
software/maya/scripts/ANIM
software/maya/scripts/LIGHT
software/maya/scripts/LOOKDEV
software/maya/scripts/RENDER
software/maya/scripts/SHD
software/maya/scripts/GEO

software/nuke/plugins/*
software/nuke/gizmos/extern
Expand All @@ -43,4 +48,4 @@ software/houdini/plugins/*

*.pyc
*.log
*.qrc
*.qrc
41 changes: 18 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
> ### In Development
> A lot of features are still in production. Check out the documentary and **[help us to improve.](https://github.com/richteralexander/plex/wiki/How-to-Contribute)**
> ### In Development
> A lot of features are still in production. Check out the documentary and **[help us to improve.](https://github.com/richteralexander/plex/wiki/How-to-Contribute)**
> [**Releases**](https://github.com/richteralexander/plex/releases): Every sunday will be a patch day with new additions and fixes.
>
> [**Releases**](https://github.com/richteralexander/plex/releases): Every sunday will be a patch day with new additions and fixes.
>
> [FMX 2017 Talk - Open Source Pipeline](https://www.youtube.com/watch?v=_JC0AMYX_Bw)
> [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)

## **Introduction**
**Plex** is an **Animation, VFX and Games pipeline** managing important workflows during production.
Its core is a flexible and independent system for small to mid-sized projects and companies.
Its core is a flexible and independent system for small to mid-sized projects and companies.
The basic idea is to handle the file and folder structure work, setups basic rules and guides the workflow to allow a collaborated working.

> Intuitively guiding the input and output of users to overcome problems and achieve goals.
> Intuitively guiding the input and output of users to overcome problems and achieve goals.
> Now you have a good game ... or pipeline.
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.
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)

## Environment [in development]
- [x] **OS**: Windows (| Linux | Max)
- [x] **Software**: Nuke 9+ | Maya 2015+ (| Houdini 15+)
- [x] **Renderer**: Arnold (| RenderMan | Mantra | V-Ray)
- [x] Python 2.7 | (Python 3.4+) | PySide | (PySide2)
- [x] **OS**: Windows (| Linux | Mac)
- [x] **Software**: Nuke 9+ | Maya 2015+ | Houdini 15+
- [x] **Renderer**: Arnold | RenderMan | Mantra | V-Ray

## Project Features
- [x] vfx, animation & game production management system
Expand Down Expand Up @@ -56,12 +54,9 @@ The main idea is to have an overall system which lays the **foundation for the m
- context (shot, task, comment ...)
- environment variables (PROJECT_PATH ...)
- additional libraries
- [x] **Feedback & Debug** (+ advanced logging)
- [x] **Feedback & Debug** (+ advanced logging)
- inform user about processes
- debug like a king \*bow\*
- [x] **Report & Support**
- automatic error report on crash
- support request with repository link (github)
- [x] **Parent Scripts**
- header (script info, user, report & help)
- footer (accept, comment, color code)
Expand All @@ -70,9 +65,9 @@ The main idea is to have an overall system which lays the **foundation for the m


## **Projects [realized with]**
- [Breaking Point](https://vimeo.com/178452618) \[VFX short film 2016\]
- [Breaking Point](https://vimeo.com/178452618) \[VFX short film 2016\]
[Winner VES Award 2017](https://www.visualeffectssociety.com/post/15th-annual-ves-awards-nominees) and [Winner Siggraph Asia 2016](https://sa2016.siggraph.org/en)
- Elemental (Nuke) \[VFX short film 2016\]
- Elemental (Nuke) \[VFX short film 2016\]
[FMX Trailer 2017](https://www.youtube.com/watch?v=KmI8yakN9d4)
- [Animan](https://www.youtube.com/watch?v=CxxzeZg05mE) | [Drool Pool](https://www.youtube.com/watch?v=EueZW6H8Rq0&t=2s)

Expand All @@ -81,9 +76,9 @@ The main idea is to have an overall system which lays the **foundation for the m
Plex is available under the **MIT License**. You can use it for commercial or non-commercial projects. Please include the attributes and a credit in your docs.


## **"Make it better"-Promise**
Everyone should have a great time working on their project and focusing on creativity.
Or helping me to make this one a fine piece of software.
I offer an introduction or support to make additions to the software.
## **"Make it better"-Promise**
Everyone should have a great time working on their project and focusing on creativity.
Or help me to make this one a fine piece of software.
I offer an introduction or support to make additions to the software.
- **[contributor](https://github.com/richteralexander/plex/wiki/How-to-Contribute)**: 2h personal or skype
- **good friend** (+ beer): 4h personal or skype
- **good friend** (+ beer): 4h personal or skype
Binary file modified img/user/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions lib/utils/arDesktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import libLog
import libData
import libFunc
import libFileFolder
from tank import Tank
from software import Software

Expand Down Expand Up @@ -113,11 +114,10 @@ def startArNotificator(self):
#**********************
# PRESS_TRIGGER
def press_btnShowUserData(self):
print os.path.normpath(project_data['PATH']['user'])
webbrowser.open(os.path.normpath(project_data['PATH']['user']))
libFileFolder.open_folder(project_data['PATH']['user'] + '/' + os.getenv('username'))

def press_btnOpenProjectPath(self):
webbrowser.open(os.path.normpath(project_data['path']))
libFileFolder.open_folder(project_data['path'])
#------------------------------
def press_btnProject(self):
import arProject
Expand All @@ -134,10 +134,10 @@ def press_btnOpenHoudini(self):

#------------------------------
def press_btnOpenProjectLog(self):
webbrowser.open(os.path.normpath(libData.get_env('DATA_PROJECT_PATH')))
libFileFolder.open_folder(libData.get_env('DATA_PROJECT_PATH'))

def press_btnOpenLocalLog(self):
webbrowser.open(os.path.normpath(libData.get_env('DATA_USER_PATH')))
libFileFolder.open_folder(libData.get_env('DATA_USER_PATH'))

def press_btnWriteReminder(self):
from utilities import arNotificator
Expand All @@ -150,7 +150,6 @@ def press_btnHelp(self):
libFunc.get_help(TITLE)
#------------------------------
def press_closeStartup(self):
LOG.debug('closeStartup')
self.parent.instance().quit()


Expand Down
Empty file.
61 changes: 61 additions & 0 deletions software/maya/scripts/maya_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#*********************************************************************
# content = maya utils
# version = 0.6.0
# date = 2017-07-10
#
# license = MIT
# copyright = Copyright 2017 Animationsinstitut
# author = Alexander Richter <[email protected]>
#*********************************************************************
# This source file has been developed within the scope of the
# Technical Director course at Filmakademie Baden-Wuerttemberg.
# http://td.animationsinstitut.de
#*********************************************************************

from pymel.core import *
from functools import wraps
import maya.mel as mel

import libLog

TITLE = os.path.splitext(os.path.basename(__file__))[0]
LOG = libLog.init(script=TITLE)

def position_selected():
selectedObj = ls( selection=True )

if len(selectedObj) > 1:
origin = selectedObj[0]
selectedObj.pop(0)

for sObj in selectedObj:
cam_new = general.PyNode(sObj)
cam_origin = general.PyNode(origin)

cam_new.translate.set(cam_origin.translate.get())
cam_new.rotate.set(cam_origin.rotate.get())
cam_new.scale.set(cam_origin.scale.get())
else:
LOG.warning("FAIL : Need at least 2 selections")


#************************
# Decorators
def viewport_off(func):

@wraps(func)
def viewport(*args, **kwargs):

try:
# viewport OFF
mel.eval("paneLayout -e -manage false $gMainPane")
return func(*args, **kwargs)
except Exception:
LOG.error("FAIL : Viewport off", exc_info=True)
raise

finally:
# viewport ON
mel.eval("paneLayout -e -manage true $gMainPane")

return viewport
37 changes: 37 additions & 0 deletions software/maya/scripts/menu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#*********************************************************************
# content = maya menu
# version = 0.6.0
# date = 2017-07-10
#
# license = MIT
# copyright = Copyright 2017 Animationsinstitut
# author = Alexander Richter <[email protected]>
#*********************************************************************
# 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 maya.cmds as cmds

from tank import Tank


#*************************
# MENU
def load_menu():
delete_menu()

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)


def delete_menu():
if cmds.menu(os.getenv('PROJECT_NAME').replace(' ',''), query = True, exists = True):
cmds.deleteUI(os.getenv('PROJECT_NAME').replace(' ',''), menu = True)

71 changes: 71 additions & 0 deletions software/maya/scripts/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#*********************************************************************
# content = maya settings
# version = 0.0.1
# date = 2017-01-01
#
# license = MIT
# copyright = Copyright 2017 Animationsinstitut
# author = Alexander Richter <[email protected]>
#*********************************************************************
# This source file has been developed within the scope of the
# Technical Director course at Filmakademie Baden-Wuerttemberg.
# http://td.animationsinstitut.de
#*********************************************************************


import maya.mel as mel
import maya.cmds as cmds
import maya.OpenMaya as api

import libLog
from tank import Tank

import libLog
TITLE = os.path.splitext(os.path.basename(__file__))[0]
LOG = libLog.init(script=TITLE)

all_data = Tank().data
project_data = all_data['project']
software_data = all_data['software']


#*************************
# SETTINGS

# TIME
try:
fps = software_data['SETTINGS']['FPS'][project_data['fps']]
cmds.currentUnit(time=fps)
cmds.optionVar(sv = ("workingUnitTime", fps))
cmds.optionVar(sv = ("workingUnitTimeDefault", fps))
except: LOG.error('FAILED load fps.', exc_info=True)

# UNIT
try: cmds.currentUnit(linear=software_data['SETTINGS']['unit'])
except: LOG.error('FAILED load unit.', exc_info=True)

# RENDERER
try:
renderer = software_data['renderer']
cmds.optionVar(sv = ("preferredRenderer", software_data['renderer']))
cmds.optionVar(sv = ("preferredRendererHold", software_data['renderer']))
except: LOG.error('FAILED load renderer.', exc_info=True)


# shortcut - SAVE
# cmd = 'python "from scripts import save;save.start()"'
# cmds.nameCommand( 'save', annotation="Save", sourceType="mel" ,c=cmd)
# cmds.hotkey( k='s', alt=True, name='save' )

# FIX renderLayer
# def fixRenderLayer(*args):
# mel.eval("fixRenderLayerOutAdjustmentErrors;")
# api.MSceneMessage.addCallback(api.MSceneMessage.kAfterOpen, fixRenderLayer)


# LINEAR WORKFLOW
# cmds.setAttr ("defaultArnoldRenderOptions.textureMaxMemoryMB", 10024)
# cmds.setAttr ("defaultArnoldRenderOptions.display_gamma", 1)
# cmds.setAttr ("defaultArnoldRenderOptions.light_gamma", 1)
# cmds.setAttr ("defaultArnoldRenderOptions.shader_gamma", 1)
# cmds.setAttr ("defaultArnoldRenderOptions.texture_gamma", 1)
Empty file added software/maya/shelf/__init__.py
Empty file.
Loading

0 comments on commit cbbb303

Please sign in to comment.