Type corresponds to the Type enum defined in StringParamBase in Parameter.h
| 5512 | |
| 5513 | //Type corresponds to the Type enum defined in StringParamBase in Parameter.h |
| 5514 | KnobStringPtr |
| 5515 | KnobHolder::createStringKnob(const std::string& name, |
| 5516 | const std::string& label, |
| 5517 | bool userKnob) |
| 5518 | { |
| 5519 | KnobIPtr existingKnob = getKnobByName(name); |
| 5520 | |
| 5521 | if (existingKnob) { |
| 5522 | return std::dynamic_pointer_cast<KnobString>(existingKnob); |
| 5523 | } |
| 5524 | KnobStringPtr ret = AppManager::createKnob<KnobString>(this, label, 1, false); |
| 5525 | ret->setName(name); |
| 5526 | ret->setAsUserKnob(userKnob); |
| 5527 | /*KnobPagePtr pageknob = getOrCreateUserPageKnob(); |
| 5528 | Q_UNUSED(pageknob);*/ |
| 5529 | EffectInstance* isEffect = dynamic_cast<EffectInstance*>(this); |
| 5530 | if (isEffect && userKnob) { |
| 5531 | isEffect->getNode()->declarePythonFields(); |
| 5532 | } |
| 5533 | |
| 5534 | return ret; |
| 5535 | } |
| 5536 | |
| 5537 | KnobFilePtr |
| 5538 | KnobHolder::createFileKnob(const std::string& name, |
no test coverage detected