[Bf-blender-cvs] [2aa347b64e8] sculpt-dev: Merge remote-tracking branch 'origin' into sculpt-dev
Joseph Eagar
noreply at git.blender.org
Thu Oct 6 05:02:07 CEST 2022
Commit: 2aa347b64e8c5fc39881e86aa066ac5385b3629f
Author: Joseph Eagar
Date: Wed Oct 5 13:06:06 2022 -0700
Branches: sculpt-dev
https://developer.blender.org/rB2aa347b64e8c5fc39881e86aa066ac5385b3629f
Merge remote-tracking branch 'origin' into sculpt-dev
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3e2223b8745,3357676bf2f..b00ac1e9629
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@@ -1372,129 -962,53 +1372,137 @@@ class VIEW3D_PT_sculpt_options(Panel, V
col = layout.column(heading="Display", align=True)
col.prop(sculpt, "show_low_resolution")
col.prop(sculpt, "use_sculpt_delay_updates")
+ col.prop(sculpt, "use_fast_draw")
col.prop(sculpt, "use_deform_only")
-
+ col.prop(sculpt, "show_sculpt_pivot")
+ col.prop(context.object.data, "sculpt_ignore_uvs")
+
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "smooth_strength_factor", ui_editing=False, slider=True, show_mappings=True)
+
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "smooth_strength_projection", ui_editing=False, slider=True, show_mappings=True)
+
+ """
+ smoothbrush = None
+
+ for ts in sculpt.tool_slots:
+ if ts.brush and ts.brush.sculpt_tool == "SMOOTH":
+ smoothbrush = ts.brush
+ break
+
+ if smoothbrush:
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ smoothbrush,
+ "dyntopo_disabled", ui_editing=False, text="Disable Dyntopo For Smooth")
+ """
+
col.separator()
-
- col = layout.column(heading="Auto-Masking", align=True)
-
+ col.prop(sculpt, "use_automasking_topology", text="Topology")
+ col.prop(sculpt, "use_automasking_face_sets", text="Face Sets")
+ col.prop(sculpt, "use_automasking_boundary_edges", text="Mesh Boundary")
+ col.prop(sculpt, "use_automasking_boundary_face_sets", text="Face Sets Boundary")
+ col.prop(sculpt, "use_automasking_cavity", text="Cavity")
+ col.prop(sculpt, "use_automasking_cavity_inverted", text="Cavity (Inverted)")
+ col.prop(sculpt, "use_automasking_start_normal", text="Area Normal")
+ col.prop(sculpt, "use_automasking_view_normal", text="View Normal")
- if sculpt.use_automasking_start_normal:
- col.separator()
-
- col.prop(sculpt, "automasking_start_normal_limit")
- col.prop(sculpt, "automasking_start_normal_falloff")
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "show_origco",
+ toolsettings_only=True, ui_editing=False)
- if sculpt.use_automasking_view_normal:
- col.separator()
-
- col.prop(sculpt, "use_automasking_view_occlusion", text="Occlusion")
- col.prop(sculpt, "automasking_view_normal_limit")
- col.prop(sculpt, "automasking_view_normal_falloff")
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "save_temp_layers",
+ toolsettings_only=True, ui_editing=False)
col.separator()
- col.prop(sculpt.brush, "automasking_boundary_edges_propagation_steps")
- if sculpt.use_automasking_cavity or sculpt.use_automasking_cavity_inverted:
- col.separator()
+ col.operator("sculpt.set_limit_surface")
- col2 = col.column()
- props = col2.operator("sculpt.mask_from_cavity", text="Mask From Cavity")
- props.use_automask_settings = True
- col2 = col.column()
+# TODO, move to space_view3d.py
+class VIEW3D_PT_sculpt_automasking(Panel, View3DPaintPanel):
+ bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
+ bl_label = "Automasking"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_ui_units_x = 12
- col2.prop(sculpt, "automasking_cavity_factor", text="Cavity Factor")
- col2.prop(sculpt, "automasking_cavity_blur_steps", text="Cavity Blur")
+ @classmethod
+ def poll(cls, context):
+ return (context.sculpt_object and context.tool_settings.sculpt)
- col2.prop(sculpt, "use_automasking_custom_cavity_curve", text="Use Curve")
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
- if sculpt.use_automasking_custom_cavity_curve:
- col2.template_curve_mapping(sculpt, "automasking_cavity_curve")
+ tool_settings = context.tool_settings
+ sculpt = tool_settings.sculpt
+ brush = sculpt.brush
+
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "automasking", toolsettings_only=True, expand=True,
+ ui_editing=False, text="Automasking (global)")
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "automasking_boundary_edges_propagation_steps",
+ ui_editing=False)
+
+ if "CONCAVITY" in sculpt.channels["automasking"].value:
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "concave_mask_factor",
+ ui_editing=False, slider=True, show_mappings=True)
+
+ enable_orig_normal = False
+
+ if "BRUSH_NORMAL" in sculpt.channels["automasking"].value:
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "automasking_start_normal_limit",
+ ui_editing=False, slider=True, show_mappings=True)
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "automasking_start_normal_falloff",
+ ui_editing=False, slider=True, show_mappings=True)
+ enable_orig_normal = True
+
+ if "VIEW_NORMAL" in sculpt.channels["automasking"].value:
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "automasking_view_normal_limit",
+ ui_editing=False, slider=True, show_mappings=True)
+ UnifiedPaintPanel.channel_unified(layout.column(),
+ context,
+ brush,
+ "automasking_view_normal_falloff",
+ ui_editing=False, slider=True, show_mappings=True)
+ enable_orig_normal = True
+
+ sub = layout.row()
+ sub.enabled = enable_orig_normal
+
+ UnifiedPaintPanel.channel_unified(sub,
+ context,
+ brush,
+ "automasking_use_original_normal",
+ ui_editing=False, show_mappings=False)
class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel):
diff --cc source/blender/blenkernel/BKE_paint.h
index ccd53c9b1b4,5312292d431..a83df6163e5
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@@ -434,27 -369,13 +434,39 @@@ typedef struct SculptClothSimulation
float damping;
float softbody_strength;
+ // cache some values here to avoid
+ // brush channel lookups inside of inner loops
+ float sim_limit;
+ int simulation_area_type;
+ float sim_falloff;
+
float (*acceleration)[3];
+
float (*pos)[3];
float (*init_pos)[3];
- float (*init_no)[3];
float (*softbody_pos)[3];
+
+ /* Position anchors for deformation brushes. These positions are modified by the brush and the
+ * final positions of the simulated vertices are updated with constraints that use these points
+ * as targets. */
+ float (*deformation_pos)[3];
+ float *deformation_strength;
+
++ /*
++ float mass;
++ float damping;
++ float softbody_strength;
++
++ float (*acceleration)[3];
++ float (*pos)[3];
++ float (*init_pos)[3];
++ float (*init_no)[3];
++ float (*softbody_pos)[3];
++ */
++
float (*prev_pos)[3];
float (*last_iteration_pos)[3];
+ float (*init_normal)[3];
struct ListBase *collider_list;
diff --cc source/blender/blenkernel/BKE_pbvh.h
index ade78185c48,467a7c7f306..4f0079b1840
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@@ -411,8 -266,7 +411,9 @@@ void BKE_pbvh_build_grids(PBVH *pbvh
void **gridfaces,
struct DMFlagMat *flagmats,
unsigned int **grid_hidden,
+ bool fast_draw,
- float *face_areas);
++ float *face_areas,
+ struct Mesh *me);
/**
* Build a PBVH from a BMesh.
*/
diff --cc source/blender/blenkernel/CMakeLists.txt
index e68f54505da,d0e2d945c2f..ca3f383daa0
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@@ -133,9 -124,8 +133,9 @@@ set(SR
intern/deform.c
intern/displist.cc
intern/dynamicpaint.c
+ intern/dyntopo.c
intern/editlattice.c
- intern/editmesh.c
+ intern/editmesh.cc
intern/editmesh_bvh.c
intern/editmesh_cache.cc
intern/editmesh_tangent.cc
diff --cc source/blender/blenkernel/intern/object_update.cc
index 2469b841a8a,5328d956cee..faa6dda6434
--- a/source/blender/blenkernel/intern/object_update.cc
+++ b/source/blender/blenkernel/intern/object_update.cc
@@@ -263,11 -263,10 +263,12 @@@ void BKE_object_sync_to_original(Depsgr
object_orig->transflag = object->transflag;
object_orig->flag = object->flag;
+ // object_orig->cached_pbvh2 = object->cached_pbvh2;
+
/* Copy back error messages from modifiers. */
- for (ModifierData *md = object->modifiers.first, *md_orig = object_orig->modifiers.first;
- md != NULL && md_orig != NULL;
+ for (ModifierData *md = static_cast<ModifierData *>(object->modifiers.first),
+ *md_orig = static_cast<ModifierData *>(object_orig->modifiers.first);
+ md != nullptr && md_orig !=
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list