| 54 | } |
| 55 | |
| 56 | bool MapImporter::addEntity(const scene::INodePtr& entityNode) |
| 57 | { |
| 58 | // Keep track of this entity |
| 59 | _nodes.insert(NodeIndexMap::value_type( |
| 60 | NodeIndexPair(_entityCount, EMPTY_PRIMITVE_NUM), entityNode)); |
| 61 | |
| 62 | _entityCount++; |
| 63 | |
| 64 | // Update the dialog text |
| 65 | _dlgEntityText = fmt::format(_("Loading entity {0:d}\n"), _entityCount); |
| 66 | |
| 67 | if (_dialogEventLimiter.readyForEvent()) |
| 68 | { |
| 69 | FileOperation msg(FileOperation::Type::Import, FileOperation::Progress, _fileSize > 0, getProgressFraction()); |
| 70 | msg.setText(_dlgEntityText); |
| 71 | GlobalRadiantCore().getMessageBus().sendMessage(msg); |
| 72 | } |
| 73 | |
| 74 | _root->addChildNode(entityNode); |
| 75 | |
| 76 | return true; |
| 77 | } |
| 78 | |
| 79 | bool MapImporter::addPrimitiveToEntity(const scene::INodePtr& primitive, const scene::INodePtr& entity) |
| 80 | { |
no test coverage detected