* Fixed problems in with script linking.

I had to update many files to get this to work.
This commit is contained in:
2003-07-27 15:56:32 +00:00
parent 2222fc7168
commit 916f527253
11 changed files with 224 additions and 79 deletions

View File

@@ -217,6 +217,32 @@ Camera *Camera_FromPyObject (PyObject *pyobj)
return ((BPy_Camera *)pyobj)->camera;
}
/*****************************************************************************/
/* Description: Returns the object with the name specified by the argument */
/* name. Note that the calling function has to remove the first */
/* two characters of the object name. These two characters */
/* specify the type of the object (OB, ME, WO, ...) */
/* The function will return NULL when no object with the given */
/* name is found. */
/*****************************************************************************/
Camera * GetCameraByName (char * name)
{
Camera * cam_iter;
cam_iter = G.main->camera.first;
while (cam_iter)
{
if (StringEqual (name, GetIdName (&(cam_iter->id))))
{
return (cam_iter);
}
cam_iter = cam_iter->id.next;
}
/* There is no camera with the given name */
return (NULL);
}
/*****************************************************************************/
/* Python BPy_Camera methods: */
/*****************************************************************************/