随笔分类 -  MAXScript

MAX脚本学习
摘要:方法一:for i in objects do( --判断是否是多维材质 if (classof i.material==Multimaterial) then ( --遍历子材质球(个数) for numsubs =1 to i.material.n... 阅读全文
posted @ 2014-10-15 16:10 amixc 阅读(1842) 评论(2) 推荐(0)
摘要:在写脚本的过程中,经常遇到大量重复的代码,这个时候可以将代码设置成缩写文件,在需要使用的时候通过缩写来调入先打开缩写文件,在编辑器中写入需要缩写的代码例如:test=for i in selestion然后切换到脚本编辑中写入test,并执行Expand Abbreviation来展开缩写test ... 阅读全文
posted @ 2014-10-11 16:17 amixc 阅读(581) 评论(0) 推荐(0)
摘要:数组的一些基础用法mybox=$Box* as array --收集数组元素deleteItem mybox 1 --根据下标删除数组中的元素sel=selection as array --将选择的物体作为数组赋值给sel数组排序--方法1allBoxes=selection as array -... 阅读全文
posted @ 2014-10-10 18:21 amixc 阅读(334) 评论(0) 推荐(0)
摘要:if 达 表 式 语法:if then [else ] 语法:if do 为测试表达式,其求值结果必须为 True 或 False 如果测试结果为 True, 那么 then 或 do 之后的被执行 其求值结果作为 if 表达式的返回值case 达 表 式 case 表达式将一个测试表达式的... 阅读全文
posted @ 2014-10-10 14:59 amixc 阅读(447) 评论(0) 推荐(0)
摘要:showclass的用法 语法:showClass [ : ] showClass "Box.* "--显示Box这个类所包含的属性 showClass "path*"--显示所有类名以 path 开头的类 showClass "noise.*" --显示 noise 类贴图所有可存取的属性 sh... 阅读全文
posted @ 2014-10-10 12:03 amixc 阅读(4129) 评论(0) 推荐(0)
摘要:rollout rendertool "渲染工具" width:193 height:300( GroupBox grp2 "RenderTool" pos:[8,8] width:176 height:248 button btnSave "Save" pos:[16,32] widt... 阅读全文
posted @ 2014-10-09 18:22 amixc 阅读(349) 评论(0) 推荐(0)
摘要:max modify mode --切换到修改面板subobjectlevel = 1splinecount =numsplines $for i = 1 to splinecount do ( numbervet=(numSegments $ i)+1 if is... 阅读全文
posted @ 2014-10-09 16:24 amixc 阅读(222) 评论(0) 推荐(0)
摘要:通过for循环的嵌套来来展平Splineshape中顶点1.判定选中的样条曲线是否符合要求2.通过循环来计算曲线中每个顶点3.将计算到的顶点的Z坐标位置设置成和曲线本身的Z坐标一致4.执行完以上操作后 使用UpdateShape()更新曲线--判断选择的曲线是否是可编辑样条曲线 曲线的数量是1 并且... 阅读全文
posted @ 2014-09-30 18:09 amixc 阅读(336) 评论(0) 推荐(0)
摘要:MAXScript中可以通过System.Windows.Forms.OpenFileDialog来获取文件的全路径--创建OpenFileDialogtheDialog=dotNetObject "System.Windows.Forms.OpenFileDialog"--设置对话框的标题theD... 阅读全文
posted @ 2014-09-29 15:01 amixc 阅读(1232) 评论(0) 推荐(0)
摘要:box() --创建box--创建一个50*50的box阵列for a in 0 to 50 do ( for i in 0 to 50 do copy $Box001 pos:[25*a,i*25,0] ) --给box的w... 阅读全文
posted @ 2014-09-25 17:32 amixc 阅读(242) 评论(0) 推荐(0)
摘要:语法:function =(expr)实例1:function createSphere count growth =(for i in 1 to count dosphere radius:(i*growth) pos:[i^2*growth,0,0] )函数的调用:createSphere ... 阅读全文
posted @ 2014-09-25 15:34 amixc 阅读(633) 评论(0) 推荐(0)