摘要:最近一段时间一直在MXS里用dotnet写界面...写的各种头晕眼花... 过程中遇到了 TextBox 控件输入时 与max快捷键冲突的问题. 解决办法是 用 MaxTextBox 控件替换,今天请教了 徽神~ 才知道原来max有个系统全局变量 enableAccelerators . 可以在窗体
阅读全文
摘要:前段时间经常渲染白模线框的图,写了这个脚本方便工作,后来又加了中英文适配,今天贴上来.fn YY_edgestex =( vr = renderers.current case of ( (vr材质 != undefined) : (mat = vr材质()) ...
阅读全文
摘要:上周在群里问了一下MAX里关于视口与模型相切的方法,感谢 .昕 给了答案.fn focusoutline obj=( if obj!=undefined do ( max zoomext sel all viewPt=(Inverse(getViewTM())...
阅读全文
摘要:也是纠结了很久的一个问题,用for循环写渲染命令,想要退出渲染只能把for循环的所有渲染命令遍历一遍.解决方法:global endrender = falsefor i = 1 to 10 do ( render cancelled:&endrender if endrender do...
阅读全文
摘要:写了个有关清除贴图与光域网路径的函数,简单实用,不过最好保证所有贴图都在文件根目录下再运行.fn clear_bitmap_path =( YY_Bitmaps = getClassInstances BitmapTexture YY_Webfiles = getClassInstanc...
阅读全文
摘要:印象中在maxscript帮助文档里找到过方法,但是当时没记下来.只能通过dotnet实现了.如果电脑有无线网卡和本地连接,可能会出现乱码,也问了写dotnet的朋友,提供了一些思路,不过最终还是使用了这个笨办法.fn getIP_PCname =( cc = (dotnetclass "Sy...
阅读全文
摘要:昨天看到群里有人问,并贴出了飞浪大大的源码,又对比了一下自己以前写的,顿时觉得弱爆了哈哈~飞浪:fn getVer =( v = (maxversion())[1] / 1000 if v <= 9 then return v else return (2008 + v - 10)...
阅读全文
摘要:最近看了一下以前写的关于收集贴图的函数...又完善了一下,老链接:http://www.cnblogs.com/3dxy/p/3988751.htmlfn saveusedmaps spath sel:#false = ( makedir spath case sel of ( ...
阅读全文
摘要:呃...15年开篇~去年想写一个有关默认相机转VR相机的脚本,当时没写完,今天不小心翻到并写完了,而且思路也和原来完全不一样了,增加了是否删除原相机与是否转换所选相机的选项.由于国内VR版本比较混乱,中间加了个中英文版本的适配.fn cam_to_vrcam sel:#off del:#on =( ...
阅读全文
摘要:之前用hiddenDOSCommand 本机测试通过,但是换其他电脑有时会不能用...fn xcopy oldfile newfile =( newfilepath = newfile + "\\" + getFilenameFile oldfile xcopy_cmd = "xcop...
阅读全文
摘要:有关逐行写入的在这里下面是关于逐行读取fn maxfilelog finpath =( fin = openfile finpath seek fin #eof maxlen=filepos fin seek fin 0 res = readChars fin maxl...
阅读全文
摘要:关于如何获取/清除 MAXScript 侦听器内的文本用来保存记录?还没想到实际用处,先记上.macroRecorder as stringlistener as stringclearListener()
阅读全文
摘要:fn YY_clrmessingmaps =( YY_messingmap = #() allBitmaps = getClassInstances BitmapTexture -- 所有材质for m=1 to allBitmaps.count do( if not doesf...
阅读全文
摘要:之前写过一个关于 MAXScript 中文路径返回上级目录的博文今天无意中发现了一个更简单的方法代码如下:fn newfile filepath = (nf = getfilenamepath filepathnf[nf.count] = ""nf) --返回上级路径newpath "D:\Prog...
阅读全文
摘要:用到了GetFileVersion 相关文档在此:http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/index.html?url=files/GUID-BA196B48-8ECA-4E0C-AE2E-F7EFAAF39844.htm,topi...
阅读全文
摘要:相关内容记录在官方文档BitmapTexture : TextureMap中fn allUsedMaps =(sceneMaps = usedMaps()for m in meditmaterials do join sceneMaps (usedMaps m)sceneMaps)allUsedMa...
阅读全文
摘要:MAXScript 中可以对文件进行创建删除复制等操作但是唯独不能删除文件夹...网上搜了一下批处理的剪切方法,在MAXScript 里调用一下就好了fn xcopy oldfile newfile =( newfilepath = newfile + "\\" + getFilenameFi...
阅读全文
摘要:官方帮助文档FileStream Values部分有相关介绍.fn format_txt filepath filetext =( if doesFileExist filepath == true then ( fin = openfile filepat...
阅读全文
摘要:MAXScript 官方文档里关于获取文件夹下所有文件的方法fn getFilesRecursive root pattern =(dir_array = GetDirectories (root+"/*")for d in dir_array do join dir_array (GetDire...
阅读全文
摘要:有时候模型使用低版本VR保存的,再次打开模型时会弹出V-Ray warning提示框这个问题困扰了我一周时间....查了VR官方帮助文档解决方法如下setVRaySilentMode() -- 设置VRay无声模式设置成无声模式后再次打开就不会弹出警告框了....以后一定第一时间查看帮助文档~
阅读全文