Commit be343452 authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot

Merge topic 'pybind-attribute-cast'

fbfc81a3 Add cast method to pybind11 bindings for smtk::attribute::Attribute
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1580
parents 30ed5190 fbfc81a3
Pipeline #138765 running with stage
......@@ -123,6 +123,10 @@ PySharedPtrClass< smtk::attribute::Attribute > pybind11_init_smtk_attribute_Attr
.def("types", &smtk::attribute::Attribute::types)
.def("unsetColor", &smtk::attribute::Attribute::unsetColor)
.def("userData", &smtk::attribute::Attribute::userData, py::arg("key"))
.def_static("CastTo", [](const std::shared_ptr<smtk::resource::Component> i) {
return std::dynamic_pointer_cast<smtk::attribute::Attribute>(i);
})
;
;
return instance;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment