All Projects → justinfx → Fileseq

justinfx / Fileseq

Licence: other
A Python library for parsing frame ranges.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Fileseq

Oiio
Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.
Stars: ✭ 1,216 (+641.46%)
Mutual labels:  vfx
2d Unity Experiments
A collection of visual Unity experiments with latest packages (URP, Shader Graph, Cinemachine, etc).
Stars: ✭ 107 (-34.76%)
Mutual labels:  vfx
Vfx Datasets
Stars: ✭ 134 (-18.29%)
Mutual labels:  vfx
Unity Abstract Wire
Unity Abstract Wires Effect
Stars: ✭ 83 (-49.39%)
Mutual labels:  vfx
Openshadinglanguage
Advanced shading language for production GI renderers
Stars: ✭ 1,382 (+742.68%)
Mutual labels:  vfx
Proccharvfx
Procedural character generation with Unity Shader Graph and VFX Graph
Stars: ✭ 114 (-30.49%)
Mutual labels:  vfx
Dkvfxsketches
VFX sketches with Depthkit and Unity
Stars: ✭ 74 (-54.88%)
Mutual labels:  vfx
Appleseed
A modern open source rendering engine for animation and visual effects
Stars: ✭ 1,824 (+1012.2%)
Mutual labels:  vfx
Blenderupdater
Small crossplatform Python 3 application to update Blender to the latest buildbot version
Stars: ✭ 103 (-37.2%)
Mutual labels:  vfx
Rcam
Real time volumetric video capture for live visuals
Stars: ✭ 128 (-21.95%)
Mutual labels:  vfx
Spriteglow
A sprite glow effect for Unity game engine
Stars: ✭ 1,287 (+684.76%)
Mutual labels:  vfx
Openvdb
OpenVDB - Sparse volume data structure and tools
Stars: ✭ 1,359 (+728.66%)
Mutual labels:  vfx
Pcxeffects3
Unity VFX with point cloud
Stars: ✭ 121 (-26.22%)
Mutual labels:  vfx
Akvj
Demo project for Akvfx (Azure Kinect plugin for Unity)
Stars: ✭ 79 (-51.83%)
Mutual labels:  vfx
Pencilsketcheffect
Real Time Hatching In Unity
Stars: ✭ 134 (-18.29%)
Mutual labels:  vfx
Unreal tools
Blender 3D scripts for storing vertex data for use in a vertex shader.
Stars: ✭ 74 (-54.88%)
Mutual labels:  vfx
Natron
Open-source compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
Stars: ✭ 1,465 (+793.29%)
Mutual labels:  vfx
Dkvfx
An example that shows how to use recorded Depthkit footage with Unity VFX Graph
Stars: ✭ 162 (-1.22%)
Mutual labels:  vfx
Delir
Web Technology driven VFX Application
Stars: ✭ 142 (-13.41%)
Mutual labels:  vfx
Vfxminisexamples
Unity examples showing how to control VFX graphs with MIDI devices
Stars: ✭ 122 (-25.61%)
Mutual labels:  vfx

Fileseq

Documentation Status Build status

A Python library for parsing frame ranges and file sequences commonly used in VFX and Animation applications.

Frame Range Shorthand

Support for:

  • Standard: 1-10
  • Comma Delimited: 1-10,10-20
  • Chunked: 1-100x5
  • Filled: 1-100y5
  • Staggered: 1-100:3 (1-100x3, 1-100x2, 1-100)
  • Negative frame numbers: -10-100
  • Subframes: 1001-1066x0.25, 1001.5-1066.0x0.5
  • Padding: #=4 padded, @=1 padded
  • Alternate padding: #=1 padded, @=1 padded
  • Printf Syntax Padding: %04d=4 padded, %01d=1 padded
  • Houdini Syntax Padding: $F4=4 padding, $F=1 padded

FrameSets

A FrameSet wraps a sequence of frames in a list container.

Iterate a FrameSet

