QQ聊天

随笔分类 -  AutoDesk.Max

摘要:Fn GetSpecialFolder argEnumName = (DotNetClass "System.Environment").GetFolderPath (Execute ("(DotnetClass \"Environment+SpecialFolder\")." + argEnumName)) Fn GetSpecialFolderArgs = GetPropNames (... 阅读全文
posted @ 2018-04-17 10:47 SITT 阅读(667) 评论(0) 推荐(0)
摘要:遇到有人问问题才会写这个啊,哈哈哈 阅读全文
posted @ 2016-03-23 10:42 SITT 阅读(970) 评论(0) 推荐(0)
摘要:也是帮网友写的。不过最后没用上。哈哈。targetPF = $startTime = AnimationRange.Start.FrameendTime = AnimationRange.End.FrameparticlesCount = targetPF.numParticlesGenerated() particleMeshs = #()particleMeshs[particlesCount] = undefinedfor timeIndex = startTime to endTime do( SliderTime = timeIndex for particID = 1 ... 阅读全文
posted @ 2013-11-08 21:45 SITT 阅读(677) 评论(0) 推荐(0)
摘要:看到有网友需要写的,其实镜像就是缩放改为负数Fn MirrorObject argObjects argAxisName =( local axisNames = #(#x,#y,#z) if FindItem axisNames argAxisName == 0 do ( throw "the second parameter error !!! -- valid values:#x,#y,#z" ) local mirrorMatrix = matrix3 1 if argAxisName == #x do mirrorMatri... 阅读全文
posted @ 2013-08-29 23:05 SITT 阅读(1313) 评论(1) 推荐(0)
摘要:vray2014安装后启动Max的时候会有如下图所示警告框。解决方式是用记事本一类的文本编辑软件打开max安装目录下的 \scripts\Startup\vraylightlister.ms在114行 有个“LightInspectorListRollout,” 选择后删掉,注意要连 “,” 号一起。删掉后保存就没有警告框了。 阅读全文
posted @ 2013-06-08 18:03 SITT 阅读(556) 评论(0) 推荐(0)
摘要:IGame是MaxSDK中的一个组件,在原生接口上做了封装来方便导出数据,以往在MaxScript中是不能调用IGame的,不过从Max2013开始MaxSDK有了.net版本(Max2012安装了扩展包也可以),MaxScript也可以使用MaxSDK的全部接口了。范例如下Fn InitializeMaxSDK = ( local result = false if (MaxVersion())[1] >= 14000 do ( result = (DotNetClass "Autodesk.Max.GlobalInterface") != undefined... 阅读全文
posted @ 2013-05-29 14:23 SITT 阅读(803) 评论(0) 推荐(0)
摘要:rollout testRollout1 "testRollout"( slider dddd "dddd" )rollout testRollout2 "testRollout"( slider dddd "dddd" )rollout testRollout "testRollout"( button btn "O_o" on btn pressed do ( testRollout1.open = not testRollout1.open testRollout2.o 阅读全文
posted @ 2013-05-15 16:47 SITT 阅读(682) 评论(0) 推荐(0)
摘要:这个需要用另外的进程来做,不然执行到关闭就会终止脚本的执行。简单的范例如下Fn ReStartMax inputSecond = ( local CSharpProvider,CompilerParams,CompilerResults,errorMessage CSharpCodeSource =" using System; using System.Diagnostics; using System.Threading; namespace Temp { static class Program { ... 阅读全文
posted @ 2013-05-07 17:46 SITT 阅读(998) 评论(0) 推荐(0)
摘要:Fn GetAllFiles inputPath inputFilterList outArray:#() =( directories = GetDirectories (inputPath + "*") if directories.count > 0 do for tempPath in directories do ( GetAllFiles tempPath inputFilterList outArray:outArray ) for tempFilter in inputFilterList do ( tem... 阅读全文
posted @ 2013-02-19 13:40 SITT 阅读(773) 评论(0) 推荐(0)
摘要:Max2012使用Nitrous作为显示驱动的时候会有个Bug,就是MaxScript无法用GW.TransPoint来将世界坐标转换为屏幕坐标.这个Bug在2013中已经修复,2012可以换用Direct3D来解决,当不能换的时候,可以用该函数凑合解决一下:)。Fn WorldPositionToScreen inputPos =( viewMatrix = GetViewTM() viewCameraMatrix = Inverse viewMatrix screenRange2D = GetViewSize() refPosition = inputPos * v... 阅读全文
posted @ 2013-01-09 13:46 SITT 阅读(801) 评论(0) 推荐(0)
摘要:3dsmax.ini[Performance]DisableAdWindows=1 阅读全文
posted @ 2012-12-20 14:06 SITT 阅读(465) 评论(0) 推荐(0)
摘要:看到有人需要,简单写了一下Fn GetMaterialSample inputMaterial inputWidth inputHeight =( result = undefined with redraw off with undo off ( tempHiddenObject = for tempObject in Objects where not tempObject.ishidden collect tempObject Hide tempHiddenObject tempCamera = Freecamera fo... 阅读全文
posted @ 2012-12-19 17:39 SITT 阅读(1545) 评论(0) 推荐(0)
摘要:也是在qq群遇到的网友的问题,,实际上如果只是合并成psd也可以找.net的库来做,不过大部分库都是只能读不能写,是因为psd的授权问题。此外也为了普及一下ole这个老古董。不过这段代码只操作cs6通过,其他photoshop的版本可能有改动。Fn CombineTextureToPSD inputSourceArray inputSavePsdFile photoshopExit:true =( if inputSourceArray.Count > 1 do ( Global PhotoshopApplication PhotoshopApplic... 阅读全文
posted @ 2012-11-27 00:05 SITT 阅读(1811) 评论(4) 推荐(0)
摘要:有时一些中文的脚本会在max2013中显示为乱码,是因为max2013将多种语言统一在一起的缘故,在开始菜单中max2013可以用支持的各种语言的版本启动。题外插一句,可见还是用英文比较合适,不会出现乱码问题,哈哈。要解决使用中文的脚本乱码问题,方式如下。第一种是手动========================================================================惯例分隔线,以下是代码改变选项的方式,美术同鞋可以止步了,技术美术和程序请继续======================================================= 阅读全文
posted @ 2012-11-21 12:07 SITT 阅读(4709) 评论(0) 推荐(0)
摘要:介绍几个东西,如何在Max插件里使用.net来做界面,怎么为插件增加maxScript的脚本接口以及命令行参数来直接测试导出插件。先说第一个,首先是visualstudio的项目设置里开启clr的支持,添加需要的引用,然后需要在DllMain里增加BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved){ if( fdwReason == DLL_PROCESS_ATTACH ) { hInstance = hinstDLL; DisableThread... 阅读全文
posted @ 2012-07-16 22:23 SITT 阅读(1371) 评论(4) 推荐(0)
摘要:其实是以前博客的老贴子,太久没写博了,就粘贴过来点自Max9开始,MaxScript可以直接调用.Net的dll文件,并且可以创建其中的类使用其中的方法。而.Net又可以调用C++编写的dll文件。于是可以使用C#对C++的代码封装一下,在max里调用。以下为范例。---------------以下为dll.defLIBRARY "Dll"EXPORTS HelloWorld @1--------------以下为dll.cpp文件内容BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reaso... 阅读全文
posted @ 2012-07-01 06:00 SITT 阅读(1853) 评论(1) 推荐(0)
摘要:DotNetClipboard = DotNetclass "System.Windows.Forms.Clipboard"tempImage = DotNetClipboard.GetImage()if tempImage != undefined do tempImage.save "d:\\test.jpg"if DotNetClipboard.ContainsFileDropList() do ( fileList = DotNetClipboard.GetFileDropList() for i = 0 to (fileList.count - 阅读全文
posted @ 2012-06-23 22:09 SITT 阅读(631) 评论(2) 推荐(0)
摘要:UnRegisterRedrawViewsCallback ShowCurrentTimeSecondFn ShowCurrentTimeSecond = ( local tempString GW.SetTransform(Matrix3 1) tempString = "Second:" + (CurrentTime.Frame / FrameRate) as string GW.hText [GW.GetWinSizeX()*0.45,30,0] tempString color:yellow GW.EnlargeUpdateRect #Whole)Reg... 阅读全文
posted @ 2012-03-17 21:59 SITT 阅读(621) 评论(0) 推荐(0)
摘要:原本记录在网易博客的,有人问起,查了一下就顺路搬过来其实就是这一句脚本设置一下就好。可以放到自动启动里。(DotNetClass"System.Windows.Forms.Application").CurrentCulture=dotnetObject"System.Globalization.CultureInfo""zh-cn" 阅读全文
posted @ 2012-03-09 14:30 SITT 阅读(1375) 评论(0) 推荐(0)
摘要:遇到有人问如何用代码设置checkbox的同时执行on checkbox changedstate 事件其实事件就是这个控件的一个函数范例如下,话说最近乱七八糟的忙,一直没有写帖子。有时间还是要积累一下View Code 1 rollout testRollout "" 2 ( 3 checkBox ckb1 "CheckButton" 4 button btn1 "Button" 5 on ckb1 changed state do 6 ( 7 print state 8 ) 9 on btn1 pressed do1... 阅读全文
posted @ 2011-12-20 16:19 SITT 阅读(689) 评论(0) 推荐(0)

QQ聊天