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()};
|
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
|
std::optional<const nt::GeometryConnection> nt::GeometryOperator::getInputConnection(size_t index) const
|
||||||
{
|
{
|
||||||
for(auto it=inputConnections_.begin(); it!=inputConnections_.end();)
|
for(auto it=inputConnections_.begin(); it!=inputConnections_.end();)
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ public:
|
|||||||
std::vector<std::weak_ptr<prm::Parameter>> getParameters();
|
std::vector<std::weak_ptr<prm::Parameter>> getParameters();
|
||||||
std::weak_ptr<prm::Parameter> getParameter(std::string parameterName);
|
std::weak_ptr<prm::Parameter> getParameter(std::string parameterName);
|
||||||
|
|
||||||
|
std::string getTypeName();
|
||||||
|
|
||||||
void dirtyNode();
|
void dirtyNode();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,10 @@ NodeGraphic::NodeGraphic(enzo::nt::OpId id, QGraphicsItem *parent)
|
|||||||
{
|
{
|
||||||
socketSize_ = 3;
|
socketSize_ = 3;
|
||||||
titlePadding_=1;
|
titlePadding_=1;
|
||||||
titleText_ = "Attr_Del_1";
|
enzo::nt::GeometryOperator& geoOp = enzo::nt::nm().getGeoOperator(id);
|
||||||
subTitleText_ = "Attribute Delete";
|
titleText_ = geoOp.getTypeName();
|
||||||
|
// TODO: unique node names
|
||||||
|
subTitleText_ = geoOp.getTypeName();
|
||||||
constexpr int height = 27;
|
constexpr int height = 27;
|
||||||
constexpr int width = 100;
|
constexpr int width = 100;
|
||||||
bodyRect_ = QRect(-width*0.5f, -height*0.5f, width, height);
|
bodyRect_ = QRect(-width*0.5f, -height*0.5f, width, height);
|
||||||
|
|||||||
Reference in New Issue
Block a user