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/font.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/font.c')
-rw-r--r--source/blender/blenkernel/intern/font.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index f7ab5415d1c..29767efa71f 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -153,7 +153,7 @@ static PackedFile *get_builtin_packedfile(void)
}
}
-static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
+static VFontData *vfont_get_data(VFont *vfont)
{
if (vfont == NULL) {
return NULL;
@@ -188,10 +188,10 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
}
}
else {
- pf = newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
+ pf = newPackedFile(NULL, vfont->name, ID_BLEND_PATH_FROM_GLOBAL(&vfont->id));
if (vfont->temp_pf == NULL) {
- vfont->temp_pf = newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
+ vfont->temp_pf = newPackedFile(NULL, vfont->name, ID_BLEND_PATH_FROM_GLOBAL(&vfont->id));
}
}
if (!pf) {
@@ -349,13 +349,13 @@ VFont *BKE_vfont_builtin_get(void)
{
VFont *vfont;
- for (vfont = G.main->vfont.first; vfont; vfont = vfont->id.next) {
+ for (vfont = G_MAIN->vfont.first; vfont; vfont = vfont->id.next) {
if (BKE_vfont_is_builtin(vfont)) {
return vfont;
}
}
- return BKE_vfont_load(G.main, FO_BUILTIN_NAME);
+ return BKE_vfont_load(G_MAIN, FO_BUILTIN_NAME);
}
static VChar *find_vfont_char(VFontData *vfd, unsigned int character)
@@ -423,7 +423,7 @@ static void build_underline(Curve *cu, ListBase *nubase, const rctf *rect,
mul_v2_fl(bp[3].vec, cu->fsize);
}
-static void buildchar(Main *bmain, Curve *cu, ListBase *nubase, unsigned int character, CharInfo *info,
+static void buildchar(Curve *cu, ListBase *nubase, unsigned int character, CharInfo *info,
float ofsx, float ofsy, float rot, int charidx)
{
BezTriple *bezt1, *bezt2;
@@ -433,7 +433,7 @@ static void buildchar(Main *bmain, Curve *cu, ListBase *nubase, unsigned int cha
VChar *che = NULL;
int i;
- vfd = vfont_get_data(bmain, which_vfont(cu, info));
+ vfd = vfont_get_data(which_vfont(cu, info));
if (!vfd) return;
#if 0
@@ -635,7 +635,7 @@ struct TempLineInfo {
int wspace_nr; /* number of whitespaces of line */
};
-bool BKE_vfont_to_curve_ex(Main *bmain, Object *ob, Curve *cu, int mode, ListBase *r_nubase,
+bool BKE_vfont_to_curve_ex(Object *ob, Curve *cu, int mode, ListBase *r_nubase,
const wchar_t **r_text, int *r_text_len, bool *r_text_free,
struct CharTrans **r_chartransdata)
{
@@ -677,7 +677,7 @@ bool BKE_vfont_to_curve_ex(Main *bmain, Object *ob, Curve *cu, int mode, ListBas
if (cu->str == NULL) return ok;
if (vfont == NULL) return ok;
- vfd = vfont_get_data(bmain, vfont);
+ vfd = vfont_get_data(vfont);
/* The VFont Data can not be found */
if (!vfd) return ok;
@@ -770,7 +770,7 @@ makebreak:
if (vfont == NULL) break;
if (vfont != oldvfont) {
- vfd = vfont_get_data(bmain, vfont);
+ vfd = vfont_get_data(vfont);
oldvfont = vfont;
}
@@ -1274,7 +1274,7 @@ makebreak:
}
/* We do not want to see any character for \n or \r */
if (cha != '\n')
- buildchar(bmain, cu, r_nubase, cha, info, ct->xof, ct->yof, ct->rot, i);
+ buildchar(cu, r_nubase, cha, info, ct->xof, ct->yof, ct->rot, i);
if ((info->flag & CU_CHINFO_UNDERLINE) && (cha != '\n')) {
float ulwidth, uloverlap = 0.0f;
@@ -1340,19 +1340,19 @@ finally:
}
-bool BKE_vfont_to_curve_nubase(Main *bmain, Object *ob, int mode, ListBase *r_nubase)
+bool BKE_vfont_to_curve_nubase(Object *ob, int mode, ListBase *r_nubase)
{
BLI_assert(ob->type == OB_FONT);
- return BKE_vfont_to_curve_ex(bmain, ob, ob->data, mode, r_nubase,
+ return BKE_vfont_to_curve_ex(ob, ob->data, mode, r_nubase,
NULL, NULL, NULL, NULL);
}
-bool BKE_vfont_to_curve(Main *bmain, Object *ob, int mode)
+bool BKE_vfont_to_curve(Object *ob, int mode)
{
Curve *cu = ob->data;
- return BKE_vfont_to_curve_ex(bmain, ob, ob->data, mode, &cu->nurb, NULL, NULL, NULL, NULL);
+ return BKE_vfont_to_curve_ex(ob, ob->data, mode, &cu->nurb, NULL, NULL, NULL, NULL);
}