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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-12 16:16:45 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-12 16:16:45 +0300
commita6585fa4b1a7a4dd4b5ea21efcee36c8460ff5ec (patch)
tree1767ffcbd73592950909c2c0cdb3816700453553 /source/blender/blenkernel/intern/object_dupli.c
parentd617a6c85b4874a81d86568d00b56f2bda11c4b4 (diff)
Cleanup: moar removal of G.main in BKE area...
Diffstat (limited to 'source/blender/blenkernel/intern/object_dupli.c')
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 97d2280c021..4201bf3d3fb 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -581,7 +581,7 @@ static const DupliGenerator gen_dupli_verts = {
};
/* OB_DUPLIVERTS - FONT */
-static Object *find_family_object(const char *family, size_t family_len, unsigned int ch, GHash *family_gh)
+static Object *find_family_object(Main *bmain, const char *family, size_t family_len, unsigned int ch, GHash *family_gh)
{
Object **ob_pt;
Object *ob;
@@ -598,7 +598,7 @@ static Object *find_family_object(const char *family, size_t family_len, unsigne
ch_utf8[ch_utf8_len] = '\0';
ch_utf8_len += 1; /* compare with null terminator */
- for (ob = G.main->object.first; ob; ob = ob->id.next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
if (STREQLEN(ob->id.name + 2 + family_len, ch_utf8, ch_utf8_len)) {
if (STREQLEN(ob->id.name + 2, family, family_len)) {
break;
@@ -655,7 +655,7 @@ static void make_duplis_font(const DupliContext *ctx)
/* advance matching BLI_strncpy_wchar_from_utf8 */
for (a = 0; a < text_len; a++, ct++) {
- ob = find_family_object(cu->family, family_len, (unsigned int)text[a], family_gh);
+ ob = find_family_object(ctx->bmain, cu->family, family_len, (unsigned int)text[a], family_gh);
if (ob) {
vec[0] = fsize * (ct->xof - xof);
vec[1] = fsize * (ct->yof - yof);