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

Function PyGetAreas

trinity/Tr2Mesh_Blue.cpp:26–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#if BLUE_WITH_PYTHON
25
26static PyObject* PyGetAreas( PyObject* self, PyObject* args )
27{
28 Tr2Mesh* pThis = BluePythonCast<Tr2Mesh*>( self );
29 if( !pThis )
30 {
31 return NULL;
32 }
33
34 int areaIndex;
35
36 if( !PyArg_ParseTuple( args, "i", &areaIndex ) )
37 {
38 PyErr_SetString( PyExc_TypeError, "Arguments must be (i)." );
39 return 0;
40 }
41
42 TriBatchType type( static_cast<TriBatchType>( areaIndex ) );
43
44 Tr2MeshAreaVector* areas( pThis->GetAreas( type ) );
45
46 if( !areas )
47 {
48 Py_RETURN_NONE;
49 }
50
51 return PyOS->WrapBlueObject( areas->GetRawRoot() );
52}
53#endif
54
55const Be::ClassInfo* Tr2Mesh::ExposeToBlue()

Callers

nothing calls this directly

Calls 1

GetAreasMethod · 0.80

Tested by

no test coverage detected