function ParamChanged( ParamName , NewValue ) |
Top Previous Next |
ParamChanged( ParamName , newValue ) is invoked when the user changes a parameter of the Smart-Object.
It could be that the parameter does not affect the Geometry (eg Material change ) and we do not want to rebuild the object. In this case the function should return a positive value to indicate that the ModelBuilder() call should be skipped .
Example:
function ParamChanged( ParamName , NewValue ) { if( ParamName=="_mat_base) { ApplyNewMaterial( NewValue ); return 1; //do not call ModelBuilder() }
return 0; //ModelBuilder() will be called to rebuild the model }
|