A class just to hold information. Possible?

Hi!

I'm writing a plugin using maxscript and was wondering if I can make a new class just to store data and save objects of this class to parameters (so that they are saved in the scene file).
As I have understood it every class that you create needs a superclass. But what class would be appropriate to inherit from?
To be able to store the objects in a parameter I tried using simpleObject as superclass and save the objects in a nodeTab.
This works, but even though they have no mesh they still appear in the scene. You can select them, they have a pivot point and their names are in the "Select from list".
A struct would work just as good as a class, but as far as I know you can't save a struct in a parameter.

Any suggestions?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

Yes, by hidden plugins I mean

Yes, by hidden plugins I mean "invisible: true", and if a object is a node then no way to hidde it persistantly. The TriMesh for example is invisible.

my recent MAXScripts RSS (archive here)

Anubis's picture

Every scripted plugin create

Every scripted plugin create a new class from it name, for example:
plugin simpleObject Test -- will create new class Test
Also you can create hidden plugins - search into the help, there is an example.

my recent MAXScripts RSS (archive here)

Agon's picture

Like I said, I tried using

Like I said, I tried using simpleObject as superclass. The problem with it is that the object appears in the scene, even though they have no mesh.
If by hidden plugins you mean "invisible: true" that only hides the button in the create panel. The objects still turn up in the scene when created from a script.
If by hidden plugins you mean in the same way as "hide selected" then yes that hides the objects in the scene, but they reappear as soon as you use "unhide all".

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.