fs = fileseq.FrameSet("1-5")
for f in fs:
  print f

Access Frames

Using Indices:

>>> fs = fileseq.FrameSet("1-100:8")
>>> fs[0] # First frame.
1
>>> fs[-1] # Last frame.
98

Using Convenience Methods:

>>> fs = fileseq.FrameSet("1-100:8")
>>> fs.start() # First frame.
1
>>> fs.end() # Last frame.
98

FileSequence

Instantiate from String

fileseq.FileSequence("/foo/bar.1-10#.exr")
fileseq.FileSequence("/foo/bar.1-10x0.25#.#.exr", allow_subframes=True)

Format Path for VFX Software

Using FileSequence.format Method:

>>> seq = fileseq.FileSequence("/foo/bar.1-10#.exr")
>>> seq.format(template='{dirname}{basename}{padding}{extension}') 
"/foo/bar.#.exr"
>>> seq = fileseq.FileSequence("/foo/bar.1-10#.#.exr", allow_subframes=True)
>>> seq.format(template='{dirname}{basename}{padding}{extension}')
"/foo/bar.#.#.exr"

Joining:

>>> seq = fileseq.FileSequence("/foo/bar.1-10#.exr")
>>> ''.join([seq.dirname(), seq.basename(), '%0{}d'.format(len(str(seq.end()))), seq.extension()])
"/foo/bar.%02d.exr"

Alternate Padding Styles:

>>> seq = fileseq.FileSequence("/foo/bar.1-10#.exr", pad_style=fileseq.PAD_STYLE_HASH1)
>>> list(seq)
['/foo/bar.1.exr',
 '/foo/bar.2.exr',
 '/foo/bar.3.exr',
 '/foo/bar.4.exr',
 '/foo/bar.5.exr',
 '/foo/bar.6.exr',
 '/foo/bar.7.exr',
 '/foo/bar.8.exr',
 '/foo/bar.9.exr',
 '/foo/bar.10.exr']
>>> seq = fileseq.FileSequence("/foo/bar.1-10#.exr", pad_style=fileseq.PAD_STYLE_HASH4)
>>> list(seq)
['/foo/bar.0001.exr',
 '/foo/bar.0002.exr',
 '/foo/bar.0003.exr',
 '/foo/bar.0004.exr',
 '/foo/bar.0005.exr',
 '/foo/bar.0006.exr',
 '/foo/bar.0007.exr',
 '/foo/bar.0008.exr',
 '/foo/bar.0009.exr',
 '/foo/bar.0010.exr']

Get List of File Paths

>>> seq = fileseq.FileSequence("/foo/bar.1-10#.exr")
>>> [seq[idx] for idx, fr in enumerate(seq.frameSet())]
['/foo/bar.0001.exr',
 '/foo/bar.0002.exr',
 '/foo/bar.0003.exr',
 '/foo/bar.0004.exr',
 '/foo/bar.0005.exr',
 '/foo/bar.0006.exr',
 '/foo/bar.0007.exr',
 '/foo/bar.0008.exr',
 '/foo/bar.0009.exr',
 '/foo/bar.0010.exr']

Finding Sequences on Disk

Check a Directory for All Existing Sequences

seqs = fileseq.findSequencesOnDisk("/show/shot/renders/bty_foo/v1")

Check a Directory for One Existing Sequence.

  • Use a '@' or '#' where you might expect to use '*' for a wildcard character.
  • For this method, it doesn't matter how many instances of the padding character you use, it will still find your sequence.

Yes:

fileseq.findSequenceOnDisk('/foo/[email protected]')

Yes:

fileseq.findSequenceOnDisk('/foo/[email protected]@@@@.exr')

No:

fileseq.findSequenceOnDisk('/foo/bar.*.exr')
  • To find subframe sequences you must explicitly opt-in
fileseq.findSequenceOnDisk('/foo/bar.#.#.exr', allow_subframes=True)

Language Ports

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].