diff --git a/src/Engine/Operator/GeometryOperator.cpp b/src/Engine/Operator/GeometryOperator.cpp index 4bd153a..aad6c99 100644 --- a/src/Engine/Operator/GeometryOperator.cpp +++ b/src/Engine/Operator/GeometryOperator.cpp @@ -124,6 +124,12 @@ std::vector> nt::GeometryOperator::g return {outputConnections_.begin(), outputConnections_.end()}; } +std::string nt::GeometryOperator::getTypeName() +{ + return opInfo_.displayName; +} + + std::optional nt::GeometryOperator::getInputConnection(size_t index) const { for(auto it=inputConnections_.begin(); it!=inputConnections_.end();) diff --git a/src/Engine/Operator/GeometryOperator.h b/src/Engine/Operator/GeometryOperator.h index 4167c18..d9ba024 100644 --- a/src/Engine/Operator/GeometryOperator.h +++ b/src/Engine/Operator/GeometryOperator.h @@ -30,6 +30,8 @@ public: std::vector> getParameters(); std::weak_ptr getParameter(std::string parameterName); + std::string getTypeName(); + void dirtyNode(); diff --git a/src/Gui/Network/NodeGraphic.cpp b/src/Gui/Network/NodeGraphic.cpp index fb650ff..4ad2bc5 100644 --- a/src/Gui/Network/NodeGraphic.cpp +++ b/src/Gui/Network/NodeGraphic.cpp @@ -20,8 +20,10 @@ NodeGraphic::NodeGraphic(enzo::nt::OpId id, QGraphicsItem *parent) { socketSize_ = 3; titlePadding_=1; - titleText_ = "Attr_Del_1"; - subTitleText_ = "Attribute Delete"; + enzo::nt::GeometryOperator& geoOp = enzo::nt::nm().getGeoOperator(id); + titleText_ = geoOp.getTypeName(); + // TODO: unique node names + subTitleText_ = geoOp.getTypeName(); constexpr int height = 27; constexpr int width = 100; bodyRect_ = QRect(-width*0.5f, -height*0.5f, width, height);