控制节点连接删除后节点是否存在

当连接某个节点的其他节点都被删除时,MPxNode根据情况决定是否删除
控制此种删除行为的是以下几个函数:
MStatus setExistWithoutInConnections (bool flag)
 This method specifies whether or not the node can exist without input connections. 
bool existWithoutInConnections (MStatus *ReturnStatus=NULL) const
 Determines whether or not this node can exist without input connections. 
MStatus setExistWithoutOutConnections (bool flag)
 This method specifies whether or not the node can exist without output connections. 
bool existWithoutOutConnections (MStatus *ReturnStatus=NULL) const
 Determines whether or not this node can exist without output connections. 

按照maya的规定,set函数应该在postConstructor调用,而不是在构造函数被调用。详细见postConstructor解释。





posted @ 2015-02-12 01:17  dydx  阅读(242)  评论(0编辑  收藏  举报