| 77 | } |
| 78 | |
| 79 | bool MapImporter::addPrimitiveToEntity(const scene::INodePtr& primitive, const scene::INodePtr& entity) |
| 80 | { |
| 81 | _nodes.insert(NodeIndexMap::value_type( |
| 82 | NodeIndexPair(_entityCount, _primitiveCount), primitive)); |
| 83 | |
| 84 | _primitiveCount++; |
| 85 | |
| 86 | if (_dialogEventLimiter.readyForEvent()) |
| 87 | { |
| 88 | // Update the dialog text |
| 89 | FileOperation msg(FileOperation::Type::Import, FileOperation::Progress, _fileSize > 0, getProgressFraction()); |
| 90 | msg.setText(_dlgEntityText + fmt::format(_("Primitive {0:d}"), _primitiveCount)); |
| 91 | GlobalRadiantCore().getMessageBus().sendMessage(msg); |
| 92 | } |
| 93 | |
| 94 | if (Node_getEntity(entity)->isContainer()) |
| 95 | { |
| 96 | entity->addChildNode(primitive); |
| 97 | return true; |
| 98 | } |
| 99 | else |
| 100 | { |
| 101 | return false; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | const NodeIndexMap& MapImporter::getNodeMap() const |
| 106 | { |
no test coverage detected