Create hidden variables in geometric objec

 
 
 
Posted by:havardsc
Data created:15 October 2012

Hi,

 

I was wondering if it is possible to add hidden variables to a geometric object created with Lab like you can do with SimpleObject scripted plugins in maxscript.

In maxscript you can do like this:

 

plugin SimpleObject myGeoPlug name;etc..

(

local hiddenVar1 = #()

local hiddenVar2 = 25

paramteres .. ( )

rollout .. ( )

on buildMesh do ()

tool create ()

)

 

The hiddenVars will not be visible if you use the showProperties method, but will be accessible like any other property:

myGeoPlugInstance.hiddenVar2 

append myGeoPlugInstance.hiddenVar1 10

I use it to read and write vertex and face data using pflow operators, like this:

http://folk.ntnu.no/havardsc/site/wordpress/?page_id=683

There is no need for them to be hidden, just wondering if it is possible to access an exposed array from the object.

Interesting. So would these just not show up in the UI then? I am not sure how to prevent them from appearing in showProperties, but I will investigate it. I suppose some special flag or tag would need to be added to the "hidden" input ports.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

They don't need to be invisible from the UI and it would be more clearer if they appeared in showProperties, but their main advantage is that the "on buildMesh " event handler is not called when changing these variables unlike the standard parameters in a scripted plugin in do when their values are changed.