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:41:32 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-12 16:41:32 +0300
commit6231a077ac96b546d41404ef423fc23e1fa01803 (patch)
tree8c91217b49506ec6e7db7c48737e5ee6295df395 /source/blender/blenkernel/intern/object_dupli.c
parent1b5e3e1c019e5209b557f6699902d275b9bc67aa (diff)
parenta6585fa4b1a7a4dd4b5ea21efcee36c8460ff5ec (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/blenkernel/BKE_group.h source/blender/blenkernel/BKE_object.h source/blender/blenkernel/intern/group.c source/blender/blenkernel/intern/library_remap.c source/blender/blenkernel/intern/object.c source/blender/blenloader/intern/readfile.c source/blender/editors/object/object_group.c source/blender/editors/object/object_relations.c source/blender/editors/physics/rigidbody_constraint.c source/blender/editors/physics/rigidbody_object.c source/blender/makesrna/intern/rna_group.c
Diffstat (limited to 'source/blender/blenkernel/intern/object_dupli.c')
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 73e7041fda8..57cdfdebcd3 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -540,7 +540,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;
@@ -557,7 +557,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;
@@ -593,7 +593,7 @@ static void make_duplis_font(const DupliContext *ctx)
/* in par the family name is stored, use this to find the other objects */
- BKE_vfont_to_curve_ex(G.main, par, par->data, FO_DUPLI, NULL,
+ BKE_vfont_to_curve_ex(par, par->data, FO_DUPLI, NULL,
&text, &text_len, &text_free, &chartransdata);
if (text == NULL || chartransdata == NULL) {
@@ -614,7 +614,9 @@ 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);
+ /* XXX That G.main is *really* ugly, but not sure what to do here...
+ * Definitively don't think it would be safe to put back Main *bmain pointer in DupliContext as done in 2.7x? */
+ ob = find_family_object(G.main, cu->family, family_len, (unsigned int)text[a], family_gh);
if (ob) {
vec[0] = fsize * (ct->xof - xof);
vec[1] = fsize * (ct->yof - yof);