mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-09 14:21:56 +02:00
[nodes] PanoramaInit: fisheyeCenterOffset x/y are now 2 parameters on command line
Avoid error with negative values on "y" interpreted as a new argument
This commit is contained in:
parent
517014faf6
commit
dcf91c244e
2 changed files with 7 additions and 6 deletions
|
@ -51,16 +51,17 @@ class PanoramaInit(desc.CommandLineNode):
|
||||||
description="Center of the Fisheye circle (XY offset to the center in pixels).",
|
description="Center of the Fisheye circle (XY offset to the center in pixels).",
|
||||||
groupDesc=[
|
groupDesc=[
|
||||||
desc.FloatParam(
|
desc.FloatParam(
|
||||||
name="x", label="x", description="",
|
name="fisheyeCenterOffset_x", label="x", description="X Offset in pixels",
|
||||||
value=0.0,
|
value=0.0,
|
||||||
uid=[0],
|
uid=[0],
|
||||||
range=(-1000.0, 10000.0, 1.0)),
|
range=(-1000.0, 10000.0, 1.0)),
|
||||||
desc.FloatParam(
|
desc.FloatParam(
|
||||||
name="y", label="y", description="",
|
name="fisheyeCenterOffset_y", label="y", description="Y Offset in pixels",
|
||||||
value=0.0,
|
value=0.0,
|
||||||
uid=[0],
|
uid=[0],
|
||||||
range=(-1000.0, 10000.0, 1.0)),
|
range=(-1000.0, 10000.0, 1.0)),
|
||||||
],
|
],
|
||||||
|
group=None, # skip group from command line
|
||||||
),
|
),
|
||||||
desc.FloatParam(
|
desc.FloatParam(
|
||||||
name='fisheyeRadius',
|
name='fisheyeRadius',
|
||||||
|
|
|
@ -242,14 +242,14 @@ FocusScope {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
active: (_reconstruction.panoramaInit && displayFisheyeCircleLoader.checked)
|
active: (_reconstruction.panoramaInit && displayFisheyeCircleLoader.checked)
|
||||||
sourceComponent: CircleGizmo {
|
sourceComponent: CircleGizmo {
|
||||||
x: _reconstruction.panoramaInit.attribute("fisheyeCenterOffset.x").value
|
x: _reconstruction.panoramaInit.attribute("fisheyeCenterOffset.fisheyeCenterOffset_x").value
|
||||||
y: _reconstruction.panoramaInit.attribute("fisheyeCenterOffset.y").value
|
y: _reconstruction.panoramaInit.attribute("fisheyeCenterOffset.fisheyeCenterOffset_y").value
|
||||||
radius: (imgContainer.image ? Math.min(imgContainer.image.width, imgContainer.image.height) : 1.0) * 0.5 * (_reconstruction.panoramaInit.attribute("fisheyeRadius").value * 0.01)
|
radius: (imgContainer.image ? Math.min(imgContainer.image.width, imgContainer.image.height) : 1.0) * 0.5 * (_reconstruction.panoramaInit.attribute("fisheyeRadius").value * 0.01)
|
||||||
border.width: Math.max(1, (3.0 / imgContainer.scale))
|
border.width: Math.max(1, (3.0 / imgContainer.scale))
|
||||||
|
|
||||||
onMoved: {
|
onMoved: {
|
||||||
_reconstruction.setAttribute(_reconstruction.panoramaInit.attribute("fisheyeCenterOffset.x"), x)
|
_reconstruction.setAttribute(_reconstruction.panoramaInit.attribute("fisheyeCenterOffset.fisheyeCenterOffset_x"), x)
|
||||||
_reconstruction.setAttribute(_reconstruction.panoramaInit.attribute("fisheyeCenterOffset.y"), y)
|
_reconstruction.setAttribute(_reconstruction.panoramaInit.attribute("fisheyeCenterOffset.fisheyeCenterOffset_y"), y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue