max 批量导入obj
Posted 南柯南
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了max 批量导入obj相关的知识,希望对你有一定的参考价值。
建模的同事网上搜的,个别语法错误,修正了下挺好用的(网上随便一搜就有,借用一下做个记录)
1 Fn getnames Title FilterName =( 2 3 dialog = DotNetObject"System.Windows.Forms.OpenFileDialog" 4 5 dialog.title = Title 6 7 dialog.filter = FilterName 8 9 dialog.Multiselect = true 10 11 OpenFileResult = dialog.ShowDialog() 12 13 if OpenFileResult.Equals OpenFileResult.OK then 14 15 ( 16 dialog.FileNames 17 ) 18 19 else 20 Undefined 21 22 ) 23 24 25 26 --if form !=undefined do destroydialogmytools 27 28 29 30 rollout form "批量导入obj" 31 ( 32 33 label lbl "批量导入obj" 34 35 button btn "选择导入obj路径" width:120 height:25 36 on btn pressed do 37 38 ( 39 40 file_names= getnames "选择导入文件" "OBJ (*.obj)|*.obj" 41 42 if file_names != undefined do 43 44 ( 45 46 for f in file_names do 47 48 ( 49 50 if ( doesfileexist f ) do 51 52 importFile f #noPrompt using:Wavefront_Object 53 54 for geo in geometry 55 56 where (matchPattern geo.name pattern:"3D_Object*") do 57 58 ( 59 60 --geo.name = (f as string) 61 62 pathaa = filterString (f as string)"//" 63 64 geo.name = pathaa[pathaa.count] 65 66 ) 67 68 ) 69 70 ) 71 72 73 74 ) 75 76 ) 77 78 createdialog form 200 50
具体使用步骤:
以上是关于max 批量导入obj的主要内容,如果未能解决你的问题,请参考以下文章
3dmax文件如何导入到Maxon BodyPaint 3D中
批量导入大量数据 -- MySQL server has gone away