changed nodeparam naming behavior
This commit is contained in:
+9
-5
@@ -40,11 +40,6 @@ NodeParam::Type NodeInput::type()
|
||||
void NodeInput::add_data_input(const NodeParam::DataType &data_type)
|
||||
{
|
||||
inputs_.append(data_type);
|
||||
|
||||
// If no name has been set, use a default name
|
||||
if (name().isEmpty()) {
|
||||
set_name(GetDefaultDataTypeName(data_type));
|
||||
}
|
||||
}
|
||||
|
||||
bool NodeInput::can_accept_type(const NodeParam::DataType &data_type)
|
||||
@@ -133,6 +128,15 @@ void NodeInput::set_dependent(bool d)
|
||||
dependent_ = d;
|
||||
}
|
||||
|
||||
NodeParam::DataType NodeInput::data_type()
|
||||
{
|
||||
if (inputs_.isEmpty()) {
|
||||
return kNone;
|
||||
}
|
||||
|
||||
return inputs_.first();
|
||||
}
|
||||
|
||||
const QList<NodeParam::DataType> &NodeInput::inputs()
|
||||
{
|
||||
return inputs_;
|
||||
|
||||
Reference in New Issue
Block a user