| 1164 | } |
| 1165 | |
| 1166 | int NodeComponent::PopupHelpers::isWrappable(NodeBase* n) |
| 1167 | { |
| 1168 | if (n == nullptr) |
| 1169 | return 0; |
| 1170 | |
| 1171 | auto nodeTree = n->getValueTree(); |
| 1172 | |
| 1173 | auto p = n->getPath(); |
| 1174 | |
| 1175 | auto isOptionalSnex = snex::cppgen::CustomNodeProperties::nodeHasProperty(nodeTree, PropertyIds::IsOptionalSnexNode); |
| 1176 | |
| 1177 | if(isOptionalSnex) |
| 1178 | { |
| 1179 | auto mode = n->getNodeProperty(PropertyIds::Mode).toString(); |
| 1180 | |
| 1181 | isOptionalSnex = mode == "Custom"; |
| 1182 | } |
| 1183 | |
| 1184 | auto isSnex = p.getIdentifier().toString().contains("snex"); |
| 1185 | auto isChain = p == NamespacedIdentifier::fromString("container::chain"); |
| 1186 | auto isExpression = p.getIdentifier().toString().endsWith("expr"); |
| 1187 | |
| 1188 | if (isChain) |
| 1189 | return 1; |
| 1190 | |
| 1191 | if (isSnex || isOptionalSnex || isExpression) |
| 1192 | return 2; |
| 1193 | |
| 1194 | return 0; |
| 1195 | } |
| 1196 | |
| 1197 | void NodeComponent::PopupHelpers::wrapIntoNetwork(NodeBase* node, bool makeCompileable) |
| 1198 | { |
nothing calls this directly
no test coverage detected