| 682 | |
| 683 | |
| 684 | OfxIntegerInstance::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 | |
| 705 | OfxStatus |
| 706 | OfxIntegerInstance::get(int & v) |
nothing calls this directly
no test coverage detected