PluginCollection

PluginCollection

導入

v4.0

詳細

Plugin オブジェクトのコレクションです。PluginCollection.Item のキーとして名前とプラグインのフルパスの両方を使用できます。

メソッド

Filter Find GetAsText  
       

プロパティ

Countオペレータ Itemオペレータ    
       

1. VBScript の例

set plgs = Application.Plugins

for each p in plgs

	Application.LogMessage "Name: " & p.Name

	Application.LogMessage "Author: " & p.Author

	Application.LogMessage "Major: " & p.Major

	Application.LogMessage "Minor: " & p.Minor

	Application.LogMessage "Language: " & p.Language

	Application.LogMessage "Filename: " & p.Filename

	Application.LogMessage "URL: " & p.URL

	Application.LogMessage "Email: " & p.Email

	Application.LogMessage "Loaded: " & p.Loaded

next

2. JScript の例

/*

	This example provides UI for loading plug-ins that is similar to the "Load" button

	on the Plug-in Manager.

	A File Open dialog is shown to the user. The PluginCollection.Item method is used to 

	test if the plug-in has already been loaded. If it hasn't been loaded Softimage 

	attempts to load it.

*/

var initialDir = Application.InstallationPath( siUserPath ) ;

if ( Application.Platform == "Win32" )

{

	initialDir += "\\Application\\plugins" ;

}

else

{

	initialDir += "/Application/plugins" ;

}

var oUIToolkit = new ActiveXObject("XSI.UIToolKit") ;

var oFileBrowser = oUIToolkit.FileBrowser ;

oFileBrowser.DialogTitle = "Select a plug-in to load" ;

oFileBrowser.InitialDirectory = initialDir ;

oFileBrowser.Filter = "All Files (*.*)|*.*||" ;

oFileBrowser.ShowOpen() ; 

if ( oFileBrowser.FilePathName != "" )

{

	var oExistingPlugin = Application.Plugins( oFileBrowser.FilePathName ) ;

	if ( oExistingPlugin != null )

	{

		XSIUIToolkit.MsgBox( oExistingPlugin.Name + " is already loaded" ) ;

	}

	else

	{

		Application.LoadPlugin( oFileBrowser.FilePathName ) ;

	}

}

関連項目

Plugin XSIApplication.Plugins