feat: node name reflects type

This commit is contained in:
parker
2025-07-30 00:32:07 +01:00
parent dabe7c860d
commit d6a205f777
3 changed files with 12 additions and 2 deletions

View File

@@ -124,6 +124,12 @@ std::vector<std::weak_ptr<const nt::GeometryConnection>> nt::GeometryOperator::g
return {outputConnections_.begin(), outputConnections_.end()};
}
std::string nt::GeometryOperator::getTypeName()
{
return opInfo_.displayName;
}
std::optional<const nt::GeometryConnection> nt::GeometryOperator::getInputConnection(size_t index) const
{
for(auto it=inputConnections_.begin(); it!=inputConnections_.end();)

View File

@@ -30,6 +30,8 @@ public:
std::vector<std::weak_ptr<prm::Parameter>> getParameters();
std::weak_ptr<prm::Parameter> getParameter(std::string parameterName);
std::string getTypeName();
void dirtyNode();

View File

@@ -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);