Sha256: c848d7c2499982cd7deefe900d9626feafbd9febe666eaae15a53fc2bf5e5de0
Contents?: true
Size: 1.96 KB
Versions: 2
Compression:
Stored size: 1.96 KB
Contents
# -*- encoding : utf-8 -*- class Tracksperanto::Blacklist # Prevent totally unsupported formats from being used def self.raise_if_format_unsupported(judging_from_file_path) extension = File.extname(judging_from_file_path).downcase formats_and_extensions.each_pair do | matcher, message | raise Tracksperanto::UnsupportedFormatError, message if matcher.is_a?(String) && extension == matcher raise Tracksperanto::UnsupportedFormatError, message if matcher.is_a?(Regexp) && extension =~ matcher end end def self.formats_and_extensions { '.ma' => 'We cannot import Maya ASCII files directly. For processing Maya Live tracks export them from Maya.', '.mb' => 'We cannot import Maya ASCII files directly. For processing Maya Live tracks export them from Maya.', /\.(mov|avi|xvid|mp4)$/ => 'Tracksperanto is not a tracking application, it converts tracks. We do not support movie file formats.', /\.(r3d)$/ => 'Tracksperanto is not a tracking application, it converts tracks. We do not support RAW file formats.', /\.(dpx|tif(f?)|jp(e?)g|png|gif|tga)$/ => 'Tracksperanto is not a tracking application, it converts tracks. We do not support image file formats.', '.sni' => 'We cannot read binary SynthEyes scene files. Export your tracks as one of the supported formats.', /\.(pfb|pfmp)/ => 'We cannot directly open PFTrack projects, export .2dt files instead', '.mmf' => 'We cannot directly open MatchMover projects, please export your tracks as .rz2 instead', /\.(doc(x?)|xls(x?)|ppt(x?))/ => 'You really think we can process Microsoft Office files? You need a drink.', /\.(abc|fbx)$/ => 'We cannot import 3D scenes such as Alembic or FBX.', '.3de' => 'We cannot handle 3DE project files directly, please export your 2D tracks in a compatible format instead.', '.bpj' => "We cannot handle Boujou projects directly, please export your feature tracks from Boujou as a text file", } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tracksperanto-3.5.5 | lib/tracksperanto/blacklist.rb |
tracksperanto-3.5.4 | lib/tracksperanto/blacklist.rb |