MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/Imath / setValueTuple

Function setValueTuple

src/python/PyImath/PyImathColor3.cpp:489–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487
488template <class T>
489static void
490setValueTuple(Color3<T> &color, const tuple &t)
491{
492 MATH_EXC_ON;
493 Color3<T> v;
494 if(t.attr("__len__")() == 3)
495 {
496 v.x = extract<T>(t[0]);
497 v.y = extract<T>(t[1]);
498 v.z = extract<T>(t[2]);
499
500 color.setValue(v);
501 }
502 else
503 throw std::invalid_argument ("Color3 expects tuple of length 3");
504}
505
506template <class T>
507static bool

Callers

nothing calls this directly

Calls 1

setValueMethod · 0.80

Tested by

no test coverage detected