diff --git a/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 3dad4fcc400..523bb9df935 100644 --- a/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -199,12 +199,14 @@ class _defs_annotate: tool_settings = context.tool_settings if space_type == 'VIEW_3D': - row = layout.row(align=True) + if region_type == 'TOOL_HEADER': + row = layout.row(align=True) + else: + row = layout.row().column(align=True) row.prop(tool_settings, "annotation_stroke_placement_view3d", text="Placement") - if tool_settings.gpencil_stroke_placement_view3d == 'CURSOR': - row.prop(tool_settings.gpencil_sculpt, "lockaxis") - elif tool_settings.gpencil_stroke_placement_view3d in {'SURFACE', 'STROKE'}: - row.prop(tool_settings, "use_gpencil_stroke_endpoints") + if tool_settings.annotation_stroke_placement_view3d in {'SURFACE', 'STROKE'}: + row.prop(tool_settings, "use_annotation_stroke_endpoints") + row.prop(tool_settings, "use_annotation_project_only_selected") elif space_type in {'IMAGE_EDITOR', 'NODE_EDITOR', 'SEQUENCE_EDITOR', 'CLIP_EDITOR'}: row = layout.row(align=True) @@ -1209,6 +1211,7 @@ def curve_draw_settings(context, layout, tool, *, extra=False): row.prop(cps, "depth_mode", expand=True) if cps.depth_mode == 'SURFACE': col = layout.column() + col.prop(cps, "use_project_only_selected") col.prop(cps, "surface_offset") col.prop(cps, "use_offset_absolute") col.prop(cps, "use_stroke_endpoints") diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index f3c16f83def..c650f2c4b3f 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -7955,6 +7955,8 @@ class VIEW3D_PT_gpencil_origin(Panel): row = layout.row() if context.preferences.experimental.use_grease_pencil_version3: row.prop(tool_settings, "gpencil_surface_offset", text="") + row = layout.row() + row.prop(tool_settings, "use_gpencil_project_only_selected") else: row.prop(gpd, "zdepth_offset", text="") diff --git a/source/blender/draw/DRW_engine.hh b/source/blender/draw/DRW_engine.hh index e36725e26b4..177756152a6 100644 --- a/source/blender/draw/DRW_engine.hh +++ b/source/blender/draw/DRW_engine.hh @@ -129,7 +129,8 @@ void DRW_draw_depth_loop(Depsgraph *depsgraph, GPUViewport *viewport, const bool use_gpencil, const bool use_basic, - const bool use_overlay); + const bool use_overlay, + const bool use_only_selected); /** * Clears the Depth Buffer and draws only the specified object. */ diff --git a/source/blender/draw/intern/draw_manager_c.cc b/source/blender/draw/intern/draw_manager_c.cc index 786b4fd09a3..7745ca0ccf9 100644 --- a/source/blender/draw/intern/draw_manager_c.cc +++ b/source/blender/draw/intern/draw_manager_c.cc @@ -2629,7 +2629,8 @@ void DRW_draw_depth_loop(Depsgraph *depsgraph, GPUViewport *viewport, const bool use_gpencil, const bool use_basic, - const bool use_overlay) + const bool use_overlay, + const bool use_only_selected) { using namespace blender::draw; Scene *scene = DEG_get_evaluated_scene(depsgraph); @@ -2712,6 +2713,9 @@ void DRW_draw_depth_loop(Depsgraph *depsgraph, if (!BKE_object_is_visible_in_viewport(v3d, ob)) { continue; } + if (use_only_selected && !(ob->base_flag & BASE_SELECTED)) { + continue; + } DST.dupli_parent = data_.dupli_parent; DST.dupli_source = data_.dupli_object_current; drw_duplidata_load(ob); diff --git a/source/blender/editors/curve/editcurve_paint.cc b/source/blender/editors/curve/editcurve_paint.cc index ec04c0a11be..57ba8c32dc4 100644 --- a/source/blender/editors/curve/editcurve_paint.cc +++ b/source/blender/editors/curve/editcurve_paint.cc @@ -1107,12 +1107,13 @@ static int curve_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event) /* needed or else the draw matrix can be incorrect */ view3d_operator_needs_opengl(C); - ED_view3d_depth_override(cdd->vc.depsgraph, - cdd->vc.region, - cdd->vc.v3d, - nullptr, - V3D_DEPTH_NO_OVERLAYS, - &cdd->depths); + eV3DDepthOverrideMode depth_mode = V3D_DEPTH_NO_OVERLAYS; + if (cps->flag & CURVE_PAINT_FLAG_DEPTH_ONLY_SELECTED) { + depth_mode = V3D_DEPTH_SELECTED_ONLY; + } + + ED_view3d_depth_override( + cdd->vc.depsgraph, cdd->vc.region, cdd->vc.v3d, nullptr, depth_mode, &cdd->depths); if (cdd->depths != nullptr) { cdd->project.use_depth = true; diff --git a/source/blender/editors/curves/intern/curves_draw.cc b/source/blender/editors/curves/intern/curves_draw.cc index d5a4a4a51fc..dbdbff0f2f1 100644 --- a/source/blender/editors/curves/intern/curves_draw.cc +++ b/source/blender/editors/curves/intern/curves_draw.cc @@ -1083,12 +1083,13 @@ static int curves_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event) /* needed or else the draw matrix can be incorrect */ view3d_operator_needs_opengl(C); - ED_view3d_depth_override(cdd->vc.depsgraph, - cdd->vc.region, - cdd->vc.v3d, - nullptr, - V3D_DEPTH_NO_OVERLAYS, - &cdd->depths); + eV3DDepthOverrideMode depth_mode = V3D_DEPTH_NO_OVERLAYS; + if (cps->flag & CURVE_PAINT_FLAG_DEPTH_ONLY_SELECTED) { + depth_mode = V3D_DEPTH_SELECTED_ONLY; + } + + ED_view3d_depth_override( + cdd->vc.depsgraph, cdd->vc.region, cdd->vc.v3d, nullptr, depth_mode, &cdd->depths); if (cdd->depths != nullptr) { cdd->project.use_depth = true; diff --git a/source/blender/editors/gpencil_legacy/annotate_paint.cc b/source/blender/editors/gpencil_legacy/annotate_paint.cc index 83fe9b41ed0..78980c22247 100644 --- a/source/blender/editors/gpencil_legacy/annotate_paint.cc +++ b/source/blender/editors/gpencil_legacy/annotate_paint.cc @@ -651,15 +651,19 @@ static short annotation_stroke_addpoint(tGPsdata *p, if (annotation_project_check(p)) { View3D *v3d = static_cast(p->area->spacedata.first); + eV3DDepthOverrideMode mode = V3D_DEPTH_GPENCIL_ONLY; + + if (ts->annotate_v3d_align & GP_PROJECT_DEPTH_VIEW) { + if (ts->annotate_v3d_align & GP_PROJECT_DEPTH_ONLY_SELECTED) { + mode = V3D_DEPTH_SELECTED_ONLY; + } + else { + mode = V3D_DEPTH_NO_OVERLAYS; + } + } + view3d_region_operator_needs_opengl(p->win, p->region); - ED_view3d_depth_override(p->depsgraph, - p->region, - v3d, - nullptr, - (ts->annotate_v3d_align & GP_PROJECT_DEPTH_STROKE) ? - V3D_DEPTH_GPENCIL_ONLY : - V3D_DEPTH_NO_GPENCIL, - nullptr); + ED_view3d_depth_override(p->depsgraph, p->region, v3d, nullptr, mode, nullptr); } /* convert screen-coordinates to appropriate coordinates (and store them) */ @@ -1679,16 +1683,20 @@ static void annotation_paint_strokeend(tGPsdata *p) if (annotation_project_check(p)) { View3D *v3d = static_cast(p->area->spacedata.first); + eV3DDepthOverrideMode mode = V3D_DEPTH_GPENCIL_ONLY; + + if (ts->annotate_v3d_align & GP_PROJECT_DEPTH_VIEW) { + if (ts->annotate_v3d_align & GP_PROJECT_DEPTH_ONLY_SELECTED) { + mode = V3D_DEPTH_SELECTED_ONLY; + } + else { + mode = V3D_DEPTH_NO_OVERLAYS; + } + } /* need to restore the original projection settings before packing up */ view3d_region_operator_needs_opengl(p->win, p->region); - ED_view3d_depth_override(p->depsgraph, - p->region, - v3d, - nullptr, - (ts->annotate_v3d_align & GP_PROJECT_DEPTH_STROKE) ? - V3D_DEPTH_GPENCIL_ONLY : - V3D_DEPTH_NO_GPENCIL, - is_eraser ? nullptr : &p->depths); + ED_view3d_depth_override( + p->depsgraph, p->region, v3d, nullptr, mode, is_eraser ? nullptr : &p->depths); } /* check if doing eraser or not */ diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_utils.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_utils.cc index 5c4c3274ac3..4e7be72d115 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_utils.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_utils.cc @@ -78,6 +78,9 @@ DrawingPlacement::DrawingPlacement(const Scene &scene, } else if (align_flag & GP_PROJECT_DEPTH_VIEW) { depth_ = DrawingPlacementDepth::Surface; + if (align_flag & GP_PROJECT_DEPTH_ONLY_SELECTED) { + use_project_only_selected_ = true; + } surface_offset_ = scene.toolsettings->gpencil_surface_offset; /* Default to view placement with the object origin if we don't hit a surface. */ placement_loc_ = layer_space_to_world_space_.location(); @@ -130,9 +133,16 @@ bool DrawingPlacement::use_project_to_nearest_stroke() const void DrawingPlacement::cache_viewport_depths(Depsgraph *depsgraph, ARegion *region, View3D *view3d) { - const eV3DDepthOverrideMode mode = (depth_ == DrawingPlacementDepth::Surface) ? - V3D_DEPTH_NO_OVERLAYS : - V3D_DEPTH_GPENCIL_ONLY; + eV3DDepthOverrideMode mode = V3D_DEPTH_GPENCIL_ONLY; + + if (use_project_to_surface()) { + if (use_project_only_selected_) { + mode = V3D_DEPTH_SELECTED_ONLY; + } + else { + mode = V3D_DEPTH_NO_OVERLAYS; + } + } ED_view3d_depth_override(depsgraph, region, view3d, nullptr, mode, &this->depth_cache_); } diff --git a/source/blender/editors/include/ED_grease_pencil.hh b/source/blender/editors/include/ED_grease_pencil.hh index cddbe952d74..440e33d1c6d 100644 --- a/source/blender/editors/include/ED_grease_pencil.hh +++ b/source/blender/editors/include/ED_grease_pencil.hh @@ -87,6 +87,7 @@ class DrawingPlacement { DrawingPlacementDepth depth_; DrawingPlacementPlane plane_; ViewDepths *depth_cache_ = nullptr; + bool use_project_only_selected_ = false; float surface_offset_; float3 placement_loc_; diff --git a/source/blender/editors/include/ED_view3d.hh b/source/blender/editors/include/ED_view3d.hh index 05a7dbd59c9..62e4004f0fe 100644 --- a/source/blender/editors/include/ED_view3d.hh +++ b/source/blender/editors/include/ED_view3d.hh @@ -190,6 +190,8 @@ enum eV3DDepthOverrideMode { V3D_DEPTH_GPENCIL_ONLY, /** Redraw viewport with active object only. */ V3D_DEPTH_OBJECT_ONLY, + /** Redraw viewport with objects from the supplied collection only. */ + V3D_DEPTH_SELECTED_ONLY, }; /** diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc index bba33c2e029..9cd161d4a34 100644 --- a/source/blender/editors/space_view3d/view3d_draw.cc +++ b/source/blender/editors/space_view3d/view3d_draw.cc @@ -2409,19 +2409,28 @@ void ED_view3d_depth_override(Depsgraph *depsgraph, if (viewport != nullptr) { switch (mode) { case V3D_DEPTH_NO_OVERLAYS: - DRW_draw_depth_loop(depsgraph, region, v3d, viewport, false, true, false); + DRW_draw_depth_loop(depsgraph, region, v3d, viewport, false, true, false, false); break; case V3D_DEPTH_NO_GPENCIL: - DRW_draw_depth_loop( - depsgraph, region, v3d, viewport, false, true, (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0); + DRW_draw_depth_loop(depsgraph, + region, + v3d, + viewport, + false, + true, + (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0, + false); break; case V3D_DEPTH_GPENCIL_ONLY: - DRW_draw_depth_loop(depsgraph, region, v3d, viewport, true, false, false); + DRW_draw_depth_loop(depsgraph, region, v3d, viewport, true, false, false, false); break; case V3D_DEPTH_OBJECT_ONLY: DRW_draw_depth_object( scene, region, v3d, viewport, DEG_get_evaluated_object(depsgraph, obact)); break; + case V3D_DEPTH_SELECTED_ONLY: + DRW_draw_depth_loop(depsgraph, region, v3d, viewport, false, true, false, true); + break; } if (r_depths) { diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 41297f59ac3..8190ebafe41 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1432,6 +1432,7 @@ enum { CURVE_PAINT_FLAG_PRESSURE_RADIUS = (1 << 1), CURVE_PAINT_FLAG_DEPTH_STROKE_ENDPOINTS = (1 << 2), CURVE_PAINT_FLAG_DEPTH_STROKE_OFFSET_ABS = (1 << 3), + CURVE_PAINT_FLAG_DEPTH_ONLY_SELECTED = (1 << 4), }; /** #CurvePaintSettings::fit_method */ @@ -2728,6 +2729,9 @@ typedef enum eGPencil_Placement_Flags { GP_PROJECT_DEPTH_STROKE_ENDPOINTS = (1 << 4), GP_PROJECT_CURSOR = (1 << 5), GP_PROJECT_DEPTH_STROKE_FIRST = (1 << 6), + + /** Surface project, "Only project on selected objects". */ + GP_PROJECT_DEPTH_ONLY_SELECTED = (1 << 7), } eGPencil_Placement_Flags; /** #ToolSettings::gpencil_selectmode */ diff --git a/source/blender/makesrna/intern/rna_scene.cc b/source/blender/makesrna/intern/rna_scene.cc index 9ee208390fe..8b4b4deaafe 100644 --- a/source/blender/makesrna/intern/rna_scene.cc +++ b/source/blender/makesrna/intern/rna_scene.cc @@ -3861,13 +3861,6 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Stroke Snap", ""); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, nullptr); - prop = RNA_def_property(srna, "use_gpencil_stroke_endpoints", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna( - prop, nullptr, "gpencil_v3d_align", GP_PROJECT_DEPTH_STROKE_ENDPOINTS); - RNA_def_property_ui_text( - prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping"); - RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, nullptr); - prop = RNA_def_property(srna, "gpencil_surface_offset", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, nullptr, "gpencil_surface_offset"); RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); @@ -3877,6 +3870,14 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 3); RNA_def_property_float_default(prop, 0.150f); + prop = RNA_def_property(srna, "use_gpencil_project_only_selected", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna( + prop, nullptr, "gpencil_v3d_align", GP_PROJECT_DEPTH_ONLY_SELECTED); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); + RNA_def_property_ui_text( + prop, "Project Onto Selected", "Project the strokes only onto selected objects"); + RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, nullptr); + /* Grease Pencil - Select mode Edit */ prop = RNA_def_property(srna, "gpencil_selectmode_edit", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, nullptr, "gpencil_selectmode_edit"); @@ -3985,6 +3986,22 @@ static void rna_def_tool_settings(BlenderRNA *brna) "How annotation strokes are orientated in 3D space"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, nullptr); + prop = RNA_def_property(srna, "use_annotation_stroke_endpoints", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna( + prop, nullptr, "annotate_v3d_align", GP_PROJECT_DEPTH_STROKE_ENDPOINTS); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); + RNA_def_property_ui_text( + prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping"); + RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, nullptr); + + prop = RNA_def_property(srna, "use_annotation_project_only_selected", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna( + prop, nullptr, "annotate_v3d_align", GP_PROJECT_DEPTH_ONLY_SELECTED); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); + RNA_def_property_ui_text( + prop, "Project Onto Selected", "Project the strokes only onto selected objects"); + RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, nullptr); + /* Annotations - Stroke Thickness */ prop = RNA_def_property(srna, "annotation_thickness", PROP_INT, PROP_PIXEL); RNA_def_property_int_sdna(prop, nullptr, "annotate_thickness"); @@ -4365,42 +4382,57 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) }; prop = RNA_def_property(srna, "curve_type", PROP_ENUM, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_enum_sdna(prop, nullptr, "curve_type"); RNA_def_property_enum_items(prop, curve_type_items); RNA_def_property_ui_text(prop, "Type", "Type of curve to use for new strokes"); prop = RNA_def_property(srna, "use_corners_detect", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_boolean_sdna(prop, nullptr, "flag", CURVE_PAINT_FLAG_CORNERS_DETECT); RNA_def_property_ui_text(prop, "Detect Corners", "Detect corners and use non-aligned handles"); prop = RNA_def_property(srna, "use_pressure_radius", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_boolean_sdna(prop, nullptr, "flag", CURVE_PAINT_FLAG_PRESSURE_RADIUS); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); RNA_def_property_ui_text(prop, "Use Pressure", "Map tablet pressure to curve radius"); prop = RNA_def_property(srna, "use_stroke_endpoints", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_boolean_sdna(prop, nullptr, "flag", CURVE_PAINT_FLAG_DEPTH_STROKE_ENDPOINTS); RNA_def_property_ui_text(prop, "Only First", "Use the start of the stroke for the depth"); prop = RNA_def_property(srna, "use_offset_absolute", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_boolean_sdna(prop, nullptr, "flag", CURVE_PAINT_FLAG_DEPTH_STROKE_OFFSET_ABS); RNA_def_property_ui_text( prop, "Absolute Offset", "Apply a fixed offset (don't scale by the radius)"); + prop = RNA_def_property(srna, "use_project_only_selected", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); + RNA_def_property_boolean_sdna(prop, nullptr, "flag", CURVE_PAINT_FLAG_DEPTH_ONLY_SELECTED); + RNA_def_property_ui_text( + prop, "Project Onto Selected", "Project the strokes only onto selected objects"); + prop = RNA_def_property(srna, "error_threshold", PROP_INT, PROP_PIXEL); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_range(prop, 1, 100); RNA_def_property_ui_text(prop, "Tolerance", "Allow deviation for a smoother, less precise line"); prop = RNA_def_property(srna, "fit_method", PROP_ENUM, PROP_PIXEL); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_enum_sdna(prop, nullptr, "fit_method"); RNA_def_property_enum_items(prop, rna_enum_curve_fit_method_items); RNA_def_property_ui_text(prop, "Method", "Curve fitting method"); prop = RNA_def_property(srna, "corner_angle", PROP_FLOAT, PROP_ANGLE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_range(prop, 0, M_PI); RNA_def_property_ui_text(prop, "Corner Angle", "Angles above this are considered corners"); prop = RNA_def_property(srna, "radius_min", PROP_FLOAT, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_range(prop, 0.0f, 10.0, 10, 2); RNA_def_property_ui_text( @@ -4409,6 +4441,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) "Minimum radius when the minimum pressure is applied (also the minimum when tapering)"); prop = RNA_def_property(srna, "radius_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_range(prop, 0.0f, 10.0, 10, 2); RNA_def_property_ui_text( @@ -4417,18 +4450,21 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) "Radius to use when the maximum pressure is applied (or when a tablet isn't used)"); prop = RNA_def_property(srna, "radius_taper_start", PROP_FLOAT, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_range(prop, 0.0, 1.0); RNA_def_property_ui_range(prop, 0.0f, 1.0, 1, 2); RNA_def_property_ui_text( prop, "Radius Min", "Taper factor for the radius of each point along the curve"); prop = RNA_def_property(srna, "radius_taper_end", PROP_FLOAT, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_range(prop, 0.0f, 1.0, 1, 2); RNA_def_property_ui_text( prop, "Radius Max", "Taper factor for the radius of each point along the curve"); prop = RNA_def_property(srna, "surface_offset", PROP_FLOAT, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_range(prop, -10.0, 10.0); RNA_def_property_ui_range(prop, -1.0f, 1.0, 1, 2); RNA_def_property_ui_text(prop, "Offset", "Offset the stroke from the surface"); @@ -4440,6 +4476,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) }; prop = RNA_def_property(srna, "depth_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_enum_sdna(prop, nullptr, "depth_mode"); RNA_def_property_enum_items(prop, depth_mode_items); RNA_def_property_ui_text(prop, "Depth", "Method of projecting depth"); @@ -4464,6 +4501,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna) }; prop = RNA_def_property(srna, "surface_plane", PROP_ENUM, PROP_NONE); + RNA_def_property_flag(prop, PROP_DEG_SYNC_ONLY); RNA_def_property_enum_sdna(prop, nullptr, "surface_plane"); RNA_def_property_enum_items(prop, surface_plane_items); RNA_def_property_ui_text(prop, "Plane", "Plane for projected stroke");