Merged changes in the trunk up to revision 48227.
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/editors/space_file/filelist.c
This commit is contained in:
@@ -370,7 +370,7 @@ static PyObject *bpy_bm_utils_edge_rotate(PyObject *UNUSED(self), PyObject *args
|
||||
PyDoc_STRVAR(bpy_bm_utils_face_split_doc,
|
||||
".. method:: face_split(face, vert_a, vert_b, coords=(), use_exist=True, example=None)\n"
|
||||
"\n"
|
||||
" Split an edge, return the newly created data.\n"
|
||||
" Face split with optional intermediate points.\n"
|
||||
"\n"
|
||||
" :arg face: The face to cut.\n"
|
||||
" :type face: :class:`bmesh.types.BMFace`\n"
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "BKE_main.h"
|
||||
|
||||
static Main *bpy_import_main = NULL;
|
||||
static ListBase bpy_import_main_list;
|
||||
|
||||
/* 'builtins' is most likely PyEval_GetBuiltins() */
|
||||
void bpy_import_init(PyObject *builtins)
|
||||
@@ -92,6 +93,16 @@ void bpy_import_main_set(struct Main *maggie)
|
||||
bpy_import_main = maggie;
|
||||
}
|
||||
|
||||
void bpy_import_main_extra_add(struct Main *maggie)
|
||||
{
|
||||
BLI_addhead(&bpy_import_main_list, maggie);
|
||||
}
|
||||
|
||||
void bpy_import_main_extra_remove(struct Main *maggie)
|
||||
{
|
||||
BLI_remlink_safe(&bpy_import_main_list, 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)
|
||||
{
|
||||
@@ -150,6 +161,18 @@ PyObject *bpy_text_import_name(const char *name, int *found)
|
||||
|
||||
text = BLI_findstring(&maggie->text, txtname, offsetof(ID, name) + 2);
|
||||
|
||||
if (text) {
|
||||
*found = 1;
|
||||
return bpy_text_import(text);
|
||||
}
|
||||
|
||||
/* If we still haven't found the module try additional modules form bpy_import_main_list */
|
||||
maggie = bpy_import_main_list.first;
|
||||
while (maggie && !text) {
|
||||
text = BLI_findstring(&maggie->text, txtname, offsetof(ID, name) + 2);
|
||||
maggie = maggie->next;
|
||||
}
|
||||
|
||||
if (!text)
|
||||
return NULL;
|
||||
else
|
||||
|
||||
@@ -62,4 +62,8 @@ extern PyMethodDef bpy_reload_meth;
|
||||
struct Main *bpy_import_main_get(void);
|
||||
void bpy_import_main_set(struct Main *maggie);
|
||||
|
||||
/* This is used for importing text from dynamically loaded libraries in the game engine */
|
||||
void bpy_import_main_extra_add(struct Main *maggie);
|
||||
void bpy_import_main_extra_remove(struct Main *maggie);
|
||||
|
||||
#endif /* __BPY_INTERNAL_IMPORT_H__ */
|
||||
|
||||
@@ -1874,7 +1874,7 @@ static PyObject *Vector_richcmpr(PyObject *objectA, PyObject *objectB, int compa
|
||||
{
|
||||
VectorObject *vecA = NULL, *vecB = NULL;
|
||||
int result = 0;
|
||||
double epsilon = .000001f;
|
||||
double epsilon = 0.000001f;
|
||||
double lenA, lenB;
|
||||
|
||||
if (!VectorObject_Check(objectA) || !VectorObject_Check(objectB)) {
|
||||
|
||||
Reference in New Issue
Block a user