Hello EveryOne
我昨天在寻找一个能在moi中快捷调用的截图工具,我使用过论坛中的代码(I was looking for a screenshot tool that can be quickly called in Moi yesterday, and I have used the code from the forum before)
script: var prev_background = moi.view.viewportBackgroundColor; moi.view.viewportBackgroundColor = 0xFFFFFF; moi.view.lineWidth = 4; moi.grid.display = false; moi.grid.showXYAxes = false; moi.view.showAxisIcon = false; moi.view.showViewTitles = false; var img = null; try { img = moi.ui.getActiveViewport().render( 4000, 2500 ); } catch(e){} moi.view.lineWidth = 1; moi.grid.display = true; moi.grid.showXYAxes = true; moi.view.showAxisIcon = true; moi.view.showViewTitles = true; moi.view.viewportBackgroundColor = prev_background; var name = img.getSaveFileName(); if ( name != '' ) img.save( name );
但效果并不好,运行它会更改我原本对视口的设置,无法截取同时显示四个视图的快照也会强制更改设置,显示参考网格。我短暂的使用过M3DCH 这套UI,在它的插件中找到了这个插件,这是我的使用效果图:
(But the effect is not good. Running it will change my original settings for the viewport, and I won't be able to take a snapshot that displays all four views at the same time. It will also force me to change the settings and display the reference grid. I have briefly used the M3DCH UI and found this plugin in its plugins. Here is my usage rendering:)
看得出来,无论是在怎样的视口和材质情况下,快照效果都不错。可以设置快捷键A 值=ScreenCapture(或任何你重命名ScreenCapture.js的对应名称 )
(It can be seen that the snapshot effect is good regardless of the viewport and material conditions. You can set the shortcut key A value to ScreenCapture (or any corresponding name for renaming ScreenCapture.js))
希望后续版本默认添加这个脚本(hope that future versions will add this script by default)
|