MCPcopy Create free account
hub / github.com/ImageEngine/cortex / channelValid

Function channelValid

src/IECoreImageBindings/ImagePrimitiveBinding.cpp:112–122  ·  view source on GitHub ↗

\todo Rewrite the Parameter::valueValid bindings to follow this form? They currently always return a tuple, which is causing lots of coding errors (the tuple is always true, and it's easy to forget a tuple is being returned and expect a bool instead).

Source from the content-addressed store, hash-verified

110/// return a tuple, which is causing lots of coding errors (the tuple is always true, and it's
111/// easy to forget a tuple is being returned and expect a bool instead).
112static object channelValid( ImagePrimitive &that, Data &d, bool wantReason = false )
113{
114 if( wantReason )
115 {
116 std::string reason;
117 bool v = that.channelValid( &d, &reason );
118 return boost::python::make_tuple( v, reason );
119 }
120 bool v = that.channelValid( &d );
121 return object( v );
122}
123
124static object channelValid2( ImagePrimitive &that, const char *n, bool wantReason = false )
125{

Callers 3

channelValidMethod · 0.85
channelsValidMethod · 0.85
channelNamesMethod · 0.85

Calls 1

channelValidMethod · 0.80

Tested by

no test coverage detected