| 5465 | } |
| 5466 | |
| 5467 | KnobButtonPtr |
| 5468 | KnobHolder::createButtonKnob(const std::string& name, |
| 5469 | const std::string& label, |
| 5470 | bool userKnob) |
| 5471 | { |
| 5472 | KnobIPtr existingKnob = getKnobByName(name); |
| 5473 | |
| 5474 | if (existingKnob) { |
| 5475 | return std::dynamic_pointer_cast<KnobButton>(existingKnob); |
| 5476 | } |
| 5477 | KnobButtonPtr ret = AppManager::createKnob<KnobButton>(this, label, 1, false); |
| 5478 | ret->setName(name); |
| 5479 | ret->setAsUserKnob(userKnob); |
| 5480 | /*KnobPagePtr pageknob = getOrCreateUserPageKnob(); |
| 5481 | Q_UNUSED(pageknob);*/ |
| 5482 | EffectInstance* isEffect = dynamic_cast<EffectInstance*>(this); |
| 5483 | if (isEffect && userKnob) { |
| 5484 | isEffect->getNode()->declarePythonFields(); |
| 5485 | } |
| 5486 | |
| 5487 | return ret; |
| 5488 | } |
| 5489 | |
| 5490 | KnobSeparatorPtr |
| 5491 | KnobHolder::createSeparatorKnob(const std::string& name, |
no test coverage detected