Page MenuHome

letterboxing from Video Sequence Editor > Strip menu
Closed, ArchivedPublic


I have created an addon which makes it easy to letterbox VSE content that does not match the current scene's aspect ratio.

Since I don't have drag&drop I hope I can upload it via a comment.



Event Timeline

Robert Forsman (mutantbob) set Type to Patch.
Robert Forsman (mutantbob) created this task.
Robert Forsman (mutantbob) raised the priority of this task from to Needs Triage by Developer.

Well, until you fix this tool to support regular file upload:

Brendon Murphy (meta-androcto) triaged this task as Normal priority.

hi, Is there a wiki page for this addon with description & more information?
I think it would be good to add to contrib once documented.

I've put my git repo on github.

The latest version has updated bl_info according to the guidelines IRC pointed me at.

Campbell Barton (campbellbarton) lowered the priority of this task from Normal to Needs Information from User.

This could go into contrib, but theres still some odd code that would be nice to change beforehand.

  • try/except used for reporting. Would prefer not to do this, instead report any problems and return False if the function fails.
  • also remove try/except for register.
  • if hasattr(src_strip, "scene"): - better check the src_strip.type == 'SCENE'. Same for other uses of hasattr to check strip types.
  • Line: # XXX what if the active strip is sound? or something else wrong?? - Just check if its a sound type and report an error in that case.
  • Line: 179, better keep our code G rated :)

You're going to have to give me some more specific advice about removing try/except. If I don't catch the exception, then the user won't get any explanation for the failure at all. Also, I don't think the operator expects me to return False on failure. returning {'CANCELLED'} seems to be the preferred return value.

My current instinct is to stick with hasattr. python, being a dynamically typed language, leads me to assume that there might be some other strip (now or in the future) with a scene property, and of all the changes likely to happen, this way seems most future-proof. It is not 100% future proof, but all the scenarios where it isn't will need code changes anyway.

Sound strips: done.

179, fixed. I really should not need that if clause, but something somewhere is insane. Look at that code and tell me why it ever gets called.

@Robert Forsman (mutantbob).

re: try/except, You don't need this to report issues to the user, you can check scripts that come with Blender, where reporting is managed without exception handling. (You can pass the report method as an argument to the function for eg).

re: "hasattr", This is fine if you inspect data and want to check what it supports. But in this case you should be specific about what strips you operate on.

I stopped throwing exceptions and now return success/fail values.

I removed the "hasattr" futureproofing for most cases, but left it in as guidance for the features currently missing from blender.

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Normal.

over 18 months old.