[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

@ -25,146 +25,148 @@ Many cameras are contributing to the low frequencies and only the best ones cont
inputs = [
desc.File(
name='input',
label='Dense SfMData',
description='SfMData file.',
value='',
name="input",
label="Dense SfMData",
description="SfMData file.",
value="",
uid=[0],
),
desc.File(
name='imagesFolder',
label='Images Folder',
description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.',
value='',
name="imagesFolder",
label="Images Folder",
description="Use images from a specific folder instead of those specified in the SfMData file.\n"
"Filename should be the image UID.",
value="",
uid=[0],
),
desc.File(
name='inputMesh',
label='Mesh',
description='Optional input mesh to texture. By default, it will texture the result of the reconstruction.',
value='',
name="inputMesh",
label="Mesh",
description="Optional input mesh to texture. By default, it will texture the result of the reconstruction.",
value="",
uid=[0],
),
desc.File(
name='inputRefMesh',
label='Ref Mesh',
description='Optional input mesh to compute height maps and normal maps. If not provided, no additional maps with geometric information will be generated.',
value='',
name="inputRefMesh",
label="Ref Mesh",
description="Optional input mesh to compute height maps and normal maps.\n"
"If not provided, no additional map with geometric information will be generated.",
value="",
uid=[0],
),
desc.ChoiceParam(
name='textureSide',
label='Texture Side',
description='''Output texture size''',
name="textureSide",
label="Texture Side",
description="Output texture size.",
value=8192,
values=(1024, 2048, 4096, 8192, 16384),
exclusive=True,
uid=[0],
),
desc.ChoiceParam(
name='downscale',
label='Texture Downscale',
description='''Texture downscale factor''',
name="downscale",
label="Texture Downscale",
description="Texture downscale factor.",
value=2,
values=(1, 2, 4, 8),
exclusive=True,
uid=[0],
),
desc.ChoiceParam(
name='outputMeshFileType',
label='Mesh File Type',
description='File Type',
value='obj',
values=('obj', 'gltf', 'fbx', 'stl'),
name="outputMeshFileType",
label="Mesh File Type",
description="File type for the mesh output.",
value="obj",
values=("obj", "gltf", "fbx", "stl"),
exclusive=True,
uid=[0],
),
desc.GroupAttribute(name="colorMapping", label="Color Mapping", description="Color Map Parameters",
desc.GroupAttribute(name="colorMapping", label="Color Mapping", description="Color map parameters.",
enabled=lambda node: (node.imagesFolder.value != ''),
group=None,
groupDesc=[
desc.BoolParam(
name='enable',
label='Enable',
description='Generate Textures',
name="enable",
label="Enable",
description="Generate textures if set to true.",
value=True,
uid=[],
group=None,
),
desc.ChoiceParam(
name='colorMappingFileType',
label='File Type',
description='Texture File Type',
value='exr',
values=('exr', 'png', 'tiff', 'jpg'),
name="colorMappingFileType",
label="File Type",
description="Texture file type.",
value="exr",
values=("exr", "png", "tiff", "jpg"),
exclusive=True,
uid=[0],
enabled=lambda node: node.colorMapping.enable.value,
),
],
),
desc.GroupAttribute(name="bumpMapping", label="Bump Mapping", description="Bump Mapping Parameters",
desc.GroupAttribute(name="bumpMapping", label="Bump Mapping", description="Bump mapping parameters.",
enabled=lambda node: (node.inputRefMesh.value != ''),
group=None,
groupDesc=[
desc.BoolParam(
name='enable',
label='Enable',
description='Generate Normal / Bump Maps',
name="enable",
label="Enable",
description="Generate normal / bump maps if set to true.",
value=True,
uid=[],
group=None,
),
desc.ChoiceParam(
name='bumpType',
label='Bump Type',
description='Export Normal Map or Height Map',
value='Normal',
values=('Height', 'Normal'),
name="bumpType",
label="Bump Type",
description="Export normal map or height map.",
value="Normal",
values=("Height", "Normal"),
exclusive=True,
uid=[0],
enabled=lambda node: node.bumpMapping.enable.value,
),
desc.ChoiceParam(
name='normalFileType',
label='File Type',
description='NormalMap Texture File Type',
value='exr',
values = ('exr', 'png', 'tiff', 'jpg'),
name="normalFileType",
label="File Type",
description="File type for the normal map texture.",
value="exr",
values = ("exr", "png", "tiff", "jpg"),
exclusive=True,
uid=[0],
enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Normal",
),
desc.ChoiceParam(
name='heightFileType',
label='File Type',
description='HeightMap Texture File Type',
value='exr',
values=('exr',),
name="heightFileType",
label="File Type",
description="File type for the height map texture.",
value="exr",
values=("exr",),
exclusive=True,
uid=[0],
enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Height",
),
],
),
desc.GroupAttribute(name="displacementMapping", label="Displacement Mapping", description="Displacement Mapping Parameters",
enabled=lambda node: (node.inputRefMesh.value != ''),
desc.GroupAttribute(name="displacementMapping", label="Displacement Mapping", description="Displacement mapping parameters.",
enabled=lambda node: (node.inputRefMesh.value != ""),
group=None,
groupDesc=[
desc.BoolParam(
name='enable',
label='Enable',
description='Generate Height Maps for Displacement',
name="enable",
label="Enable",
description="Generate height maps for displacement.",
value=True,
uid=[],
group=None,
),
desc.ChoiceParam(
name='displacementMappingFileType',
label='File Type',
description='HeightMap Texture File Type',
value='exr',
values=('exr',),
name="displacementMappingFileType",
label="File Type",
description="File type for the height map texture.",
value="exr",
values=("exr",),
exclusive=True,
uid=[0],
enabled=lambda node: node.displacementMapping.enable.value,
@ -172,44 +174,44 @@ Many cameras are contributing to the low frequencies and only the best ones cont
],
),
desc.ChoiceParam(
name='unwrapMethod',
label='Unwrap Method',
description='Method to unwrap input mesh if it does not have UV coordinates.\n'
' * Basic (> 600k faces) fast and simple. Can generate multiple atlases.\n'
' * LSCM (<= 600k faces): optimize space. Generates one atlas.\n'
' * ABF (<= 300k faces): optimize space and stretch. Generates one atlas.',
name="unwrapMethod",
label="Unwrap Method",
description="Method to unwrap input mesh if it does not have UV coordinates.\n"
" - Basic (> 600k faces) fast and simple. Can generate multiple atlases.\n"
" - LSCM (<= 600k faces): optimize space. Generates one atlas.\n"
" - ABF (<= 300k faces): optimize space and stretch. Generates one atlas.",
value="Basic",
values=("Basic", "LSCM", "ABF"),
exclusive=True,
uid=[0],
),
desc.BoolParam(
name='useUDIM',
label='Use UDIM',
description='Use UDIM UV mapping.',
name="useUDIM",
label="Use UDIM",
description="Use UDIM UV mapping.",
value=True,
uid=[0],
),
desc.BoolParam(
name='fillHoles',
label='Fill Holes',
description='Fill Texture holes with plausible values',
name="fillHoles",
label="Fill Holes",
description="Fill texture holes with plausible values.",
value=False,
uid=[0],
),
desc.IntParam(
name='padding',
label='Padding',
description='''Texture edge padding size in pixel''',
name="padding",
label="Padding",
description="Texture edge padding size in pixels.",
value=5,
range=(0, 20, 1),
uid=[0],
advanced=True,
),
desc.IntParam(
name='multiBandDownscale',
label='Multi Band Downscale',
description='''Width of frequency bands for multiband blending''',
name="multiBandDownscale",
label="Multi Band Downscale",
description="Width of frequency bands for multiband blending.",
value=4,
range=(0, 8, 2),
uid=[0],
@ -217,109 +219,113 @@ Many cameras are contributing to the low frequencies and only the best ones cont
),
desc.GroupAttribute(
name="multiBandNbContrib",
label="MultiBand contributions",
label="Multi-Band Contributions",
groupDesc=[
desc.IntParam(name="high", label="High Freq", description="High Frequency Band", value=1, uid=[0], range=None),
desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-High Frequency Band", value=5, uid=[0], range=None),
desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-Low Frequency Band", value=10, uid=[0], range=None),
desc.IntParam(name="low", label="Low Freq", description="Low Frequency Band", value=0, uid=[0], range=None),
desc.IntParam(name="high", label="High Freq", description="High frequency band.", value=1, uid=[0], range=None),
desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-high frequency band.", value=5, uid=[0], range=None),
desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-low frequency band.", value=10, uid=[0], range=None),
desc.IntParam(name="low", label="Low Freq", description="Low frequency band", value=0, uid=[0], range=None),
],
description='''Number of contributions per frequency band for multiband blending (each frequency band also contributes to lower bands)''',
description="Number of contributions per frequency band for multi-band blending (each frequency band also contributes to lower bands).",
advanced=True,
),
desc.BoolParam(
name='useScore',
label='Use Score',
description='Use triangles scores (ie. reprojection area) for multiband blending.',
name="useScore",
label="Use Score",
description="Use triangles scores (ie. reprojection area) for multi-band blending.",
value=True,
uid=[0],
advanced=True,
),
desc.FloatParam(
name='bestScoreThreshold',
label='Best Score Threshold',
description='''(0.0 to disable filtering based on threshold to relative best score)''',
name="bestScoreThreshold",
label="Best Score Threshold",
description="Setting this parameter to 0.0 disables filtering based on threshold to relative best score.",
value=0.1,
range=(0.0, 1.0, 0.01),
uid=[0],
advanced=True,
),
desc.FloatParam(
name='angleHardThreshold',
label='Angle Hard Threshold',
description='''(0.0 to disable angle hard threshold filtering)''',
name="angleHardThreshold",
label="Angle Hard Threshold",
description="Setting this parameter to 0.0 disables angle hard threshold filtering.",
value=90.0,
range=(0.0, 180.0, 0.01),
uid=[0],
advanced=True,
),
desc.ChoiceParam(
name='workingColorSpace',
label='Working Color Space',
name="workingColorSpace",
label="Working Color Space",
description="Color space for the texturing internal computation (does not impact the output file color space).",
value='sRGB',
values=('sRGB', 'Linear', 'ACES2065-1', 'ACEScg'),
value="sRGB",
values=("sRGB", "Linear", "ACES2065-1", "ACEScg"),
exclusive=True,
uid=[0],
advanced=True,
),
desc.ChoiceParam(
name='outputColorSpace',
label='Output Color Space',
name="outputColorSpace",
label="Output Color Space",
description="Color space for the output texture files.",
value='AUTO',
values=('sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'AUTO'),
value="AUTO",
values=("sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "AUTO"),
exclusive=True,
uid=[0],
),
desc.BoolParam(
name='correctEV',
label='Correct Exposure',
description='Uniformize images exposure values.',
name="correctEV",
label="Correct Exposure",
description="Uniformize images exposure values.",
value=False,
uid=[0],
),
desc.BoolParam(
name='forceVisibleByAllVertices',
label='Force Visible By All Vertices',
description='''Triangle visibility is based on the union of vertices visibility.''',
name="forceVisibleByAllVertices",
label="Force Visible By All Vertices",
description="Triangle visibility is based on the union of vertices visibility.",
value=False,
uid=[0],
advanced=True,
),
desc.BoolParam(
name='flipNormals',
label='Flip Normals',
description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''',
name="flipNormals",
label="Flip Normals",
description="Option to flip face normals.\n"
"It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.",
value=False,
uid=[0],
advanced=True,
),
desc.ChoiceParam(
name='visibilityRemappingMethod',
label='Visibility Remapping Method',
description='''Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush, MeshItself).''',
value='PullPush',
values=['Pull', 'Push', 'PullPush', 'MeshItself'],
name="visibilityRemappingMethod",
label="Visibility Remapping Method",
description="Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush, MeshItself).",
value="PullPush",
values=["Pull", "Push", "PullPush", "MeshItself"],
exclusive=True,
uid=[0],
advanced=True,
),
desc.FloatParam(
name='subdivisionTargetRatio',
label='Subdivision Target Ratio',
description='''Percentage of the density of the reconstruction as the target for the subdivision (0: disable subdivision, 0.5: half density of the reconstruction, 1: full density of the reconstruction).''',
name="subdivisionTargetRatio",
label="Subdivision Target Ratio",
description="Percentage of the density of the reconstruction as the target for the subdivision:\n"
" - 0: disable subdivision.\n"
" - 0.5: half density of the reconstruction.\n"
" - 1: full density of the reconstruction).",
value=0.8,
range=(0.0, 1.0, 0.001),
uid=[0],
advanced=True,
),
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=[],
),
@ -328,36 +334,36 @@ Many cameras are contributing to the low frequencies and only the best ones cont
outputs = [
desc.File(
name='output',
label='Folder',
description='Folder for output mesh: OBJ, material and texture files.',
name="output",
label="Folder",
description="Folder for output mesh: OBJ, material and texture files.",
value=desc.Node.internalFolder,
uid=[],
),
desc.File(
name='outputMesh',
label='Mesh',
description='Output Mesh file.',
value=desc.Node.internalFolder + 'texturedMesh.{outputMeshFileTypeValue}',
name="outputMesh",
label="Mesh",
description="Output mesh file.",
value=desc.Node.internalFolder + "texturedMesh.{outputMeshFileTypeValue}",
uid=[],
group='',
group="",
),
desc.File(
name='outputMaterial',
name="outputMaterial",
enabled= lambda node: node.outputMeshFileType.value == "obj",
label='Material',
description='Output Material file.',
value=desc.Node.internalFolder + 'texturedMesh.mtl',
label="Material",
description="Output material file.",
value=desc.Node.internalFolder + "texturedMesh.mtl",
uid=[],
group='',
group="",
),
desc.File(
name='outputTextures',
label='Textures',
description='Output Texture files.',
value= lambda attr: desc.Node.internalFolder + 'texture_*.' + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else '',
name="outputTextures",
label="Textures",
description="Output texture files.",
value= lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "",
uid=[],
group=''
group=""
)
]