[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30293] branches/render25: svn merge https ://svn.blender.org/svnroot/bf-blender/trunk/blender -r30286:30292
Campbell Barton
ideasman42 at gmail.com
Wed Jul 14 09:04:56 CEST 2010
Revision: 30293
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30293
Author: campbellbarton
Date: 2010-07-14 09:04:56 +0200 (Wed, 14 Jul 2010)
Log Message:
-----------
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30286:30292
Modified Paths:
--------------
branches/render25/doc/blender.1.py
branches/render25/release/scripts/modules/rna_info.py
branches/render25/release/scripts/op/presets.py
branches/render25/release/scripts/ui/properties_data_armature.py
branches/render25/release/scripts/ui/properties_data_curve.py
branches/render25/release/scripts/ui/space_view3d.py
branches/render25/source/blender/blenkernel/intern/font.c
branches/render25/source/blender/editors/armature/armature_intern.h
branches/render25/source/blender/editors/armature/armature_ops.c
branches/render25/source/blender/editors/armature/poseobject.c
branches/render25/source/blender/editors/curve/curve_ops.c
branches/render25/source/blender/editors/curve/editfont.c
branches/render25/source/blender/gpu/gpu_buffers.h
branches/render25/source/blender/gpu/intern/gpu_draw.c
branches/render25/source/blender/makesdna/DNA_curve_types.h
branches/render25/source/blender/makesrna/intern/rna_curve.c
Modified: branches/render25/doc/blender.1.py
===================================================================
--- branches/render25/doc/blender.1.py 2010-07-14 06:27:31 UTC (rev 30292)
+++ branches/render25/doc/blender.1.py 2010-07-14 07:04:56 UTC (rev 30293)
@@ -31,12 +31,12 @@
data = data.replace("-", "\\-")
data = data.replace("\t", " ")
# data = data.replace("$", "\\fI")
-
+
data_ls = []
for w in data.split():
if w.startswith("$"):
w = "\\fI" + w[1:] + "\\fR"
-
+
data_ls.append(w)
data = data[:len(data) - len(data.lstrip())] + " ".join(data_ls)
@@ -90,16 +90,16 @@
while lines:
l = lines.pop(0)
if l.startswith("Environment Variables:"):
- fw('.SH "ENVIRONMENT VARIABLES"\n')
+ fw('.SH "ENVIRONMENT VARIABLES"\n')
elif l.endswith(":"): # one line
- fw('.SS "%s"\n\n' % l)
+ fw('.SS "%s"\n\n' % l)
elif l.startswith("-") or l.startswith("/"): # can be multi line
fw('.TP\n')
fw('.B %s\n' % man_format(l))
-
+
while lines:
- # line with no
+ # line with no
if lines[0].strip() and len(lines[0].lstrip()) == len(lines[0]): # no white space
break
@@ -112,7 +112,7 @@
l = l[1:] # remove first whitespace (tab)
fw('%s\n' % man_format(l))
-
+
else:
if not l.strip():
fw('.br\n')
Modified: branches/render25/release/scripts/modules/rna_info.py
===================================================================
--- branches/render25/release/scripts/modules/rna_info.py 2010-07-14 06:27:31 UTC (rev 30292)
+++ branches/render25/release/scripts/modules/rna_info.py 2010-07-14 07:04:56 UTC (rev 30293)
@@ -631,6 +631,8 @@
props = [(prop.identifier, prop) for prop in v.properties]
for prop_id, prop in sorted(props):
+ if prop.type == 'boolean':
+ continue
data += "%s.%s -> %s: %s%s %s\n" % (struct_id_str, prop.identifier, prop.identifier, prop.type, ", (read-only)" if prop.is_readonly else "", prop.description)
if bpy.app.background:
Modified: branches/render25/release/scripts/op/presets.py
===================================================================
--- branches/render25/release/scripts/op/presets.py 2010-07-14 06:27:31 UTC (rev 30292)
+++ branches/render25/release/scripts/op/presets.py 2010-07-14 07:04:56 UTC (rev 30293)
@@ -27,8 +27,8 @@
subclasses must define
- preset_values
- preset_subdir '''
- bl_idname = "script.add_preset_base"
- bl_label = "Add a Python Preset"
+ # bl_idname = "script.preset_base_add"
+ # bl_label = "Add a Python Preset"
name = bpy.props.StringProperty(name="Name", description="Name of the preset, used to make the path name", maxlen=64, default="")
Modified: branches/render25/release/scripts/ui/properties_data_armature.py
===================================================================
--- branches/render25/release/scripts/ui/properties_data_armature.py 2010-07-14 06:27:31 UTC (rev 30292)
+++ branches/render25/release/scripts/ui/properties_data_armature.py 2010-07-14 07:04:56 UTC (rev 30293)
@@ -160,15 +160,18 @@
col = split.column()
col.template_triColorSet(group, "colors")
- row = layout.row(align=True)
+ row = layout.row()
row.active = (ob.proxy is None)
- row.operator("pose.group_assign", text="Assign")
- row.operator("pose.group_unassign", text="Remove") #row.operator("pose.bone_group_remove_from", text="Remove")
- #row.operator("object.bone_group_select", text="Select")
- #row.operator("object.bone_group_deselect", text="Deselect")
+ sub = row.row(align=True)
+ sub.operator("pose.group_assign", text="Assign")
+ sub.operator("pose.group_unassign", text="Remove") #row.operator("pose.bone_group_remove_from", text="Remove")
+ sub = row.row(align=True)
+ sub.operator("pose.group_select", text="Select")
+ sub.operator("pose.group_deselect", text="Deselect")
+
# TODO: this panel will soon be depreceated too
Modified: branches/render25/release/scripts/ui/properties_data_curve.py
===================================================================
--- branches/render25/release/scripts/ui/properties_data_curve.py 2010-07-14 06:27:31 UTC (rev 30292)
+++ branches/render25/release/scripts/ui/properties_data_curve.py 2010-07-14 07:04:56 UTC (rev 30293)
@@ -313,8 +313,6 @@
colsub.label(text="Underline:")
colsub.prop(text, "ul_position", text="Position")
colsub.prop(text, "ul_height", text="Thickness")
- col.label(text="")
- col.prop(text, "small_caps_scale", text="Small Caps")
if wide_ui:
col = split.column()
@@ -322,9 +320,13 @@
col.prop(char, "bold")
col.prop(char, "italic")
col.prop(char, "underline")
+
+ split = layout.split()
+ col = split.column()
+ col.prop(text, "small_caps_scale", text="Small Caps")
+
+ col = split.column()
col.prop(char, "use_small_caps")
-# col.prop(char, "style")
-# col.prop(char, "wrap")
class DATA_PT_paragraph(DataButtonsPanel):
Modified: branches/render25/release/scripts/ui/space_view3d.py
===================================================================
--- branches/render25/release/scripts/ui/space_view3d.py 2010-07-14 06:27:31 UTC (rev 30292)
+++ branches/render25/release/scripts/ui/space_view3d.py 2010-07-14 07:04:56 UTC (rev 30293)
@@ -1707,7 +1707,14 @@
layout.menu("VIEW3D_MT_edit_text_chars")
+ layout.separator()
+
+ layout.operator("font.style_toggle", text="Toggle Bold").style = 'BOLD'
+ layout.operator("font.style_toggle", text="Toggle Italic").style = 'ITALIC'
+ layout.operator("font.style_toggle", text="Toggle Underline").style = 'UNDERLINE'
+ layout.operator("font.style_toggle", text="Toggle Small Caps").style = 'SMALL_CAPS'
+
class VIEW3D_MT_edit_text_chars(bpy.types.Menu):
bl_label = "Special Characters"
Modified: branches/render25/source/blender/blenkernel/intern/font.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/font.c 2010-07-14 06:27:31 UTC (rev 30292)
+++ branches/render25/source/blender/blenkernel/intern/font.c 2010-07-14 07:04:56 UTC (rev 30293)
@@ -427,12 +427,12 @@
static VFont *which_vfont(Curve *cu, CharInfo *info)
{
- switch(info->flag & CU_STYLE) {
- case CU_BOLD:
+ switch(info->flag & (CU_CHINFO_BOLD|CU_CHINFO_ITALIC)) {
+ case CU_CHINFO_BOLD:
if (cu->vfontb) return(cu->vfontb); else return(cu->vfont);
- case CU_ITALIC:
+ case CU_CHINFO_ITALIC:
if (cu->vfonti) return(cu->vfonti); else return(cu->vfont);
- case (CU_BOLD|CU_ITALIC):
+ case (CU_CHINFO_BOLD|CU_CHINFO_ITALIC):
if (cu->vfontbi) return(cu->vfontbi); else return(cu->vfont);
default:
return(cu->vfont);
@@ -450,6 +450,17 @@
return load_vfont("<builtin>");
}
+static VChar *find_vfont_char(VFontData *vfd, intptr_t character)
+{
+ VChar *che= NULL;
+
+ for(che = vfd->characters.first; che; che = che->next) {
+ if(che->index == character)
+ break;
+ }
+ return che; /* NULL if not found */
+}
+
static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, int charidx, short mat_nr)
{
Nurb *nu2;
@@ -524,14 +535,7 @@
si= (float)sin(rot);
co= (float)cos(rot);
- // Find the correct character from the font
- che = vfd->characters.first;
- while(che)
- {
- if(che->index == character)
- break;
- che = che->next;
- }
+ che= find_vfont_char(vfd, character);
// Select the glyph data
if(che)
@@ -598,7 +602,7 @@
}
bezt2 = nu2->bezt;
- if(info->flag & CU_SMALLCAPS) {
+ if(info->flag & CU_CHINFO_SMALLCAPS_CHECK) {
const float sca= cu->smallcaps_scale;
for (i= nu2->pntsu; i > 0; i--) {
fp= bezt2->vec[0];
@@ -656,7 +660,7 @@
if(che == NULL) {
return 0.0f;
}
- else if(info->flag & CU_SMALLCAPS) {
+ else if(info->flag & CU_CHINFO_SMALLCAPS_CHECK) {
return che->width * cu->smallcaps_scale;
}
else {
@@ -745,7 +749,7 @@
oldvfont = NULL;
- for (i=0; i<slen; i++) custrinfo[i].flag &= ~CU_WRAP;
+ for (i=0; i<slen; i++) custrinfo[i].flag &= ~(CU_CHINFO_WRAP|CU_CHINFO_SMALLCAPS_CHECK);
if (cu->selboxes) MEM_freeN(cu->selboxes);
cu->selboxes = NULL;
@@ -760,27 +764,20 @@
che = vfd->characters.first;
info = &(custrinfo[i]);
ascii = mem[i];
- if(info->flag & CU_SMALLCAPS) {
+ if(info->flag & CU_CHINFO_SMALLCAPS) {
ascii = towupper(ascii);
if(mem[i] != ascii) {
mem[i]= ascii;
+ info->flag |= CU_CHINFO_SMALLCAPS_CHECK;
}
- else {
- info->flag &= ~CU_SMALLCAPS; /* could have a different way to not scale caps */
- }
}
vfont = which_vfont(cu, info);
if(vfont==NULL) break;
-
- // Find the character
- while(che) {
- if(che->index == ascii)
- break;
- che = che->next;
- }
+ che= find_vfont_char(vfd, ascii);
+
/*
* The character wasn't in the current curve base so load it
* But if the font is <builtin> then do not try loading since
@@ -791,12 +788,7 @@
}
/* Try getting the character again from the list */
- che = vfd->characters.first;
- while(che) {
- if(che->index == ascii)
- break;
- che = che->next;
- }
+ che= find_vfont_char(vfd, ascii);
/* No VFont found */
if (vfont==0) {
@@ -833,13 +825,13 @@
i = j-1;
xof = ct->xof;
ct[1].dobreak = 1;
- custrinfo[i+1].flag |= CU_WRAP;
+ custrinfo[i+1].flag |= CU_CHINFO_WRAP;
goto makebreak;
}
if (chartransdata[j].dobreak) {
// fprintf(stderr, "word too long: %c%c%c...\n", mem[j], mem[j+1], mem[j+2]);
ct->dobreak= 1;
- custrinfo[i+1].flag |= CU_WRAP;
+ custrinfo[i+1].flag |= CU_CHINFO_WRAP;
ct -= 1;
cnr -= 1;
i--;
@@ -1047,14 +1039,8 @@
/* rotate around center character */
ascii = mem[i];
-
- // Find the character
- che = vfd->characters.first;
- while(che) {
- if(che->index == ascii)
- break;
- che = che->next;
- }
+
+ che= find_vfont_char(vfd, ascii);
twidth = char_width(cu, che, info);
@@ -1180,22 +1166,17 @@
if(cha != '\n' && cha != '\r')
buildchar(cu, cha, info, ct->xof, ct->yof, ct->rot, i);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list