MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / OfxIntegerInstance

Method OfxIntegerInstance

Engine/OfxParamInstance.cpp:684–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682
683
684OfxIntegerInstance::OfxIntegerInstance(const OfxEffectInstancePtr& node,
685 OFX::Host::Param::Descriptor & descriptor)
686 : OfxParamToKnob(node)
687 , OFX::Host::Param::IntegerInstance( descriptor, node->effectInstance() )
688{
689 const OFX::Host::Property::Set &properties = getProperties();
690 KnobIntPtr k = checkIfKnobExistsWithNameOrCreate<KnobInt>(descriptor.getName(), this, 1);
691
692 _knob = k;
693 setRange();
694 setDisplayRange();
695
696 int def = properties.getIntProperty(kOfxParamPropDefault);
697 k->setIncrement(1); // kOfxParamPropIncrement only exists for Double
698 k->blockValueChanges();
699 k->setDefaultValue(def, 0);
700 k->unblockValueChanges();
701 std::string dimensionName = properties.getStringProperty(kOfxParamPropDimensionLabel, 0);
702 k->setDimensionName(0, dimensionName);
703}
704
705OfxStatus
706OfxIntegerInstance::get(int & v)

Callers

nothing calls this directly

Calls 7

effectInstanceMethod · 0.80
getNameMethod · 0.80
blockValueChangesMethod · 0.80
unblockValueChangesMethod · 0.80
setDimensionNameMethod · 0.80
setIncrementMethod · 0.45
setDefaultValueMethod · 0.45

Tested by

no test coverage detected