|
1 | | -__version__ = "1.0" |
| 1 | +__version__ = "2.0" |
2 | 2 |
|
3 | 3 | from meshroom.core import desc |
4 | 4 | from meshroom.core.utils import VERBOSE_LEVEL |
@@ -31,45 +31,43 @@ class SphereDetection(desc.CommandLineNode): |
31 | 31 | description="Automatic detection of calibration spheres.", |
32 | 32 | value=False, |
33 | 33 | ), |
| 34 | + desc.Circle( |
| 35 | + name="sphereShape", |
| 36 | + label="Sphere Shape", |
| 37 | + description="The shape of the calibration sphere for every image.", |
| 38 | + enabled=lambda node: not node.autoDetect.value, |
| 39 | + group=lambda node: None if node.sphereFile.value else "allParams", |
| 40 | + keyable=True, |
| 41 | + keyType="viewId", |
| 42 | + ), |
| 43 | + desc.File( |
| 44 | + name="sphereFile", |
| 45 | + label="Sphere Shape File", |
| 46 | + description="An input JSON file containing the shapes for every image. If provided, " |
| 47 | + "the shapes provided with \"Sphere Shape\" will be ignored.", |
| 48 | + semantic="shapeFile", |
| 49 | + value="", |
| 50 | + enabled=lambda node: not node.autoDetect.value, |
| 51 | + group=lambda node: None if not node.sphereFile.value else "allParams", |
| 52 | + ), |
| 53 | + desc.BoolParam( |
| 54 | + name="fillMissingSpheres", |
| 55 | + label="Fill Missing Spheres", |
| 56 | + description="Checked if a sphere position is to be written as detected although it " |
| 57 | + "was not provided. In that case, the position of the last known sphere " |
| 58 | + "will be used.", |
| 59 | + value=False, |
| 60 | + enabled=lambda node: not node.autoDetect.value, |
| 61 | + ), |
34 | 62 | desc.FloatParam( |
35 | 63 | name="minScore", |
36 | 64 | label="Minimum Score", |
37 | 65 | description="Minimum score for the detection.", |
38 | 66 | value=0.0, |
39 | 67 | range=(0.0, 50.0, 0.01), |
| 68 | + enabled=lambda node: node.autoDetect.value, |
40 | 69 | advanced=True, |
41 | 70 | ), |
42 | | - desc.GroupAttribute( |
43 | | - name="sphereCenter", |
44 | | - label="Sphere Center", |
45 | | - description="Center of the circle (XY offset to the center of the image in pixels).", |
46 | | - groupDesc=[ |
47 | | - desc.FloatParam( |
48 | | - name="x", |
49 | | - label="x", |
50 | | - description="X offset in pixels.", |
51 | | - value=0.0, |
52 | | - range=(-1000.0, 10000.0, 1.0), |
53 | | - ), |
54 | | - desc.FloatParam( |
55 | | - name="y", |
56 | | - label="y", |
57 | | - description="Y offset in pixels.", |
58 | | - value=0.0, |
59 | | - range=(-1000.0, 10000.0, 1.0), |
60 | | - ), |
61 | | - ], |
62 | | - enabled=lambda node: not node.autoDetect.value, |
63 | | - group=None, # skip group from command line |
64 | | - ), |
65 | | - desc.FloatParam( |
66 | | - name="sphereRadius", |
67 | | - label="Radius", |
68 | | - description="Sphere radius in pixels.", |
69 | | - value=500.0, |
70 | | - range=(0.0, 10000.0, 0.1), |
71 | | - enabled=lambda node: not node.autoDetect.value, |
72 | | - ), |
73 | 71 | desc.ChoiceParam( |
74 | 72 | name="verboseLevel", |
75 | 73 | label="Verbose Level", |
|
0 commit comments