Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Selten <michel@mselten.demon.nl>2003-06-03 00:15:50 +0400
committerMichel Selten <michel@mselten.demon.nl>2003-06-03 00:15:50 +0400
commita127b387607fea5c0433bde26517a9fe575e72f9 (patch)
treee2d960360b338cbcd0559d377cbdc36717f5b6d0 /source/blender/python/api2_2x/Object.h
parent271dc5aaf1f025725cd71ffa78a4cdc2b19d8fef (diff)
* Fix compilation errors on Windows hopefully. Implemented the suggestion done
by Aphex - thanks. * Added the doc strings to the Object module. * Added more functionality to the Object module.
Diffstat (limited to 'source/blender/python/api2_2x/Object.h')
-rw-r--r--source/blender/python/api2_2x/Object.h73
1 files changed, 48 insertions, 25 deletions
diff --git a/source/blender/python/api2_2x/Object.h b/source/blender/python/api2_2x/Object.h
index 08316739b10..65fbcc33ac2 100644
--- a/source/blender/python/api2_2x/Object.h
+++ b/source/blender/python/api2_2x/Object.h
@@ -36,6 +36,8 @@
#include <stdio.h>
#include <BDR_editobject.h>
+#include <BKE_armature.h>
+#include <BKE_curve.h>
#include <BKE_global.h>
#include <BKE_library.h>
#include <BKE_main.h>
@@ -44,6 +46,7 @@
#include <BKE_scene.h>
#include <BLI_arithb.h>
#include <BLI_blenlib.h>
+#include <DNA_armature_types.h>
#include <DNA_ID.h>
#include <DNA_ika_types.h>
#include <DNA_listBase.h>
@@ -155,53 +158,73 @@ static PyObject *Object_shareFrom (C_Object *self, PyObject *args);
static PyMethodDef C_Object_methods[] = {
/* name, method, flags, doc */
{"clrParent", (PyCFunction)Object_clrParent, METH_VARARGS,
- "(x) - "},
+ "Clears parent object. Optionally specify:\n\
+mode\n\t2: Keep object transform\nfast\n\t>0: Don't update scene \
+hierarchy (faster)"},
{"getData", (PyCFunction)Object_getData, METH_NOARGS,
- "(x) - "},
+ "Returns the datablock object containing the object's data, \
+e.g. Mesh"},
{"getDeformData", (PyCFunction)Object_getDeformData, METH_NOARGS,
- "(x) - "},
+ "Returns the datablock object containing the object's deformed \
+data.\nCurrently, this is only supported for a Mesh"},
{"getDeltaLocation", (PyCFunction)Object_getDeltaLocation, METH_NOARGS,
- "(x) - "},
+ "Returns the object's delta location (x, y, z)"},
{"getDrawMode", (PyCFunction)Object_getDrawMode, METH_NOARGS,
- "(x) - "},
+ "Returns the object draw modes"},
{"getDrawType", (PyCFunction)Object_getDrawType, METH_NOARGS,
- "(x) - "},
+ "Returns the object draw type"},
{"getEuler", (PyCFunction)Object_getEuler, METH_NOARGS,
- "(x) - "},
+ "Returns the object's rotation as Euler rotation vector\n\
+(rotX, rotY, rotZ)"},
{"getInverseMatrix", (PyCFunction)Object_getInverseMatrix, METH_NOARGS,
- "(x) - "},
+ "Returns the object's inverse matrix"},
{"getLocation", (PyCFunction)Object_getLocation, METH_VARARGS,
- "(x) - "},
+ "Returns the object's location (x, y, z)"},
{"getMaterials", (PyCFunction)Object_getMaterials, METH_NOARGS,
- "(x) - "},
+ "Returns list of materials assigned to the object"},
{"getMatrix", (PyCFunction)Object_getMatrix, METH_NOARGS,
- "(x) - "},
+ "Returns the object matrix"},
{"getParent", (PyCFunction)Object_getParent, METH_NOARGS,
- "(x) - "},
+ "Returns the object's parent object"},
{"getTracked", (PyCFunction)Object_getTracked, METH_NOARGS,
- "(x) - "},
+ "Returns the object's tracked object"},
{"getType", (PyCFunction)Object_getType, METH_NOARGS,
- "(x) - "},
+ "Returns type of string of Object"},
{"link", (PyCFunction)Object_link, METH_VARARGS,
- "(x) - "},
+ "Links Object with data provided in the argument. The data must \n\
+match the Object's type, so you cannot link a Lamp to a Mesh type object."},
{"makeParent", (PyCFunction)Object_makeParent, METH_VARARGS,
- "(x) - "},
+ "Makes the object the parent of the objects provided in the \n\
+argument which must be a list of valid Objects. Optional extra arguments:\n\
+mode:\n\t0: make parent with inverse\n\t1: without inverse\n\
+fase:\n\t0: update scene hierarchy automatically\n\t\
+don't update scene hierarchy (faster). In this case, you must\n\t\
+explicitely update the Scene hierarchy."},
{"materialUsage", (PyCFunction)Object_materialUsage, METH_VARARGS,
- "(x) - "},
+ "Determines the way the material is used and returs status.\n\
+Possible arguments (provide as strings):\n\
+\tData: Materials assigned to the object's data are shown. (default)\n\
+\tObject: Materials assigned to the object are shown."},
{"setDeltaLocation", (PyCFunction)Object_setDeltaLocation, METH_VARARGS,
- "(x) - "},
+ "Sets the object's delta location which must be a vector triple."},
{"setDrawMode", (PyCFunction)Object_setDrawMode, METH_VARARGS,
- "(x) - "},
+ "Sets the object's drawing mode. The argument can be a sum of:\n\
+2: axis\n4: texspace\n8: drawname\n16: drawimage\n32: drawwire"},
{"setDrawType", (PyCFunction)Object_setDrawType, METH_VARARGS,
- "(x) - "},
+ "Sets the object's drawing type. The argument must be one of:\n\
+1: Bounding box\n2: Wire\n3: Solid\n4: Shaded\n5: Textured"},
{"setEuler", (PyCFunction)Object_setEuler, METH_VARARGS,
- "(x) - "},
+ "Set the object's rotation according to the specified Euler\n\
+angles. The argument must be a vector triple"},
{"setLocation", (PyCFunction)Object_setLocation, METH_VARARGS,
- "(x) - "},
+ "Set the object's location. The first argument must be a vector\n\
+triple."},
{"setMaterials", (PyCFunction)Object_setMaterials, METH_VARARGS,
- "(x) - "},
+ "Sets materials. The argument must be a list of valid material\n\
+objects."},
{"shareFrom", (PyCFunction)Object_shareFrom, METH_VARARGS,
- "(x) - "},
+ "Link data of self with object specified in the argument. This\n\
+works only if self and the object specified are of the same type."},
};
/*****************************************************************************/
@@ -218,7 +241,7 @@ static PyObject* ObjectRepr (C_Object *obj);
/*****************************************************************************/
PyTypeObject Object_Type =
{
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"Object", /* tp_name */
sizeof (C_Object), /* tp_basicsize */