Skip to content

Commit

Permalink
cleanup render settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fraguada committed Jul 26, 2023
1 parent 89dd206 commit 031c255
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/bindings/bnd_3dm_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ class BND_RenderSettings : public BND_CommonObject
BND_File3dmSun& GetSun() const { return *m_sun; }
BND_File3dmPostEffectTable& GetPostEffects() const { return *m_post_effects; }

//void SetGroundPlane(BND_File3dmGroundPlane& gp) { m_render_settings->GroundPlane = gp; }

};

class BND_EarthAnchorPoint
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/bnd_dithering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ using namespace emscripten;
void initDitheringBindings(void*)
{
class_<BND_File3dmDithering>("Dithering")
.constructor<>()
.constructor<const BND_File3dmDithering&>()
//.constructor<>()
//.constructor<const BND_File3dmDithering&>()
.property("enabled", &BND_File3dmDithering::GetEnabled, &BND_File3dmDithering::SetEnabled)
.property("method", &BND_File3dmDithering::GetMethod, &BND_File3dmDithering::SetMethod)
;
Expand Down
2 changes: 2 additions & 0 deletions src/bindings/bnd_extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,7 @@ void initExtensionsBindings(pybind11::module& m)
.def("__len__", &BND_File3dmPostEffectTable::Count)
.def("__getitem__", &BND_File3dmPostEffectTable::FindIndex)
.def("__iter__", [](py::object s) { return PyBNDIterator<BND_File3dmPostEffectTable&, BND_File3dmPostEffect*>(s.cast<BND_File3dmPostEffectTable &>(), s); })
//.def("Add", &BND_File3dmRenderContentTable::Add, py::arg("render_content"))
.def("FindIndex", &BND_File3dmPostEffectTable::FindIndex, py::arg("index"))
.def("FindId", &BND_File3dmPostEffectTable::FindId, py::arg("id"))
;
Expand Down Expand Up @@ -1896,6 +1897,7 @@ void initExtensionsBindings(void*)
class_<BND_File3dmPostEffectTable>("File3dmPostEffectTable")
.property("count", &BND_File3dmPostEffectTable::Count)
.function("get", &BND_File3dmPostEffectTable::FindIndex, allow_raw_pointers())
//.function("add", &BND_File3dmPostEffectTable::Add, allow_raw_pointers())
.function("findIndex", &BND_File3dmPostEffectTable::FindIndex, allow_raw_pointers())
.function("findId", &BND_File3dmPostEffectTable::FindId, allow_raw_pointers())
;
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/bnd_linear_workflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ using namespace emscripten;
void initLinearWorkflowBindings(void*)
{
class_<BND_File3dmLinearWorkflow>("LinearWorkflow")
.constructor<>()
.constructor<const BND_File3dmLinearWorkflow&>()
//.constructor<>()
//.constructor<const BND_File3dmLinearWorkflow&>()
.property("preProcessTexturesOn", &BND_File3dmLinearWorkflow::GetPreProcessTexturesOn, &BND_File3dmLinearWorkflow::SetPreProcessTexturesOn)
.property("preProcessColorsOn", &BND_File3dmLinearWorkflow::GetPreProcessColorsOn, &BND_File3dmLinearWorkflow::SetPreProcessColorsOn)
.property("preProcessGamma", &BND_File3dmLinearWorkflow::GetPreProcessGamma, &BND_File3dmLinearWorkflow::SetPreProcessGamma)
Expand Down
7 changes: 4 additions & 3 deletions src/bindings/bnd_render_channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ using namespace emscripten;
void initRenderChannelsBindings(void*)
{
class_<BND_File3dmRenderChannels>("RenderChannels")
.constructor<>()
.constructor<const BND_File3dmRenderChannels&>()
//.constructor<>()
//.constructor<const BND_File3dmRenderChannels&>()
.property("mode", &BND_File3dmRenderChannels::GetMode, &BND_File3dmRenderChannels::SetMode)
.property("customIds", &BND_File3dmRenderChannels::GetCustomList, &BND_File3dmRenderChannels::SetCustomList)
//.property("customIds", &BND_File3dmRenderChannels::GetCustomList, &BND_File3dmRenderChannels::SetCustomList)
.property("customIds", &BND_File3dmRenderChannels::GetCustomList)
;
}
#endif
11 changes: 9 additions & 2 deletions src/bindings/bnd_render_environments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,20 @@ using namespace emscripten;
void initRenderEnvironmentsBindings(void*)
{
class_<BND_File3dmRenderEnvironments>("RenderEnvironments")
.constructor<>()
.constructor<const BND_File3dmRenderEnvironments&>()
//.constructor<>()
//.constructor<const BND_File3dmRenderEnvironments&>()
/*
.property("backgroundId", &BND_File3dmRenderEnvironments::GetBackgroundId, &BND_File3dmRenderEnvironments::SetBackgroundId)
.property("skylightingId", &BND_File3dmRenderEnvironments::GetSkylightingId, &BND_File3dmRenderEnvironments::SetSkylightingId)
.property("skylightingOverride", &BND_File3dmRenderEnvironments::GetSkylightingOverride, &BND_File3dmRenderEnvironments::SetSkylightingOverride)
.property("reflectionId", &BND_File3dmRenderEnvironments::GetReflectionId, &BND_File3dmRenderEnvironments::SetReflectionId)
.property("reflectionOverride", &BND_File3dmRenderEnvironments::GetReflectionOverride, &BND_File3dmRenderEnvironments::SetReflectionOverride)
*/
.property("backgroundId", &BND_File3dmRenderEnvironments::GetBackgroundId)
.property("skylightingId", &BND_File3dmRenderEnvironments::GetSkylightingId)
.property("skylightingOverride", &BND_File3dmRenderEnvironments::GetSkylightingOverride)
.property("reflectionId", &BND_File3dmRenderEnvironments::GetReflectionId)
.property("reflectionOverride", &BND_File3dmRenderEnvironments::GetReflectionOverride)
;
}
#endif
4 changes: 2 additions & 2 deletions src/bindings/bnd_safe_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ using namespace emscripten;
void initSafeFrameBindings(void*)
{
class_<BND_File3dmSafeFrame>("SafeFrame")
.constructor<>()
.constructor<const BND_File3dmSafeFrame&>()
//.constructor<>()
//.constructor<const BND_File3dmSafeFrame&>()
.property("enabled", &BND_File3dmSafeFrame::GetEnabled, &BND_File3dmSafeFrame::SetEnabled)
.property("perspectiveOnly", &BND_File3dmSafeFrame::GetPerspectiveOnly, &BND_File3dmSafeFrame::SetPerspectiveOnly)
.property("fieldGridOn", &BND_File3dmSafeFrame::GetFieldGridOn, &BND_File3dmSafeFrame::SetFieldGridOn)
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/bnd_skylight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ using namespace emscripten;
void initSkylightBindings(void*)
{
class_<BND_File3dmSkylight>("Skylight")
.constructor<>()
.constructor<const BND_File3dmSkylight&>()
//.constructor<>()
//.constructor<const BND_File3dmSkylight&>()
.property("enabled", &BND_File3dmSkylight::GetEnabled, &BND_File3dmSkylight::SetEnabled)
.property("shadowIntensity", &BND_File3dmSkylight::GetShadowIntensity, &BND_File3dmSkylight::SetShadowIntensity)
;
Expand Down

0 comments on commit 031c255

Please sign in to comment.