Merged changes in the trunk up to revision 42692.
This commit is contained in:
@@ -260,6 +260,7 @@ PyObject *BPY_app_struct(void)
|
||||
/* prevent user from creating new instances */
|
||||
BlenderAppType.tp_init= NULL;
|
||||
BlenderAppType.tp_new= NULL;
|
||||
BlenderAppType.tp_hash= (hashfunc)_Py_HashPointer; /* without this we can't do set(sys.modules) [#29635] */
|
||||
|
||||
/* kindof a hack ontop of PyStructSequence */
|
||||
py_struct_seq_getset_init();
|
||||
|
||||
@@ -210,6 +210,7 @@ PyObject *BPY_app_handlers_struct(void)
|
||||
/* prevent user from creating new instances */
|
||||
BlenderAppCbType.tp_init= NULL;
|
||||
BlenderAppCbType.tp_new= NULL;
|
||||
BlenderAppCbType.tp_hash= (hashfunc)_Py_HashPointer; /* without this we can't do set(sys.modules) [#29635] */
|
||||
|
||||
/* assign the C callbacks */
|
||||
if (ret) {
|
||||
|
||||
@@ -94,13 +94,12 @@ int bpy_pydriver_create_dict(void)
|
||||
|
||||
/* note, this function should do nothing most runs, only when changing frame */
|
||||
static PyObject *bpy_pydriver_InternStr__frame= NULL;
|
||||
/* not thread safe but neither is python */
|
||||
static float bpy_pydriver_evaltime_prev= FLT_MAX;
|
||||
|
||||
static void bpy_pydriver_update_dict(const float evaltime)
|
||||
{
|
||||
/* not thread safe but neither is python */
|
||||
static float evaltime_prev= FLT_MAX;
|
||||
|
||||
if (evaltime_prev != evaltime) {
|
||||
if (bpy_pydriver_evaltime_prev != evaltime) {
|
||||
|
||||
/* currently only update the frame */
|
||||
if (bpy_pydriver_InternStr__frame == NULL) {
|
||||
@@ -111,7 +110,7 @@ static void bpy_pydriver_update_dict(const float evaltime)
|
||||
bpy_pydriver_InternStr__frame,
|
||||
PyFloat_FromDouble(evaltime));
|
||||
|
||||
evaltime_prev= evaltime;
|
||||
bpy_pydriver_evaltime_prev= evaltime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,6 +136,7 @@ void BPY_driver_reset(void)
|
||||
if (bpy_pydriver_InternStr__frame) {
|
||||
Py_DECREF(bpy_pydriver_InternStr__frame);
|
||||
bpy_pydriver_InternStr__frame= NULL;
|
||||
bpy_pydriver_evaltime_prev= FLT_MAX;
|
||||
}
|
||||
|
||||
if (use_gil)
|
||||
|
||||
@@ -805,7 +805,8 @@ static PyObject *M_Geometry_intersect_point_tri_2d(PyObject *UNUSED(self), PyObj
|
||||
PyDoc_STRVAR(M_Geometry_intersect_point_quad_2d_doc,
|
||||
".. function:: intersect_point_quad_2d(pt, quad_p1, quad_p2, quad_p3, quad_p4)\n"
|
||||
"\n"
|
||||
" Takes 5 vectors (using only the x and y coordinates): one is the point and the next 4 define the quad, only the x and y are used from the vectors. Returns 1 if the point is within the quad, otherwise 0.\n"
|
||||
" Takes 5 vectors (using only the x and y coordinates): one is the point and the next 4 define the quad, \n"
|
||||
" only the x and y are used from the vectors. Returns 1 if the point is within the quad, otherwise 0.\n"
|
||||
"\n"
|
||||
" :arg pt: Point\n"
|
||||
" :type pt: :class:`mathutils.Vector`\n"
|
||||
|
||||
@@ -720,7 +720,7 @@ PyDoc_STRVAR(M_Noise_voronoi_doc,
|
||||
" :arg exponent: The exponent for Minkovsky distance metric.\n"
|
||||
" :type exponent: float\n"
|
||||
" :return: A list of distances to the four closest features and their locations.\n"
|
||||
" :rtype: [list of four floats, list of four :class:`mathutils.Vector`s]\n"
|
||||
" :rtype: list of four floats, list of four :class:`mathutils.Vector`s\n"
|
||||
);
|
||||
static PyObject *M_Noise_voronoi(PyObject *UNUSED(self), PyObject *args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user