Notifications
Clear all

[Closed] Scene explorer, Custom Properties

I’ve played around with adding some custom columns for the Scene Explorer, I think there is a lot of potential there!

I’ve hit a blocker though, I can’t figure out how to display/edit any value other than string. In max2009, the docs don’t explain how to do checkboxes, lists, integer values, etc.

For instance, the example script from the docs that makes an editable column for radius (integer value) doesn’t actually work. When you try to set the value from the SE, you get an error because its reading your entry as a string, you have to force the value in the script to read as integer before it runs.

From the docs:


fn getRad theNode = 
(
if isProperty theNode "Radius" then theNode.Radius 
)

fn setRad theNode theValue = 
(
if isProperty theNode "Radius" then theNode.Radius = theValue -- add 'as integer' here
)

SceneExplorerManager.addProperty "Radius" getRad setRad


It seems like there is some info missing from the docs on how to handle different property types, or maybe its just not available in 2009.

Has anyone had any luck with this?
Thanks in advance

6 Replies

Actually it should be AS FLOAT so you can have non-integer radii.

But good catch, that example is broken as it is. Not sure how it happened as I am quite sure it used to work at some point. There might have been an implicit conversion of the string to number in earlier Betas when it was written, or I am just a moron… not sure.

Thanks Bobo!

I apologize, my intentions where not to point out a mistake in the docs, It just happened to be a good example of the problem I’m running in to. I know you have a lot on your plate there.

I’m trying to figure out if there are undocumented features that would allow us to script check boxes, lists, or spinners into a custom column for the SE. Some of the max default columns do this already.

For instance, we have a No-Export modifier in house, we throw that on objects and check box it on and off. Its great being able to control that through scene explorer, but the only way I could get it to work is having guys type “true” or “false” in the SE column. A check box column would be more elegant

I appreciate the help!

1 Reply
(@bobo)
Joined: 2 years ago

Posts: 0

The non-string controls in the Explorer are DotNet controls and they are currently not usable via the MAXScript methods for extending the Explorer columns. At least as far as I know…

Can we use DotNet to extend the explorer columns?

1 Reply
(@bobo)
Joined: 2 years ago

Posts: 0

As I said, as far as I know this is not possible via MAXScript.
The Scene Explorer was written with the SDK and was a proof of concept for exactly that – using managed code (C#, DotNet) within unmanaged code (C++).

Gotcha. Thanks, Bobo.