C++ SDK - Pattern Matching Support for Operator Parameters
Is there any way in the C++ SDK to access all operators resolved from a pattern parameter? Native operators like Render TOP support pattern matching (e.g., geo* resolves to geo1, geo2, geo3), but I can’t find any API to replicate this in custom operators.
Missing API:
Looking at CPlusPlus_Common.h, there’s no way to:
- Get the count of resolved operators from a pattern
- Iterate through all resolved matches
All getParX() methods return only a single operator.
Additional POP-Specific Gaps:
POPs are missing get/append methods that exist for every other operator family:
// These exist for SOP/TOP/CHOP/DAT/Object:
virtual const OP_SOPInput* getSOP(const char* path) const = 0;
virtual OP_ParAppendResult appendSOP(const OP_StringParameter &sp) = 0;
// These are missing for POPs:
virtual const OP_POPInput* getPOP(const char* path) const = 0;
virtual OP_ParAppendResult appendPOP(const OP_StringParameter &sp) = 0;
Without getPOP(path), even DAT workarounds don’t work since there’s no way to convert a path string to a POP input.
Without appendPOP(), you’re forced to use appendOP() which accepts any operator type instead of restricting to POPs only.
Questions:
- Am I missing something, or is pattern resolution not exposed to C++ plugins?
- Any workarounds besides creating multiple individual parameters or Python/DAT bridges?
Proposed API:
// Pattern resolution for all operator types:
virtual int32_t getParResolvedCount(const char* paramName) const = 0;
virtual const char* getParResolvedPath(const char* paramName, int32_t index) const = 0;
// Complete POP API parity:
virtual const OP_POPInput* getPOP(const char* path) const = 0;
virtual OP_ParAppendResult appendPOP(const OP_StringParameter &sp) = 0;
TD Version: 2025.32050