00001 /*============================================================================== 00002 00003 file: imrPreferences.h 00004 00005 author: Daniel Levesque 00006 00007 created: 26aug2002 00008 00009 description: 00010 00011 Interface for accessing the mental ray preferences. 00012 00013 PERFORMANCE NOTICE: 00014 Most the the methods of the preferences interface directly access a .ini 00015 file to get/set the preference values. It is therefore important to 00016 minimize calls to this interface in performance critical code. 00017 00018 modified: 00019 00020 00021 (c) 2002 Autodesk 00022 ==============================================================================*/ 00023 #pragma once 00024 #include "..\GetCOREInterface.h" 00025 #include "..\ifnpub.h" 00026 00027 #define IMRPREFERENCES_INTERFACEID Interface_ID(0x594511cc, 0x15505bac) 00028 00029 //============================================================================== 00030 // class imrPreferences 00031 // 00032 // This interface provides access to the mental ray preferences. 00033 //============================================================================== 00034 class imrPreferences : public FPStaticInterface { 00035 00036 public: 00037 00038 // Mode used for clearing the VFB before rendering 00039 enum VFBClearMode { 00040 kVFBClear_None, // Do not clear the VFB 00041 kVFBClear_OneLineOnTwo, // Clear every other line (1 line on 2) 00042 kVFBClear_All, // Clear the entire VFB 00043 }; 00044 00045 // Register/unregister preference change callbacks 00046 typedef void(*mrPreferencesCallback)(void* param); 00047 virtual void RegisterChangeCallback(mrPreferencesCallback callback, void* param) = 0; 00048 virtual void UnRegisterChangeCallback(mrPreferencesCallback callback, void* param) = 0; 00049 00050 // Are the mental ray extensions ON/OFF? 00051 virtual bool GetMRExtensionsActive() const = 0; 00052 virtual void SetMRExtensionsActive(bool active) = 0; 00053 00054 // Is mental ray the default production renderer? 00055 virtual bool GetMRDefaultProductionRenderer() const = 0; 00056 virtual void SetMRDefaultProductionRenderer(bool val) = 0; 00057 00059 // Message dialog verbosity & options, log file 00060 // 00061 00062 virtual bool GetMsgDlgOpenOnError() const = 0; 00063 virtual void SetMsgDlgOpenOnError(bool val) = 0; 00064 00065 virtual bool GetMsgVerbosity_Info() const = 0; 00066 virtual void SetMsgVerbosity_Info(bool val) = 0; 00067 virtual bool GetMsgVerbosity_Progress() const = 0; 00068 virtual void SetMsgVerbosity_Progress(bool val) = 0; 00069 virtual bool GetMsgVerbosity_Debug() const = 0; 00070 virtual void SetMsgVerbosity_Debug(bool val) = 0; 00071 00072 // Opens the message dialog 00073 virtual void OpenMessageDialog() const = 0; 00074 00075 // log file name 00076 virtual const MCHAR* GetLogFileName() const = 0; 00077 virtual void SetLogFileName(const MCHAR* filename) = 0; 00078 // log file ON 00079 virtual bool GetLogFileON() const = 0; 00080 virtual void SetLogFileON(bool on) = 0; 00081 // log file Append 00082 virtual bool GetLogFileAppend() const = 0; 00083 virtual void SetLogFileAppend(bool on) = 0; 00084 00085 // 00086 // Message dialog verbosity & options 00088 00090 // Rendering Options 00091 // 00092 00093 // Show brackets around the bucket(s) currently being rendered 00094 virtual bool GetShowRenderBrackets() const = 0; 00095 virtual void SetShowRenderBrackets(bool on) = 0; 00096 00097 // Show visual Final Gather progress, in the VFB 00098 virtual bool GetShowVisualFGProgress() const = 0; 00099 virtual void SetShowVisualFGProgress(bool on) = 0; 00100 00101 // 00102 // Rendering Options 00104 00105 }; 00106 00107 // Retrieve a pointer to the preferences interface 00108 inline imrPreferences* GetMRPreferences() { 00109 00110 return static_cast<imrPreferences*>(GetCOREInterface(IMRPREFERENCES_INTERFACEID)); 00111 } 00112