Skip to content

salvaom/Ecosystem

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecosystem

About this fork

This is a prototype to determine what features of this code are valid an useful and which are not. It is meant as a compilation of ideas to improve the original Ecosystem.

Setup

  • ECO_ENV: Path for environment files.
  • ECO_PRESET_PATH: Path for ecosystem presets.
  • ECO_PLUGIN_PATH: Path for ecosystem plugins.

Basic python usage

from ecosystem import Ecosystem
import subprocess


eco = Ecosystem()
env = eco.get_environment('maya2016.5', 'mtoa1.2.7.3', 'alShaders1.0.0rc14')


# OR

maya_tool = eco.get_tool('maya2016.5')
mtoa_tool = eco.get_tool('mtoa1.2.7.3')
alshaders_tool = eco.get_tool('alShaders1.0.0rc14')

env = Environment(eco, maya_tool, mtoa_tool, alshaders_tool)

# The "clean" way
with env:
    subprocess.call('maya')

# The "dirty" way
env.resolve()
subprocess.call('maya')

Retrieving an environment

from ecosystem import Ecosystem
import subprocess


eco = Ecosystem()
env = eco.get_environment('maya2016.5', 'mtoa1.2.7.3', 'alShaders1.0.0rc14')

with env:
    environ = env.environ

#  ...

subprocess.call(
    'maya',
    env=environ
)

Presets

from ecosystem import Ecosystem
import subprocess


eco = Ecosystem()
preset = eco.get_preset('maya2016_core')

# Execute defaults
preset.run()

# Execute custom command
preset.run(command=['maya', '--prompt'])


# Further customization

with preset.get_environment():
    environ = env.environ

#  ...

subprocess.call(
    'maya',
    env=environ
)

Command line usage

ecosystem -h
ecosystem -l
ecosystem --list-presets
ecosystem -t maya2016.5 mtoa1.2.7.3 alShaders1.0.0rc14 -r maya
ecosystem -p maya2016_core -r
ecosystem -p maya2016_core -r maya

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%