feat: hide non-texture OFX params from node graph + host coordinate standardization
Hide non-texture OFX params from node graph
--------------------------------------------
OFX plugins like ColorCorrect expose dozens of scalar parameters as
node inputs, making nodes extremely tall and pushing Source/Mask far
down. Previously attempted via kInputFlagHidden, but that also hid
them from the parameter panel.
Fix: move the filter to NodeViewItem::IsInputValid() instead.
For OFX plugin nodes (getPluginInstance() != nullptr), only
kTexture inputs are rendered as ports. Scalar parameters remain
fully visible in the parameter panel.
Files: app/widget/nodeview/nodeviewitem.cpp
app/node/plugins/Plugin.cpp
Standardize OFX host coordinate system
--------------------------------------
Olive's OFX host had partial and inconsistent coordinate handling.
1. Fix Project coordinate methods
- getProjectSize() / getProjectExtent() / getProjectOffset()
now multiply X by pixel_aspect_ratio(), returning canonical
coordinates per the OFX spec.
2. Fix Clip default RoD
- OliveClipInstance::getRegionOfDefinition() default now returns
{0, 0, width*PAR, height} instead of raw pixel coords.
3. Add parameter coordinate system conversion
- DoubleInstance / Double2DInstance / Double3DInstance now check
_descriptor.getDefaultCoordinateSystem().
- For kOfxParamCoordinatesNormalised:
get: internal pixel value -> normalised (divide by extent)
set: normalised plugin value -> pixel (multiply by extent)
- DefaultValueForParam() also converts normalised defaults to
canonical before storing in Node, keeping Olive internal/UI
values consistently in pixel space.
Files: app/pluginSupport/OlivePluginInstance.cpp
app/pluginSupport/OliveClip.cpp
app/pluginSupport/paraminstance.h
app/node/plugins/Plugin.cpp
This commit is contained in:
@@ -276,18 +276,21 @@ OfxStatus OlivePluginInstance::clearPersistentMessage()
|
||||
}
|
||||
void OlivePluginInstance::getProjectSize(double &xSize, double &ySize) const
|
||||
{
|
||||
xSize =params_.width();
|
||||
ySize =params_.height();
|
||||
double par = params_.pixel_aspect_ratio().toDouble();
|
||||
xSize = params_.width() * par;
|
||||
ySize = params_.height();
|
||||
}
|
||||
void OlivePluginInstance::getProjectOffset(double &xOffset, double &yOffset) const
|
||||
{
|
||||
xOffset =params_.x();
|
||||
yOffset =params_.y();
|
||||
double par = params_.pixel_aspect_ratio().toDouble();
|
||||
xOffset = params_.x() * par;
|
||||
yOffset = params_.y();
|
||||
}
|
||||
void OlivePluginInstance::getProjectExtent(double &xSize, double &ySize) const
|
||||
{
|
||||
xSize =params_.width();
|
||||
ySize =params_.height();
|
||||
double par = params_.pixel_aspect_ratio().toDouble();
|
||||
xSize = params_.width() * par;
|
||||
ySize = params_.height();
|
||||
}
|
||||
double OlivePluginInstance::getProjectPixelAspectRatio() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user