Skip to content

Commit

Permalink
Added groups
Browse files Browse the repository at this point in the history
  • Loading branch information
denis authored and denis committed Nov 10, 2024
1 parent 83c0eb9 commit a93da4f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Engine/include/SceneObjects/Node.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Prisma
virtual glm::mat4 matrix() const;
virtual void finalMatrix(const glm::mat4& matrix, bool update = true);
virtual glm::mat4 finalMatrix() const;
void parent(Node* parent);
void parent(Node* parent, bool update = false);
Node* parent() const;
virtual void istantiate(std::shared_ptr<Node> node);
uint64_t uuid();
Expand Down
7 changes: 5 additions & 2 deletions Engine/src/SceneObjects/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,13 @@ glm::mat4 Prisma::Node::finalMatrix() const
return m_finalMatrix;
}

void Prisma::Node::parent(Node* parent)
void Prisma::Node::parent(Node* parent, bool update)
{
m_parent = parent;
updateParent(parent);
if (update)
{
updateParent(parent);
}
CacheScene::getInstance().updateData(true);
}

Expand Down
1 change: 1 addition & 0 deletions GUI/src/ImGuiTabs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void Prisma::ImGuiTabs::showNodes(std::shared_ptr<Node> root, int depth, ImGuiCa
{
current->parent()->removeChild(m_current, false);
m_parent->addChild(current);
current->parent(m_parent.get(), true);
m_current = -1;
m_parent = nullptr;
}
Expand Down

0 comments on commit a93da4f

Please sign in to comment.