Parameter Blocks

 
 
 
Posted by:MrSparkle
Data created:10 May 2010

Hi,

is there a tutorial about how to add UI parameters to a geometry plugin? I tested the Plane geometry plugin example and tried to add some ParameterBlocks for the width and the length of the plane. The spinners are shown in the plugin's rollout but I couldn't manage to apply the chenged values to the plane's geometry. I guess the problem is to notify the plugin after the value has been changed in the UI, so the plugin can rebuild the geometry according to the parameters. Where can I find an example about the parameter block handling?

Thank you,

Christian

Hi Christian,

I guess you already looked through the paramblock doc. The 'UpdateMesh' method should be called automatically when a parameter changes in the block. The only trick is to make sure you set the validity interval to current frame from what I remember.

I will try to update the geometry plugin tutorial to include parameter blocks soon, or at least post a sample project for you to look at.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Thank you, it works. I simply had to remove the line

( this as ISimpleObject2 ).Ivalid.SetInfinite();

from the BuildMesh-Method.

Christian