MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenImageIO / declare_paramvalue

Function declare_paramvalue

src/python/py_paramvalue.cpp:122–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121
122void declare_paramvalue()
123{
124
125 enum_<ParamValue::Interp>("Interp")
126 .value("INTERP_CONSTANT", ParamValue::INTERP_CONSTANT)
127 .value("INTERP_PERPIECE", ParamValue::INTERP_PERPIECE)
128 .value("INTERP_LINEAR", ParamValue::INTERP_LINEAR)
129 .value("INTERP_VERTEX", ParamValue::INTERP_VERTEX)
130 ;
131
132 class_<ParamValue>("ParamValue")
133 .add_property("name", &ParamValue_name)
134 .add_property("type", &ParamValue::type)
135 .add_property("value", &ParamValue_value)
136 .def("__getitem__", &ParamValue_getitem)
137 .def("__len__", &ParamValue::nvalues)
138 ;
139
140 class_<ParamValueList>("ParamValueList")
141 .def("__getitem__", &ParamValueList_getitem,
142 return_internal_reference<>())
143 .def("__iter__", boost::python::iterator<ParamValueList>())
144 .def("__len__", &ParamValueList::size)
145 .def("grow", &ParamValueList::grow,
146 return_internal_reference<>())
147 .def("append", &ParamValueList::push_back)
148 .def("clear", &ParamValueList::clear)
149 .def("free", &ParamValueList::free)
150 .def("resize", &ParamValueList::resize)
151 ;
152}
153
154}

Callers 1

OIIO_DECLARE_PYMODULEFunction · 0.85

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected