[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36993] branches/soc-2010-jwilkins: * Symmetry Feather option was not appearing
Jason Wilkins
Jason.A.Wilkins at gmail.com
Sun May 29 07:22:18 CEST 2011
Revision: 36993
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36993
Author: jwilkins
Date: 2011-05-29 05:22:17 +0000 (Sun, 29 May 2011)
Log Message:
-----------
* Symmetry Feather option was not appearing
* Moved symmetry feather option to brush area of UI because it is a per-brush option
* Trunk has 'height' and my branch has 'layer_distance', height is way too generic and hard to search for, renamed this to 'layer_limit'
* Made layer limit and persistent base greyed-out if Layer is disabled
* Was getting warnings about gl_TexCoord being deprecated in GLSL version 1.30, so for now it is just gonna use the 1.00 version.
Why warn about deprecation when I explicitly asked for a version that still supports a feature? If I say 1.3, and 1.3 supports gl_TexCoord, then there is no problem with me using it. Kindly stfu compiler.
Deprecation makes people stupid...</rant>
XXX: not sure what persistent base does or if it even still works in my branch.
Modified Paths:
--------------
branches/soc-2010-jwilkins/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2010-jwilkins/source/blender/blenloader/intern/readfile.c
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h
branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_draw.c
Modified: branches/soc-2010-jwilkins/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2011-05-29 04:15:35 UTC (rev 36992)
+++ branches/soc-2010-jwilkins/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2011-05-29 05:22:17 UTC (rev 36993)
@@ -586,10 +586,6 @@
row.active = brush.use_plane_trim
row.prop(brush, "plane_trim", slider=True, text="Distance")
- if brush.sculpt_tool == 'LAYER':
- row = col.row()
- row.prop(brush, "height", slider=True, text="Height")
-
col.separator()
row = col.row()
@@ -609,13 +605,19 @@
if brush.sculpt_tool not in ('LAYER', 'GRAB', 'ROTATE', 'THUMB', 'SMOOTH'):
col.separator()
- col.prop(brush, "use_layer")
+ col.prop(brush, "use_layer", "Layer")
+ else:
+ col.separator()
+ col.label("Layer:")
+
if brush.sculpt_tool in ('LAYER'):
col.separator()
if brush.sculpt_tool not in ('GRAB', 'ROTATE', 'THUMB', 'SMOOTH'):
- col.prop(brush, "layer_distance")
+ row = col.row()
+ row.prop(brush, "layer_limit", "Limit")
+ row.active = brush.use_layer
ob = context.sculpt_object
do_persistent = True
@@ -626,9 +628,16 @@
do_persistent = False
if do_persistent:
- col.prop(brush, "use_persistent")
- col.operator("sculpt.set_persistent_base")
+ row = col.row()
+ row.prop(brush, "use_persistent")
+ row.active = brush.use_layer
+ row = col.row()
+ row.operator("sculpt.set_persistent_base")
+ row.active = brush.use_layer
+ col.separator()
+ col.prop(brush, "use_symmetry_feather", text="Symmetry Feather")
+
# Texture Paint Mode #
elif context.image_paint_object and brush:
@@ -991,10 +1000,6 @@
split.prop(sculpt, "radial_symmetry", text="Radial")
- layout.separator()
-
- layout.prop(brush, "use_symmetry_feather", text="Feather")
-
class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
bl_label = "Appearance"
bl_options = {'DEFAULT_CLOSED'}
Modified: branches/soc-2010-jwilkins/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/blenloader/intern/readfile.c 2011-05-29 04:15:35 UTC (rev 36992)
+++ branches/soc-2010-jwilkins/source/blender/blenloader/intern/readfile.c 2011-05-29 05:22:17 UTC (rev 36993)
@@ -11330,9 +11330,11 @@
if (brush->frontface_angle== 0)
brush->frontface_angle= (float)(M_PI_2 * 80.0/90.0);
- if (brush->height== 0)
- brush->height= 0.25f;
+ /* Sanity Check for Brushes 2.57 */
+ if (brush->layer_limit == 0)
+ brush->layer_limit= 0.25f;
+
if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) {
brush->flag |= BRUSH_SPACE_ATTEN; // explicitly enable adaptive strength
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2011-05-29 04:15:35 UTC (rev 36992)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2011-05-29 05:22:17 UTC (rev 36993)
@@ -3056,9 +3056,9 @@
sub_v3_v3v3(disp, val, base);
len= len_v3(disp);
- if (len > ss->cache->radius*brush->layer_distance) {
+ if (len > ss->cache->radius*brush->layer_limit) {
normalize_v3(disp);
- mul_v3_fl(disp, ss->cache->radius*brush->layer_distance);
+ mul_v3_fl(disp, ss->cache->radius*brush->layer_limit);
add_v3_v3v3(val, disp, base);
}
}
Modified: branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h 2011-05-29 04:15:35 UTC (rev 36992)
+++ branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h 2011-05-29 05:22:17 UTC (rev 36993)
@@ -97,9 +97,8 @@
float gravity_factor;
float plane_trim;
- float height; /* affectable height of brush (layer height for layer tool, i.e.) */
- float layer_distance, pad2;
+ float layer_limit;
float texture_sample_bias;
int texture_overlay_alpha;
Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c 2011-05-29 04:15:35 UTC (rev 36992)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c 2011-05-29 05:22:17 UTC (rev 36993)
@@ -542,13 +542,6 @@
RNA_def_property_ui_text(prop, "Plane Trim", "If a vertex is further from offset plane than this then it is not affected");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "height");
- RNA_def_property_float_default(prop, 0.5f);
- RNA_def_property_range(prop, 0, 1.0f);
- RNA_def_property_ui_text(prop, "Brush Height", "Affectable height of brush (layer height for layer tool, i.e.)");
- RNA_def_property_update(prop, 0, "rna_Brush_update");
-
prop= RNA_def_property(srna, "texture_sample_bias", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "texture_sample_bias");
RNA_def_property_float_default(prop, 0);
@@ -601,8 +594,8 @@
RNA_def_property_ui_text(prop, "Front-Face Angle", "Angle where effect of brush starts to be reduced to prevent it affecting back-faces");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "layer_distance", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "layer_distance");
+ prop= RNA_def_property(srna, "layer_limit", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "layer_limit");
RNA_def_property_float_default(prop, 0);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 0.001);
Modified: branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_draw.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_draw.c 2011-05-29 04:15:35 UTC (rev 36992)
+++ branches/soc-2010-jwilkins/source/blender/windowmanager/intern/wm_draw.c 2011-05-29 05:22:17 UTC (rev 36993)
@@ -681,7 +681,7 @@
triple->depth_fragment_shader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
- if (major == 1 && minor < 30) {
+ //if (major == 1 && minor < 30) {
if (GLEW_ARB_texture_rectangle) {
source = depth_fragment_shader_rect_source_100;
source_lines = sizeof(depth_fragment_shader_rect_source_100)/sizeof(GLcharARB*);
@@ -690,17 +690,17 @@
source = depth_fragment_shader_source_100;
source_lines = sizeof(depth_fragment_shader_source_100)/sizeof(GLcharARB*);
}
- }
- else {
- if (GLEW_ARB_texture_rectangle) {
- source = depth_fragment_shader_rect_source_130;
- source_lines = sizeof(depth_fragment_shader_rect_source_130)/sizeof(GLcharARB*);
- }
- else {
- source = depth_fragment_shader_source_130;
- source_lines = sizeof(depth_fragment_shader_source_130)/sizeof(GLcharARB*);
- }
- }
+ //}
+ //else {
+ // if (GLEW_ARB_texture_rectangle) {
+ // source = depth_fragment_shader_rect_source_130;
+ // source_lines = sizeof(depth_fragment_shader_rect_source_130)/sizeof(GLcharARB*);
+ // }
+ // else {
+ // source = depth_fragment_shader_source_130;
+ // source_lines = sizeof(depth_fragment_shader_source_130)/sizeof(GLcharARB*);
+ // }
+ //}
glShaderSourceARB(triple->depth_fragment_shader, source_lines, source, NULL);
glCompileShaderARB(triple->depth_fragment_shader);
More information about the Bf-blender-cvs
mailing list