[nodes] S-T: Harmonize and improve labels and descriptions

Use CamelCase for all labels, always end descriptions with periods, and
replace the mixed use of single and double quotes with double quotes
only.
This commit is contained in:
Candice Bentéjac 2023-06-16 10:32:01 +02:00
parent 41280dc22a
commit c498f48e1e
12 changed files with 798 additions and 777 deletions

View file

@ -24,43 +24,46 @@ The alignment can be based on:
inputs = [
desc.File(
name='input',
label='Input',
description='''SfMData file .''',
value='',
name="input",
label="Input",
description="Input SfMData file .",
value="",
uid=[0],
),
desc.File(
name='reference',
label='Reference',
description='''Path to the scene used as the reference coordinate system.''',
value='',
name="reference",
label="Reference",
description="Path to the scene used as the reference coordinate system.",
value="",
uid=[0],
),
desc.ChoiceParam(
name='method',
label='Alignment Method',
description="Alignment Method:\n"
" * from_cameras_viewid: Align cameras with same view Id\n"
" * from_cameras_poseid: Align cameras with same pose Id\n"
" * from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'\n"
" * from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n"
" * from_markers: Align from markers with the same Id\n",
value='from_cameras_viewid',
values=['from_cameras_viewid', 'from_cameras_poseid', 'from_cameras_filepath', 'from_cameras_metadata', 'from_markers'],
name="method",
label="Alignment Method",
description="Alignment method:\n"
" - from_cameras_viewid: Align cameras with same view ID.\n"
" - from_cameras_poseid: Align cameras with same pose ID.\n"
" - from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'.\n"
" - from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList'.\n"
" - from_markers: Align from markers with the same ID.\n",
value="from_cameras_viewid",
values=["from_cameras_viewid", "from_cameras_poseid", "from_cameras_filepath", "from_cameras_metadata", "from_markers"],
exclusive=True,
uid=[0],
),
desc.StringParam(
name='fileMatchingPattern',
label='File Matching Pattern',
description='Matching regular expression for the "from_cameras_filepath" method. '
'You should capture specific parts of the filepath with parenthesis to define matching elements.\n'
'Some examples of patterns:\n'
r' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"' + '\n' +
r' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"' + '\n' +
r' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"',
value=r'.*\/(.*?)\.\w{3}',
name="fileMatchingPattern",
label="File Matching Pattern",
description="Matching regular expression for the 'from_cameras_filepath' method.\n"
"You should capture specific parts of the filepath with parentheses to define matching elements.\n"
"Some examples of patterns:\n"
" - Match the filename without extension (default value): "
r'".*\/(.*?)\.\w{3}"' + "\n"
" - Match the filename suffix after '_': "
r'".*\/.*(_.*?\.\w{3})"' + "\n"
" - Match the filename prefix before '_': "
r'".*\/(.*?)_.*\.\w{3}"',
value=r".*\/(.*?)\.\w{3}",
uid=[0],
),
desc.ListAttribute(
@ -68,40 +71,41 @@ The alignment can be based on:
name="metadataMatching",
label="Metadata",
description="",
value="",
value="Metadata that should match to create the correspondences.",
uid=[0],
),
name="metadataMatchingList",
label="Metadata Matching List",
description='List of metadata that should match to create the correspondences. If the list is empty, the default value will be used: ["Make", "Model", "Exif:BodySerialNumber", "Exif:LensSerialNumber"].',
description="List of metadata that should match to create the correspondences.\n"
"If the list is empty, the default value will be used: ['Make', 'Model', 'Exif:BodySerialNumber', 'Exif:LensSerialNumber'].",
),
desc.BoolParam(
name='applyScale',
label='Scale',
description='Apply scale transformation.',
name="applyScale",
label="Scale",
description="Apply scale transformation.",
value=True,
uid=[0]
),
desc.BoolParam(
name='applyRotation',
label='Rotation',
description='Apply rotation transformation.',
name="applyRotation",
label="Rotation",
description="Apply rotation transformation.",
value=True,
uid=[0]
),
desc.BoolParam(
name='applyTranslation',
label='Translation',
description='Apply translation transformation.',
name="applyTranslation",
label="Translation",
description="Apply translation transformation.",
value=True,
uid=[0]
),
desc.ChoiceParam(
name='verboseLevel',
label='Verbose Level',
description='''verbosity level (fatal, error, warning, info, debug, trace).''',
value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
),
@ -109,17 +113,17 @@ The alignment can be based on:
outputs = [
desc.File(
name='output',
label='SfMData File',
description='SfMData file.',
value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc',
name="output",
label="SfMData File",
description="Output SfMData file.",
value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc",
uid=[],
),
desc.File(
name='outputViewsAndPoses',
label='Poses',
description='''Path to the output sfmdata file with cameras (views and poses).''',
value=desc.Node.internalFolder + 'cameras.sfm',
name="outputViewsAndPoses",
label="Poses",
description="Path to the output SfMData file with cameras (views and poses).",
value=desc.Node.internalFolder + "cameras.sfm",
uid=[],
),
]