Notifications
Clear all

[Closed] Using utilities

For the script I’m working on, I need to change a value in the ulitilies panel. There is no response generated in the listener when I change the property and I can’t find anything helpful in the MaxScript reference, so I’m stuck.

The utility I need to use contains a bunch of extra properties for meshes. Each mesh has its own entires for each of the properties. I need to know how to affect those properties.

I’m probably not being clear, so here is what I would do to do what I want manually.

[ul]
[li]Go to the utilities panel.[/li]
[li]Click ‘More’.[/li]
[li]Select ‘User Property Editor’.[/li]
[li]Check the ‘Connected’ box.[/li]
[/ul]

Thanks for any help.

4 Replies

Bad news – the Utilities panel, like the Video Post, is an “island” in 3ds max that has almost no MAXScript access. It has been written as a rather isolated feature in 3D Studio MAX 1.0 and was never intended to interact with the scene directly (as are most other parts of the system like objects, modifiers, materials, space warps etc.).
The only thing you can do in MAXScript is List all Utilities, Open a utility and Close a utility.
Utilities CAN expose properties to MAXScript though via Function Publishing Interfaces. See the utilities added to 3ds max 6 like the “Clean_MultiMaterial”, “Fix Ambient”, “Instance_Duplicated_Maps” etc. It is the responsibility of the Utility plugin developer to expose an Interface to MAXScript.

Ok, thanks anyway.

Edit: Actually, maybe I can use a workaround. Here is my idea: I have a base object that has the properties set as I want. For each new objet that I want to create, I duplicate that (so the utilities-based properties are hopefully retained) and then just modify the geometry, pivot, etc.

I did that, but ran into a problem. It grays out the options I want and all the other data of the panel are erased. It does not gray them out when I just shift-drag a piece. Here is the code I’m using to copy and modify:

	if (includedVert.count>0) then (
  		newMesh=copy $baseObject
 		chunkMesh = mesh vertices:includedVert faces:includedTri name:( (whichChunk as string) + "_")
  		attach newMesh chunkMesh
 		newMesh.pivot=[ pivotpoint[whichChunk][1], pivotpoint[whichChunk][2], pivotpoint[whichChunk][3] ]
  		newMesh.name=( (whichChunk as string) + "_")
  	)

Is there something else I can use other than ‘copy’ to copy?

Thanks much.

Try the

maxOps.cloneNodes

method. It is always better, especially when instancing, but even when copying, it might preserve more data and dependencies…

Thanks again, I got that part working now.