The Area http://area.autodesk.com/forum/ The Area en Copyright 2012 2012-05-17T02:28:20+02:00 Maxscript window interface made in Visual Studio C# http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/maxscript-window-interface-made-in-visual-studio-c/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/maxscript-window-interface-made-in-visual-studio-c/page-last/#When:02:19:12Z Hey Guys I want to be able to make an interface/form using C# in visual studio and use it in 3Ds Max rollout. I searched for information a lot and I couldn't find anything. All I did so far is to open the interface using ".show()", but it doesn't work the way it should because it opens like a standalone program. Is that even possible? If so, what kind of project should I use in VS, class library? How do I import the interface to a Max Rollout? 2012-05-16T02:19:12+02:00 Move keys for vertexes http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/move-keys-for-vertexes/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/move-keys-for-vertexes/page-last/#When:02:07:56Z Using macrorecorder on an animated spline The first line is reported as [code][/code] moveKeys $.Master.controller 1f #selection [code][/code] If I copy paste the very same line of code into a new script and run it I get in the listener [code][/code] -- Unknown property: "master" in $Line:Line01 @ [-15.591690,-0.000000,3.866278] [code][/code] I am trying to find the right syntax for moving keys for splines but this has bafelled me! 2012-05-16T02:07:56+02:00 After creating spline shape via maxscript modifier list doesn't work ! http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/after-creating-spline-shape-via-maxscript-modifier-list-doesnt-work-/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/after-creating-spline-shape-via-maxscript-modifier-list-doesnt-work-/page-last/#When:01:46:13Z Hello everyone, I'm working on PARA 3d Scripted plug-in. The idea is to make and control spline shapes just like you do with arrays in my plug-in. I found strange problem when you keep updating a spline object by maxscript function "Updateshape()". When I create a clone of the spline in the scene the modifier list of max no longer operates. I can't open the list anymore even I reset the scene. any suggestion? www.parametric-array.com 2012-05-16T01:46:13+02:00 Programmatically get normal value at certain time. http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/programmatically-get-normal-value-at-certain-time/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/programmatically-get-normal-value-at-certain-time/page-last/#When:16:33:53Z I'm trying to get the normals for a certain vertex at a certain time, but using "at time t" or "sliderTime = t" doesn't seem to have an effect. The following script will print the first vert and first normal for the selected object. [code] function PrintNormal mesh = ( v = GetVert mesh 1 print (Format "VERTEX: %, %, %n" v.x v.y v.z) n = GetNormal mesh 1 print (Format "NORMAL: %, %, %n" n.x n.y n.z) ) for obj in selection do ( animate on mesh = SnapshotAsMesh obj PrintNormal mesh ) [/code] The object moves and rotates obviously between frame 0 and frame 5, and if I run the script, move the time slider to frame 5, then run the script the vertex has the same value but the normal has changed: [code] PrintNormal() VERTEX: -2.41496, -1.24684, 0.308088 OK NORMAL: -6.53527e-006, -0.0980185, -0.995185 OK OK PrintNormal() VERTEX: -2.41496, -1.35053, 0.136583 OK NORMAL: -7.0202e-006, -0.595702, -0.803205 OK OK [/code] But if I programmatically set the time using slider time and/or use "at time" like this: [code] function PrintNormal mesh = ( v = GetVert mesh 1 print (Format "VERTEX: %, %, %n" v.x v.y v.z) n = GetNormal mesh 1 print (Format "NORMAL: %, %, %n" n.x n.y n.z) ) for obj in selection do ( animate on mesh = SnapshotAsMesh obj at time 0 PrintNormal mesh at time 5 PrintNormal mesh ) [/code] It prints the same value twice like this: [code] VERTEX: -2.41496, -1.35053, 0.136583 OK NORMAL: -7.0202e-006, -0.595702, -0.803205 OK VERTEX: -2.41496, -1.35053, 0.136583 OK NORMAL: -7.0202e-006, -0.595702, -0.803205 [/code] How can I programmatically get the animated vertex value and corresponding animated normal? 2012-05-15T16:33:53+02:00 Hey I'm having a hell of a time trying to understand how to write For loops in Max http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/hey-im-having-a-hell-of-a-time-trying-to-understand-how-to-write-for-loops-in-max/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/hey-im-having-a-hell-of-a-time-trying-to-understand-how-to-write-for-loops-in-max/page-last/#When:11:06:28Z I'm trying to write this: [code] int a[] = {9,25,3}; int y = 0; for (int i = 0; i < 3; i++){ if ( a[i] > y){ y = a[i]; } } [/code] all I'm trying to to do is scale any object to fit in the size of a box i was doing [code] a = ($.max - $.min) b = ($Dummy001.max - $Dummy001.min) $.scale = b/a [/code] but uneven shapes scale to fill the whole box of course. just trying to find the biggest number from a above. thanks in advance :D 2012-05-11T11:06:28+02:00 Enable in render http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/enable-in-render/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/enable-in-render/page-last/#When:07:25:01Z HI I wondered was it possible to create a script when could switch 'enable in renderer' on for a large set of wires, and also to adjust their thickness. As an occasional scripter I noticed that the listener doesn't work at this level. Cheers Simon 2012-05-10T07:25:01+02:00 how to display bitmap in 2013 that doesn't break under different user gamma settings? http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/how-to-display-bitmap-in-2013-that-doesnt-break-under-different-user-gamma-settings/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/how-to-display-bitmap-in-2013-that-doesnt-break-under-different-user-gamma-settings/page-last/#When:05:26:52Z I've written a number of maxscripts that use bitmaps for various interface items, etc. In max 2013 all of these bitmaps are now broken because how they look depends on whether the user is using gamma correction and what that setting is. So if I display an image in a window and the user changes her gamma setting, that image in the window will now look wrong. Is this a bug or a feature? In max 2012 it was possible to use the following technique when loading bitmaps and this enabled the bitmaps to look correct in most cases no matter what the user was doing with gamma: [color=blue]currentgamma = fileInGamma fileInGamma = 1 bitmapfile = OpenBitMap ( GetDir #ui + "\Icons\PhysXEdit_24i.bmp" ) theimage = bitmap bitmapfile.width bitmapfile.height copy bitmapfile theimage fileInGamma = currentgamma display theimage[/color] This type of script no longer works in max 2013. Any insight appreciated. 2012-05-10T05:26:52+02:00 Faulty I/O to network, poor stringstream scalability http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/faulty-io-to-network-poor-stringstream-scalability/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/faulty-io-to-network-poor-stringstream-scalability/page-last/#When:13:30:23Z My exporter uses CreateFile() and Format " ... " to:myfile to write 4-10MB ascii files to a network share on the fast local network, and often times freezes with no error output in the listener. Is there any way around this? Should I constantly flush the file buffer, or use a different write method? Or maybe buffer all of the data and write it all at once? We have a few modelers that all need to easily share files and exporting to the local disc and then manually copying the results to the network share is becoming a pain... Also, string string does not seem to scale to buffers of this size, and becomes unusable after a couple of megabytes. Is there a way to initialize a stringstream to a static size first? 2012-05-09T13:30:23+02:00 Delete Visibility tracks for multiple objects http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/delete-visibility-tracks-for-multiple-objects/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/delete-visibility-tracks-for-multiple-objects/page-last/#When:12:30:59Z Sorry if this is basic maxscript 0.02 question, but how do I delete the the keys for multiple objects. This code doesn't work (because I wrote it!) [code][/code] foo=$line* as array for m=1 to foo.count do ( deletekeys foo[m].VISIBILITY ) [code][/code] 2012-05-09T12:30:59+02:00 offset visibility for objects? (SOLVED) http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/offset-visibility-for-objects-solved/page-last/ http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/offset-visibility-for-objects-solved/page-last/#When:08:17:27Z I am using this script by Dan Grover [code][/code] rollout MyRoll "Ani-Offset - Dan" ( spinner offsetamount range: [0,100,2] type:#FLOAT align:#left width:120 button offset "Offset Position" align:#left width:120 label lab1 "Choose the Offset Amount" align:#middle label lab2 "and hit the Button" align:#middle on offset pressed do ( offsetval = offsetamount.value counter = 0 for c in selection do ( counter = (counter + 1) newLocale = (counter*offsetval) moveKeys c.transform.controller newLocale ) )--end pressed )--end rollout createdialog MyRoll height:90 width:150 [code][/code] And I wonder if it could be edited to offset the visibility attribues as well? Basically I am animating 3000 objects over 60 frames (60/3000)=offset 0.02 frames, I have set the visibility to zero at frame zero and 1 at frame 60, but for the life of me I do not know how to offset visibilty keys! Can anyone help? 2012-05-04T08:17:27+02:00