Browse Source

Use plString in PtGetCameraNumber()

Adam Johnson 12 years ago
parent
commit
8091fffa1d
  1. 8
      Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp
  2. 2
      Sources/Plasma/FeatureLib/pfPython/cyMisc.h
  3. 2
      Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp

8
Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp

@ -2459,14 +2459,14 @@ int cyMisc::GetNumCameras()
return (plVirtualCam1::Instance()->GetNumCameras());
}
const char* cyMisc::GetCameraNumber(int number)
plString cyMisc::GetCameraNumber(int number)
{
plCameraModifier1* pCam = plVirtualCam1::Instance()->GetCameraNumber(number-1);
if (pCam && pCam->GetTarget())
{
const char* ret = pCam->GetTarget()->GetKeyName().c_str();
plString str = plString::Format("saving camera named %s to chronicle\n",ret);
plVirtualCam1::Instance()->AddMsgToLog(str.c_str());
plString ret = pCam->GetTarget()->GetKeyName();
plString log = plString::Format("saving camera named %s to chronicle\n", ret.c_str());
plVirtualCam1::Instance()->AddMsgToLog(log.c_str());
return ret;
}
plVirtualCam1::Instance()->AddMsgToLog("sending empty to camera chronicle\n");

2
Sources/Plasma/FeatureLib/pfPython/cyMisc.h

@ -809,7 +809,7 @@ public:
//
static int GetNumCameras();
static const char* GetCameraNumber(int number);
static plString GetCameraNumber(int number);
static void RebuildCameraStack(const plString& name, const char* ageName);
static void PyClearCameraStack();
static void RecenterCamera();

2
Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp

@ -337,7 +337,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetCameraNumber, args, "Params: x\nReturns cam
PyErr_SetString(PyExc_TypeError, "PtGetCameraNumber expects an int");
PYTHON_RETURN_ERROR;
}
return PyString_FromString(cyMisc::GetCameraNumber(x));
return PyString_FromPlString(cyMisc::GetCameraNumber(x));
}
PYTHON_GLOBAL_METHOD_DEFINITION_NOARGS(PtGetNumCameras, "returns camera stack size")

Loading…
Cancel
Save