Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/tuttleofx/TuttleOFX into…
Browse files Browse the repository at this point in the history
… dev_samDoStopProcessWithMultipleGraph

Conflicts:
	applications/sam/sam_ls.py
  • Loading branch information
Clement Champetier committed Aug 30, 2016
2 parents 72cd31f + a66600f commit 00cade1
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 171 deletions.
11 changes: 10 additions & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export TUTTLE_HOME=/your/custom/path
```


## The log level
## Manage log level
TuttleOFX host handles a global level to log information.
The list of possible log level are:
* fatal
Expand All @@ -50,5 +50,14 @@ export TUTTLE_LOG_LEVEL=trace
Note: the sam command line has an other log level, separate from the level of the TuttleOFX host. See sam options to get more details.


## Disable printed colors
The sam command line uses clint python module to display some results with colors. This is significantly clearer for the user.
Nevertheless, these colors could be a problem depending on the shell used, or if you want to dump some outputs to a file.
For all of these reasons, you can disable the printed colors with the following environment variable:
```
export TUTTLE_DISABLE_COLOR=True
```


## More information
http://www.tuttleofx.org/user-documentation
4 changes: 4 additions & 0 deletions applications/sam/common/samUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def __init__(self):
How to manipulate sequences ''' + self.tuttleWebSiteSequences + '''
'''

# disable printed colors if asked
if os.environ.get('TUTTLE_DISABLE_COLOR'):
colored.disable()

# create logger
self.logger = logging.getLogger('SAM')
self.logger.setLevel(logging.DEBUG)
Expand Down
81 changes: 30 additions & 51 deletions applications/sam/sam_do.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,80 +31,59 @@ def __init__(self):
sam do [options]... [// node [node-options]... [[param=]value]...]... [options]
'''))

self._pluginOption = colored.blue('Plugins options')
self._generatorsAndViewers = colored.blue('Generators and viewers')
self._principle = colored.blue('Principle')
self._imgSeqConversion = colored.blue('Image sequence conversion and creation')
self._folderManipulation = colored.blue('Folder manipulations')
self._geometryPorcessing = colored.blue('Geometry processing during conversion')
self._colorProcessing = colored.blue('Color processing during conversion')
self._imgSeqNumbering = colored.blue('Image Sequence Numbering')
self._processingOptions = colored.blue('Processing options')
self._processing = colored.blue('Processing')
self._generatorsAndViewers = colored.blue('Generators and viewers')
self._tuttleVersion = colored.green('TuttleOFX project [v' + str(tuttle.TUTTLE_HOST_VERSION_MAJOR)+'.'+str(tuttle.TUTTLE_HOST_VERSION_MINOR)+'.'+str(tuttle.TUTTLE_HOST_VERSION_MICRO)+']')
if clintVersion >= '0.3.3':
self._pluginOption.bold=True
self._generatorsAndViewers.bold=True
self._principle.bold=True
self._imgSeqConversion.bold=True
self._folderManipulation.bold=True
self._geometryPorcessing.bold=True
self._colorProcessing.bold=True
self._imgSeqNumbering.bold=True
self._processingOptions.bold=True
self._processing.bold=True
self._generatorsAndViewers.bold=True
self._tuttleVersion.bold=True

self.epilog = '''
''' + self._pluginOption + '''
Plugin list: sam do --nodes
Supported file formats list: sam do --file-formats
Plugin help: sam do blur -h
''' + self._generatorsAndViewers + '''
Viewer: sam do reader [email protected] // viewer
Print: sam do reader [email protected] // print color=full16ansi
Constant generator: sam do constant // viewer
White constant generator: sam do constant color=1,1,1,1 // viewer
HD constant generator: sam do constant size=1920,1080 // viewer
Checkerboard generator: sam do checkerboard // viewer
Checkerboard generator: sam do checkerboard width=500 // viewer
Checkerboard generator: sam do checkerboard width=1920 ratio=2.35 // viewer
Text writing: sam do constant // text text="hello" size=80 // viewer
''' + self._principle + '''
'sam do' can be seen as a command line version of a compositing software in which you can chain nodes, with a directed acyclic graph.
The general syntax is: sam do plugin // plugin // plugin
Continues whatever happens: sam do plugin // plugin // plugin --continue-on-error
Which plugins are available? sam do --nodes
How does a plugin work? sam do blur -h
''' + self._imgSeqConversion + '''
Convert Image: sam do reader in.dpx // writer out.jpg
Convert Sequence: sam do reader in.####.dpx // writer out.####.jpg
Select a frame: sam do reader in.####.dpx // writer out.####.jpg --ranges 10
Select a range: sam do reader in.####.dpx // writer out.####.jpg --ranges 10 100
Select several ranges: sam do reader in.####.dpx // writer out.####.jpg --ranges 10 100 150 200
Note: 'r' and 'w' are shortcuts for 'reader' and 'writer'
Convert files in directory recursively: sam do reader inDir // writer outDir ext=jpg
Convert some files in directory: sam do reader inDir ext=dpx // writer outDir ext=jpg --no-recursivity
Notes: 'reader' / 'r' could be use to automatically choose the best reader.
'writer' / 'w' could be use to automatically choose the best writer.
Convert files in a directory also copy the input tree structure to the output.
''' + self._folderManipulation + '''
Convert all images in a folder: sam do reader inputFolder // writer outputFolder ext=jpg
Convert dpx images in a folder: sam do reader inputFolder ext=dpx // writer outputFolder ext=jpg
Note: These commands copy the input tree structure to the output.
''' + self._imgSeqNumbering + '''
Frames with or without padding: [email protected]
Frames 1 to 100 padding 4: image.####.jpg -or- [email protected]
Frames 1 to 100 padding 5: image.#####.jpg
Printf style padding 4: image.%04d.jpg
''' + self._geometryPorcessing + '''
''' + self._processing + '''
Crop: sam do reader in.dpx // crop x1=20 x2=1000 y1=10 y2=300 // writer out.jpg
Fill: sam do reader in.dpx // crop y1=10 y2=1060 mode=fill color=0.43,0.67,0.50,1 // writer out.jpg
Resize: sam do reader in.####.dpx // resize size=1920,1080 // writer out.####.jpg
Upscaling: sam do reader in.####.dpx // resize width=1920 filter=lanczos // writer out.####.jpg
Downscaling: sam do reader in.####.dpx // resize width=720 filter=mitchell // writer out.####.jpg
''' + self._colorProcessing + '''
Lut : sam do reader in.####.dpx // ocio.lut lutFile.3dl // writer out.jpg
Resize: sam do reader in.####.dpx // resize format=HD // writer out.####.jpg
Lut: sam do reader in.####.dpx // ocio.lut lutFile.3dl // writer out.jpg
CTL: sam do reader in.####.dpx // ctl file=ctlCode.ctl // writer out.####.jpg
Gamma: sam do reader in.####.dpx // gamma master=2.2 // writer out.####.jpg
Color Gradation: sam do reader in.####.dpx // colorgradation in=Linear out=Rec709 // writer out.####.jpg
''' + self._imgSeqNumbering + '''
Frames with or without padding: [email protected]
Frames 1 to 100 padding 4: image.####.jpg -or- [email protected]
Frames 1 to 100 padding 5: image.#####.jpg
Printf style padding 4: image.%04d.jpg
''' + self._generatorsAndViewers + '''
Viewer: sam do reader [email protected] // viewer
Text writing: sam do reader [email protected] // text text="hello" size=80 // viewer
Checkerboard: sam do checkerboard // viewer
''' + self._processingOptions + '''
Range process: sam do reader [email protected] // writer [email protected] --ranges 50 100
Single process: sam do reader [email protected] // writer [email protected] --ranges 59
Continues whatever happens: sam do reader [email protected] // writer [email protected] --continue-on-error
Disable recursivity with folders: sam do reader inputFolder // writer outputFolder --no-recursivity
''' + self._tuttleVersion + ''' ''' + self.tuttleWebSiteUserDoc

def fillParser(self, parser):
Expand Down
Loading

0 comments on commit 00cade1

Please sign in to comment.