-------------------------- Outliner::RefillTreeView Initialize the outliners tree from the Entity hierachy in the current scenes scene graph
| 203 | // Initialize the outliners tree from the Entity hierachy in the current scenes scene graph |
| 204 | // |
| 205 | void Outliner::RefillTreeView() |
| 206 | { |
| 207 | ET_ASSERT(fw::UnifiedScene::Instance().GetSceneId() != 0u); |
| 208 | fw::EcsController& ecs = fw::UnifiedScene::Instance().GetEcs(); |
| 209 | |
| 210 | Gtk::TreeModel::Row row = *(m_TreeModel->append()); |
| 211 | row[m_Columns.m_Name] = fw::UnifiedScene::Instance().GetSceneId().ToStringDbg(); |
| 212 | row[m_Columns.m_Id] = fw::INVALID_ENTITY_ID; |
| 213 | |
| 214 | for (fw::T_EntityId const id : ecs.GetEntities()) |
| 215 | { |
| 216 | // #todo: make this recurse |
| 217 | ET_ASSERT(ecs.HasComponent<EditorMetaComponent>(id)); |
| 218 | EditorMetaComponent const& meta = ecs.GetComponent<EditorMetaComponent>(id); |
| 219 | |
| 220 | Gtk::TreeModel::iterator iter = m_TreeModel->append(row.children()); |
| 221 | (*iter)[m_Columns.m_Name] = meta.name; |
| 222 | (*iter)[m_Columns.m_Id] = id; |
| 223 | } |
| 224 | |
| 225 | m_TreeView->show_all_children(); |
| 226 | m_TreeView->expand_all(); |
| 227 | } |
| 228 | |
| 229 | //-------------------------- |
| 230 | // Outliner::RecursiveGetChild |
nothing calls this directly
no test coverage detected