Comments

jetdv wrote on 1/10/2008, 6:07 PM
The same png files that work with scripts also work in Custom Commands. However, you specify the Custom Command icon differently. You can either specify it in the config file or you can specify it in the dll file itself:

myCC.IconFile = "MyImage.png";

(Use the full path to the icon file)

As mentioned in the first sticky post in this forum:

* Vegas can now be extended by a new kind of compiled script,
called a "custom command", that is loaded when the application
starts and stays 'alive' as long as the application is running.
Custom commands have the ability to respond to changes in project
data, control playback, and present a non-modal user interface.
Custom commands are represented by instances of the CustomCommand
class which provides basic information about the command such as its
category, name, and icon. You can subscribe to events or override
methods on CustomCommand objects to provide their functionality.

Rosebud wrote on 1/11/2008, 1:31 AM
As always, Thx for your help Edward .

I’m feeling like a dumb, I can’t get it to work.

I tried with a config file:

<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<ScriptSettings>
<IconFile>C:\Documents and Settings\Pialat\Mes documents\Vegas Application Extensions\CC_GotoEvent.png</IconFile>
</ScriptSettings>
</configuration>

or

<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<ScriptSettings>
<IconFile>CC_GotoEvent.png</IconFile>
</ScriptSettings>
</configuration>

and it don’t work...

It works when I specify it in the dll file itself, but I don’t know how to set the path relatively.
I don't find a way to know where the Custom Command is installed.

Thx again.



But what I'm doing wrong with the config file ?
jetdv wrote on 1/11/2008, 6:14 AM
I always do it in the DLL file like the method you got to work. You can also change the menu text there as well.
ForumAdmin wrote on 1/11/2008, 7:22 AM
Vegas does not read configuration files for application extensions. You must specify the icon file in the code. If needed, your own code can read the icon location from a configuration file.
Rosebud wrote on 1/11/2008, 8:42 AM
Ok, many thx for the clarification.