コード例 #1
0
ファイル: shadingNode.cpp プロジェクト: haggi/OpenMaya
void ShadingNode::setMObject(MObject mobj)
{
	this->mobject = mobj;
	if( this->mobject != MObject::kNullObj)
	{
		this->typeName = getDepNodeTypeName(this->mobject);
		this->fullName = getObjectName(this->mobject);	
	}
}
コード例 #2
0
void ShadingNode::setMObject(const MObject& mobj)
{
    mobject = mobj;
    if (mobject != MObject::kNullObj)
    {
        typeName = getDepNodeTypeName(mobject);
        fullName = getObjectName(mobject);
    }
}
コード例 #3
0
ファイル: shadingNode.cpp プロジェクト: haggi/OpenMaya
void ShadingNode::init(void)
{
	this->mobject = MObject::kNullObj;
	this->nodeState = INVALID;
	if( this->mobject != MObject::kNullObj)
	{
		this->typeName = getDepNodeTypeName(this->mobject);
		this->fullName = getObjectName(this->mobject);	
	}
}
コード例 #4
0
ファイル: shaderDefs.cpp プロジェクト: Zaken7/OpenMaya
ShadingNode ShaderDefinitions::findShadingNode(MObject node)
{
	ShadingNode sn;
	MString nodeTypeName = getDepNodeTypeName(node);
	for(size_t nodeId = 0; nodeId < this->shadingNodes.size(); nodeId++)
	{
		//logger.feature(MString("Searching current node type ") + nodeTypeName + " in supported nodes " + this->shadingNodes[nodeId].typeName);
		if( this->shadingNodes[nodeId].typeName == nodeTypeName)
		{
			// copy attributes to the shading node
			sn = this->shadingNodes[nodeId];
			// initialize the shading node with the correct mobject
			sn.setMObject(node);
			break;
		}
	}
	return sn;
}