mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-02 02:42:05 +02:00
[nodes] PS: Expose normal and albedo maps in Viewer
This commit is contained in:
parent
bfd1db8b89
commit
5e49ee3f58
2 changed files with 25 additions and 2 deletions
|
@ -49,4 +49,25 @@ TODO.
|
||||||
value=desc.Node.internalFolder,
|
value=desc.Node.internalFolder,
|
||||||
uid=[],
|
uid=[],
|
||||||
),
|
),
|
||||||
|
# these attributes are only here to describe more accurately the output of the node
|
||||||
|
# by specifying that it generates 2 sequences of images
|
||||||
|
# (see in Viewer2D.qml how these attributes can be used)
|
||||||
|
desc.File(
|
||||||
|
name='normals',
|
||||||
|
label='Normal Maps',
|
||||||
|
description='Generated normal maps.',
|
||||||
|
semantic='image',
|
||||||
|
value=desc.Node.internalFolder + '<POSE_ID>_normals.png',
|
||||||
|
uid=[],
|
||||||
|
group='', # do not export on the command line
|
||||||
|
),
|
||||||
|
desc.File(
|
||||||
|
name='albedo',
|
||||||
|
label='Albedo Maps',
|
||||||
|
description='Generated albedo maps.',
|
||||||
|
semantic='image',
|
||||||
|
value=desc.Node.internalFolder + '<POSE_ID>_albedo.png',
|
||||||
|
uid=[],
|
||||||
|
group='', # do not export on the command line
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -214,13 +214,15 @@ FocusScope {
|
||||||
|
|
||||||
var viewId = -1;
|
var viewId = -1;
|
||||||
var intrinsicId = -1;
|
var intrinsicId = -1;
|
||||||
|
var poseId = -1;
|
||||||
var fileName = "";
|
var fileName = "";
|
||||||
if (_reconstruction) {
|
if (_reconstruction) {
|
||||||
viewId = _reconstruction.selectedViewId;
|
viewId = _reconstruction.selectedViewId;
|
||||||
intrinsicId = getViewpointAttribute("intrinsicId", viewId);
|
intrinsicId = getViewpointAttribute("intrinsicId", viewId);
|
||||||
fileName = Filepath.removeExtension(Filepath.basename(getViewpointAttribute("path",viewId)));
|
poseId = getViewpointAttribute("poseId", viewId);
|
||||||
|
fileName = Filepath.removeExtension(Filepath.basename(getViewpointAttribute("path", viewId)));
|
||||||
}
|
}
|
||||||
var patterns = {"<VIEW_ID>": viewId,"<INTRINSIC_ID>": intrinsicId, "<FILENAME>": fileName}
|
var patterns = {"<VIEW_ID>": viewId, "<INTRINSIC_ID>": intrinsicId, "<POSE_ID>": poseId, "<FILENAME>": fileName}
|
||||||
return getFileAttributePath(displayedNode, outputAttribute.name,patterns);
|
return getFileAttributePath(displayedNode, outputAttribute.name,patterns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue