Cleanup: get rid of last G.main's in bpy area.

Essentially 'validating' them as G_MAIN, and adding some asserts in
dubious places, that handled IDs are actually in G_MAIN.
This commit is contained in:
2018-06-22 11:37:47 +02:00
parent 1870a1adc7
commit cbf5c738d6
9 changed files with 21 additions and 14 deletions

View File

@@ -185,7 +185,7 @@ PyObject *bpy_text_import_name(const char *name, int *found)
Text *text;
char txtname[MAX_ID_NAME - 2];
int namelen = strlen(name);
//XXX Main *maggie = bpy_import_main ? bpy_import_main:G.main;
//XXX Main *maggie = bpy_import_main ? bpy_import_main : G_MAIN;
Main *maggie = bpy_import_main;
*found = 0;
@@ -234,7 +234,7 @@ PyObject *bpy_text_reimport(PyObject *module, int *found)
Text *text;
const char *name;
const char *filepath;
//XXX Main *maggie = bpy_import_main ? bpy_import_main:G.main;
//XXX Main *maggie = bpy_import_main ? bpy_import_main : G_MAIN;
Main *maggie = bpy_import_main;
if (!maggie) {