| 35 | #include "Engine/NodeSerialization.h" |
| 36 | |
| 37 | NATRON_NAMESPACE_ENTER |
| 38 | |
| 39 | // Trim underscore followed by digits at the end of baseName (see #732). |
| 40 | static |
| 41 | void trimNumber(std::string &baseName) |
| 42 | { |
| 43 | std::size_t found_underscore = baseName.rfind('_'); |
| 44 | if (found_underscore != std::string::npos && found_underscore != (baseName.size() - 1)) { |
| 45 | std::size_t found_nondigit = baseName.find_last_not_of("0123456789"); |
| 46 | if (found_nondigit == found_underscore) { |
| 47 | baseName.erase(found_underscore); |
| 48 | } |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | void |
| 53 | Node::initNodeScriptName(const NodeSerialization* serialization, const QString& fixedName) |
no test coverage detected