随笔分类 -  转载

转载 多层影藏 和显示
摘要:global LI_Isolateglobal LI_Backbtnpress=0AllArray=#()curselArray=#()firstArraypviewactivecamtheNodeName store1stPos=truefn LI_Isolate=( if store1stPos==true and btnpress==0 then activecam=getActiveCamera() --store the camera-- viewport.setType #view_persp_user if btnpress==0 then pview=getViewTM().. 阅读全文

posted @ 2011-11-22 14:18 盖天00 阅读(229) 评论(0) 推荐(0)

飞狼的收集元素第一个面。
摘要:fn getIDsOfElement obj =( --此函数用来获取每个element中的第一个face IDselect obj faceNum=polyOp.getNumFaces $ids=#{1} --储存face idtempID=1while tempID <= faceNum do ( polyOp.setFaceSelection $ #{tempID} --polyOp.setFaceSelection $ #{7} $.EditablePoly.SelectElement()selFace=polyOp.getFaceSelection $ids[tempID]=t 阅读全文

posted @ 2011-11-10 17:23 盖天00 阅读(198) 评论(0) 推荐(0)

把组 保存
摘要:fn save_by_Group sel dir = ( local ss = #(), s for i in sel where isGroupHead i do ( setGroupOpen i false append ss i ) for i in ss do ( s = for o in i.children collect i append s i saveNodes s (dir+i.name+".max") quiet:on ))save_by_Group objects "d:\\" 阅读全文

posted @ 2011-10-25 09:01 盖天00 阅读(201) 评论(0) 推荐(0)

转 splie 的
摘要:/* global pickObj=undefinedglobal selObj=undefinedglobal mysplineArray=#()global targetsplineArray=#()global myObjArray=#()fn fl_detachSplines ss =(centerPivot ssnumsp = numsplines sssp=#()if numsp > 1 then( for i in 1 to numsp do ( tempS = splineShape pos:(getKnotPoint ss i 1) addNewSpline tempS 阅读全文

posted @ 2011-10-20 17:53 盖天00 阅读(302) 评论(0) 推荐(0)

更新材质球
摘要:(global TestMapSamples try(destroyDialog TestMapSamples )catch()local lights_state = #()local lights_array = #()fn collectLightsState = (lights_state = #()lights_array = for l in Lights where classof l != TargetObject collect lfor l in lights_array do (try(append lights_state l.onl.on = false)catch( 阅读全文

posted @ 2011-10-17 17:09 盖天00 阅读(270) 评论(0) 推荐(0)

排列顶点 uv 不过有很大问题
摘要:-- curb unwrapper(version 0.1, 6th may 2004)-- MAX script, tested with 3ds MAX 5.1-- (c) 2004 Andrei Kletskov (111)-- homepage: http://andklv.narod.ru -- e-mail: andklv@mail.ru -- please do not remove any copyrights from this script-- Description -- -- this script was designed to ease texturing of c 阅读全文

posted @ 2011-10-13 17:37 盖天00 阅读(367) 评论(0) 推荐(0)

对于火焰效果的接触
摘要:rollout FErollout "火焰特效" width:180 height:245(button btn1 "火焰" pos:[12,20] width:140 height:30bitmap bmp1 "" pos:[12,70] width:140 height:120button btn2 "渲染预览" pos:[51,205] width:64 height:21 on btn1 pressed do(resetMaxFile #nopromptglobal sgizmo = spheregizmo 阅读全文

posted @ 2011-10-13 15:12 盖天00 阅读(190) 评论(0) 推荐(0)

两条线中画终点
摘要:a=$line01.centerb=$line02.centernew_spline = splineShape ()addNewSpline new_spline addKnot new_spline 1 #corner #curve a addKnot new_spline 1 #corner #curve b updateshape new_spline 阅读全文

posted @ 2011-10-13 14:59 盖天00 阅读(214) 评论(0) 推荐(0)

旋转矩阵
摘要:resetMaxFile #noPrompt --重置文件theV = normalize [5,10,0] --矢量旋转,标准化为 单位向量theStep = 10 --旋转 单位--旋转从0到360度for a = 0 to 360-theStep by theStep do(rm = rotateXMatrix a --根据变量 a 创建一个旋转矩阵theRotV = theV * rm --使用矩阵 改造原有的载体format "%: %/n" a theRotV --将结果 打印到 监听器上c = cylinder() --创建一个圆柱体c.dir = theRo 阅读全文

posted @ 2011-10-13 14:57 盖天00 阅读(221) 评论(0) 推荐(0)

进行随机旋转用于和并东西并
摘要:--随机树角度oArray = $selection as arrayclearSelection()for i in oArray do(--随机角度angleValue = (random 5 30) *3--format "角度:% /n" angleValuerotate i (angleaxis (random 0 90) [0,0,1]))--合并树递归方法function attachTree oArray isRandHeight =(if oArray.count < 2 then(return "选择合并数量必须大于等于2")s 阅读全文

posted @ 2011-10-13 14:47 盖天00 阅读(194) 评论(0) 推荐(0)

合并方法
摘要:p = convertToPoly(Plane()) --create a plane, convert to EPolys = sphere radius:5 --create a sphere primitivep.attach s s --attach sphere to EPolyp = convertToPoly(Plane()) --create a plane, convert to EPolyb = Box() --create a box primitiveb.rotation = eulerangles 45 45 0 --rotate the boxt = teapot 阅读全文

posted @ 2011-10-13 14:29 盖天00 阅读(155) 评论(0) 推荐(0)

麻花的移动物体到原点
摘要:--只移动Z轴到0fn moveObjectToZeroOnlyZ obj = ( local icenter local minz icenter = obj.center minz = obj.min.z move obj [0,0,-minz])--轴心归底fn CenterPiv i =( CenterPivot i --轴心归中心 i.pivot.z = i.min.z --轴心的Z轴等于物体最底点)--移动物体到世界原点fn moveObjectToZero obj = ( center = obj.center minz = obj.min.z move obj [-center 阅读全文

posted @ 2011-10-12 16:17 盖天00 阅读(225) 评论(0) 推荐(0)

论坛里 名为麻花写的 是到处物体的东西
摘要:fn HandleMax obj=( --有必要可以优化一下材质 --........ obj_name=obj.name filepath = maxfilepath makeDir (filepath + obj_name)--在当前处理的max路径下建立以对象物体为名的文件夹 --输出这个文件成一个.x文件,并保存为以物体为名的文件夹内。 exportfile (filepath + obj_name + "\\" + obj_name+".x") #noprompt )--------------------------------------- 阅读全文

posted @ 2011-10-12 16:16 盖天00 阅读(281) 评论(0) 推荐(0)

导航