Skip to content
Snippets Groups Projects
Commit dd6a83d9 authored by Willian Padovani Germano's avatar Willian Padovani Germano
Browse files

Exppython:

- Minor tweaks related to ipos and Added Object_setIpo and Object_clearIpo to Object.c
- Updated docs
parent f3a809b0
Branches
Tags
No related merge requests found
......@@ -258,6 +258,11 @@ static PyObject *Camera_getIpo(BPy_Camera *self)
return Ipo_CreatePyObject (ipo);
}
static PyObject *Camera_getName(BPy_Camera *self)
{
......@@ -329,6 +334,8 @@ static PyObject *Camera_getDrawSize(BPy_Camera *self)
"couldn't get Camera.drawSize attribute");
}
static PyObject *Camera_setIpo(BPy_Camera *self, PyObject *args)
{
PyObject *pyipo = 0;
......
......@@ -142,7 +142,7 @@ static PyObject *Camera_setDrawSize(BPy_Camera *self, PyObject *args);
static PyMethodDef BPy_Camera_methods[] = {
/* name, method, flags, doc */
{"getIpo", (PyCFunction)Camera_getIpo, METH_NOARGS,
"() - Return Camera Data Ipo's"},
"() - Return Camera Data Ipo"},
{"getName", (PyCFunction)Camera_getName, METH_NOARGS,
"() - Return Camera Data name"},
{"getType", (PyCFunction)Camera_getType, METH_NOARGS,
......
This diff is collapsed.
......@@ -55,6 +55,7 @@
#include <DNA_userdef_types.h>
#include <DNA_view3d_types.h>
#include "bpy_types.h"
#include "gen_utils.h"
#include "modules.h"
#include "vector.h"
......
......@@ -152,9 +152,11 @@ class Object:
Recomputes the particle system. This method only applies to an Object of
the type Effect.
"""
def getIpo():
def clearIpo():
"""
returns the Ipo (if any) associated to the Object.
Unlinks the ipo from this object.
@return: True if there was an ipo linked or False otherwise.
"""
def clrParent(mode = 0, fast = 0):
......@@ -223,6 +225,13 @@ class Object:
@return: the inverse of the matrix of the Object
"""
def getIpo():
"""
Returns the Ipo associated to this object or None if there's no linked ipo.
@rtype: Ipo
@return: the wrapped ipo or None.
"""
def getLocation():
"""
Returns the object's location (x, y, z).
......@@ -381,6 +390,13 @@ class Object:
@param z: The rotation angle in radians for the Z direction.
"""
def setIpo(ipo):
"""
Links an ipo to this object.
@type ipo: Blender Ipo
@param ipo: an object type ipo.
"""
def setLocation(x, y, z):
"""
Sets the object's location.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment