forked from bartvdbraak/blender
Change to text3d: When back or front is enabled, the bevel rim on the other side is not created anymore, just as the back/front filling faces are not created when disabled.
when both are off the behavior is unchanged. This is needed when rendering alpha text so its possible to have a single layer of faces but use the bevel option to make text thicker. adding a rim on the back when back is disabled also doesnt make much sense IMHO. minor python edits too.
This commit is contained in:
parent
fe958e647f
commit
8e3a9634a3
@ -53,7 +53,7 @@ blender_version = blender_version.split("Build")[0]
|
|||||||
|
|
||||||
date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
|
date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
|
||||||
|
|
||||||
filepath = __file__.replace(".py", "")
|
filepath = os.path.splitext(__file__)[0] + ".1"
|
||||||
|
|
||||||
file = open(filepath, "w")
|
file = open(filepath, "w")
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ def get_console(console_id):
|
|||||||
stderr = io.StringIO()
|
stderr = io.StringIO()
|
||||||
else:
|
else:
|
||||||
namespace = {'__builtins__': __builtins__, 'bpy': bpy}
|
namespace = {'__builtins__': __builtins__, 'bpy': bpy}
|
||||||
console = InteractiveConsole(namespace)
|
console = InteractiveConsole(locals=namespace, filename="<blender_console>")
|
||||||
|
|
||||||
import io
|
import io
|
||||||
stdout = io.StringIO()
|
stdout = io.StringIO()
|
||||||
|
@ -1318,7 +1318,9 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
|
|||||||
short dnr;
|
short dnr;
|
||||||
|
|
||||||
/* bevel now in three parts, for proper vertex normals */
|
/* bevel now in three parts, for proper vertex normals */
|
||||||
/* part 1 */
|
/* part 1, back */
|
||||||
|
|
||||||
|
if((cu->flag & CU_BACK) || !(cu->flag & CU_FRONT)) {
|
||||||
dnr= nr= 2+ cu->bevresol;
|
dnr= nr= 2+ cu->bevresol;
|
||||||
if( (cu->flag & (CU_FRONT|CU_BACK))==0)
|
if( (cu->flag & (CU_FRONT|CU_BACK))==0)
|
||||||
nr= 3+ 2*cu->bevresol;
|
nr= 3+ 2*cu->bevresol;
|
||||||
@ -1343,6 +1345,7 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
|
|||||||
angle+= dangle;
|
angle+= dangle;
|
||||||
fp+= 3;
|
fp+= 3;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* part 2, sidefaces */
|
/* part 2, sidefaces */
|
||||||
if(cu->ext1!=0.0) {
|
if(cu->ext1!=0.0) {
|
||||||
@ -1374,7 +1377,8 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* part 3 */
|
/* part 3, front */
|
||||||
|
if((cu->flag & CU_FRONT) || !(cu->flag & CU_BACK)) {
|
||||||
dnr= nr= 2+ cu->bevresol;
|
dnr= nr= 2+ cu->bevresol;
|
||||||
if( (cu->flag & (CU_FRONT|CU_BACK))==0)
|
if( (cu->flag & (CU_FRONT|CU_BACK))==0)
|
||||||
nr= 3+ 2*cu->bevresol;
|
nr= 3+ 2*cu->bevresol;
|
||||||
@ -1400,6 +1404,7 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
|
|||||||
fp+= 3;
|
fp+= 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cu_isectLL(float *v1, float *v2, float *v3, float *v4, short cox, short coy, float *labda, float *mu, float *vec)
|
static int cu_isectLL(float *v1, float *v2, float *v3, float *v4, short cox, short coy, float *labda, float *mu, float *vec)
|
||||||
|
@ -18,7 +18,8 @@ if "Cube" in bpy.data.meshes:
|
|||||||
|
|
||||||
|
|
||||||
# write images into a file next to the blend
|
# write images into a file next to the blend
|
||||||
file = open(bpy.data.filepath.replace(".blend", ".txt"), 'w')
|
import os
|
||||||
|
file = open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w')
|
||||||
|
|
||||||
for image in bpy.data.images:
|
for image in bpy.data.images:
|
||||||
file.write("%s %dx%d\n" % (image.filepath, image.size[0], image.size[1]))
|
file.write("%s %dx%d\n" % (image.filepath, image.size[0], image.size[1]))
|
||||||
|
Loading…
Reference in New Issue
Block a user