Revision: 38717
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38717
Author: jwilkins
Date: 2011-07-26 04:30:30 +0000 (Tue, 26 Jul 2011)
Log Message:
-----------
long overdue commit
re-factors sculpt.c and paint_stroke.c into many more modules
also, many new features (mostly in paint_stroke.c), to many to go into here
many sculpting features are broken (why I did not wish to commit, but I had to
get over that)
deleted and add (replaced) sculpt.c and paint_stroke.c because the changes were
too extensive to have a clean history
Modified Paths:
--------------
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2011-onion/source/blender/blenkernel/BKE_brush.h
branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h
branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c
branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
branches/soc-2011-onion/source/blender/blenkernel/intern/paint.c
branches/soc-2011-onion/source/blender/blenkernel/intern/scene.c
branches/soc-2011-onion/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2011-onion/source/blender/blenlib/intern/math_vector_inline.c
branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c
branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h
branches/soc-2011-onion/source/blender/editors/interface/resources.c
branches/soc-2011-onion/source/blender/editors/physics/particle_edit.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/CMakeLists.txt
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_intern.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_mask.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt_intern.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt_undo.c
branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-onion/source/blender/makesdna/DNA_brush_types.h
branches/soc-2011-onion/source/blender/makesdna/DNA_scene_types.h
branches/soc-2011-onion/source/blender/makesdna/DNA_userdef_types.h
branches/soc-2011-onion/source/blender/makesrna/intern/rna_brush.c
branches/soc-2011-onion/source/blender/makesrna/intern/rna_main_api.c
branches/soc-2011-onion/source/blender/makesrna/intern/rna_sculpt_paint.c
branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c
branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c
Added Paths:
-----------
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_bspace.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_controls.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_dab.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_hide.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_inline.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_meshcache.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_stroke.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_texcache.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt_tools.c
Removed Paths:
-------------
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
Modified:
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py
2011-07-26 04:17:59 UTC (rev 38716)
+++ branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py
2011-07-26 04:30:30 UTC (rev 38717)
@@ -304,6 +304,20 @@
col.label(text="Playback:")
col.prop(edit, "use_negative_frames")
+ col.separator()
+ col.separator()
+ col.separator()
+ col.label(text="Paint and Sculpt:")
+
+ col.prop(edit, "sculpt_paint_overlay_color", text="Overlay Color")
+ col.prop(edit, "sculpt_paint_mask_color", text="Mask Color")
+
+ col.separator()
+ col.prop(edit, "sculpt_paint_input_samples", text="Stroke Input
Samples")
+
+ col.separator()
+ col.prop(edit, "sculpt_paint_tilt_dead_zone", text="Pen Tilt
Dead-Zone")
+
row.separator()
row.separator()
@@ -339,13 +353,7 @@
row.separator()
col = row.column()
- col.prop(edit, "sculpt_paint_overlay_color", text="Paint/Sculpt
Overlay Color")
- col.prop(edit, "sculpt_paint_mask_color", text="Default Paint/Sculpt
Mask Color")
- col.separator()
- col.separator()
- col.separator()
-
col.label(text="Duplicate Data:")
col.prop(edit, "use_duplicate_mesh", text="Mesh")
col.prop(edit, "use_duplicate_surface", text="Surface")
Modified:
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
---
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
2011-07-26 04:17:59 UTC (rev 38716)
+++
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
2011-07-26 04:30:30 UTC (rev 38717)
@@ -523,7 +523,7 @@
row = col.row(align=True)
- if brush.use_space and brush.sculpt_tool not in {'SMOOTH'}:
+ if brush.use_path_stroke and brush.sculpt_tool not in
{'SMOOTH'}:
if brush.use_space_atten:
row.prop(brush, "use_space_atten", toggle=True,
text="", icon='LOCKED')
else:
@@ -592,7 +592,7 @@
row = col.row()
row.prop(brush, "use_frontface", text="Front-Faces Only")
- row= col.row()
+ row = col.row()
row.active = brush.use_frontface
row.prop(brush, "frontface_angle", text="Angle")
@@ -640,12 +640,9 @@
row.prop(brush, "use_persistent")
row.active = brush.use_layer
row = col.row()
- row.operator("sculpt.set_persistent_base")
+ row.operator("paint.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:
@@ -808,7 +805,7 @@
col.label(text="Angle:")
col = layout.column()
- col.prop(brush, "texture_angle_source_random", text="")
+ col.prop(brush, "tex_angle_source", text="")
col = layout.column()
col.prop(tex_slot, "angle", text="")
@@ -899,88 +896,255 @@
brush = settings.brush
image_paint = context.image_paint_object
+ db = False
+
col = layout.column()
- if context.sculpt_object:
- col.label(text="Stroke Method:")
- col.prop(brush, "stroke_method", text="")
+ col.prop(brush, "stroke_method", text="")
- if brush.use_anchor:
- col.separator()
- row = col.row()
- row.prop(brush, "use_edge_to_edge", "Edge To Edge")
+ # Airbrush
- if brush.use_airbrush:
- col.separator()
- row = col.row()
- row.prop(brush, "rate", text="Rate", slider=True)
+ if db:
+ col.prop(brush, "use_airbrush")
- if brush.use_space:
- col.separator()
- row = col.row()
- row.active = brush.use_space
- row.prop(brush, "spacing", text="Spacing")
- row = col.row()
- row.active = brush.use_space
- row.prop(brush, "use_adaptive_space", text="Adaptive Spacing")
+ if brush.use_airbrush:
+ col.prop(brush, "rate", text="Rate", slider=True)
- if (brush.sculpt_tool not in {'GRAB', 'THUMB', 'SNAKE_HOOK',
'ROTATE'}) and (not brush.use_anchor) and (not brush.use_restore_mesh):
- col = layout.column()
- col.separator()
- col.prop(brush, "use_smooth_stroke")
+ # Path
- sub = col.column()
- sub.active = brush.use_smooth_stroke
+ if db:
+ col.prop(brush, "use_path_stroke", text="Path")
+ col.prop(brush, "use_line", text="Line")
+
+ if brush.use_path_stroke:
+ row = col.row(align=True)
+ row.prop(brush, "spacing", text="Spacing", slider=True)
+ row.prop(brush, "use_pressure_spacing", text="")
+
+
+ # Anchored
+
+ if db:
+ col.prop(brush, "use_anchored_stroke", text="Anchored")
+ col.prop(brush, "use_edge_to_edge", text="Edge-to-edge")
+
+
+ # Restore
+
+ if db:
+ col.prop(brush, "use_restore", text="Restore")
+
+
+ # Mouse
+
+ if not brush.use_anchored_stroke:
+ col.label("Position:")
+ col.prop(brush, "stroke_mouse_method", text="")
+
+ if db:
+ col.prop(brush, "use_smooth_stroke", text="Smooth Stroke")
+
+ if brush.use_smooth_stroke:
+ sub = col.column(align=True)
sub.prop(brush, "smooth_stroke_radius", text="Radius",
slider=True)
- sub.prop(brush, "smooth_stroke_factor", text="Factor",
slider=True)
+ sub.prop(brush, "smooth_stroke_factor", text="Smooth",
slider=True)
- col.separator()
+ if db:
+ col.prop(brush, "use_snap_mouse", text="Snap Mouse")
+ if brush.use_snap_mouse:
+ row = col.row()
+ row.prop(brush, "snap_mouse", text="", slider=False)
+
+ # Mouse Jitter
+ row = col.row(align=True)
+ row.prop(brush, "use_jitter_mouse", text="", icon="RNDCURVE")
+ sub = row.row(align=True)
+ sub.active = brush.use_jitter_mouse
+ sub.prop(brush, "jitter_mouse", text="Jitter", slider=True)
+ sub.prop(brush, "use_pressure_jitter_mouse", text="")
+
+ # One-Way Stroke
+ col.prop(brush, "use_oneway_stroke", text="One-Way Stroke")
+
+
+ # Pressure
+
+ col.label("Pressure:")
+ col.prop(brush, "stroke_pressure_method", text="")
+
+ if db:
+ col.prop(brush, "use_pen_pressure", text="Pen Pressure")
+ col.prop(brush, "use_smooth_pressure", text="Pen Pressure Smooth")
+ col.prop(brush, "use_simulate_pressure", text="Simulate Pressure")
+
+ if brush.use_smooth_pressure:
+ col.prop(brush, "smooth_pressure_factor", text="Smooth",
slider=True)
+
+ #if brush.use_simulate_pressure:
+ # sub = col.column(align=True)
+ # sub.prop(brush, "simulate_pressure_start", text="Start",
slider=True)
+ # sub.prop(brush, "simulate_pressure_fade", text="Fade",
slider=True)
+
+ # Pressure Jitter
+ if brush.use_pen_pressure or brush.use_simulate_pressure:
+ row = col.row(align=True)
+ row.prop(brush, "use_jitter_pressure", text="", icon="RNDCURVE")
+ sub = row.row(align=True)
+ sub.active = brush.use_jitter_pressure
+ sub.prop(brush, "jitter_pressure", "Jitter", slider=True)
+ sub.prop(brush, "use_pressure_jitter_pressure", text="")
+
+
+ # Tilt
+
+ col.label("Tilt:")
+ col.prop(brush, "stroke_tilt_method", text="")
+
+ if db:
+ col.prop(brush, "use_tilt", text="Tilt")
+
+ if brush.use_tilt:
+ # Tilt Smooth
+ row = col.row(align=True)
+ row.prop(brush, "use_smooth_tilt", text="", icon="SMOOTHCURVE")
+ sub = row.row(align=True)
+ sub.active = brush.use_smooth_tilt
+ sub.prop(brush, "smooth_tilt_factor", text="Smooth", slider=True)
+
+ # Tilt Snap
+ row = col.row(align=True)
+ row.prop(brush, "use_snap_tilt", text="")
+ sub = row.row(align=True)
+ sub.active = brush.use_snap_tilt
+ sub.prop(brush, "snap_tilt", text="Snap", slider=False)
+
+ # Tilt Jitter
+ row = col.row(align=True)
+ row.prop(brush, "use_jitter_tilt", text="", icon="RNDCURVE")
+ sub = row.row(align=True)
+ sub.active = brush.use_jitter_tilt
+ sub.prop(brush, "jitter_tilt", "Jitter", slider=True)
+ sub.prop(brush, "use_pressure_jitter_tilt", text="")
+
+
+ # Rake
+
+ if not brush.use_anchored_stroke:
+ col.label("Rake:")
+ col.prop(brush, "stroke_rake_method", text="")
+
+ if db:
+ col.prop(brush, "use_rake", text="Rake")
+
+ if brush.use_rake:
+ if not brush.use_smooth_stroke:
+ col.prop(brush, "rake_dead_zone", "Dead-Zone",
slider=False)
+
+ # Rake Smooth
row = col.row(align=True)
- row.prop(brush, "jitter", slider=True)
- row.prop(brush, "use_pressure_jitter", toggle=True, text="")
+ row.prop(brush, "use_smooth_rake", text="", icon="SMOOTHCURVE")
+ sub = row.row(align=True)
+ sub.active = brush.use_smooth_rake
+ sub.prop(brush, "smooth_rake_factor", text="Smooth",
slider=True)
- else:
- row = col.row()
- row.prop(brush, "use_airbrush")
+ # Rake Snap
+ row = col.row(align=True)
+ row.prop(brush, "use_snap_rake", text="")
+ sub = row.row(align=True)
@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs