Modo Scripts
(501) mm_ClipUtilities.py
Posted by on Sunday, December 19, 2010 (GST)

*Note, if you're currently using either my 401 image file utilities or mm_EXIFDisplay scripts you should delete them before installing this new version to avoid conflicts*

Download: mm_ClipUtilities.zip

Last Update: 04/02/2011

What is it?
Adds 4 new commands to the right click context menu in the clips list:
  • Open With...  -  opens the clip file in a user defined application, e.g Photoshop.
  • Copy to Project Folder -  copies images loaded from external locations to the current project directory.
  • Set as Backplate - sets up the selected image as a camera backplate .
  • Display EXIF Data -  if present, displays any EXIF data associated with the image.

How to install:
  1. Download and unzip mm_WFRender.zip.
  2. From modo's 'System' menu choose either 'Open User Configs Folder' or 'Open User Scripts Folder' (it doesn't matter which) to open either the configs or scripts directory in Explorer/Finder.
  3. Copy/move the mm_ClipUtilities folder into whichever user folder you opened in the previous step. Make sure you copy the whole 'mm_ClipUtilities ' folder not just the files inside it.
  4. Restart modo.


The Commands:
Open With...
Opens the currently selected image clip with an application specified by the user, for example Photoshop. If no application is currently defined, ie the first time the script is run, the script will open a file dialog so that an application can be chosen. Once set the script will always open images using the specified program.


Copy to Project Folder
Copies the selected image clip to the current project folder, updating the images path in the scene. Usefull for consolidating images that have been loaded from outside the project and/or consolidating scene images. If the current scene is not part of a defined project the image will be saved relative to the scene file (lxo).

Images are saved to a subdirectory called 'imported_images'

*Note - as of 19/12/2010 there is a bug in modo's project structure implementation that prevents discovering the project's base path from a script for existing projects that have been opened in modo using 'File/Choose Project ...' and a scene file from that project opened using 'File/Open' or 'File/Open Recent ...' In this case, if you use 'Copy to Project Folder', the script wil open a dialog asking if you would like to save the image relative to the scene. Answereing 'yes' will save the image in a directory called 'imported_images' inside the project's 'scenes' directory (assuming that's where the scene was loaded from). There's not a lot that I'm able to do about this at the moment but the end result is that the image still gets saved inside the project directry structure and it's path will still be project relative. Hopefully ths bug will be fixed in an up-coming service pack.


Set as Backplate
Sets the currently selected image up as a Backplate Image using the current render camera. The script does all the necessary setup of the render item, frame size, frame aspect etc and sets up a new Environment item for the backplate. This gies you a one click setup for backplates.


Display EXIF Data
If the selected clip has associated EXIF data a dialog will pop up with the following EXIF information:
  • Camera model
  • Image creation Date
  • FocalLength
  • 35mm Equivalent focal length (see note below)
  • Shutter Speed
  • FStop
  • ISO
  • White Balance
  • Aspect Ratio
If the selected image has no EXIF data the dialog will say: 'No EXIF data to display'.

35mm Equivalent focal length
This figure is worked out based on a small database of cameras in the script. These are currently mostly DSLRs from Canon and Nikon. If a camera is not currently in the list the 35mm Equivalent entry will read 'Unknown: model of camera'. If you have a camera that is not in the list and you'd like it to be, I need to know the Model string as reported by the dialog as well as it's sensor dimensions (width and height). You should be able to find these in your camera's specification. The best way to let me know would be to either message me using the messaging facility on the members page or post in the forum. Cameras currently in the list are:
  • Canon EOS 300D DIGITAL
  • Canon EOS 350D DIGITAL
  • Canon EOS 400D DIGITAL
  • Canon EOS DIGITAL REBEL XT
  • Canon EOS D30
  • Canon EOS D60
  • Canon EOS 10D
  • Canon EOS 20D
  • Canon EOS 5D
  • Canon EOS-1D
  • Canon EOS-1D Mark II
  • Canon EOS-1Ds
  • Canon EOS-1Ds Mark II
  • NIKON D70
  • NIKON D1X
  • NIKON D2X
  • Sony DSLR-A100
  • Sony DSC-F828

Comments:

04/02/2011 - Fix
By Gwynne on Friday, February 04, 2011 (GST)
Fixed 'too many arguments' error caused by filenames with spaces.