MCPcopy Create free account
hub / github.com/carbonengine/trinity / PyGetColorForOption

Method PyGetColorForOption

trinity/Tr2DebugRenderer.cpp:932–947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930
931#if BLUE_WITH_PYTHON
932PyObject* Tr2DebugRenderer::PyGetColorForOption( PyObject* self, PyObject* args )
933{
934 auto renderer = BluePythonCast<Tr2DebugRenderer*>( self );
935 const char* option;
936 if( !PyArg_ParseTuple( args, "s", &option ) )
937 {
938 return nullptr;
939 }
940 Color color;
941 if( renderer->GetColorForOption( color, option ) )
942 {
943 PyObject* result = Py_BuildValue( "(ffff)", color.r, color.g, color.b, color.a );
944 return result;
945 }
946 Py_RETURN_NONE;
947}
948#endif
949
950std::vector<Tr2DebugRendererOption> Tr2DebugRenderer::GetOptions( IRoot* owner ) const

Callers

nothing calls this directly

Calls 1

GetColorForOptionMethod · 0.80

Tested by

no test coverage detected