def returnPuppetObjects(): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Looks for master objects and returns a list of the objects ARGUMENTS: nothing RETURNS: masterList(list) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ transformsList = mc.ls(tr=True) mastersList = [] for obj in transformsList: userAttrsBuffer = attributes.returnUserAttributes(obj) if userAttrsBuffer > 0: for attr in userAttrsBuffer: if attr == 'cgmModuleType': attrBuffer = mc.getAttr('%s%s%s' % (obj, '.', attr)) if attrBuffer == 'master': mastersList.append(obj) return mastersList
def connectBlendShapeNodeToPoseBuffer(blendShapeNode,poseBuffer): blendShapeChannels = search.returnBlendShapeAttributes(blendShapeNode) poseBufferAttributes = attributes.returnUserAttributes(poseBuffer) for blendShapeChannel in blendShapeChannels: if blendShapeChannel in poseBufferAttributes: attributes.doConnectAttr((poseBuffer+'.'+blendShapeChannel),(blendShapeNode+'.'+blendShapeChannel),False)
def returnPuppetObjects(): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Looks for master objects and returns a list of the objects ARGUMENTS: nothing RETURNS: masterList(list) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ transformsList = mc.ls(tr=True) mastersList = [] for obj in transformsList: userAttrsBuffer = attributes.returnUserAttributes(obj) if userAttrsBuffer > 0: for attr in userAttrsBuffer: if attr == 'cgmModuleType': attrBuffer = mc.getAttr('%s%s%s'%(obj,'.',attr)) if attrBuffer == 'master': mastersList.append(obj) return mastersList
def updateBlendShapeNodeToPoseBuffer(poseBuffer,blendShapeNode,doConnect = True, transferConnections = True, removeMissingShapes = True): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Updates a blendshape to posebuffer connection with new attrs (need to make it remove non existing ones, maybe make the creation one tag it's parent blendshape node) ARGUMENTS: poseBuffer(string) blendShapeNode(string) doConnect(bool) - (True) - if you want to connect the atributes to the new ones transferConnections(bool) - (True) - if you wanna transfer exisiting connections or not RETURNS: returnList(list) - [poseBuffer(string),newAttrs(list)] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ """ first get the blendshape attrs """ blendShapeAttrs = search.returnBlendShapeAttributes(blendShapeNode) initialPoseBufferAttrs = attributes.returnUserAttributes(poseBuffer) removeAttrsBuffer = lists.returnMissingList(blendShapeAttrs,initialPoseBufferAttrs) newAttrs = lists.returnMissingList(initialPoseBufferAttrs,blendShapeAttrs) newAttrs = attributes.addFloatAttrsToObj(poseBuffer, newAttrs,dv = 0) poseBufferAttrs = attributes.returnUserAttributes(poseBuffer) if doConnect: for attr in newAttrs: try: attributes.doConnectAttr((poseBuffer+'.'+attr),(blendShapeNode+'.'+attr),False,transferConnections) except: guiFactory.warning('%s%s%s%s' % ((poseBuffer+'.'+attr),' to ',(blendShapeNode+'.'+attr),' failed!' )) removeAttrs = [] if removeMissingShapes: for attr in removeAttrsBuffer: if 'cgm' not in attr: removeAttrs.append((poseBuffer+'.'+attr)) mc.deleteAttr((poseBuffer+'.'+attr)) return [newAttrs,removeAttrs]
def doRenameHeir(obj, sceneUnique=False): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Names an object's heirarchy below ARGUMENTS: obj(string) - the object we'd like to startfrom RETURNS: newNames(list) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ ### input check assert mc.objExists(obj) is True, "'%s' doesn't exist" % obj #children = mc.listRelatives(obj,allDescendents=True,type='transform') # Create a tmp group to store out objects to so that we can get them back even if heirarchal names change tmpGroup = mc.group(em=True) attributes.storeInfo(tmpGroup, ('name' + str(0)), obj) newNames = [] childrenList = [] children = mc.listRelatives(obj, allDescendents=True, fullPath=True) children.reverse() cnt = 1 for c in children: attributes.storeInfo(tmpGroup, ('name' + str(cnt)), c) cnt += 1 toNameAttrs = attributes.returnUserAttributes(tmpGroup) mayaMainProgressBar = guiFactory.doStartMayaProgressBar( len(toNameAttrs), 'Naming') for attr in toNameAttrs: if mc.progressBar(mayaMainProgressBar, query=True, isCancelled=True): break objectToName = (attributes.returnMessageObject(tmpGroup, attr)) mc.progressBar(mayaMainProgressBar, edit=True, status=("Naming '%s'" % objectToName), step=1) buffer = doNameObject(objectToName, sceneUnique) if buffer: newNames.append(buffer) guiFactory.doEndMayaProgressBar(mayaMainProgressBar) mc.delete(tmpGroup) return newNames
def doRenameHeir(obj,sceneUnique = False): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Names an object's heirarchy below ARGUMENTS: obj(string) - the object we'd like to startfrom RETURNS: newNames(list) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ ### input check assert mc.objExists(obj) is True, "'%s' doesn't exist" %obj #children = mc.listRelatives(obj,allDescendents=True,type='transform') # Create a tmp group to store out objects to so that we can get them back even if heirarchal names change tmpGroup = mc.group(em=True) attributes.storeInfo(tmpGroup,('name'+str(0)),obj) newNames = [] childrenList = [] children = mc.listRelatives(obj,allDescendents=True,fullPath=True) children.reverse() cnt = 1 for c in children: attributes.storeInfo(tmpGroup,('name'+str(cnt)),c) cnt += 1 toNameAttrs = attributes.returnUserAttributes(tmpGroup) mayaMainProgressBar = guiFactory.doStartMayaProgressBar(len(toNameAttrs),'Naming') for attr in toNameAttrs: if mc.progressBar(mayaMainProgressBar, query=True, isCancelled=True ) : break objectToName = (attributes.returnMessageObject(tmpGroup,attr)) mc.progressBar(mayaMainProgressBar, edit=True, status = ("Naming '%s'"%objectToName), step=1) buffer = doNameObject( objectToName,sceneUnique ) if buffer: newNames.append(buffer) guiFactory.doEndMayaProgressBar(mayaMainProgressBar) mc.delete(tmpGroup) return newNames
def returnBlendShapeNodeFromPoseBuffer(poseBuffer): poseBufferAttributes = attributes.returnUserAttributes(poseBuffer) drivenObjects = [] if poseBufferAttributes: for attr in poseBufferAttributes: try: buffer = attributes.returnDrivenObject(poseBuffer+'.'+attr) if search.returnObjectType(buffer) == 'blendShape': drivenObjects.append(buffer) except: pass drivenObjects = lists.returnListNoDuplicates(drivenObjects) return drivenObjects else: guiFactory.warning("No blendshape node connected to %s found" %poseBuffer) return False
def returnSceneModules(): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Returns all modules in a scene file ARGUMENTS: RETURNS: moduleList(list) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ transformsList = mc.ls(tr=True) moduleList = [] for obj in transformsList: userAttrsBuffer = attributes.returnUserAttributes(obj) if userAttrsBuffer > 0: for attr in userAttrsBuffer: if attr == 'cgmType': attrBuffer = mc.getAttr('%s%s%s' % (obj, '.', attr)) if attrBuffer == 'module': moduleList.append(obj) return moduleList
def returnObjectsOwnedByModuleNull(moduleNull): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Returns all objeccts owned by a particular module ARGUMENTS: moduleNull(string) for example the templateNull RETURNS: objList(list) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ transformsList = mc.ls(tr=True) returnList = [] for obj in transformsList: userAttrsBuffer = attributes.returnUserAttributes(obj) if userAttrsBuffer > 0: for attr in userAttrsBuffer: if attr == 'cgmOwnedBy': messageObject = attributes.returnMessageObject(obj,attr) if messageObject == moduleNull: returnList.append(obj) return returnList
def returnSceneModules(): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Returns all modules in a scene file ARGUMENTS: RETURNS: moduleList(list) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ transformsList = mc.ls(tr=True) moduleList = [] for obj in transformsList: userAttrsBuffer = attributes.returnUserAttributes(obj) if userAttrsBuffer > 0: for attr in userAttrsBuffer: if attr == 'cgmType': attrBuffer = mc.getAttr('%s%s%s'%(obj,'.',attr)) if attrBuffer == 'module': moduleList.append(obj) return moduleList
def returnObjectGeneratedNameDict(obj, ignore=[False]): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Returns a generated dictionary of name info ARGUMENTS: obj(string) - object ignore(string) - default is 'none', only culls out cgmtags that are generated via returnCGMOrder() function RETURNS: namesDict(string) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ typesDictionary = dictionary.initializeDictionary(typesDictionaryFile) namesDictionary = dictionary.initializeDictionary(namesDictionaryFile) settingsDictionary = dictionary.initializeDictionary( settingsDictionaryFile) namesDict = {} divider = returnCGMDivider() order = returnCGMOrder() nameBuilder = [] #>>> Get our cgmVar_iables userAttrs = attributes.returnUserAttributes(obj) cgmAttrs = lists.returnMatchList(userAttrs, order) #>>> Tag ignoring if ignore: for i in ignore: if i in order: order.remove(i) #>>> Geting our data for tag in order: tagInfo = search.findRawTagInfo(obj, tag) if tagInfo is not False: namesDict[tag] = (tagInfo) """ remove tags up stream that we don't want if they don't exist on the actual object""" if mc.objExists(obj + '.cgmTypeModifier') != True: if namesDict.get('cgmTypeModifier') != None: namesDict.pop('cgmTypeModifier') #>>> checks if the names exist as objects or it's a shape node ChildNameObj = False nameObj = search.returnTagInfo(obj, 'cgmName') typeTag = search.returnTagInfo(obj, 'cgmType') isType = search.returnObjectType(obj) childrenObjects = search.returnChildrenObjects(obj) """first see if it's a group """ if childrenObjects > 0 and isType == 'transform' and typeTag == False: """ if it's a transform group """ groupNamesDict = {} if not nameObj: groupNamesDict['cgmName'] = childrenObjects[0] else: groupNamesDict['cgmName'] = nameObj groupNamesDict['cgmType'] = typesDictionary.get('transform') if namesDict.get('cgmDirection') != None: groupNamesDict['cgmDirection'] = namesDict.get('cgmDirection') if namesDict.get('cgmDirectionModifier') != None: groupNamesDict['cgmDirectionModifier'] = namesDict.get( 'cgmDirectionModifier') if namesDict.get('cgmTypeModifier') != None: groupNamesDict['cgmTypeModifier'] = namesDict.get( 'cgmTypeModifier') return groupNamesDict """ see if there's a name tag""" elif nameObj != None or isType == 'shape': """if there is, does it exist """ if mc.objExists(nameObj) == True: """basic child object with cgmName tag """ childNamesDict = {} childNamesDict['cgmName'] = namesDict.get('cgmName') childNamesDict['cgmType'] = namesDict.get('cgmType') if namesDict.get('cgmDirection') != None: childNamesDict['cgmDirection'] = namesDict.get('cgmDirection') if namesDict.get('cgmNameModifier') != None: childNamesDict['cgmNameModifier'] = namesDict.get( 'cgmNameModifier') if namesDict.get('cgmDirectionModifier') != None: childNamesDict['cgmDirectionModifier'] = namesDict.get( 'cgmDirectionModifier') if namesDict.get('cgmTypeModifier') != None: childNamesDict['cgmTypeModifier'] = namesDict.get( 'cgmTypeModifier') return childNamesDict elif isType == 'shape' or 'Constraint' in isType: """if so, it's a child name object""" childNamesDict = {} childNamesDict['cgmName'] = search.returnParentObject(obj, False) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict elif typeTag == 'infoNull': """if so, it's a special case""" moduleObj = search.returnMatchedTagObjectUp( obj, 'cgmType', 'module') masterObj = search.returnMatchedTagObjectUp( obj, 'cgmType', 'master') if moduleObj != False: moduleName = returnUniqueGeneratedName(moduleObj, ignore='cgmType') childNamesDict = {} childNamesDict['cgmName'] = (moduleName + '_' + nameObj) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict elif masterObj != False: masterName = returnUniqueGeneratedName(masterObj, ignore='cgmType') childNamesDict = {} childNamesDict['cgmName'] = (masterName + '_' + nameObj) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict else: return namesDict else: return namesDict else: return namesDict
def returnObjectGeneratedNameDict(obj,ignore='none'): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Returns a generated dictionary of name info ARGUMENTS: obj(string) - object ignore(string) - default is 'none', only culls out cgmtags that are generated via returnCGMOrder() function RETURNS: namesDict(string) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ typesDictionary = dictionary.initializeDictionary(typesDictionaryFile) namesDictionary = dictionary.initializeDictionary(namesDictionaryFile) settingsDictionary = dictionary.initializeDictionary(settingsDictionaryFile) namesDict={} divider = returnCGMDivider() order = returnCGMOrder() nameBuilder = [] #>>> Get our cgmVar_iables userAttrs = attributes.returnUserAttributes(obj) cgmAttrs = lists.returnMatchList(userAttrs,order) #>>> Tag ignoring if ignore != 'none': if ignore in order: order.remove(ignore) #>>> Geting our data for tag in order: tagInfo = search.findRawTagInfo(obj,tag) if tagInfo is not False: namesDict[tag] = (tagInfo) """ remove tags up stream that we don't want if they don't exist on the actual object""" if mc.objExists(obj+'.cgmTypeModifier') != True: if namesDict.get('cgmTypeModifier') != None: namesDict.pop('cgmTypeModifier') #>>> checks if the names exist as objects or it's a shape node ChildNameObj = False nameObj = search.returnTagInfo(obj,'cgmName') typeTag = search.returnTagInfo(obj,'cgmType') isType = search.returnObjectType(obj) childrenObjects = search.returnChildrenObjects(obj) """first see if it's a group """ if childrenObjects > 0 and isType == 'transform' and typeTag == False: """ if it's a transform group """ groupNamesDict = {} if not nameObj: groupNamesDict['cgmName'] = childrenObjects[0] else: groupNamesDict['cgmName'] = nameObj groupNamesDict['cgmType'] = typesDictionary.get('transform') if namesDict.get('cgmDirection') != None: groupNamesDict['cgmDirection'] = namesDict.get('cgmDirection') if namesDict.get('cgmDirectionModifier') != None: groupNamesDict['cgmDirectionModifier'] = namesDict.get('cgmDirectionModifier') if namesDict.get('cgmTypeModifier') != None: groupNamesDict['cgmTypeModifier'] = namesDict.get('cgmTypeModifier') return groupNamesDict """ see if there's a name tag""" elif nameObj != None or isType == 'shape': """if there is, does it exist """ if mc.objExists(nameObj) == True: """basic child object with cgmName tag """ childNamesDict = {} childNamesDict['cgmName'] = namesDict.get('cgmName') childNamesDict['cgmType'] = namesDict.get('cgmType') if namesDict.get('cgmDirection') != None: childNamesDict['cgmDirection'] = namesDict.get('cgmDirection') if namesDict.get('cgmNameModifier') != None: childNamesDict['cgmNameModifier'] = namesDict.get('cgmNameModifier') if namesDict.get('cgmDirectionModifier') != None: childNamesDict['cgmDirectionModifier'] = namesDict.get('cgmDirectionModifier') if namesDict.get('cgmTypeModifier') != None: childNamesDict['cgmTypeModifier'] = namesDict.get('cgmTypeModifier') return childNamesDict elif isType == 'shape' or 'Constraint' in isType: """if so, it's a child name object""" childNamesDict = {} childNamesDict['cgmName'] = search.returnParentObject(obj,False) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict elif typeTag == 'infoNull': """if so, it's a special case""" moduleObj = search.returnMatchedTagObjectUp(obj,'cgmType','module') masterObj = search.returnMatchedTagObjectUp(obj,'cgmType','master') if moduleObj != False: moduleName = returnUniqueGeneratedName(moduleObj,ignore='cgmType') childNamesDict = {} childNamesDict['cgmName'] = (moduleName+'_'+nameObj) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict elif masterObj != False: masterName = returnUniqueGeneratedName(masterObj,ignore='cgmType') childNamesDict = {} childNamesDict['cgmName'] = (masterName+'_'+nameObj) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict else: return namesDict else: return namesDict else: return namesDict
def returnObjectGeneratedNameDict(obj,ignore=[False]): """ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION: Returns a generated dictionary of name info ARGUMENTS: obj(string) - object ignore(string) - default is 'none', only culls out cgmtags that are generated via returnCGMOrder() function RETURNS: namesDict(string) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> """ _str_funcName = "returnObjectGeneratedNameDict" log.debug(">>> %s >>> "%(_str_funcName) + "="*75) #_str_funcName = "returnObjectGeneratedNameDict(%s,ignore = %s)"%(obj,ignore) if type(ignore) is not list:ignore = [ignore] typesDictionary = dictionary.initializeDictionary(typesDictionaryFile) namesDictionary = dictionary.initializeDictionary(namesDictionaryFile) settingsDictionary = dictionary.initializeDictionary(settingsDictionaryFile) namesDict={} divider = returnCGMDivider() order = returnCGMOrder() nameBuilder = [] #>>> Get our cgmVar_iables userAttrs = attributes.returnUserAttributes(obj) cgmAttrs = lists.returnMatchList(userAttrs,order) #>>> Tag ignoring if ignore: for i in ignore: if i in order: order.remove(i) #>>> Geting our data for tag in order: tagInfo = search.findRawTagInfo(obj,tag) if tagInfo is not False: namesDict[tag] = (tagInfo) _iterator = search.findRawTagInfo(obj,'cgmIterator') if _iterator is not False: log.debug("Iterator found") namesDict['cgmIterator'] = (_iterator) # remove tags up stream that we don't want if they don't exist on the actual object""" if not mc.objExists(obj+'.cgmTypeModifier'): if namesDict.get('cgmTypeModifier') != None: namesDict.pop('cgmTypeModifier') log.debug("%s >>> initial nameDict: %s "%(_str_funcName,namesDict)) #>>> checks if the names exist as objects or it's a shape node ChildNameObj = False nameObj = search.returnTagInfo(obj,'cgmName') typeTag = search.returnTagInfo(obj,'cgmType') isType = search.returnObjectType(obj) childrenObjects = search.returnChildrenObjects(obj) """first see if it's a group """ if isType == 'group' and typeTag == False: log.debug("%s >>> group and no typeTag..."%(_str_funcName)) """ if it's a transform group """ groupNamesDict = {} if not nameObj: groupNamesDict['cgmName'] = childrenObjects[0] else: groupNamesDict['cgmName'] = nameObj groupNamesDict['cgmType'] = typesDictionary.get('transform') if namesDict.get('cgmTypeModifier') != None: groupNamesDict['cgmTypeModifier'] = namesDict.get('cgmTypeModifier') return groupNamesDict """ see if there's a name tag""" elif nameObj != None or isType == 'shape': #If we have a name object or shape log.debug("%s >>> nameObj not None or isType is 'shape'..."%(_str_funcName)) if mc.objExists(nameObj) and mc.attributeQuery ('cgmName',node=obj,msg=True): log.debug("%s >>> nameObj exists: '%s'..."%(_str_funcName,nameObj)) #Basic child object with cgmName tag childNamesDict = {} childNamesDict['cgmName'] = namesDict.get('cgmName') childNamesDict['cgmType'] = namesDict.get('cgmType') if namesDict.get('cgmTypeModifier') != None: childNamesDict['cgmTypeModifier'] = namesDict.get('cgmTypeModifier') if namesDict.get('cgmIterator') != None: childNamesDict['cgmIterator'] = namesDict.get('cgmIterator') return childNamesDict elif isType == 'shape' or 'Constraint' in isType: """if so, it's a child name object""" log.debug("%s >>> child name object..."%(_str_funcName)) childNamesDict = {} childNamesDict['cgmName'] = search.returnParentObject(obj,False) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict elif typeTag == 'infoNull': log.debug("%s >>> special case..."%(_str_funcName)) moduleObj = search.returnMatchedTagObjectUp(obj,'cgmType','module') masterObj = search.returnMatchedTagObjectUp(obj,'cgmType','master') if moduleObj != False: moduleName = returnUniqueGeneratedName(moduleObj,ignore='cgmType') childNamesDict = {} childNamesDict['cgmName'] = (moduleName+'_'+nameObj) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict elif masterObj != False: masterName = returnUniqueGeneratedName(masterObj,ignore='cgmType') childNamesDict = {} childNamesDict['cgmName'] = (masterName+'_'+nameObj) childNamesDict['cgmType'] = namesDict.get('cgmType') return childNamesDict else: return namesDict else: log.debug("%s >>> No special case found. %s"%(_str_funcName,namesDict)) return namesDict else: return namesDict