feat: node name reflects type
This commit is contained in:
@@ -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();)
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user