def loadIKs(self, cid): nodeIdsMapping = [ i[0] for i in self.__modelsList ] turrets = [] for partName, ikData in self.__iks.iteritems(): for data in ikData: if data: ikSys = BigWorld.IKConstraintSystem() actuators = self.__findModel(partName) turrets += actuators gunners = self.__relationGunnerWithTurret[partName] linkedModels = ikSys.buildIKSystem(data, cid, gunners, actuators, nodeIdsMapping) self.__context.ikSystemByPart[partName] = ikSys if linkedModels and len(linkedModels) > 0: for modelId in linkedModels: hierarchyUpdates = [] linearHierarchy = self.__rootNode.linearHierarchy for parentId, node in linearHierarchy: if parentId == self.__modelsList[modelId][0]: try: hierarchyUpdates.append((node.id, node.name)) except HierarchyWorker.HardpointNotFound: debug_utils.LOG_WARNING_DEBUG('Hardpoint not found "{0}" in object "{1}, {2}"'.format(node.path, self.__context.objDBData.name, getattr(self.__context.objDBData, 'fileName', ''))) if modelId not in actuators: CompoundSystem.setModelFashion(cid, modelId, ikSys) CompoundSystem.setModelNodeSyncList(cid, modelId, hierarchyUpdates) self.__context.ikSystems.append(ikSys) else: debug_utils.LOG_WARNING('loadIKs - cant build complete IK model') CompoundSystem.swapModels(cid, turrets)