private static void setNodeInheritProperty(IINode node, NodeLayerProperty prop, Boolean value) { IINodeLayerProperties nodeProps = node.GetInterface(MaxInterfaces.NodeLayerProperties) as IINodeLayerProperties; if (nodeProps == null) return; switch (prop) { case NodeLayerProperty.Color: nodeProps.ColorByLayer = value; break; case NodeLayerProperty.Display: nodeProps.DisplayByLayer = value; break; case NodeLayerProperty.GlobalIllumination: nodeProps.GlobalIlluminationByLayer = value; break; case NodeLayerProperty.Motion: nodeProps.MotionByLayer = value; break; case NodeLayerProperty.Render: nodeProps.RenderByLayer = value; break; } }