xsi_application.h
Go to the documentation of this file.
00001 //*****************************************************************************
00011 //*****************************************************************************
00012 
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016 
00017 #ifndef __XSIAPPLICATION_H__
00018 #define __XSIAPPLICATION_H__
00019 
00020 #include <xsi_siobject.h>
00021 #include <xsi_value.h>
00022 #include <xsi_status.h>
00023 
00024 namespace XSI {
00025 
00026 class Selection;
00027 class Dictionary;
00028 class Command;
00029 class CommandArray;
00030 class Project;
00031 class Model;
00032 class Preferences;
00033 class Desktop;
00034 class UIToolkit;
00035 class Plugin;
00036 class UIToolkit;
00037 class Factory;
00038 class ProjectItem;
00039 class ShaderDef;
00040 
00041 //*****************************************************************************
00075 //*****************************************************************************
00076 
00077 class SICPPSDKDECL Application : public SIObject
00078 {
00079 public:
00081     Application();
00082 
00084     ~Application(){}
00085 
00090     Application(const CRef& in_ref);
00091 
00095     Application(const Application& in_obj);
00096 
00101     bool IsA( siClassID in_ClassID) const;
00102 
00106     siClassID GetClassID() const;
00107 
00113     Application& operator=(const Application& in_obj);
00114 
00120     Application& operator=(const CRef& in_ref);
00121 
00125     Selection GetSelection() const;
00126 
00131     CRefArray GetFCurveSelection() const;
00132 
00136     Dictionary GetDictionary() const;
00137 
00141     Project GetActiveProject() const;
00142 
00149     CStatus PutActiveProject(const CString& in_Project) const;
00150 
00154     Model GetActiveSceneRoot() const;
00155 
00161     CString GetInstallationPath( siInstallationPath in_pathType ) const;
00162 
00177     CString GetVersion() const;
00178 
00186     CString GetLicense() const;
00187 
00204     CStatus InstallAddon( const CString& in_strFileName, siInstallationPath in_eInstallDir, bool in_bNoUI=false );
00205 
00214     CStatus UnInstallAddon( const CString& in_strFileName );
00215 
00229     Command CreateCommand( const CString& in_CommandName, siCommandCategory in_category = siNoCategory );
00230 
00240     CStatus AddCommand(const CRef& in_Cmd);
00241 
00253     CStatus RemoveCommand( const CString& name );
00254 
00258     CommandArray GetCommands() const;
00259 
00267     Command GetCommandByScriptingName(const CString& scriptingName) const ;
00268 
00333     CStatus ExecuteCommand
00334     (
00335         const CString&  in_name,
00336         CValueArray&    in_args,
00337         CValue&         io_val
00338     ) const;
00339 
00357     CStatus ExecuteCommand
00358     (
00359         const CString&      in_name,
00360         const CValueArray&  in_args,
00361         CValue&             io_val
00362     ) const;
00363 
00375     CScriptErrorDescriptor ExecuteScript
00376     (
00377         const CString &     in_ScriptFilename,
00378         const CString&      in_ScriptLanguage,
00379         const CString&      in_ScriptProcedure,
00380         CValueArray&        in_args,
00381         CValue&             out_returnval
00382     ) ;
00383 
00431     CScriptErrorDescriptor ExecuteScriptCode
00432     (
00433         const CString & in_ScriptCode,
00434         const CString&  in_ScriptLanguage
00435     ) ;
00436 
00453     CScriptErrorDescriptor ExecuteScriptProcedure
00454     (
00455         const CString & in_ScriptCode,
00456         const CString&  in_ScriptLanguage,
00457         const CString&  in_ScriptProcedure,
00458         CValueArray&    in_args,
00459         CValue&         out_returnval
00460     ) ;
00461 
00466     CRefArray GetEventInfos() const;
00467 
00476     CStatus LogMessage
00477     (
00478         const CString& in_Message,
00479         siSeverityType in_Sev = siInfoMsg
00480     ) const;
00481 
00489     CStatus CreateProject(
00490             const CString& in_ProjectPath,
00491             Project &out_rProject) const;
00492 
00498     Preferences GetPreferences() const;
00499 
00504     Desktop GetDesktop() const;
00505 
00511     Factory GetFactory() const;
00512 
00518     CString GetActiveToolName() const;
00519 
00523     UIToolkit GetUIToolkit() const;
00524 
00529     CRefArray GetFilters() const;
00530 
00535     CRefArray GetPlugins() const;
00536 
00541     bool IsInteractive() const;
00542 
00550     Plugin LoadPlugin( const CString& in_pluginPath );
00551 
00568     CStatus UnloadPlugin( const CString& in_pluginPath, bool in_bRemove );
00569 
00577     CStatus UpdatePlugins() ;
00578 
00587     CStatus AddWorkgroup(const CString& in_workgroupPath) ;
00588 
00595     CStatus RemoveWorkgroup(const CString& in_workgroupPath) ;
00596 
00601     CStringArray GetWorkgroups() ;
00602 
00611     CStatus RescanWorkgroups() ;
00612 
00627     CStatus ActivateWorkgroup( const CString& in_workgroupPath, bool in_bActivate ) ;
00628 
00633     CRefArray GetRenderers( ) ;
00634 
00641     ProjectItem GetObjectFromID( ULONG in_nID ) const;
00642 
00716     CSIObjectRefArray FindObjects( const XSI::siClassID& in_nClsID ) const;
00717 
00740     CSIObjectRefArray FindObjects( const CString& in_sCLSID ) const;
00741 
00747     ShaderDef GetShaderDef( const CString&  in_progID );
00748 
00753     CRefArray GetShaderDefinitions( );
00754 
00778     CStatus RegisterShaderFamily(
00779         const CString &in_strName,
00780         const CString &in_strDisplayName,
00781         const CString &in_strDescription,
00782         unsigned char in_nodeRed,
00783         unsigned char in_nodeGreen,
00784         unsigned char in_nodeBlue,
00785         bool        in_bShaderball
00786         );
00787 
00815     CStatus RegisterShaderCustomParameterType(
00816         const CString &in_strName,
00817         const CString &in_strDisplayName,
00818         const CString &in_strDescription,
00819         unsigned char in_portRed,
00820         unsigned char in_portGreen,
00821         unsigned char in_portBlue,
00822         const CStringArray &in_typeFilter,
00823         const CStringArray &in_familyFilter
00824         );
00825 
00859     CStatus OpenUndo( const CString& in_sComplexName );
00860 
00888     CStatus CloseUndo( );
00889 
00894     bool IsUndoing() const;
00895     
00902     ULONG GetCustomPropertyCount( const CString& in_strType ) const;
00903 
00904     private:
00905     Application * operator&() const;
00906     Application * operator&();
00907 };
00908 
00909 
00910 
00911 };
00912 
00913 #endif // __XSIAPPLICATION_H__