rsgalloway / pyseq

Compressed sequence string module for Python
https://pyseq.rsgalloway.com/
Other
123 stars 36 forks source link

stereo sequences #11

Open nebukadhezer opened 9 years ago

nebukadhezer commented 9 years ago

Hi Ryan,

first of thanks a ton for this module!! We do work a lot on stereo projects and, I made a fork of pyseq and made a bit of a "rucksack" bagpack s3d implemetation. to detect stereo pairs.... https://github.com/nebukadhezer/pyseq/blob/master/pyseq.py I did not go down to the item level so, each item has a "view" parameter, but as #5 , if one was about todo that I guess putting the regex pattern in an envvar would be best. Atm it only searches like this for s3d pairs gStereoRE = re.compile(r'(|.)(left|right|l|r|%v|%V)(|.)')

I do compare sequence objects after those have been detected and check for left and right. If those match, then they are a stuffed into a "wrapper" class stereoSequence, that has, the left eye sequence object on seq.left and right on seq.right If one was to perform actions on seq itself there is the left eye in there but the format returns the %v syntax for the s3d pair.... or %V if it is left not l only, like nuke does..

So the question is, is this something that could be pulled into your main repository ? Or do you want to keep stuff like that out ?

I am not sure if going down to the item level is a good thing for this, would love to get your opinion on that.

Then I added size parameters, so one can get the diskspace that is used from the sequence object, and a method to detect image size drops within a sequence. Sort of a sanity check for broken frames. though I am using that not that often to be honest :-)

Cheers Johannes

broganross commented 9 years ago

I've also seen le, re, lt, rt as eye specifiers. Plus they could be in your folder names and not just the files, so adding os.sep to the ends of the regex might help. I also found that doing a combined eye helped me a lot. Because I'll get the paths to a stereo pair then need to parse the formatted string later. I believe I did '[left|right]', [re|le]', etc...

rsgalloway commented 9 years ago

I think stereo pairing is useful functionality, thanks for thinking of that and implementing a prototype. Stereo seems like one of those conventions that's probably implemented slightly differently at every studio, unfortunately. I wonder if pyseq can help enable cross-studio conventions, like an industry standard for sequence naming. Maybe the VES already has something on this. hmm.

I don't want to get too industry specific with this module, though, since it can have utility outside of vfx/animation. File sequences exist in lots of contexts. I'd like to explore more "pairing" functionality in general, perhaps enabled by issue #5.

edit: typo

nebukadhezer commented 9 years ago

Hey Ryan and Ross,

I am still reworking the entire "views" thing, I already jumped on Ross suggestion to use pairs, as it makes more sense... as in #5 using an envvar with a general fallback seems a good way to go. for now I used json to decode this into a list of lists again... I tend to use "views" often for other stuff than s3d too. So I changed it that a pair can have n numbers of views ['greenWheel','blueWheel','whiteWheel', ...](I constantly push stuff into my s3dPyseq branch, but it is quite messy) I ll make a pull request once I am happy... Any suggestions are welcome.

Cheers Johannes

nebukadhezer commented 9 years ago

https://github.com/nebukadhezer/pyseq/blob/s3dPyseq/pyseq.py

current state of things is... I am a bit behind with the other modifications, but you can see where I am heading with this... Cheers