Skip to content

Commit

Permalink
Merge branch 'release-6.11'
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	package.xml
  • Loading branch information
jslee02 committed Oct 29, 2021
2 parents e8f84a8 + ddc4b1d commit 0cc469b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@

* Added Python bindings for ResourceRetriever and SdfParser: [#1610](https://github.com/dartsim/dart/pull/1610)

### [DART 6.11.2 (2021-10-29)](https://github.com/dartsim/dart/milestone/68?closed=1)

* dartpy

* Added Python binding for global lighting mode setting: [#1615](https://github.com/dartsim/dart/pull/1615)

### [DART 6.11.1 (2021-08-23)](https://github.com/dartsim/dart/milestone/67?closed=1)

* Dynamics
Expand Down
14 changes: 13 additions & 1 deletion python/dartpy/gui/osg/Viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void Viewer(py::module& m)
},
::py::arg("eventHandler"));

::py::class_<
auto viewer = ::py::class_<
dart::gui::osg::Viewer,
osgViewer::View,
dart::common::Subject,
Expand Down Expand Up @@ -131,6 +131,13 @@ void Viewer(py::module& m)
+[](const dart::gui::osg::Viewer* self) -> bool {
return self->checkHeadlights();
})
.def(
"setLightingMode",
&dart::gui::osg::Viewer::setLightingMode,
::py::arg("lightingMode"))
.def(
"getLightingMode",
&dart::gui::osg::Viewer::getLightingMode)
.def(
"addWorldNode",
+[](dart::gui::osg::Viewer* self,
Expand Down Expand Up @@ -351,6 +358,11 @@ void Viewer(py::module& m)

self->setCameraManipulator(self->getCameraManipulator());
});

::py::enum_<dart::gui::osg::Viewer::LightingMode>(viewer, "LightingMode")
.value("NO_LIGHT", dart::gui::osg::Viewer::NO_LIGHT)
.value("HEADLIGHT", dart::gui::osg::Viewer::HEADLIGHT)
.value("SKY_LIGHT", dart::gui::osg::Viewer::SKY_LIGHT);
} // namespace python

} // namespace python
Expand Down

0 comments on commit 0cc469b

Please sign in to comment.