Blender Git Commit Log
Git Commits -> Revision 6e81e5c
Revision 6e81e5c by Pablo Dobarro (sculpt-mode-features) April 5, 2019, 15:56 (GMT) |
Sculpt vertex colors: Initial implementation This adds a new CustomDataLayer to store per vertex color data in a way that can be used from sculpt mode. This vertex paint mode uses the same brush, pbvh, undo and rendering code as sculpt mode, so it has much better performance. It also enables other features like sculpting and painting at the same time. I also added some extra features that are needed to start testing this paint mode, such as: - New paint brush optimized for painting. It doesn't modify any vertex position data. - Sculpt mode sample color operator that uses the active vertex from the cursor - Remesh reprojection support: sculpt vertex colors are reprojected into the new mesh when using the remesh operator if the mesh has that option enabled. - Store and load sculpt vertex colors into the regular vertex color layers to keep compatibility. - Use the single color display mode to disable sculpt vertex colors in sculpt mode. A lot of decisions needs to be made to integrate this in Blender, so I decided to keep the implementation as unintrusive as possible to start working on the tools. This has the following limitations: - Sculpt and paint at the same time is only enabled in the draw brush. You need to set the Color Mode to Mix in the brush options. - Dyntopo and multires modes and viewport display are broken - Only mix as a color blend mode - No brush texture support - Sculpt and color share the same strength - Limited to one layer per object - No rendering support. You will need to copy the sculpt vertex colors to the old color layers first. All of these issues should be addressed once the main workflow, final UI and behavior are decided. |
Commit Details:
Full Hash: 6e81e5c70952004f6d24f58d2047227f2e73f1e9
Parent Commit: 159bbb7
Lines Changed: +548, -13
25 Modified Paths:
/release/scripts/startup/bl_ui/properties_data_mesh.py (+5, -0) (Diff)
/release/scripts/startup/bl_ui/space_topbar.py (+2, -0) (Diff)
/release/scripts/startup/bl_ui/space_view3d_toolbar.py (+4, -0) (Diff)
/source/blender/blenkernel/BKE_paint.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_pbvh.h (+4, -0) (Diff)
/source/blender/blenkernel/intern/customdata.c (+9, -5) (Diff)
/source/blender/blenkernel/intern/paint.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/pbvh.c (+19, -0) (Diff)
/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl (+7, -0) (Diff)
/source/blender/draw/engines/workbench/shaders/workbench_prepass_vert.glsl (+4, -0) (Diff)
/source/blender/draw/engines/workbench/workbench_materials.c (+6, -0) (Diff)
/source/blender/editors/object/object_edit.c (+173, -0) (Diff)
/source/blender/editors/object/object_intern.h (+2, -0) (Diff)
/source/blender/editors/object/object_ops.c (+2, -0) (Diff)
/source/blender/editors/sculpt_paint/sculpt.c (+153, -2) (Diff)
/source/blender/editors/sculpt_paint/sculpt_intern.h (+3, -0) (Diff)
/source/blender/editors/sculpt_paint/sculpt_undo.c (+75, -1) (Diff)
/source/blender/gpu/GPU_buffers.h (+1, -0) (Diff)
/source/blender/gpu/intern/gpu_buffers.c (+40, -1) (Diff)
/source/blender/makesdna/DNA_brush_types.h (+8, -1) (Diff)
/source/blender/makesdna/DNA_customdata_types.h (+5, -3) (Diff)
/source/blender/makesdna/DNA_meshdata_types.h (+5, -0) (Diff)
/source/blender/makesdna/DNA_mesh_types.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_brush.c (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_mesh.c (+7, -0) (Diff)
/release/scripts/startup/bl_ui/space_topbar.py (+2, -0) (Diff)
/release/scripts/startup/bl_ui/space_view3d_toolbar.py (+4, -0) (Diff)
/source/blender/blenkernel/BKE_paint.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_pbvh.h (+4, -0) (Diff)
/source/blender/blenkernel/intern/customdata.c (+9, -5) (Diff)
/source/blender/blenkernel/intern/paint.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/pbvh.c (+19, -0) (Diff)
/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl (+7, -0) (Diff)
/source/blender/draw/engines/workbench/shaders/workbench_prepass_vert.glsl (+4, -0) (Diff)
/source/blender/draw/engines/workbench/workbench_materials.c (+6, -0) (Diff)
/source/blender/editors/object/object_edit.c (+173, -0) (Diff)
/source/blender/editors/object/object_intern.h (+2, -0) (Diff)
/source/blender/editors/object/object_ops.c (+2, -0) (Diff)
/source/blender/editors/sculpt_paint/sculpt.c (+153, -2) (Diff)
/source/blender/editors/sculpt_paint/sculpt_intern.h (+3, -0) (Diff)
/source/blender/editors/sculpt_paint/sculpt_undo.c (+75, -1) (Diff)
/source/blender/gpu/GPU_buffers.h (+1, -0) (Diff)
/source/blender/gpu/intern/gpu_buffers.c (+40, -1) (Diff)
/source/blender/makesdna/DNA_brush_types.h (+8, -1) (Diff)
/source/blender/makesdna/DNA_customdata_types.h (+5, -3) (Diff)
/source/blender/makesdna/DNA_meshdata_types.h (+5, -0) (Diff)
/source/blender/makesdna/DNA_mesh_types.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_brush.c (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_mesh.c (+7, -0) (Diff)