0
嘿傢伙我有這個簡單的腳本,正在測試。目前它基本上可以讓你選擇一個位圖,然後將路徑添加到edittext。分配着色器按鈕創建了一個材質並分配它。我正在尋找的是使用用戶路徑來定義一個位圖紋理添加到diffuse插槽。有點卡在那裏。感謝在先進的幫助。這裏是腳本到目前爲止Maxscript文件路徑讀取?
嘗試(DestroyDialog瀏覽)趕上()
首次展示瀏覽 「瀏覽」 寬度:550高度:150
(
button btn_browse "browse" pos:[430,20]
button btn_assin "Assign Shader "
edittext edt_image "ImageFile:" fieldWidth: 350 pos:[5,22]
on btn_browse pressed do
(
imgDir = getOpenFilename caption: "Open File" types: "Jpg (*.jpg)|*.jpg|Exr (*.exr)|*.exr|Tif (*.tif)|*.tif|ALL|*.*|"
edt_image.text = imgDir
)
on btn_assin pressed do
(
if edt_image != undefined do
(
for i in selection do
(
i.material = meditmaterials[1].diffuseMap = Bitmaptexture filename: ????????????????????
)
)
)
)
createdialog瀏覽