Skip to content

Releases: Azzinoth/VisualNodeSystem

v0.1.0

16 Jun 18:23
Compare
Choose a tag to compare

0.1.0: Test Branch and Various Small Refactorings

In this update, I mainly focused on creating a base for continuous integration. I decided not to include the gtest library and tests themselves in the master branch to keep it lightweight. Instead, I created a tests branch to house all the necessary code and used GitHub Actions to ensure CI is properly utilized. The test cases included do not provide full coverage, but they helped me spot a few bugs.

Changes

Bug Fixes:

  • NodeArea::Clear() was not clearing GroupComments.
  • std::vector<Node*> Node::GetNodesConnectedToOutput() was returning multiple copies of the same node if that node was connected through multiple sockets.

Breaking Changes:

  • Renamed function size_t Node::InputSocketCount to size_t Node::GetInputSocketCount to better describe its functionality.
  • Renamed function size_t Node::OutSocketCount to size_t Node::GetOutputSocketCount to better describe its functionality.
  • Made static void NodeArea::CopyNodesInternal, static bool NodeArea::IsAlreadyConnected, and static void NodeArea::ProcessConnections functions private.
  • Renamed static bool NodeArea::EmptyOrFilledByNulls to static bool NodeArea::IsEmptyOrFilledByNulls and made it private.
  • Renamed and moved static bool NodeArea::IsNodeIDInList to static bool Node::IsNodeWithIDInList.
  • Transformed static NodeArea* NodeArea::FromJson(std::string JsonText) to void NodeArea::LoadFromJson(std::string JsonText) to make it more clear when to use the function. This also helped to rewrite loading from a file to avoid node copying, as the previous implementation was inefficient due to legacy issues.
  • Renamed NodeArea::SetNodeEventCallback to NodeArea::AddNodeEventCallback to better reflect its functionality and shifted from accepting raw function pointers to accepting std::function for better support of lambdas.

Other Changes:

  • Added size_t NodeArea::GetGroupCommentCount function.
  • Changed the return type of the NodeArea::GetNodeCount function from int to size_t.
  • Added bool Node::CouldBeDestroyed function.
  • Added Node* NodeArea::GetNodeByID function.
  • Added GroupComment* NodeArea::GetGroupCommentByID(std::string GroupCommentID) and std::vector<GroupComment*> NodeArea::GetGroupCommentsByName(std::string GroupCommentName) functions.
  • Added std::vector<Node*> NodeArea::GetNodesInGroupComment(GroupComment* GroupCommentToCheck), std::vector<RerouteNode*> NodeArea::GetRerouteNodesInGroupComment(GroupComment* GroupCommentToCheck), and std::vector<GroupComment*> NodeArea::GetGroupCommentsInGroupComment(GroupComment* GroupCommentToCheck) functions.
  • Added bool NodeArea::TryToDisconnect(const Node* OutNode, size_t OutNodeSocketIndex, const Node* InNode, size_t InNodeSocketIndex), bool NodeArea::TryToDisconnect(const Node* OutNode, std::string OutSocketID, const Node* InNode, std::string InSocketID), bool NodeArea::IsConnected(const Node* OutNode, size_t OutNodeSocketIndex, const Node* InNode, size_t InNodeSocketIndex), and bool NodeArea::IsConnected(const Node* OutNode, std::string OutSocketID, const Node* InNode, std::string InSocketID) functions to improve work with connections.