MaterialXglTF 1.39.0.1
Loading...
Searching...
No Matches
globals.py
Go to the documentation of this file.
1# globals.py
2
3'''
4@file
5Package globals
6'''
7TO_DEGREE = 180.0 / 3.1415926535
8
9# Default MaterialX names for conversion to MaterialX
10MTLX_DEFAULT_MATERIAL_NAME = 'MAT_0'
11MTLX_MATERIAL_PREFIX = 'MAT_'
12MTLX_DEFAULT_SHADER_NAME = 'SHD_0'
13MTLX_SHADER_PREFIX = 'SHD_'
14# Default GLTF names for conversion to/from MaterialX
15GLTF_DEFAULT_NODE_PREFIX = 'NODE_'
16GLTF_DEFAULT_MESH_PREFIX = 'MESH_'
17# As primitives have not named, use the index as the name if more than one primitives child
18GLTF_DEFAULT_PRIMITIVE_PREFIX = 'PRIMITIVE_'
19
20# MaterialX strings
21#SURFACE_SHADER_TYPE_STRING = 'surfaceshader'
22MTLX_GLTF_PBR_CATEGORY = 'gltf_pbr'
23MTLX_UNLIT_CATEGORY_STRING = 'surface_unlit'
24MULTI_OUTPUT_TYPE_STRING = 'multioutput'
25MTLX_GLTF_IMAGE = 'gltf_image'
26MTLX_GLTF_COLOR_IMAGE = 'gltf_colorimage'
27MTLX_GLTF_NORMALMAP_IMAGE = 'gltf_normalmap'
28MTLX_DEFAULT_COLORSPACE = 'srgb_texture'
29# mx.PortElement.NODE_NAME_ATTRIBUTE is not exposed
30MTLX_INTERFACEINPUT_NAME_ATTRIBUTE = 'interfacename'
31MTLX_NODE_NAME_ATTRIBUTE = 'nodename'
32MTLX_NODEGRAPH_NAME_ATTRIBUTE = 'nodegraph'
33MTLX_COLOR_SPACE_ATTRIBUTE = 'colorspace' # mx.Element.COLOR_SPACE_ATTRIBUTE is not exposed
34MTLX_VEC3_STRING = 'vector3'
35MTLX_IN_STRING = 'in'
36MTLX_FLOAT_STRING = 'float'
37MTLX_VALUE_STRING = 'value'
38EMPTY_STRING = ''
39MTLX_VALUE_ATTRIBUTE = 'value' # mx.AttributeDef.MTLX_VALUE_ATTRIBUTE is not exposed
40
41# We use a colon to separate the category and name of an element in the JSON hierarchy
42JSON_CATEGORY_NAME_SEPARATOR = ':'
43# The root of the JSON hierarchy
44MATERIALX_DOCUMENT_ROOT = 'materialx'
45