svn merge -r36900:37028 https://svn.blender.org/svnroot/bf-blender/trunk/blender
This commit is contained in:
@@ -114,7 +114,7 @@ PyObject *BPy_IDGroup_WrapData( ID *id, IDProperty *prop )
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
#if 0 /* UNUSED, currenly assignment overwrites into new properties, rather then setting in-place */
|
||||
#if 0 /* UNUSED, currenly assignment overwrites into new properties, rather than setting in-place */
|
||||
static int BPy_IDGroup_SetData(BPy_IDProperty *self, IDProperty *prop, PyObject *value)
|
||||
{
|
||||
switch (prop->type) {
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
#include <Python.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "compile.h" /* for the PyCodeObject */
|
||||
#include "eval.h" /* for PyEval_EvalCode */
|
||||
|
||||
#include "bpy_internal_import.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
@@ -51,7 +48,6 @@
|
||||
/* UNUSED */
|
||||
#include "BKE_text.h" /* txt_to_buf */
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_global.h" /* grr, only for G.main->name */
|
||||
|
||||
static Main *bpy_import_main= NULL;
|
||||
|
||||
@@ -97,7 +93,7 @@ void bpy_import_main_set(struct Main *maggie)
|
||||
/* returns a dummy filename for a textblock so we can tell what file a text block comes from */
|
||||
void bpy_text_filename_get(char *fn, size_t fn_len, Text *text)
|
||||
{
|
||||
BLI_snprintf(fn, fn_len, "%s%c%s", text->id.lib ? text->id.lib->filepath : G.main->name, SEP, text->id.name+2);
|
||||
BLI_snprintf(fn, fn_len, "%s%c%s", text->id.lib ? text->id.lib->filepath : bpy_import_main->name, SEP, text->id.name+2);
|
||||
}
|
||||
|
||||
PyObject *bpy_text_import(Text *text)
|
||||
|
||||
@@ -59,7 +59,7 @@ void bpy_text_filename_get(char *fn, size_t fn_len, struct Text *text);
|
||||
extern PyMethodDef bpy_import_meth;
|
||||
extern PyMethodDef bpy_reload_meth;
|
||||
|
||||
/* The game engine has its own Main struct, if this is set search this rather then G.main */
|
||||
/* The game engine has its own Main struct, if this is set search this rather than G.main */
|
||||
struct Main *bpy_import_main_get(void);
|
||||
void bpy_import_main_set(struct Main *maggie);
|
||||
|
||||
|
||||
@@ -93,7 +93,8 @@ PyDoc_STRVAR(Color_copy_doc,
|
||||
" :return: A copy of the color.\n"
|
||||
" :rtype: :class:`Color`\n"
|
||||
"\n"
|
||||
" .. note:: use this to get a copy of a wrapped color with no reference to the original data.\n"
|
||||
" .. note:: use this to get a copy of a wrapped color with\n"
|
||||
" no reference to the original data.\n"
|
||||
);
|
||||
static PyObject *Color_copy(ColorObject *self)
|
||||
{
|
||||
|
||||
@@ -185,7 +185,8 @@ static PyObject *Euler_zero(EulerObject * self)
|
||||
PyDoc_STRVAR(Euler_rotate_axis_doc,
|
||||
".. method:: rotate_axis(axis, angle)\n"
|
||||
"\n"
|
||||
" Rotates the euler a certain amount and returning a unique euler rotation (no 720 degree pitches).\n"
|
||||
" Rotates the euler a certain amount and returning a unique euler rotation\n"
|
||||
" (no 720 degree pitches).\n"
|
||||
"\n"
|
||||
" :arg axis: single character in ['X, 'Y', 'Z'].\n"
|
||||
" :type axis: string\n"
|
||||
@@ -247,7 +248,8 @@ static PyObject *Euler_rotate(EulerObject * self, PyObject *value)
|
||||
PyDoc_STRVAR(Euler_make_compatible_doc,
|
||||
".. method:: make_compatible(other)\n"
|
||||
"\n"
|
||||
" Make this euler compatible with another, so interpolating between them works as intended.\n"
|
||||
" Make this euler compatible with another,\n"
|
||||
" so interpolating between them works as intended.\n"
|
||||
"\n"
|
||||
" .. note:: the rotation order is not taken into account for this function.\n"
|
||||
);
|
||||
@@ -279,7 +281,8 @@ PyDoc_STRVAR(Euler_copy_doc,
|
||||
" :return: A copy of the euler.\n"
|
||||
" :rtype: :class:`Euler`\n"
|
||||
"\n"
|
||||
" .. note:: use this to get a copy of a wrapped euler with no reference to the original data.\n"
|
||||
" .. note:: use this to get a copy of a wrapped euler with\n"
|
||||
" no reference to the original data.\n"
|
||||
);
|
||||
static PyObject *Euler_copy(EulerObject *self)
|
||||
{
|
||||
|
||||
@@ -195,7 +195,8 @@ PyDoc_STRVAR(C_Matrix_Rotation_doc,
|
||||
" :type angle: float\n"
|
||||
" :arg size: The size of the rotation matrix to construct [2, 4].\n"
|
||||
" :type size: int\n"
|
||||
" :arg axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object (optional when size is 2).\n"
|
||||
" :arg axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object\n"
|
||||
" (optional when size is 2).\n"
|
||||
" :type axis: string or :class:`Vector`\n"
|
||||
" :return: A new rotation matrix.\n"
|
||||
" :rtype: :class:`Matrix`\n"
|
||||
@@ -407,7 +408,9 @@ PyDoc_STRVAR(C_Matrix_OrthoProjection_doc,
|
||||
"\n"
|
||||
" Create a matrix to represent an orthographic projection.\n"
|
||||
"\n"
|
||||
" :arg axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'], where a single axis is for a 2D matrix. Or a vector for an arbitrary axis\n"
|
||||
" :arg axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n"
|
||||
" where a single axis is for a 2D matrix.\n"
|
||||
" Or a vector for an arbitrary axis\n"
|
||||
" :type axis: string or :class:`Vector`\n"
|
||||
" :arg size: The size of the projection matrix to construct [2, 4].\n"
|
||||
" :type size: int\n"
|
||||
@@ -513,11 +516,13 @@ PyDoc_STRVAR(C_Matrix_Shear_doc,
|
||||
"\n"
|
||||
" Create a matrix to represent an shear transformation.\n"
|
||||
"\n"
|
||||
" :arg plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'], where a single axis is for a 2D matrix only.\n"
|
||||
" :arg plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n"
|
||||
" where a single axis is for a 2D matrix only.\n"
|
||||
" :type plane: string\n"
|
||||
" :arg size: The size of the shear matrix to construct [2, 4].\n"
|
||||
" :type size: int\n"
|
||||
" :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix pass a pair of floats corrasponding with the *plane* axis.\n"
|
||||
" :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix\n"
|
||||
" pass a pair of floats corrasponding with the *plane* axis.\n"
|
||||
" :type factor: float or float pair\n"
|
||||
" :return: A new shear matrix.\n"
|
||||
" :rtype: :class:`Matrix`\n"
|
||||
@@ -660,11 +665,15 @@ static PyObject *Matrix_to_quaternion(MatrixObject *self)
|
||||
PyDoc_STRVAR(Matrix_to_euler_doc,
|
||||
".. method:: to_euler(order, euler_compat)\n"
|
||||
"\n"
|
||||
" Return an Euler representation of the rotation matrix (3x3 or 4x4 matrix only).\n"
|
||||
" Return an Euler representation of the rotation matrix\n"
|
||||
" (3x3 or 4x4 matrix only).\n"
|
||||
"\n"
|
||||
" :arg order: Optional rotation order argument in ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"
|
||||
" :arg order: Optional rotation order argument in\n"
|
||||
" ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"
|
||||
" :type order: string\n"
|
||||
" :arg euler_compat: Optional euler argument the new euler will be made compatible with (no axis flipping between them). Useful for converting a series of matrices to animation curves.\n"
|
||||
" :arg euler_compat: Optional euler argument the new euler will be made\n"
|
||||
" compatible with (no axis flipping between them).\n"
|
||||
" Useful for converting a series of matrices to animation curves.\n"
|
||||
" :type euler_compat: :class:`Euler`\n"
|
||||
" :return: Euler representation of the matrix.\n"
|
||||
" :rtype: :class:`Euler`\n"
|
||||
@@ -1174,7 +1183,8 @@ PyDoc_STRVAR(Matrix_identity_doc,
|
||||
"\n"
|
||||
" Set the matrix to the identity matrix.\n"
|
||||
"\n"
|
||||
" .. note:: An object with zero location and rotation, a scale of one, will have an identity matrix.\n"
|
||||
" .. note:: An object with zero location and rotation, a scale of one,\n"
|
||||
" will have an identity matrix.\n"
|
||||
"\n"
|
||||
" .. seealso:: <http://en.wikipedia.org/wiki/Identity_matrix>\n"
|
||||
);
|
||||
|
||||
@@ -72,9 +72,12 @@ PyDoc_STRVAR(Quaternion_to_euler_doc,
|
||||
"\n"
|
||||
" Return Euler representation of the quaternion.\n"
|
||||
"\n"
|
||||
" :arg order: Optional rotation order argument in ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"
|
||||
" :arg order: Optional rotation order argument in\n"
|
||||
" ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"
|
||||
" :type order: string\n"
|
||||
" :arg euler_compat: Optional euler argument the new euler will be made compatible with (no axis flipping between them). Useful for converting a series of matrices to animation curves.\n"
|
||||
" :arg euler_compat: Optional euler argument the new euler will be made\n"
|
||||
" compatible with (no axis flipping between them).\n"
|
||||
" Useful for converting a series of matrices to animation curves.\n"
|
||||
" :type euler_compat: :class:`Euler`\n"
|
||||
" :return: Euler representation of the quaternion.\n"
|
||||
" :rtype: :class:`Euler`\n"
|
||||
@@ -417,7 +420,8 @@ PyDoc_STRVAR(Quaternion_copy_doc,
|
||||
" :return: A copy of the quaternion.\n"
|
||||
" :rtype: :class:`Quaternion`\n"
|
||||
"\n"
|
||||
" .. note:: use this to get a copy of a wrapped quaternion with no reference to the original data.\n"
|
||||
" .. note:: use this to get a copy of a wrapped quaternion with\n"
|
||||
" no reference to the original data.\n"
|
||||
);
|
||||
static PyObject *Quaternion_copy(QuaternionObject *self)
|
||||
{
|
||||
|
||||
@@ -107,9 +107,11 @@ PyDoc_STRVAR(Vector_normalize_doc,
|
||||
"\n"
|
||||
" Normalize the vector, making the length of the vector always 1.0.\n"
|
||||
"\n"
|
||||
" .. warning:: Normalizing a vector where all values are zero results in all axis having a nan value (not a number).\n"
|
||||
" .. warning:: Normalizing a vector where all values are zero results\n"
|
||||
" in all axis having a nan value (not a number).\n"
|
||||
"\n"
|
||||
" .. note:: Normalize works for vectors of all sizes, however 4D Vectors w axis is left untouched.\n"
|
||||
" .. note:: Normalize works for vectors of all sizes,\n"
|
||||
" however 4D Vectors w axis is left untouched.\n"
|
||||
);
|
||||
static PyObject *Vector_normalize(VectorObject *self)
|
||||
{
|
||||
@@ -565,7 +567,8 @@ PyDoc_STRVAR(Vector_angle_doc,
|
||||
"\n"
|
||||
" :arg other: another vector to compare the angle with\n"
|
||||
" :type other: :class:`Vector`\n"
|
||||
" :arg fallback: return this value when the angle cant be calculated (zero length vector)\n"
|
||||
" :arg fallback: return this value when the angle cant be calculated\n"
|
||||
" (zero length vector)\n"
|
||||
" :type fallback: any\n"
|
||||
" :return: angle in radians or fallback when given\n"
|
||||
" :rtype: float\n"
|
||||
@@ -618,7 +621,8 @@ static PyObject *Vector_angle(VectorObject *self, PyObject *args)
|
||||
PyDoc_STRVAR(Vector_rotation_difference_doc,
|
||||
".. function:: difference(other)\n"
|
||||
"\n"
|
||||
" Returns a quaternion representing the rotational difference between this vector and another.\n"
|
||||
" Returns a quaternion representing the rotational difference between this\n"
|
||||
" vector and another.\n"
|
||||
"\n"
|
||||
" :arg other: second vector.\n"
|
||||
" :type other: :class:`Vector`\n"
|
||||
@@ -764,7 +768,8 @@ PyDoc_STRVAR(Vector_copy_doc,
|
||||
" :return: A copy of the vector.\n"
|
||||
" :rtype: :class:`Vector`\n"
|
||||
"\n"
|
||||
" .. note:: use this to get a copy of a wrapped vector with no reference to the original data.\n"
|
||||
" .. note:: use this to get a copy of a wrapped vector with\n"
|
||||
" no reference to the original data.\n"
|
||||
);
|
||||
static PyObject *Vector_copy(VectorObject *self)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user