"Open In Graphics Editor" Script not RAWs. Help!

Grazie wrote on 4/14/2016, 1:26 AM
I use COREL X8 as my weapon of graphics-choice.

I can get OIGE to work nicely with all the flavours it is meant to, but transferring RAWs does not open/transfer.

Note1: COREL X8 accepts RAWs easily - it would have too, it's a Graphics-Photo app!

Note2: Opening the RAW directly from a "RUN" command works too.

Now, would a kindly Scripting Guru consider making it happen for me?

Much appreciated,

Grazie

Comments

JohnnyRoy wrote on 4/19/2016, 6:08 AM
Here is my personal script for doing this. Just change the location of the graphics program to whatever you'd like and see if it works for you:

//*******************************************************************
//* Program: OpenInGraphicEditor.cs
//* Author: John Rofrano
//* Updated: December 27, 2009
//* Copyright: (c) 2009, John Rofrano, All Rights Reserved
//********************************************************************
using System;
using System.Diagnostics;
using System.Windows.Forms;
using Sony.Vegas;

public class EntryPoint
{
// String graphicsProgram = @"C:\Program Files (x86)\Adobe\Adobe Photoshop CS5\Photoshop.exe";
String graphicsProgram = @"C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Photoshop.exe";

public void FromVegas(Vegas vegas)
{
try
{
VideoEvent videoEvent = FindFirstSelectedVideoEvent(vegas.Project);
if (videoEvent != null && videoEvent.ActiveTake != null)
{
Process.Start(graphicsProgram, "\"" + videoEvent.ActiveTake.MediaPath + "\"");
}
else
{
MessageBox.Show("You must select a video event before running this script", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception e)
{
MessageBox.Show(e.Message, "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
}

/// <summary>
/// Returns the first selected video event
/// </summary>
/// <param name="project"></param>
/// <returns>The first selected video event or null if no video event selected</returns>
public VideoEvent FindFirstSelectedVideoEvent(Project project)
{
foreach (Track track in project.Tracks)
{
// only check video tracks
if (!track.IsVideo()) continue;

foreach (VideoEvent videoEvent in track.Events)
{
if (videoEvent.Selected)
{
return videoEvent;
}
}
}

return null;
}

}
Let me know how it works out.

~jr
videoITguy wrote on 4/19/2016, 4:09 PM
I think the OP's quest is about a slightly different wrinkle in the RAW type file processes. I have observed that while you can in fact install a given app for opening a given type of esoteric RAW file image - this does not mean that an allowance is always made to open in a secondary app hooked into the primary app. Could have to do with other issues including memory allocation.
Grazie wrote on 4/20/2016, 4:27 PM
Hi John - only just got to read your kind posting ( the OP here VITG).

I've got this error come up:

C:\Program Files\Sony\Vegas Pro 13.0\Script Menu\OpenInGraphicEditor.cs(1) : A namespace cannot directly contain members such as fields or methods

I have no idea what this means?

Please advise,

G