forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPyLightHandler.cpp
More file actions
44 lines (40 loc) · 2.19 KB
/
PyLightHandler.cpp
File metadata and controls
44 lines (40 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Copyright Contributors to the MaterialX Project
// SPDX-License-Identifier: Apache-2.0
//
#include <PyMaterialX/PyMaterialX.h>
#include <MaterialXCore/Document.h>
#include <MaterialXGenShader/GenContext.h>
#include <MaterialXRender/LightHandler.h>
namespace py = pybind11;
namespace mx = MaterialX;
void bindPyLightHandler(py::module& mod)
{
py::class_<mx::LightHandler, mx::LightHandlerPtr>(mod, "LightHandler")
.def_static("create", &mx::LightHandler::create)
.def(py::init<>())
.def("setLightTransform", &mx::LightHandler::setLightTransform)
.def("getLightTransform", &mx::LightHandler::getLightTransform)
.def("setDirectLighting", &mx::LightHandler::setDirectLighting)
.def("getDirectLighting", &mx::LightHandler::getDirectLighting)
.def("setIndirectLighting", &mx::LightHandler::setIndirectLighting)
.def("getIndirectLighting", &mx::LightHandler::getIndirectLighting)
.def("setEnvRadianceMap", &mx::LightHandler::setEnvRadianceMap)
.def("getEnvRadianceMap", &mx::LightHandler::getEnvRadianceMap)
.def("setEnvIrradianceMap", &mx::LightHandler::setEnvIrradianceMap)
.def("getEnvIrradianceMap", &mx::LightHandler::getEnvIrradianceMap)
.def("setAlbedoTable", &mx::LightHandler::setAlbedoTable)
.def("getAlbedoTable", &mx::LightHandler::getAlbedoTable)
.def("setEnvSampleCount", &mx::LightHandler::setEnvSampleCount)
.def("getEnvSampleCount", &mx::LightHandler::getEnvSampleCount)
.def("setRefractionTwoSided", &mx::LightHandler::setRefractionTwoSided)
.def("getRefractionTwoSided", &mx::LightHandler::getRefractionTwoSided)
.def("addLightSource", &mx::LightHandler::addLightSource)
.def("setLightSources", &mx::LightHandler::setLightSources)
.def("getLightSources", &mx::LightHandler::getLightSources)
.def("getFirstLightOfCategory", &mx::LightHandler::getFirstLightOfCategory)
.def("getLightIdMap", &mx::LightHandler::getLightIdMap)
.def("computeLightIdMap", &mx::LightHandler::computeLightIdMap)
.def("findLights", &mx::LightHandler::findLights)
.def("registerLights", &mx::LightHandler::registerLights);
}