We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63826ed commit 7e8798aCopy full SHA for 7e8798a
1 file changed
meshroom/nodes/general/GetFileExtension.py
@@ -0,0 +1,27 @@
1
+__version__ = "1.0"
2
+
3
+import os
4
+from meshroom.core import desc
5
6
7
+class GetFileExtension(desc.InlineNode):
8
+ inputs = [
9
+ desc.File(
10
+ name="path",
11
+ value="",
12
+ exposed=True,
13
+ ),
14
+ ]
15
16
+ outputs = [
17
+ desc.StringParam(
18
+ name="extension",
19
+ value=None,
20
21
22
23
+ def process(self, node):
24
+ if not node.path.value:
25
+ node.extension.value = ""
26
+ else:
27
+ node.extension.value = os.path.splitext(node.path.value)[1]
0 commit comments