public static int AddOsmShell(uint nodeHandle, float shellAmount)
{
try
{
IGlobal global = Autodesk.Max.GlobalInterface.Instance;
IInterface14 ip = global.COREInterface14;
IClass_ID cidOsmShell = global.Class_ID.Create(0x3b9b1a16, 0x6d84e8d0);
AddOsmModifier(nodeHandle, cidOsmShell);
IINode node = ip.GetINodeByHandle(nodeHandle);
IModifier mod = GetModifier(node, cidOsmShell);
if (mod != null)
{
IIParamBlock2 pb = mod.GetParamBlock(0);
pb.SetValue(0, 0, shellAmount, 0); // innerAmount parameter is at index zero of the parameter block.
}
}
catch (Exception ex)
{
Debug.Print(ex.Message);
return -1;
}
return 1;
}