JBoolean
JNamedTreeNode::FindNamedChild
	(
	const JCharacter*	name,
	JNamedTreeNode**	node
	)
{
	const JNamedTreeNode* n;
	const JBoolean found = FindNamedChild(name, &n);
	if (found)
		{
		*node = const_cast<JNamedTreeNode*>(n);
		}
	return found;
}
Beispiel #2
0
bool HesperisIO::ReadTransforms(HBase * parent, MObject &target)
{
    std::vector<std::string > tmNames;
    parent->lsTypedChild<HTransform>(tmNames);
	std::vector<std::string>::const_iterator it = tmNames.begin();
	
    for(;it!=tmNames.end();++it) {
        std::string nodeName = *it;
        SHelper::behead(nodeName, parent->pathToObject());
        SHelper::behead(nodeName, "/");
        HBase child(*it);
        MObject otm = MObject::kNullObj;
        if(!FindNamedChild(otm, nodeName, target)) {
            MFnTransform ftransform;
            otm = ftransform.create(target);
            SHelper::noColon(nodeName);
            ftransform.setName(nodeName.c_str()); 
        }
        ReadTransforms(&child, otm);
        ReadCurves(&child, otm);
        child.close();
	}
    return true;
}