Created
December 12, 2014 11:25
-
-
Save Hoikohroh/d115b8c512d6469026f8 to your computer and use it in GitHub Desktop.
Maxscript:MatID_Changer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MatID_Changer_v20140224 | |
スクリプト概要 | |
選択オブジェクトのマテリアルIDを変更します | |
編集可能ポリゴンのみ対応 | |
*/ | |
try destroyDialog Roll_MatID_Change catch() | |
Rollout Roll_MatID_Change "MatID" | |
( | |
Group "ID" ( | |
Spinner spn_old "Old" type:#integer range:[1,999,1] fieldwidth:40 | |
Spinner spn_new "New" type:#integer range:[1,999,1] fieldwidth:40 | |
) | |
button btn_change "Change" width:80 height:30 | |
on btn_change Pressed do ( | |
for i in selection as array do | |
( local Temp = polyop.getFaceSelection i | |
i.selectByMaterial spn_old.value | |
polyop.setFaceMatID i #selection spn_new.value | |
polyop.setFaceSelection i Temp | |
) | |
) | |
) | |
createDialog Roll_MatID_Change 120 110 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment