The Area http://area.autodesk.com/forum/ The Area en Copyright 2012 2012-02-10T09:26:47+01:00 Close 'Choose Editor File' dialog delay during script initiation. http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/close-choose-editor-file-dialog-delay-during-script-initiation/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/close-choose-editor-file-dialog-delay-during-script-initiation/page-last/#When:18:15:00Z Max 2010. Win XP SP3. [u][b]The problem:[/b][/u] Using MAXScript > Run Script > [choose file] > [open] the 'Choose Editor File' dialog box remains on-screen during the script initiation and only closes once the script has done so. The script, initially, sets itself up by creating a whole bunch of images. During this I have a simple empty dialog which just says 'Loading Images...' via a background image. What isn't happening is that when this 'loading' dialog is displayed the 'Choose Editor File' dialog remains underneath it, until the script finishes at which point it then closes my 'loading' dialog and then the 'Choose Editor File' dialog closes. [u][b]What I've tried so far:[/b][/u] Opening another dialog offscreen and immediately closing it again...in an attempt to fool the 'Choose Editor File' dialog into thinking that's all I'm doing. Used the sleep() function to delay the starting of the image creation, in various different places but same result. Started the script via the fileIn() function from a completely different script. [u][b]The Question:[/b][/u] So the question is, is there a way to close that pesky dialog ideally before the script starts to execute? OR, is there some function, method, procedure, code, whatever, that I can add to definitely trigger the dialog to close? Maybe a different way to invoke the script in the first place? (I'd like to stay clear of macros and stick with just running the script if possible.) Whilst the script all works fine, it's just annoying that for a brief moment I have a clearly inactive and 'finished with' dialog box on screen.....which, if nothing else, doesn't really give a very good impression. Regards. 2012-02-09T18:15:00+01:00 Maxscript - Backburner - netRenderMgr progress http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/maxscript---backburner---netrendermgr-progress/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/maxscript---backburner---netrendermgr-progress/page-last/#When:08:33:39Z I've written a render manager for my studio. I am pretty happy with it. It even manages power! When nodes are done on the last complete job it powers them off and powers off the entire farm when the last job is done.. now I can sleep better knowing my render farm isn't going to be running through the night. I am a little confused about getting progress and frame counts from backburner jobs though. When the manager sends an update callback my app requests all of the jobs again. I am trying to use the job.numFramesComplete value to update my displays. But it doesn't really update to the proper values until the job is completed. When attempting to update the server's progress I am trying to use s.jobFrameIndex as the frame number the server is currently working on. But somehow I don't think the frame index equates to an actual frame. it returns either a frame number, undefined or 268435455 (0x0FFFFFFF) So.. I am looking for some examples of code snippets to help me keep an a updated render progress display. 2012-02-09T08:33:39+01:00 Can render() include camera shader? http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/can-render-include-camera-shader/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/can-render-include-camera-shader/page-last/#When:02:29:20Z I am using mental ray renderer. To my knowledge, there are two ways to excute render from Max Script. One is [code]render()[/code] the other one is [code]max quick render[/code] I noticed that when I use render(), my setup for camera shaders/Lens/Distortion doesn't work. I think render() command did not include the camera shader. Is there a way to solve this problem? Here is my Max Script code: [code] renderers.current = mental_ray_renderer() renderers.current.Enable_Camera_Lens_Shader = true distMap = Distortion() distMap.Barrel = true distMap.Pin_Cushion = false distMap.amount = 1.8 renderscenedialog.update() rendOutputFilename=outputdir+"\"+fileName+".tif" b = bitmap 640 480 filename:rendOutputFilename numframes:1 gamma:0.40 pixelAspect:1 TIF.setType #color TIF.setAlpha 1 render camera:cameraObject frame:i to: b vfb:off save b close b [/code] 2012-02-09T02:29:20+01:00 Dividing 1 with 100 is 0 why? http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/dividing-1-with-100-is-0-why/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/dividing-1-with-100-is-0-why/page-last/#When:13:30:40Z I have strange behaviour with maxcsript, when i want divide 1/100 he says that it is 0 do you know whre is the problem? 2012-02-08T13:30:40+01:00 Access command-line parameters from within my MAXScript? http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/access-command-line-parameters-from-within-my-maxscript/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/access-command-line-parameters-from-within-my-maxscript/page-last/#When:12:29:06Z How can I access command-line parameters from within my MAXScript? 2012-02-07T12:29:06+01:00 Bitmap in Rollout http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/bitmap-in-rollout/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/bitmap-in-rollout/page-last/#When:09:10:30Z Hello, im trying to make a bitmap that change layer depending on a value but... is this posible if so how? what im trying to do is a image that highligt one point at the time easiest with layers i think but maby theres another way... 2012-02-07T09:10:30+01:00 Rotate bends gizmo givin a world space rotation matrix http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/rotate-bends-gizmo-givin-a-world-space-rotation-matrix/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/rotate-bends-gizmo-givin-a-world-space-rotation-matrix/page-last/#When:04:41:43Z Hi, I have some animated chunks exported from Thinking particles that I need to rotate the bend gizmo at a certain direction. Here are the details: The flat part of the chunks that I need to bend is perpendicular to X axis. Ai need to rotate the bends gizmo axis around the X axis pointing to a world coordinates vector The chunks have scale in them (they was exported like this), looks like all of them are uniform scaled. Here is the calculation of rotation matrix: [CODE] vec1 = [-1.0, 0.0, 0.0] --World space need to look at vector upVecObj = normalize ($.transform).row1 --X axis (in this case the upVector) of the chunk vecz = normalize (cross upVecObj vec1) --Z axis perpendicular vecy = normalize (cross upVecObj vecz) --Y axis that is trying to perserve the lookat vector newRot = matrix3 upVecObj vecy vecz [1,1,1] --New rotation [/CODE] now I need to apply this to $.modifiers[1].gizmo.rotation non incremental (absolute) Didn't found any good solution... I even tried to bring the direction vector to object space first then create the rotation matrix, still the X axis was corect but Y an Z offseted in rotation Thanks 2012-02-07T04:41:43+01:00 Bug check: getFileModDate http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/bug-check-getfilemoddate/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/bug-check-getfilemoddate/page-last/#When:09:48:30Z I've found what appears to be a bug in getFileModDate: 1. In Windows, find a file with a modification date between 12 pm and 1pm. 2. in Maxscript run a "getFileModDate" on that file. The time comes back as AM instead of PM. e.g. Windows timestamp [b]"2/2/2012 12:21:11 PM"[/b] becomes [b]"2/2/2012 12:21:11 AM"[/b] If you run the same test on a file with a timestamp between 12 and 1 AM, the 12 becomes 0. e.g. Windows timestamp [b]"11/11/2011 12:23:00 AM"[/b] becomes [b]"11/11/2011 0:23:00 AM"[/b] Can someone else confirm this (i.e., it's not just something odd with my network/servers/time settings/etc.)? Thanks, -Scott 2012-02-06T09:48:30+01:00 Linked Objects - Save / Load http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/linked-objects---save--load/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/linked-objects---save--load/page-last/#When:03:31:33Z Hello... I would like to know if there is a feature in 3DSMAX or maybe a script available which allows you to save/export the link association between objects and be able to load/import this back in. 2012-02-06T03:31:33+01:00 MaxScript 2012 won't format string to external file http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/maxscript-2012-wont-format-string-to-external-file/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/maxscript-2012-wont-format-string-to-external-file/page-last/#When:16:04:03Z Hello everyone! In a need to use this code: [code]file = (createfile "C:UsersReljaDesktop\filename.txt") format "mystring" to:file[/code] I've found out that it's not working in 3ds Max 2012. Works fine in 2010, but in 2012, compiler says "OK" but nothing gets formatted to the file. I've looked under the MAXScript Help on the web, but they say nothing about changing this command. If anyone knows a solution, I would appreciate if you'd share. Thanks! 2012-02-05T16:04:03+01:00