[インタフェース](Interfaces) > [コア インタフェース](Core Interfaces) > [DwfExportPreferences] |
DwfExportPreferences コア インタフェースは、[DWF 書き出し](DWF Export) ダイアログの設定を MAXScript に公開します。
3ds Max 2014 以降で使用可能です。
プロパティ:
.groupBy : enum : Read|Write groupBy enums: {#ByObject|#ByLayer}
[グループ化オプション](Grouping Options)ラジオ ボタンの状態を取得/設定します。
列挙または 0 ベースの整数のいずれかを使用することができます。
有効な値は次のとおりです。
0 - [#ByObject] - [オブジェクト別にグループ化](Group By Object)
1 - [#ByLayer] - [レイヤ別にグループ化](Group By Layer)
.exportProperties : boolean : Read|Write
[オブジェクト プロパティをパブリッシュ](Publish Object Properties)チェックボックスの状態を取得/設定します。
既定は true です。
.exportMaterials : boolean : Read|Write
[マテリアルをパブリッシュ](Publish Materials)チェックボックスの状態を取得/設定します。
既定は true です。
.selectedOnly : boolean : Read|Write
[選択したオブジェクトのみをパブリッシュ](Publish Selected Objects Only)チェックボックスの状態を取得/設定します。
既定値は False です。
.exportHidden : boolean : Read|Write
[非表示オブジェクトをパブリッシュ](Publish Hidden Objects)チェックボックスの状態を取得/設定します。
既定値は False です。
.showViewer : boolean : Read|Write
[DWF をビューワに表示](Show DWF In Viewer)チェックボックスの状態を取得/設定します。
既定値は False です。
.rescaleTextures : boolean : Read|Write
[ビットマップを再スケール](Rescale Bitmaps)チェックボックスの状態を取得/設定します。
既定は true です。
.maxTextureSize : integer : Read|Write
DwfExportPreferences.rescaleTextures が True に設定されている場合に使用される[最大解像度(ピクセル)](Max.Resolution (pixels))スピナーの値を取得/設定します。
既定値は 512 です。
.defaultDwfLights : boolean : Read|Write
[既定値の DWF ライトを使用](Use Default DWF Lights)チェックボックスの状態を取得/設定します。
既定は true です。
.writeLogFile : boolean : Read|Write
[ログ ファイルを保存](Save Log File)チェックボックスの状態を取得/設定します。
既定値は False です。
.logFileName : filename : Read|Write
DwfExportPreferences.writeLogFile が True に設定されている場合に使用されるログファイルのファイル名を取得/設定します。
既定値は "C:¥Users¥<ユーザ名>¥AppData¥Local¥Autodesk¥3dsMax¥<最大バージョン> - 64bit¥JPN¥ja-JP¥plugcfg¥DWF_export.log" です。ここで、<ユーザ名> はユーザの名前、<最大バージョン>は 3ds Max のバージョン番号("2014"など)になります。
メソッド:
<void>ResetDefaultPreferences()
すべてのパラメータを既定値にリセットします。
<void>SavePreferences()
現在の値を基本設定として保存します。
保存された設定は、次のメソッドを呼び出すことによって、後で再度呼び出すことができます。
<boolean>LoadPreferences()
以前に保存した設定を復元します。
例 |
--Reset to defaults, then print them to Listener: DwfExportPreferences.ResetDefaultPreferences() for p in getPropNames DwfExportPreferences do format "%=%\n" p (getProperty DwfExportPreferences p) |
出力 |
OK #writeLogFile=false #exportMaterials=true #selectedOnly=false #showViewer=false #rescaleTextures=true #defaultDwfLights=true #exportHidden=false #LogFilename=C:\Users\MyUserName\AppData\Local\Autodesk\3dsMax\2014 - 64bit\ENU\en-US\plugcfg\DWF_export.log #groupBy=#ByObject #maxTextureSize=512 #exportProperties=true OK |
例: |
--Let's change a few settings - Export Hidden to True and Group By to #ByLayer: DwfExportPreferences.exportHidden=true DwfExportPreferences.groupBy=#ByLayer --Now let's store these settings for future use and print the current values: DwfExportPreferences.SavePreferences() for p in getPropNames DwfExportPreferences do format "%=%\n" p (getProperty DwfExportPreferences p) |
出力 |
true #ByLayer OK #writeLogFile=false #exportMaterials=true #selectedOnly=false #showViewer=false #rescaleTextures=true #defaultDwfLights=true #exportHidden=true #LogFilename=C:\Users\MyUserName\AppData\Local\Autodesk\3dsMax\2014 - 64bit\ENU\en-US\plugcfg\DWF_export.log #groupBy=#ByLayer #maxTextureSize=512 #exportProperties=true OK |
例: |
--let's reset the settings to defaults - as expected, we will get the original values DwfExportPreferences.ResetDefaultPreferences() for p in getPropNames DwfExportPreferences do format "%=%\n" p (getProperty DwfExportPreferences p) |
出力 |
OK #writeLogFile=false #exportMaterials=true #selectedOnly=false #showViewer=false #rescaleTextures=true #defaultDwfLights=true #exportHidden=false #LogFilename=C:\Users\MyUserName\AppData\Local\Autodesk\3dsMax\2014 - 64bit\ENU\en-US\plugcfg\DWF_export.log #groupBy=#ByObject #maxTextureSize=512 #exportProperties=true OK |
例: |
--Let's load the previously saved settings - --the #exportHidden will be back to True and #groupBy will be back to #ByLayer! DwfExportPreferences.LoadPreferences() for p in getPropNames DwfExportPreferences do format "%=%\n" p (getProperty DwfExportPreferences p) |
出力 |
true #writeLogFile=false #exportMaterials=true #selectedOnly=false #showViewer=false #rescaleTextures=true #defaultDwfLights=true #exportHidden=true #LogFilename=C:\Users\MyUserName\AppData\Local\Autodesk\3dsMax\2014 - 64bit\ENU\en-US\plugcfg\DWF_export.log #groupBy=#ByLayer #maxTextureSize=512 #exportProperties=true OK |
例 |
--To export using these settings without showing the Dialog, simply call exportMaxFile (GetDir #export + "\\someFile.dwf") #noPrompt |