From 7e60e7a1858cca497bf355d80b448a32a1a69363 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Sun, 2 Feb 2020 20:14:33 +0100 Subject: UI: Re-organize Sculpt Symmetrize controls Currently the UI for Symmetrize is confusing, for a few reasons: - It exists as a sub-panel to the Dyntopo panel, even though it doesn't require Dyntopo to work - It is inside a panel called Remesh, which is confusing because we now have a different Remesh panel Changes: - Put the Symmetrize controls in the Symmetry panel - Rename Optimize to Rebuild BVH and move to the Sculpt menu - Change the poll function - apparently it doesn't require Dyntopo Differential Revision: https://developer.blender.org/D6735 Reviewed by Pablo Dobarro --- release/scripts/startup/bl_ui/space_view3d.py | 4 +++ .../scripts/startup/bl_ui/space_view3d_toolbar.py | 38 ++++++---------------- 2 files changed, 14 insertions(+), 28 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 3a3869068b0..6ca6cb7b544 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2937,6 +2937,10 @@ class VIEW3D_MT_sculpt(Menu): layout.menu("VIEW3D_MT_sculpt_set_pivot", text="Set Pivot") + layout.separator() + + layout.operator("sculpt.optimize") + class VIEW3D_MT_mask(Menu): bl_label = "Mask" diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 19d5e3da309..ff1392d9126 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -810,38 +810,14 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): sub.prop(sculpt, "detail_refine_method", text="Refine Method") sub.prop(sculpt, "detail_type_method", text="Detailing") + if sculpt.detail_type_method in {'CONSTANT', 'MANUAL'}: + col.operator("sculpt.detail_flood_fill") + col.prop(sculpt, "use_smooth_shading") -class VIEW3D_PT_sculpt_dyntopo_remesh(Panel, View3DPaintPanel): - bl_context = ".sculpt_mode" # dot on purpose (access from topbar) - bl_label = "Remesh" - bl_parent_id = "VIEW3D_PT_sculpt_dyntopo" - bl_options = {'DEFAULT_CLOSED'} - bl_ui_units_x = 12 - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False - - tool_settings = context.tool_settings - sculpt = tool_settings.sculpt - col = layout.column() - col.active = context.sculpt_object.use_dynamic_topology_sculpting - - col.prop(sculpt, "symmetrize_direction") - - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - - col = flow.column() - col.operator("sculpt.symmetrize") - col = flow.column() - col.operator("sculpt.optimize") - if sculpt.detail_type_method in {'CONSTANT', 'MANUAL'}: - col = flow.column() - col.operator("sculpt.detail_flood_fill") class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel): @@ -990,6 +966,13 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel): layout.column().prop(sculpt, "radial_symmetry", text="Radial") layout.column().prop(sculpt, "tile_offset", text="Tile Offset") + layout.separator() + + col = layout.column() + + col.prop(sculpt, "symmetrize_direction") + col.operator("sculpt.symmetrize") + class VIEW3D_PT_sculpt_symmetry_for_topbar(Panel): bl_space_type = 'TOPBAR' @@ -1908,7 +1891,6 @@ classes = ( VIEW3D_PT_tools_brush_display, VIEW3D_PT_sculpt_dyntopo, - VIEW3D_PT_sculpt_dyntopo_remesh, VIEW3D_PT_sculpt_voxel_remesh, VIEW3D_PT_sculpt_symmetry, VIEW3D_PT_sculpt_symmetry_for_topbar, -- cgit v1.2.3 From 7bbbb9ba8a139b96fe9484e05d3db43fb5ad0a18 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Mon, 3 Feb 2020 11:55:29 +0100 Subject: Displace Modifier add invert vgroup option Adds the invert vertex weights option to the Displace modifier. Adds a flag and char padding to the Displace modifier DNA for the invert group boolean. Differential Revision: https://developer.blender.org/D6686 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 197566f16f3..ae450f17e09 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -381,7 +381,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.label(text="Space:") col.prop(md, "space", text="") col.label(text="Vertex Group:") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') col = split.column(align=True) col.active = has_texture -- cgit v1.2.3 From 808fa22a7ad8f954bda35dd07776154a24b884fe Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Mon, 3 Feb 2020 12:01:13 +0100 Subject: Warp Modifier add invert vgroup option Adds the invert vertex weights option to the Warp Modifier. Setup in the same way as the other modifiers. Uses the existing flag char that is labeled unused. Differential Revision: https://developer.blender.org/D6720 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index ae450f17e09..021a4600a73 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1139,7 +1139,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.label(text="To:") col.prop(md, "object_to", text="") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') col = layout.column() -- cgit v1.2.3 From fdb68e184714f480c87c13c3c34480e9adfe4620 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 3 Feb 2020 22:35:39 -0500 Subject: Fix: UI: Spelling and Capitalization --- release/scripts/startup/bl_ui/properties_physics_cloth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index d9713cb8608..0bf667482c4 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -230,7 +230,7 @@ class PHYSICS_PT_cloth_pressure(PhysicButtonsPanel, Panel): col.prop(cloth, "uniform_pressure_force") col = flow.column() - col.prop(cloth, "use_pressure_volume", text="Custom volume") + col.prop(cloth, "use_pressure_volume", text="Custom Volume") col = flow.column() col.active = cloth.use_pressure_volume -- cgit v1.2.3 From 937eff4112dab15b13e901517a37a857050d3d78 Mon Sep 17 00:00:00 2001 From: Simon G Date: Tue, 4 Feb 2020 17:53:04 +0100 Subject: Cleanup: remove duplicated bl_parent_id in brush mask panel Differential Revision: https://developer.blender.org/D6718 --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index ff1392d9126..c074069af06 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1185,7 +1185,6 @@ class VIEW3D_PT_tools_imagepaint_options(View3DPaintPanel, Panel): class VIEW3D_PT_tools_imagepaint_options_cavity(View3DPaintPanel, Panel): bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "Cavity Mask" - bl_parent_id = "VIEW3D_PT_tools_imagepaint_options" bl_parent_id = "VIEW3D_PT_mask" bl_options = {'DEFAULT_CLOSED'} -- cgit v1.2.3 From 0bedf9cf07c66f4f6ddbdcfb47001bb29cb2389e Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 3 Feb 2020 12:49:09 +0100 Subject: Fix T58842: Add-ons Import/Export entries disapear when enabling Filter Addons option This removes the 'use_owner' option feature from rB61c8ed40f5df. (this wasnt working well when addons are enabled and when switching workspaces) Now Addon filtering is just bypassed for Import/Export menus. (by introducing/setting bl_owner_use_filter = False) Maniphest Tasks: T58842 Differential Revision: https://developer.blender.org/D6740 --- release/scripts/startup/bl_ui/properties_workspace.py | 2 -- release/scripts/startup/bl_ui/space_topbar.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_workspace.py b/release/scripts/startup/bl_ui/properties_workspace.py index 322cdee0922..8af30b5c002 100644 --- a/release/scripts/startup/bl_ui/properties_workspace.py +++ b/release/scripts/startup/bl_ui/properties_workspace.py @@ -77,8 +77,6 @@ class WORKSPACE_PT_addons(WorkSpaceButtonsPanel, Panel): if module is None: continue info = addon_utils.module_bl_info(module) - if not info["use_owner"]: - continue is_enabled = module_name in owner_ids row = col.row() row.alignment = 'LEFT' diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index fd46bd53cd2..192b239ac03 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -452,6 +452,7 @@ class TOPBAR_MT_templates_more(Menu): class TOPBAR_MT_file_import(Menu): bl_idname = "TOPBAR_MT_file_import" bl_label = "Import" + bl_owner_use_filter = False def draw(self, _context): if bpy.app.build_options.collada: @@ -464,6 +465,7 @@ class TOPBAR_MT_file_import(Menu): class TOPBAR_MT_file_export(Menu): bl_idname = "TOPBAR_MT_file_export" bl_label = "Export" + bl_owner_use_filter = False def draw(self, context): if bpy.app.build_options.collada: -- cgit v1.2.3 From db0121a0099836113e7babe7f006e99e4f6ed69f Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 5 Feb 2020 11:08:15 +0100 Subject: Fix T73580: Gpencil crash when try to draw without eraser brush available --- release/scripts/startup/bl_ui/properties_paint_common.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 93bf5eca052..8b4f86b2879 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -996,6 +996,8 @@ def brush_basic_texpaint_settings(layout, context, brush, *, compact=False): def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False): gp_settings = brush.gpencil_settings tool = context.workspace.tools.from_space_view3d_mode(context.mode, create=False) + if gp_settings is None: + return # Brush details if brush.gpencil_tool == 'ERASE': -- cgit v1.2.3 From efa2ffaa2d2763391bf3a67fd6fc99bd1bfd2bc4 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Thu, 6 Feb 2020 11:18:41 +0100 Subject: Lattice Modifier add invert vgroup option Adds the invert vertex group option to the Lattice modifier. Adds a short flag and modifies the existing char padding for the correct amount. Adds a .invert_vgroup to the LatticeDeformUserdata. Passes the flag into the lattice_deform_verts function where the weights around found and used. For the other calls of lattice_deform_verts function they pass in NULL for the flag in the same way they pass NULL for the vgroup name. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6747 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 021a4600a73..330f05205fc 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -532,7 +532,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.label(text="Vertex Group:") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') layout.separator() layout.prop(md, "strength", slider=True) -- cgit v1.2.3 From 8768cd6a6a98a710ed2b6d8b257c43dd0e6e58ee Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Thu, 6 Feb 2020 11:46:41 +0100 Subject: Curve Modifier add invert vgroup option Adds the invert vertex group option to the Curve modifier. Adds a short flag and char pad to the Curve modifier DNA. Passes the flag into the curve_deform_verts function as the weight values are found there and not in the modifiers .c file. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6746 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 330f05205fc..a8b9de409c2 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -316,7 +316,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "object", text="") col = split.column() col.label(text="Vertex Group:") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') layout.label(text="Deformation Axis:") layout.row().prop(md, "deform_axis", expand=True) -- cgit v1.2.3 From dd00e8ecd642cafc6294ec7f0f31c5e0e0fe9870 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Thu, 6 Feb 2020 11:52:24 +0100 Subject: Smooth Modifier add invert vgroup option Adds the invert vertex group option to the smooth modifier. Setup same way as previous modifiers. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6745 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index a8b9de409c2..b91c7f71843 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -969,7 +969,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "factor") col.prop(md, "iterations") col.label(text="Vertex Group:") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') def SOFT_BODY(self, layout, _ob, _md): layout.label(text="Settings are inside the Physics tab") -- cgit v1.2.3 From ae112a38ab8d5b6cb7fe8e9209aa7e0e0209a6db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Thu, 6 Feb 2020 15:59:10 +0100 Subject: Fluid: Removed UI locks for cache file types Caches that haven't been baked yet should not be locked. --- .../scripts/startup/bl_ui/properties_physics_fluid.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 28c9895f53b..2a918f0c58b 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -680,7 +680,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): domain = context.fluid.domain_settings # Deactivate UI if guides are enabled but not baked yet. - layout.active = domain.use_noise and not self.check_domain_has_unbaked_guide(domain) + layout.enabled = domain.use_noise and not self.check_domain_has_unbaked_guide(domain) is_baking_any = domain.is_cache_baking_any has_baked_noise = domain.has_cache_baked_noise @@ -746,7 +746,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): domain = context.fluid.domain_settings # Deactivate UI if guides are enabled but not baked yet. - layout.active = domain.use_mesh and not self.check_domain_has_unbaked_guide(domain) + layout.enabled = domain.use_mesh and not self.check_domain_has_unbaked_guide(domain) is_baking_any = domain.is_cache_baking_any has_baked_mesh = domain.has_cache_baked_mesh @@ -818,7 +818,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): domain = context.fluid.domain_settings # Deactivate UI if guides are enabled but not baked yet. - layout.active = not self.check_domain_has_unbaked_guide(domain) + layout.enabled = not self.check_domain_has_unbaked_guide(domain) is_baking_any = domain.is_cache_baking_any has_baked_particles = domain.has_cache_baked_particles @@ -1072,7 +1072,10 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): domain = context.fluid.domain_settings is_baking_any = domain.is_cache_baking_any - has_baked_any = domain.has_cache_baked_any + has_baked_data = domain.has_cache_baked_data + has_baked_noise = domain.has_cache_baked_noise + has_baked_mesh = domain.has_cache_baked_mesh + has_baked_particles = domain.has_cache_baked_particles col = layout.column() col.prop(domain, "cache_directory", text="") @@ -1096,18 +1099,24 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): col.separator() col = flow.column() - col.enabled = not is_baking_any and not has_baked_any + col.enabled = not is_baking_any and not has_baked_data col.prop(domain, "cache_data_format", text="Data File Format") if md.domain_settings.domain_type in {'GAS'}: if domain.use_noise: + col = flow.column() + col.enabled = not is_baking_any and not has_baked_noise col.prop(domain, "cache_noise_format", text="Noise File Format") if md.domain_settings.domain_type in {'LIQUID'}: # File format for all particle systemes (FLIP and secondary) + col = flow.column() + col.enabled = not is_baking_any and not has_baked_particles col.prop(domain, "cache_particle_format", text="Particle File Format") if domain.use_mesh: + col = flow.column() + col.enabled = not is_baking_any and not has_baked_mesh col.prop(domain, "cache_mesh_format", text="Mesh File Format") if domain.cache_type == 'FINAL': -- cgit v1.2.3 From ffb94e88b0857e8262f9e026444b327dddffa8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Thu, 6 Feb 2020 19:06:07 +0100 Subject: Fluid: Hide Advanced cache options The Manta script export should not be visible in the UI. At least not to normal users. The export feature is only useful for developers. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 2a918f0c58b..cdd6a31aeda 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -1141,7 +1141,8 @@ class PHYSICS_PT_export(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): - if not PhysicButtonsPanel.poll_fluid_domain(context): + # Only show the advanced panel to advanced users who know Mantaflow's birthday :) + if not PhysicButtonsPanel.poll_fluid_domain(context) or bpy.app.debug_value != 3001: return False return (context.engine in cls.COMPAT_ENGINES) -- cgit v1.2.3 From a5a9493ffdc5c964ddd9cfc2ae344dfef3db3dc2 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 8 Feb 2020 17:19:34 -0500 Subject: UI: Cleanup Liquid Settings Code Style This makes the code more consitent with the rest of blender The `fractions_threshold` was changed to be active than enabled which is also more consistent. This needs to be changed in other areas also. --- .../startup/bl_ui/properties_physics_fluid.py | 41 ++++++++++------------ 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index cdd6a31aeda..de99d282f9f 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -445,32 +445,27 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): is_baking_any = domain.is_cache_baking_any has_baked_data = domain.has_cache_baked_data + layout.enabled = not is_baking_any and not has_baked_data flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) col = flow.column() - col0 = col.column() - col0.enabled = not is_baking_any and not has_baked_data - col0.prop(domain, "simulation_method", expand=False) - col0.prop(domain, "flip_ratio", text="FLIP Ratio") - col0.prop(domain, "particle_radius", text="Particle Radius") - - col1 = flow.column(align=True) - col1.enabled = not is_baking_any and not has_baked_data - col1.prop(domain, "particle_max", text="Particles Maximum") - col1.prop(domain, "particle_min", text="Minimum") - - col1 = flow.column() - col1.enabled = not is_baking_any and not has_baked_data - col1.prop(domain, "particle_number", text="Particle Sampling") - col1.prop(domain, "particle_band_width", text="Narrow Band Width") - col1.prop(domain, "particle_randomness", text="Particle Randomness") - - col2 = flow.column() - col2.enabled = not is_baking_any and not has_baked_data - col2.prop(domain, "use_fractions", text="Fractional Obstacles") - col3 = col2.column() - col3.enabled = domain.use_fractions and col2.enabled - col3.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") + col.prop(domain, "simulation_method", expand=False) + col.prop(domain, "flip_ratio", text="FLIP Ratio") + col.prop(domain, "particle_radius", text="Particle Radius") + + col = flow.column() + col.prop(domain, "particle_max", text="Particles Maximum") + col.prop(domain, "particle_min", text="Minimum") + + col = flow.column() + col.prop(domain, "particle_number", text="Particle Sampling") + col.prop(domain, "particle_band_width", text="Narrow Band Width") + col.prop(domain, "particle_randomness", text="Particle Randomness") + + col = flow.column() + col.prop(domain, "use_fractions", text="Fractional Obstacles") + col.active = domain.use_fractions + col.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): -- cgit v1.2.3 From 86e24ea10cba05dcb48eccc026530edab14dfe01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Sun, 9 Feb 2020 17:15:41 +0100 Subject: Fluid: Fixes for fluid guiding Fluid guiding functionality was broken in the bake / read cache loop in fluid.c. Committing this to the release branch as otherwise fluid guiding would not have worked as expected (i.e. not at all). --- .../startup/bl_ui/properties_physics_fluid.py | 81 ++++++++++++++++------ 1 file changed, 60 insertions(+), 21 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 2a918f0c58b..807ce5a81b8 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -162,9 +162,6 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): if md.fluid_type == 'DOMAIN': domain = md.domain_settings - # Deactivate UI if guides are enabled but not baked yet. - layout.active = not self.check_domain_has_unbaked_guide(domain) - is_baking_any = domain.is_cache_baking_any has_baked_data = domain.has_cache_baked_data @@ -176,7 +173,9 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): flow.enabled = not is_baking_any and not has_baked_data col = flow.column() + col.enabled = not domain.has_cache_baked_guide col.prop(domain, "resolution_max", text="Resolution Divisions") + col = flow.column() col.prop(domain, "time_scale", text="Time Scale") col.prop(domain, "cfl_condition", text="CFL Number") @@ -201,7 +200,17 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): if domain.cache_type == 'MODULAR': col.separator() + + # Deactivate bake operator if guides are enabled but not baked yet. + note_flag = True + if self.check_domain_has_unbaked_guide(domain) and domain.cache_type == 'MODULAR': + note = layout.split() + note_flag = False + note.enabled = note_flag + note.label(icon='INFO', text="Unbaked Guides: Bake Guides or disable them.") + split = layout.split() + split.enabled = note_flag bake_incomplete = (domain.cache_frame_pause_data < domain.cache_frame_end) if domain.has_cache_baked_data and not domain.is_cache_baking_data and bake_incomplete: @@ -354,10 +363,13 @@ class PHYSICS_PT_smoke_dissolve(PhysicButtonsPanel, Panel): return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): - md = context.fluid - domain = md.domain_settings + md = context.fluid.domain_settings + domain = context.fluid.domain_settings + + is_baking_any = domain.is_cache_baking_any - self.layout.prop(domain, "use_dissolve_smoke", text="") + self.layout.enabled = not is_baking_any + self.layout.prop(md, "use_dissolve_smoke", text="") def draw(self, context): layout = self.layout @@ -433,6 +445,11 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): def draw_header(self, context): md = context.fluid.domain_settings + domain = context.fluid.domain_settings + + is_baking_any = domain.is_cache_baking_any + + self.layout.enabled = not is_baking_any self.layout.prop(md, "use_flip_particles", text="") def draw(self, context): @@ -618,6 +635,12 @@ class PHYSICS_PT_adaptive_domain(PhysicButtonsPanel, Panel): if not PhysicButtonsPanel.poll_gas_domain(context): return False + md = context.fluid + domain = md.domain_settings + # Effector guides require a fixed domain size + if domain.use_guide and domain.guide_source == 'EFFECTOR': + return False + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -678,9 +701,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): layout.use_property_split = True domain = context.fluid.domain_settings - - # Deactivate UI if guides are enabled but not baked yet. - layout.enabled = domain.use_noise and not self.check_domain_has_unbaked_guide(domain) + layout.enabled = domain.use_noise is_baking_any = domain.is_cache_baking_any has_baked_noise = domain.has_cache_baked_noise @@ -701,8 +722,16 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): if domain.cache_type == 'MODULAR': col.separator() + # Deactivate bake operator if data has not been baked yet. + note_flag = True + if domain.use_noise and not domain.has_cache_baked_data and domain.cache_type == 'MODULAR': + note = layout.split() + note_flag = False + note.enabled = note_flag + note.label(icon='INFO', text="Unbaked Data: Bake Data first.") + split = layout.split() - split.enabled = domain.has_cache_baked_data + split.enabled = domain.has_cache_baked_data and note_flag bake_incomplete = (domain.cache_frame_pause_noise < domain.cache_frame_end) if domain.has_cache_baked_noise and not domain.is_cache_baking_noise and bake_incomplete: @@ -744,9 +773,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): layout.use_property_split = True domain = context.fluid.domain_settings - - # Deactivate UI if guides are enabled but not baked yet. - layout.enabled = domain.use_mesh and not self.check_domain_has_unbaked_guide(domain) + layout.enabled = domain.use_mesh is_baking_any = domain.is_cache_baking_any has_baked_mesh = domain.has_cache_baked_mesh @@ -780,8 +807,16 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): if domain.cache_type == 'MODULAR': col.separator() + # Deactivate bake operator if data has not been baked yet. + note_flag = True + if domain.use_mesh and not domain.has_cache_baked_data and domain.cache_type == 'MODULAR': + note = layout.split() + note_flag = False + note.enabled = note_flag + note.label(icon='INFO', text="Unbaked Data: Bake Data first.") + split = layout.split() - split.enabled = domain.has_cache_baked_data + split.enabled = domain.has_cache_baked_data and note_flag bake_incomplete = (domain.cache_frame_pause_mesh < domain.cache_frame_end) if domain.has_cache_baked_mesh and not domain.is_cache_baking_mesh and bake_incomplete: @@ -817,9 +852,6 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): domain = context.fluid.domain_settings - # Deactivate UI if guides are enabled but not baked yet. - layout.enabled = not self.check_domain_has_unbaked_guide(domain) - is_baking_any = domain.is_cache_baking_any has_baked_particles = domain.has_cache_baked_particles using_particles = domain.use_spray_particles or domain.use_foam_particles or domain.use_bubble_particles @@ -887,8 +919,17 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): if domain.cache_type == 'MODULAR': col.separator() + # Deactivate bake operator if data has not been baked yet. + note_flag = True + if using_particles and not domain.has_cache_baked_data and domain.cache_type == 'MODULAR': + note = layout.split() + note_flag = False + note.enabled = note_flag + note.label(icon='INFO', text="Unbaked Data: Bake Data first.") + split = layout.split() split.enabled = ( + note_flag and domain.has_cache_baked_data and (domain.use_spray_particles or domain.use_bubble_particles or @@ -931,9 +972,6 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): domain = context.fluid.domain_settings - # Deactivate UI if guides are enabled but not baked yet. - layout.active = not self.check_domain_has_unbaked_guide(domain) - is_baking_any = domain.is_cache_baking_any has_baked_any = domain.has_cache_baked_any has_baked_data = domain.has_cache_baked_data @@ -1018,7 +1056,8 @@ class PHYSICS_PT_guide(PhysicButtonsPanel, Panel): col = split.column() col.operator("fluid.free_guides", text="Free") elif not domain.has_cache_baked_guide and domain.is_cache_baking_guide: - split.operator("fluid.pause_bake", text="Pause Guides") + split.enabled = False + split.operator("fluid.pause_bake", text="Baking Guides - ESC to pause") elif not domain.has_cache_baked_guide and not domain.is_cache_baking_guide: split.operator("fluid.bake_guides", text="Bake Guides") else: -- cgit v1.2.3 From 6a841acab637c6e614bfcf17de8452bebd3f6c20 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Mon, 10 Feb 2020 10:53:59 +0100 Subject: UI: Bone Custom Shape layout The layout was somewhat poor - hard to see what relates to the custom object, and also weirdly we show the Wireframe toggle above the Custom Object control, even though it can only be active if a bone has a custom object set. Instead, I grouped everything in a Custom Shape sub-panel and used greying out. Differential Revision: https://developer.blender.org/D6789 Reviewed by Brecht van Lommel --- .../scripts/startup/bl_ui/properties_data_bone.py | 41 +++++++++++++++++----- 1 file changed, 33 insertions(+), 8 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index c50b9414667..4eb93f0f93c 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -268,18 +268,43 @@ class BONE_PT_display(BoneButtonsPanel, Panel): col = layout.column() col.prop(bone, "hide", text="Hide") + + +class BONE_PT_display_custom_shape(BoneButtonsPanel, Panel): + bl_label = "Custom Shape" + bl_parent_id = "BONE_PT_display" + + @classmethod + def poll(cls, context): + return context.bone + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + ob = context.object + bone = context.bone + pchan = None + + if ob and bone: + pchan = ob.pose.bones[bone.name] + elif bone is None: + bone = context.edit_bone + + if bone and pchan: + col = layout.column() + col.prop(pchan, "custom_shape") + sub = col.column() sub.active = bool(pchan and pchan.custom_shape) + sub.separator() + sub.prop(pchan, "custom_shape_scale", text="Scale") + sub.prop_search(pchan, "custom_shape_transform", + ob.pose, "bones", text="Override Transform") + sub.prop(pchan, "use_custom_shape_bone_size") + sub.separator() sub.prop(bone, "show_wire", text="Wireframe") - if pchan: - col = layout.column() - col.prop(pchan, "custom_shape") - if pchan.custom_shape: - col.prop(pchan, "use_custom_shape_bone_size", text="Bone Size") - col.prop(pchan, "custom_shape_scale", text="Scale") - col.prop_search(pchan, "custom_shape_transform", ob.pose, "bones") - class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel): bl_label = "Inverse Kinematics" -- cgit v1.2.3 From 39b3327490c6f1b34ac516dce86a4148cad61ef1 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Mon, 10 Feb 2020 11:04:34 +0100 Subject: Fix: Missed this line in last commit --- release/scripts/startup/bl_ui/properties_data_bone.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index 4eb93f0f93c..aca358870c8 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -456,6 +456,7 @@ classes = ( BONE_PT_inverse_kinematics, BONE_PT_deform, BONE_PT_display, + BONE_PT_display_custom_shape, BONE_PT_custom_props, ) -- cgit v1.2.3 From 795c4a3462536d1e780b227d6877a8693f656cf9 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 10 Feb 2020 11:55:49 +0100 Subject: GPencil: Fix unreported missing annotation popover menu This was introduced when annotations was splited. --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index c1ad196b555..13b8dced08c 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -144,11 +144,7 @@ class _defs_view3d_generic: class _defs_annotate: def draw_settings_common(context, layout, tool): - if type(context.gpencil_data_owner) is bpy.types.Object: - gpd = context.scene.grease_pencil - else: - gpd = context.gpencil_data - + gpd = context.annotation_data if gpd is not None: if gpd.layers.active_note is not None: text = gpd.layers.active_note @@ -158,7 +154,7 @@ class _defs_annotate: else: text = "" - gpl = context.active_gpencil_layer + gpl = context.active_annotation_layer if gpl is not None: layout.label(text="Annotation:") sub = layout.row(align=True) -- cgit v1.2.3 From 50d5c03e2d14b852c6afd3046aa8428bede85efd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 11 Feb 2020 14:01:01 +1100 Subject: UI: Use popup dialog for make single user from operator search Use a popup since the default action was to do nothing, the user would always need to access the redo panel. Resolves T73711. --- release/scripts/startup/bl_ui/space_view3d.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 6ca6cb7b544..537a4a4761a 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2713,6 +2713,7 @@ class VIEW3D_MT_make_single_user(Menu): def draw(self, _context): layout = self.layout + layout.operator_context = 'EXEC_DEFAULT' props = layout.operator("object.make_single_user", text="Object") props.object = True -- cgit v1.2.3 From 7b0aca2a530fb1a42367eebf595a1c6ca93dba7d Mon Sep 17 00:00:00 2001 From: Charlie Jolly Date: Tue, 11 Feb 2020 15:31:40 +0000 Subject: Nodes: Add dynamic label support for Math Nodes Reviewed By: brecht Differential Revision: https://developer.blender.org/D6375 --- release/scripts/startup/bl_ui/space_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 2ce81ba8359..55ec8306e16 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -530,7 +530,7 @@ class NODE_PT_active_node_properties(Panel): layout.label(text="Inputs:") for socket in value_inputs: row = layout.row() - socket.draw(context, row, node, iface_(socket.name, socket.bl_rna.translation_context)) + socket.draw(context, row, node, iface_(socket.label if socket.label else socket.name, socket.bl_rna.translation_context)) class NODE_PT_texture_mapping(Panel): -- cgit v1.2.3 From 0ab7e321585f909a4fd3cc55221bf3d3827989e9 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 11 Feb 2020 19:43:36 +0100 Subject: Pose Brush: Option to disable the IK anchor point The IK chain was using an anchor point by default as it makes sense for posing, but for creating curved shapes it is useful to be able to disable it. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6584 --- release/scripts/startup/bl_ui/properties_paint_common.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index ec3dec6c54d..7d2846acb72 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -620,6 +620,7 @@ def brush_settings(layout, context, brush, popover=False): layout.prop(brush, "pose_offset") layout.prop(brush, "pose_smooth_iterations") layout.prop(brush, "pose_ik_segments") + layout.prop(brush, "use_pose_ik_anchored") layout.separator() if brush.sculpt_tool == 'SCRAPE': -- cgit v1.2.3 From 6ee6a42d10e3c1c0868d1f038401d525264a7e24 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 11 Feb 2020 20:04:41 +0100 Subject: Sculpt: Clay Strips Tip Roundness property This patch allow to change the brush tip shape between a square and a circle using a brush property. After this change we are no longer testing the distance against a cube (the Z axis is not used). I did not test this in depth, but if it does not produce any artifacts I think we can keep it this way instead of adding more complexity to the code. In this new distance test the brush falloff is only applied on the rounded parts of the square to avoid sharp artifacts in the diagonals. Because of this, the round version is much softer than the square one. The planned hardness property will fix this, but this can also be avoided by setting the fallof to a custom curve. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6165 --- release/scripts/startup/bl_ui/properties_paint_common.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 7d2846acb72..2031546f4d0 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -609,6 +609,10 @@ def brush_settings(layout, context, brush, popover=False): layout.operator("sculpt.set_persistent_base") layout.separator() + if brush.sculpt_tool == 'CLAY_STRIPS': + row = layout.row() + row.prop(brush, "tip_roundness") + if brush.sculpt_tool == 'ELASTIC_DEFORM': layout.separator() layout.prop(brush, "elastic_deform_type") -- cgit v1.2.3 From df45257ec53c795081e65a35784bd89ac8c3e83d Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 16 Dec 2019 23:16:21 +0100 Subject: Sculpt: Split normal radius and area radius This enables an extra layer of control in the sculpt brushes. For now it is enabled only in Scrape, but it should work in all brushes (like normal radius). In the future it may also be enabled in other brushes. You can tweak in this property in the scrape brush to achieve a much better behavior when working on curve surfaces and control how much volume you want to trim. In most cases, it also fixes the bug where the brush keeps trimming in the same area without disabling accumulate. It should be possible to fix some other artifacts in other brushes by tweaking this default property. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D5993 --- release/scripts/startup/bl_ui/properties_paint_common.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 2031546f4d0..e82caccdfe1 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -628,10 +628,14 @@ def brush_settings(layout, context, brush, popover=False): layout.separator() if brush.sculpt_tool == 'SCRAPE': + row = layout.row() + row.prop(brush, "area_radius_factor", slider=True) row = layout.row() row.prop(brush, "invert_to_scrape_fill", text="Invert to Fill") if brush.sculpt_tool == 'FILL': + row = layout.row() + row.prop(brush, "area_radius_factor", slider=True) row = layout.row() row.prop(brush, "invert_to_scrape_fill", text="Invert to Scrape") -- cgit v1.2.3 From 7e99e396a9991538d3a2d34a69b7a1cf1cbce7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Wed, 12 Feb 2020 00:45:01 +0100 Subject: Fluid: Naming and UI visibility fixes for some parameters Cleaned up some inconsistencies in the UI, i.e. corrected name for velocity factor and fixed UI visibility for fractional obstacle parameter. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 7c2077a178c..1eaaeb81772 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -481,8 +481,9 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): col = flow.column() col.prop(domain, "use_fractions", text="Fractional Obstacles") - col.active = domain.use_fractions - col.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") + col1 = col.column() + col1.enabled = domain.use_fractions + col1.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): @@ -1145,7 +1146,7 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): if md.domain_settings.domain_type in {'LIQUID'}: # File format for all particle systemes (FLIP and secondary) col = flow.column() - col.enabled = not is_baking_any and not has_baked_particles + col.enabled = not is_baking_any and not has_baked_particles and not has_baked_data col.prop(domain, "cache_particle_format", text="Particle File Format") if domain.use_mesh: -- cgit v1.2.3 From e32457952b45e5df7c3fc7d3e948e1403c7452da Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Wed, 12 Feb 2020 10:34:35 +0100 Subject: Modifiers: Hook Modifier add invert vgroup option Adds the invert group optin to the hook modifier. Differential Revision: https://developer.blender.org/D6817 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index b91c7f71843..7dadbd427fd 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -454,7 +454,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop_search(md, "subtarget", md.object.data, "bones", text="") col = split.column() col.label(text="Vertex Group:") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') layout.separator() -- cgit v1.2.3 From cd57c9e310e2482298ac61fc9424551bbe6eb61c Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Wed, 12 Feb 2020 11:04:20 +0100 Subject: Modifiers: Weld Modifier add invert vgroup option Adds the invert vgroup option to the weld modifier. Differential Revision: https://developer.blender.org/D6818 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 7dadbd427fd..996d6add629 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1498,7 +1498,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): def WELD(self, layout, ob, md): layout.prop(md, "merge_threshold", text="Distance") layout.prop(md, "max_interactions") - layout.prop_search(md, "vertex_group", ob, "vertex_groups") + row = layout.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') def DATA_TRANSFER(self, layout, ob, md): row = layout.row(align=True) -- cgit v1.2.3 From a1e50cfe6b4dbc360b6118c63a0dc7445023c37b Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Mon, 23 Dec 2019 12:46:05 +0300 Subject: Weight Paint: add a pie menu for locking and unlocking vertex groups. Provide different options for locking and unlocking vertex groups using bone selection, accessible via a pie menu triggered via the 'K' hotkey. To implement a variety of operations, extend the old operator with a new option to mask it by bone selection. If the X Mirror option is enabled, selection is automatically mirrored. This follows D6533 as the next step in improving accessibility of vertex group locking during weight painting. Differential Revision: https://developer.blender.org/D6618 --- .../scripts/startup/bl_ui/properties_data_mesh.py | 9 ++++-- release/scripts/startup/bl_ui/space_view3d.py | 34 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 3edce6b3b52..d6aa986613d 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -55,9 +55,12 @@ class MESH_MT_vertex_group_context_menu(Menu): layout.operator("object.vertex_group_remove", text="Delete All Unlocked Groups").all_unlocked = True layout.operator("object.vertex_group_remove", text="Delete All Groups").all = True layout.separator() - layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All").action = 'LOCK' - layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="UnLock All").action = 'UNLOCK' - layout.operator("object.vertex_group_lock", text="Lock Invert All").action = 'INVERT' + props = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All") + props.action, props.mask = 'LOCK', 'ALL' + props = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="UnLock All") + props.action, props.mask = 'UNLOCK', 'ALL' + props = layout.operator("object.vertex_group_lock", text="Lock Invert All") + props.action, props.mask = 'INVERT', 'ALL' class MESH_MT_shape_key_context_menu(Menu): diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 537a4a4761a..cffa52c8052 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5020,6 +5020,39 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu): op.auto_iteration_count = False +class VIEW3D_MT_wpaint_vgroup_lock_pie(Menu): + bl_label = "Vertex Group Locks" + + def draw(self, _context): + layout = self.layout + pie = layout.menu_pie() + + # 1: Left + op = pie.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All") + op.action, op.mask = 'LOCK', 'ALL' + # 2: Right + op = pie.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All") + op.action, op.mask = 'UNLOCK', 'ALL' + # 3: Down + op = pie.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Selected") + op.action, op.mask = 'UNLOCK', 'SELECTED' + # 4: Up + op = pie.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Selected") + op.action, op.mask = 'LOCK', 'SELECTED' + # 5: Up/Left + op = pie.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Unselected") + op.action, op.mask = 'LOCK', 'UNSELECTED' + # 6: Up/Right + op = pie.operator("object.vertex_group_lock", text="Lock Only Selected") + op.action, op.mask = 'LOCK', 'INVERT_UNSELECTED' + # 7: Down/Left + op = pie.operator("object.vertex_group_lock", text="Lock Only Unselected") + op.action, op.mask = 'UNLOCK', 'INVERT_UNSELECTED' + # 8: Down/Right + op = pie.operator("object.vertex_group_lock", text="Invert Locks") + op.action, op.mask = 'INVERT', 'ALL' + + # ********** Panel ********** @@ -7090,6 +7123,7 @@ classes = ( VIEW3D_MT_orientations_pie, VIEW3D_MT_proportional_editing_falloff_pie, VIEW3D_MT_sculpt_mask_edit_pie, + VIEW3D_MT_wpaint_vgroup_lock_pie, VIEW3D_PT_active_tool, VIEW3D_PT_active_tool_duplicate, VIEW3D_PT_view3d_properties, -- cgit v1.2.3 From cc085e228de70563ed0b6870d23ef3bb531c4798 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Wed, 12 Feb 2020 12:38:43 +0100 Subject: Modifiers: Vertex Weight Modifiers add invert vgroup option Adds the invert vgroup mask option to the Vertex Weight modifiers. These 3 modifiers share the same functions so they needed to be modified at the same time. They are all setup the same with the invert vgroup option being added. I had to add a flag to the Mix modifier but the others I use the existing flags. Differential Revision: https://developer.blender.org/D6819 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 996d6add629..9128173754c 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1269,7 +1269,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if not md.mask_texture: split = layout.split(factor=0.4) split.label(text="Vertex Group Mask:") - split.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="") + row = split.row(align=True) + row.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_mask_vertex_group", text="", icon='ARROW_LEFTRIGHT') if not md.mask_vertex_group: split = layout.split(factor=0.4) -- cgit v1.2.3 From c10e05ceb89ebb52707d519e091ebab9ca62e40b Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 12 Feb 2020 17:01:41 +0100 Subject: Fix T69697: Remove not working "Inherit Scale" option from menu The option can still be modified in the bone settings in the properties editor. In the future a correct menu entry (using an enum) can be added back. For that, an operator like `wm.context_collection_boolean_set` could be added for enums. --- release/scripts/startup/bl_ui/space_view3d.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index cffa52c8052..de5e6624085 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3390,7 +3390,6 @@ class BoneOptions: "use_deform", "use_envelope_multiply", "use_inherit_rotation", - "inherit_scale", ] if context.mode == 'EDIT_ARMATURE': -- cgit v1.2.3 From dd9dfadaac9b17d0a5f41545925668717b662b08 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 12 Feb 2020 16:47:19 +0100 Subject: remove "Select Linked" from the particle select and context menu The operator in its current state is based on mouse position and doesnt make sense to be called from a menu. (In fact it should be called 'select_linked_pick' internally and a separate 'select_linked' should be implemented similar to how "Select Linked" works for meshes, curves etc -- see D6823 for this) Differential Revision: https://developer.blender.org/D6822 --- release/scripts/startup/bl_ui/space_view3d.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index de5e6624085..349ed2d5621 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1443,10 +1443,6 @@ class VIEW3D_MT_select_particle(Menu): layout.separator() - layout.operator("particle.select_linked") - - layout.separator() - layout.operator("particle.select_more") layout.operator("particle.select_less") @@ -3124,10 +3120,6 @@ class VIEW3D_MT_particle_context_menu(Menu): layout.operator("particle.select_more") layout.operator("particle.select_less") - layout.separator() - - layout.operator("particle.select_linked") - class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu): _operator_name = "particle" -- cgit v1.2.3 From 4af74f453d4e41129626f7578c55ac9927f6d02a Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Thu, 13 Feb 2020 01:29:30 +0100 Subject: Freestyle: Add option for rendering Freestyle to a separate pass This allows for more flexibility in Compositing compared to the hardcoded alpha-over that is currently used. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6829 --- release/scripts/startup/bl_ui/properties_freestyle.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index 5fc03e59f9d..f70789ebeed 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -126,6 +126,7 @@ class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel): row = layout.row() layout.prop(freestyle, "mode", text="Control Mode") layout.prop(freestyle, "use_view_map_cache", text="View Map Cache") + layout.prop(freestyle, "as_render_pass", text="As Render Pass") layout.label(text="Edge Detection Options:") split = layout.split() -- cgit v1.2.3 From d9e4f5a7e8e925a9bc35184cf1228240d93b83f8 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 13 Feb 2020 15:20:44 +0100 Subject: Fix T73774: Error in Paint 'Clone from Image/UV Map' panel This panel is not for 2D paint, IMAGEPAINT_PROJECT_LAYER_CLONE is only ever used in projection painting, not 2D painting. Add a proper poll for this. Maniphest Tasks: T73774 Differential Revision: https://developer.blender.org/D6836 --- release/scripts/startup/bl_ui/properties_paint_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index e82caccdfe1..24016061194 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -211,7 +211,7 @@ class ClonePanel(BrushPanel): settings = cls.paint_settings(context) mode = cls.get_brush_mode(context) - if mode in {'PAINT_TEXTURE', 'PAINT_2D'}: + if mode == 'PAINT_TEXTURE': brush = settings.brush return brush.image_tool == 'CLONE' return False -- cgit v1.2.3 From 5ca7c85e105d910f554db4855c099a6b74e59886 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 12 Feb 2020 17:08:35 +0100 Subject: Particle editmode: add mouse independent "Select Linked" operator The current "Select Linked" operator works based on mouse position and makes no sense to call from the menus and was removed in rBdd9dfadaac9b. This patch adds an operator independent from mouse position that just selects all keys to a corresponding point (and adds back menu entries, adds keymap entry). The original operator is renamed to 'select_linked_pick' internally (this is now more in line to how "Select Linked" works for meshes, curves etc) Differential Revision: https://developer.blender.org/D6823 --- release/scripts/startup/bl_ui/space_view3d.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 349ed2d5621..7f053101bab 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1443,6 +1443,10 @@ class VIEW3D_MT_select_particle(Menu): layout.separator() + layout.operator("particle.select_linked", text="Select Linked") + + layout.separator() + layout.operator("particle.select_more") layout.operator("particle.select_less") @@ -3120,6 +3124,9 @@ class VIEW3D_MT_particle_context_menu(Menu): layout.operator("particle.select_more") layout.operator("particle.select_less") + layout.separator() + + layout.operator("particle.select_linked", text="Select Linked") class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu): _operator_name = "particle" -- cgit v1.2.3 From 38e06b19f6d198cc4846a8e5526ba08369c562ff Mon Sep 17 00:00:00 2001 From: mano-wii Date: Fri, 14 Feb 2020 11:43:14 -0300 Subject: Fix T59218: Loop Cut from the Context Menu doesn't slide Differential Revision: https://developer.blender.org/D6810 --- release/scripts/startup/bl_ui/space_view3d.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 7f053101bab..abc6cc63828 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3583,7 +3583,8 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu): col.separator() - col.operator("mesh.loopcut_slide") + props = col.operator("mesh.loopcut_slide") + props.TRANSFORM_OT_edge_slide.release_confirm = False col.operator("mesh.offset_edge_loops_slide") col.separator() -- cgit v1.2.3 From b1f40955d9a9c205581bd8fff3ed04320dbe95da Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 15 Feb 2020 09:49:22 +1100 Subject: Cleanup: incorrect __contains__ comparison, long line --- release/scripts/startup/bl_ui/space_node.py | 7 ++++++- release/scripts/startup/bl_ui/space_sequencer.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 55ec8306e16..8fe758b8bf6 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -530,7 +530,12 @@ class NODE_PT_active_node_properties(Panel): layout.label(text="Inputs:") for socket in value_inputs: row = layout.row() - socket.draw(context, row, node, iface_(socket.label if socket.label else socket.name, socket.bl_rna.translation_context)) + socket.draw( + context, + row, + node, + iface_(socket.label if socket.label else socket.name, socket.bl_rna.translation_context), + ) class NODE_PT_texture_mapping(Panel): diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index af0c23e7892..f05a0e18eed 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -842,7 +842,7 @@ class SEQUENCER_MT_context_menu(Menu): }: layout.separator() layout.menu("SEQUENCER_MT_strip_effect") - elif strip_type in 'MOVIE': + elif strip_type == 'MOVIE': layout.separator() layout.menu("SEQUENCER_MT_strip_movie") elif strip_type == 'IMAGE': -- cgit v1.2.3 From f6aafd5186bd921637df755797c7ff6f3036a361 Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Sat, 15 Feb 2020 01:49:50 +0100 Subject: Modifiers: Add option to directly specify a 2D transform for UVWarp Currently the only option is to warp based on the transform of other objects, which is inconvenient if you want to e.g. control it through a driver - you need to set up a dummy object and go through that, which is clunky and should be unneccessary. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6690 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 9128173754c..6159504b68a 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1455,6 +1455,19 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.label(text="Bone:") col.prop_search(md, "bone_to", obj.data, "bones", text="") + split = layout.split() + col = split.column() + col.label(text="Offset:") + col.prop(md, "offset", text="") + + col = split.column() + col.label(text="Scale:") + col.prop(md, "scale", text="") + + col = split.column() + col.label(text="Rotate:") + col.prop(md, "rotation", text="") + split = layout.split() col = split.column() -- cgit v1.2.3 From 31530d0da95cea17c4e30fd449b2ce6f01feda3b Mon Sep 17 00:00:00 2001 From: William Reynish Date: Sun, 16 Feb 2020 20:56:59 +0100 Subject: UI: add blade icon to the Sequencer Cut tool Was previously using the mesh edit Knife tool icon - now this tool has a bespoke icon. --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 13b8dced08c..79fd5f85851 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1718,12 +1718,14 @@ class _defs_sequencer_generic: return dict( idname="builtin.cut", label="Cut", - icon="ops.mesh.knife_tool", + icon="ops.sequencer.blade", + cursor='CROSSHAIR', widget=None, keymap="Sequencer Tool: Cut", draw_settings=draw_settings, ) + class _defs_sequencer_select: @ToolDef.from_fn def select(): -- cgit v1.2.3 From 819af2094b21a78d57c7480a649f97502c09ec1f Mon Sep 17 00:00:00 2001 From: William Reynish Date: Sun, 16 Feb 2020 21:39:12 +0100 Subject: Rename Sequencer 'Cut' to 'Split' This avoids the ambiguity with the Cut operator in the Sequencer, which could be confused with Cut/Copy/Paste. Use 'Split' for the operator and 'Blade' for the active tool. Patch by Nathan Lovato, with edits Differential Revision: https://developer.blender.org/D5542 --- release/scripts/startup/bl_ui/space_sequencer.py | 4 ++-- .../scripts/startup/bl_ui/space_toolsystem_toolbar.py | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index f05a0e18eed..903416b78e6 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -716,8 +716,8 @@ class SEQUENCER_MT_strip(Menu): layout.menu("SEQUENCER_MT_strip_transform") layout.separator() - layout.operator("sequencer.cut", text="Cut").type = 'SOFT' - layout.operator("sequencer.cut", text="Hold Cut").type = 'HARD' + layout.operator("sequencer.split", text="Split").type = 'SOFT' + layout.operator("sequencer.split", text="Hold Split").type = 'HARD' layout.separator() layout.operator("sequencer.copy", text="Copy") diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 79fd5f85851..02db00e36c0 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1706,22 +1706,23 @@ class _defs_node_edit: keymap="Node Tool: Links Cut", ) + class _defs_sequencer_generic: @ToolDef.from_fn - def cut(): + def blade(): def draw_settings(_context, layout, tool): - props = tool.operator_properties("sequencer.cut") + props = tool.operator_properties("sequencer.split") row = layout.row() row.use_property_split = False row.prop(props, "type", expand=True) return dict( - idname="builtin.cut", - label="Cut", + idname="builtin.blade", + label="Blade", icon="ops.sequencer.blade", cursor='CROSSHAIR', widget=None, - keymap="Sequencer Tool: Cut", + keymap="Sequencer Tool: Blade", draw_settings=draw_settings, ) @@ -2255,15 +2256,16 @@ class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel): ], 'SEQUENCER': [ *_tools_select, - _defs_sequencer_generic.cut, + _defs_sequencer_generic.blade, ], 'SEQUENCER_PREVIEW': [ *_tools_select, *_tools_annotate, - _defs_sequencer_generic.cut, + _defs_sequencer_generic.blade, ], } + classes = ( IMAGE_PT_tools_active, NODE_PT_tools_active, -- cgit v1.2.3 From c0423c871d1dde5a6bb094768c3310c66b795586 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 17 Feb 2020 20:44:18 +1100 Subject: Keymap: add sequencer box select with handles Use Ctrl-B, include in menu, rename property to match graph editor. --- release/scripts/startup/bl_ui/space_sequencer.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 903416b78e6..72583519800 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -404,6 +404,8 @@ class SEQUENCER_MT_select(Menu): layout.separator() layout.operator("sequencer.select_box", text="Box Select") + props = layout.operator("sequencer.select_box", text="Box Select (Handles)") + props.include_handles = True layout.separator() -- cgit v1.2.3 From c64cea14edddd50d33a6c43c0327edd8ce186e30 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 17 Feb 2020 20:55:23 +1100 Subject: Keymap: minor tweaks so box-select shortcuts show in the menu --- release/scripts/startup/bl_ui/space_graph.py | 6 +----- release/scripts/startup/bl_ui/space_sequencer.py | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 2e853a287ea..c251d55714f 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -171,14 +171,10 @@ class GRAPH_MT_select(Menu): layout.separator() - props = layout.operator("graph.select_box") - props.axis_range = False - props.include_handles = False + layout.operator("graph.select_box") props = layout.operator("graph.select_box", text="Box Select (Axis Range)") props.axis_range = True - props.include_handles = False props = layout.operator("graph.select_box", text="Box Select (Include Handles)") - props.axis_range = False props.include_handles = True layout.operator("graph.select_circle") diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 72583519800..1cb3829708a 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -404,7 +404,7 @@ class SEQUENCER_MT_select(Menu): layout.separator() layout.operator("sequencer.select_box", text="Box Select") - props = layout.operator("sequencer.select_box", text="Box Select (Handles)") + props = layout.operator("sequencer.select_box", text="Box Select (Include Handles)") props.include_handles = True layout.separator() -- cgit v1.2.3 From cec7db2004526e44d9541340d7c356ae884eafc1 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Mon, 17 Feb 2020 11:16:13 +0100 Subject: UI: Use crosshair cursor for Extrude to Cursor tools Since this tool doesn't perform selections when you click, it's important that the cursor helps communicate that something else will happen. Also fix missing 'to' in Curve Edit Mode. --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 02db00e36c0..16485833ab2 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -456,6 +456,7 @@ class _defs_edit_armature: return dict( idname="builtin.extrude_to_cursor", label="Extrude to Cursor", + cursor='CROSSHAIR', icon="ops.armature.extrude_cursor", widget=None, keymap=(), @@ -710,6 +711,7 @@ class _defs_edit_mesh: return dict( idname="builtin.extrude_to_cursor", label="Extrude to Cursor", + cursor='CROSSHAIR', icon="ops.mesh.dupli_extrude_cursor", widget=None, keymap=(), @@ -892,7 +894,8 @@ class _defs_edit_curve: def extrude_cursor(): return dict( idname="builtin.extrude_cursor", - label="Extrude Cursor", + label="Extrude to Cursor", + cursor='CROSSHAIR', icon="ops.curve.extrude_cursor", widget=None, keymap=(), -- cgit v1.2.3 From d119e163d0a867fe0263d751231b838c57b95b31 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 17 Feb 2020 13:00:01 +0100 Subject: Fix many typos and other issues in UI messages. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 8 ++++---- release/scripts/startup/bl_ui/space_filebrowser.py | 2 +- release/scripts/startup/bl_ui/space_outliner.py | 10 ++++++++-- release/scripts/startup/bl_ui/space_sequencer.py | 4 ++-- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 2 +- release/scripts/startup/bl_ui/space_userpref.py | 2 +- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 1eaaeb81772..310f1d6f8dc 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -207,7 +207,7 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): note = layout.split() note_flag = False note.enabled = note_flag - note.label(icon='INFO', text="Unbaked Guides: Bake Guides or disable them.") + note.label(icon='INFO', text="Unbaked Guides: Bake Guides or disable them") split = layout.split() split.enabled = note_flag @@ -724,7 +724,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): note = layout.split() note_flag = False note.enabled = note_flag - note.label(icon='INFO', text="Unbaked Data: Bake Data first.") + note.label(icon='INFO', text="Unbaked Data: Bake Data first") split = layout.split() split.enabled = domain.has_cache_baked_data and note_flag @@ -809,7 +809,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): note = layout.split() note_flag = False note.enabled = note_flag - note.label(icon='INFO', text="Unbaked Data: Bake Data first.") + note.label(icon='INFO', text="Unbaked Data: Bake Data first") split = layout.split() split.enabled = domain.has_cache_baked_data and note_flag @@ -921,7 +921,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): note = layout.split() note_flag = False note.enabled = note_flag - note.label(icon='INFO', text="Unbaked Data: Bake Data first.") + note.label(icon='INFO', text="Unbaked Data: Bake Data first") split = layout.split() split.enabled = ( diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 8dd0eaf5445..8ff85459d35 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -275,7 +275,7 @@ class FILEBROWSER_PT_bookmarks_recents(Panel): bl_space_type = 'FILE_BROWSER' bl_region_type = 'TOOLS' bl_category = "Bookmarks" - bl_label = "Recents" + bl_label = "Recent" @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 11fb20d8b38..6ac31aeb3d0 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -19,6 +19,10 @@ # import bpy from bpy.types import Header, Menu, Panel +from bpy.app.translations import ( + contexts as i18n_contexts, + pgettext_iface as iface_, +) class OUTLINER_HT_header(Header): @@ -279,8 +283,10 @@ class OUTLINER_MT_object(Menu): if object_mode in {'EDIT', 'POSE'}: name = bpy.types.Object.bl_rna.properties["mode"].enum_items[object_mode].name - layout.operator("outliner.object_operation", text=f"{name:s} Set").type = 'OBJECT_MODE_ENTER' - layout.operator("outliner.object_operation", text=f"{name:s} Clear").type = 'OBJECT_MODE_EXIT' + layout.operator("outliner.object_operation", + text=iface_("%s Set", i18n_contexts.operator_default) % name).type = 'OBJECT_MODE_ENTER' + layout.operator("outliner.object_operation", + text=iface_("%s Clear", i18n_contexts.operator_default) % name).type = 'OBJECT_MODE_EXIT' del name layout.separator() diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 1cb3829708a..788350025b9 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1115,11 +1115,11 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): if i == strip.multicam_source: sub = row.row(align=True) sub.enabled = False - sub.operator("sequencer.cut_multicam", text=f"{i:d}").camera = i + sub.operator("sequencer.cut_multicam", text="%d" % i).camera = i else: sub_1 = row.row(align=True) sub_1.enabled = True - sub_1.operator("sequencer.cut_multicam", text=f"{i:d}").camera = i + sub_1.operator("sequencer.cut_multicam", text="%d" % i).camera = i if strip.channel > BT_ROW and (strip_channel - 1) % BT_ROW: for i in range(strip.channel, strip_channel + ((BT_ROW + 1 - strip_channel) % BT_ROW)): diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 16485833ab2..cd1fc49ac8b 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -125,7 +125,7 @@ class _defs_view3d_generic: "\u2022 Drag ruler segment to measure an angle.\n" "\u2022 {} to remove the active ruler.\n" "\u2022 Ctrl while dragging to snap.\n" - "\u2022 Shift while dragging to measure surface thickness." + "\u2022 Shift while dragging to measure surface thickness" ).format( kmi_to_string_or_none(kmi_add), kmi_to_string_or_none(kmi_remove), diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index ad5e7b5442c..a4e8ce0f3e3 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1837,7 +1837,7 @@ class USERPREF_PT_addons(AddOnPanel, Panel): # WARNING: 2.8x exception, may be removed # use disabled state for old add-ons, chances are they are broken. if is_addon_27x: - sub.label(text="upgrade to 2.8x required") + sub.label(text="Upgrade to 2.8x required") sub.label(icon='ERROR') # Remove code above after 2.8x migration is complete. elif info["warning"]: diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index c074069af06..cf1b99cee89 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -706,7 +706,7 @@ class VIEW3D_PT_tools_brush_falloff(Panel, View3DPaintPanel, FalloffPanel): class VIEW3D_PT_tools_brush_falloff_frontface(View3DPaintPanel, Panel): bl_context = ".imagepaint" # dot on purpose (access from topbar) - bl_label = "Frontface Falloff" + bl_label = "Front-face Falloff" bl_parent_id = "VIEW3D_PT_tools_brush_falloff" bl_options = {'DEFAULT_CLOSED'} -- cgit v1.2.3 From 4353bc919030a6eea5e0dc41247f452bea226d16 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Mon, 17 Feb 2020 16:38:53 +0100 Subject: VSE: Fix missed renaming of cut operator Fix errors introduced by commit rB819af2094b21. Reviewed By: ISS Differential Revision: https://developer.blender.org/D6870y --- release/scripts/startup/bl_ui/space_sequencer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 788350025b9..f1a349d49b4 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -783,7 +783,7 @@ class SEQUENCER_MT_context_menu(Menu): layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("sequencer.cut", text="Cut").type = 'SOFT' + layout.operator("sequencer.split", text="Split").type = 'SOFT' layout.separator() @@ -1115,11 +1115,11 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): if i == strip.multicam_source: sub = row.row(align=True) sub.enabled = False - sub.operator("sequencer.cut_multicam", text="%d" % i).camera = i + sub.operator("sequencer.split_multicam", text="%d" % i).camera = i else: sub_1 = row.row(align=True) sub_1.enabled = True - sub_1.operator("sequencer.cut_multicam", text="%d" % i).camera = i + sub_1.operator("sequencer.split_multicam", text="%d" % i).camera = i if strip.channel > BT_ROW and (strip_channel - 1) % BT_ROW: for i in range(strip.channel, strip_channel + ((BT_ROW + 1 - strip_channel) % BT_ROW)): -- cgit v1.2.3 From d0cc9b522dfb56e329f894d2c188bdcdfd175609 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Tue, 18 Feb 2020 16:28:02 +0100 Subject: Modifiers: Laplacian Smooth modifier add invert vgroup option Adds the invert vgroup option to the Laplacian Smooth modifier. Differential Revision: https://developer.blender.org/D6842 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 6159504b68a..f0a6cccb62e 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -525,7 +525,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "use_normalized") layout.label(text="Vertex Group:") - layout.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = layout.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') def LATTICE(self, layout, ob, md): split = layout.split() -- cgit v1.2.3 From f996aeaf766cf840ec7ed1d8b6878def5014de81 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 10 Feb 2020 21:44:33 +0100 Subject: Fix T73105: Use Magnify instead of Pinch in the brush context menu This matches the name in the properties panel for the Blob and Snake Hook brushes Reviewed By: brecht Maniphest Tasks: T73105 Differential Revision: https://developer.blender.org/D6805 --- release/scripts/startup/bl_ui/space_view3d.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index abc6cc63828..5ca6bbb20b7 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6936,7 +6936,10 @@ class VIEW3D_PT_sculpt_context_menu(Panel): layout.prop(brush, "normal_weight", slider=True) if capabilities.has_pinch_factor: - layout.prop(brush, "crease_pinch_factor", slider=True, text="Pinch") + text = "Pinch" + if brush.sculpt_tool in {'BLOB', 'SNAKE_HOOK'}: + text = "Magnify" + layout.prop(brush, "crease_pinch_factor", slider=True, text=text) if capabilities.has_rake_factor: layout.prop(brush, "rake_factor", slider=True) -- cgit v1.2.3 From e30d8f45ef13c6258eea5edd33898a5bf9af4e92 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Tue, 18 Feb 2020 16:54:00 +0100 Subject: Modifiers: Laplacian Deform modifier add invert vgroup option Adds the invert vgroup option to the Laplacian Deform modifier. Differential Revision: https://developer.blender.org/D6843 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index f0a6cccb62e..69cd8a96f99 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -497,6 +497,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row = layout.row() row.enabled = not is_bind row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') layout.separator() -- cgit v1.2.3 From 5df0f8bffb55de161b7835baf9e1c3a60ce870d8 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Tue, 18 Feb 2020 17:03:20 +0100 Subject: Modifiers: Explode modifier add invert vgroup option Adds the invert vgroup option to the Explode modifier. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6844 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 69cd8a96f99..1926e4bcae9 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -423,7 +423,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.label(text="Vertex Group:") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') sub = col.column() sub.active = bool(md.vertex_group) sub.prop(md, "protect") -- cgit v1.2.3 From 6cd4363c0c3ee73a0656e84e91ebf9e9c936d6bd Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Tue, 18 Feb 2020 18:06:13 +0100 Subject: Modifiers: Bevel modifier add invert vgroup option Adds the invert vgroup option to the Bevel modifier. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6845 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 1926e4bcae9..ffd42c452f0 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -170,7 +170,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if md.limit_method == 'ANGLE': layout.prop(md, "angle_limit") elif md.limit_method == 'VGROUP': - layout.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = layout.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') layout.label(text="Face Strength Mode:") layout.row().prop(md, "face_strength_mode", expand=True) -- cgit v1.2.3 From 20605c4b515e3e93a1557839669e8c6fc02dcbc9 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Tue, 18 Feb 2020 18:12:06 +0100 Subject: Modifiers: UVWarp modifier add invert vgroup option Adds the invert vgroup option to the UVWarp modifier. Adds a flag and char padding to the DNA. Differential Revision: https://developer.blender.org/D6841 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index ffd42c452f0..5028c78f4c3 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1479,7 +1479,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.label(text="Vertex Group:") - col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') col = split.column() col.label(text="UV Map:") -- cgit v1.2.3 From e82827bf6ed54a1d1552ac9176df9e309b4d29e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 19 Feb 2020 01:44:52 +0100 Subject: DRW: New High Quality Normal & Tangent extract This patch adds a dedicated path to extract 16bit normals instead of packing them into 10bits/comp. The tangents are also packed to 10bits/comp if not using the new High Quality Normal option. Fix T61024 Degraded texture shading on dense meshes Reviewed By: brecht Differential Revision: https://developer.blender.org/D6614 --- release/scripts/startup/bl_ui/properties_render.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index b4c864c16cd..9c422b58ee5 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -524,6 +524,25 @@ class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel): layout.prop(rd, "hair_subdiv") +class RENDER_PT_eevee_performance(RenderButtonsPanel, Panel): + bl_label = "Performance" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + @classmethod + def poll(cls, context): + return (context.engine in cls.COMPAT_ENGINES) + + def draw(self, context): + layout = self.layout + scene = context.scene + rd = scene.render + + layout.use_property_split = True + + layout.prop(rd, "use_high_quality_normals") + + class RENDER_PT_opengl_sampling(RenderButtonsPanel, Panel): bl_label = "Sampling" COMPAT_ENGINES = {'BLENDER_WORKBENCH'} @@ -674,6 +693,7 @@ classes = ( RENDER_PT_eevee_volumetric, RENDER_PT_eevee_volumetric_lighting, RENDER_PT_eevee_volumetric_shadows, + RENDER_PT_eevee_performance, RENDER_PT_eevee_hair, RENDER_PT_eevee_shadows, RENDER_PT_eevee_indirect_lighting, -- cgit v1.2.3 From e77e6ba3089e9f88377151bfec0fbb27552024c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Wed, 19 Feb 2020 17:34:58 +0100 Subject: Fluid: Cleanup in fluid rna code More descriptive names for secondary particle options. --- .../startup/bl_ui/properties_physics_fluid.py | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 310f1d6f8dc..4d6d3d8f607 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -875,18 +875,18 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): col.separator() col = flow.column(align=True) - col.prop(domain, "sndparticle_tau_max_wc", text="Wave Crest Potential Maximum") - col.prop(domain, "sndparticle_tau_min_wc", text="Minimum") + col.prop(domain, "sndparticle_potential_max_wavecrest", text="Wave Crest Potential Maximum") + col.prop(domain, "sndparticle_potential_min_wavecrest", text="Minimum") col.separator() col = flow.column(align=True) - col.prop(domain, "sndparticle_tau_max_ta", text="Trapped Air Potential Maximum") - col.prop(domain, "sndparticle_tau_min_ta", text="Minimum") + col.prop(domain, "sndparticle_potential_max_trappedair", text="Trapped Air Potential Maximum") + col.prop(domain, "sndparticle_potential_min_trappedair", text="Minimum") col.separator() col = flow.column(align=True) - col.prop(domain, "sndparticle_tau_max_k", text="Kinetic Energy Potential Maximum") - col.prop(domain, "sndparticle_tau_min_k", text="Minimum") + col.prop(domain, "sndparticle_potential_max_energy", text="Kinetic Energy Potential Maximum") + col.prop(domain, "sndparticle_potential_min_energy", text="Minimum") col.separator() col = flow.column(align=True) @@ -895,18 +895,18 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): col.separator() col = flow.column(align=True) - col.prop(domain, "sndparticle_k_wc", text="Wave Crest Particle Sampling") - col.prop(domain, "sndparticle_k_ta", text="Trapped Air Particle Sampling") + col.prop(domain, "sndparticle_sampling_wavecrest", text="Wave Crest Particle Sampling") + col.prop(domain, "sndparticle_sampling_trappedair", text="Trapped Air Particle Sampling") col.separator() col = flow.column(align=True) - col.prop(domain, "sndparticle_l_max", text="Particle Life Maximum") - col.prop(domain, "sndparticle_l_min", text="Minimum") + col.prop(domain, "sndparticle_life_max", text="Particle Life Maximum") + col.prop(domain, "sndparticle_life_min", text="Minimum") col.separator() col = flow.column(align=True) - col.prop(domain, "sndparticle_k_b", text="Bubble Buoyancy") - col.prop(domain, "sndparticle_k_d", text="Bubble Drag") + col.prop(domain, "sndparticle_bubble_buoyancy", text="Bubble Buoyancy") + col.prop(domain, "sndparticle_bubble_drag", text="Bubble Drag") col.separator() col = flow.column() -- cgit v1.2.3 From d95e9c7cf80ae2eb40728e7369216e48146a3a36 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 6 Feb 2020 14:07:53 +0100 Subject: Fix T63892: Tools cannot be registered into some contexts (e.g. PAINT_TEXTURE) This fails because some tool contexts define their tools with functions [see the following list for context that fail]: - PARTICLE (_defs_particle.generate_from_brushes) - SCULPT (_defs_sculpt.generate_from_brushes) - PAINT_TEXTURE (_defs_texture_paint.generate_from_brushes) - PAINT_VERTEX (_defs_vertex_paint.generate_from_brushes) - PAINT_WEIGHT (_defs_weight_paint.generate_from_brushes) - PAINT_GPENCIL (_defs_gpencil_paint.generate_from_brushes) - SCULPT_GPENCIL (_defs_gpencil_sculpt.generate_from_brushes) - WEIGHT_GPENCIL (_defs_gpencil_weight.generate_from_brushes) ToolSelectPanelHelper._tools_flatten() is usually called with cls.tools_from_context(context) [that already yields from the function]. But when registering a tool, _tools_flatten() will still give back this function, not a ToolDef - and we cannot get a bl_idname from that. Now check for this and yield None in that case. Also share logic across all tool_flatten functions: - _tools_flatten - _tools_flatten_with_tool_index - _tools_flatten_with_keymap Maniphest Tasks: T63892 Differential Revision: https://developer.blender.org/D6763 --- .../startup/bl_ui/space_toolsystem_common.py | 72 ++++++++++++---------- 1 file changed, 41 insertions(+), 31 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index 4dc724299f0..d2deb70d4a2 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -216,29 +216,52 @@ class ToolSelectPanelHelper: else: return 0 + # tool flattening + # + # usually 'tools' is already expanded into ToolDef + # but when registering a tool, this can still be a function + # (_tools_flatten is usually called with cls.tools_from_context(context) + # [that already yields from the function]) + # so if item is still a function (e.g._defs_XXX.generate_from_brushes) + # seems like we cannot expand here (have no context yet) + # if we yield None here, this will risk running into duplicate tool bl_idname [in register_tool()] + # but still better than erroring out @staticmethod def _tools_flatten(tools): - for item in tools: - if type(item) is tuple: - yield from item - else: - # May be None. - yield item + for item_parent in tools: + if item_parent is None: + yield None + for item in item_parent if (type(item_parent) is tuple) else (item_parent,): + if item is None or _item_is_fn(item): + yield None + else: + yield item @staticmethod def _tools_flatten_with_tool_index(tools): - for item in tools: - if type(item) is tuple: - i = 0 - for sub_item in item: - if sub_item is None: - yield None, -1 - else: - yield sub_item, i - i += 1 - else: - # May be None. - yield item, -1 + for item_parent in tools: + if item_parent is None: + yield None, -1 + i = 0 + for item in item_parent if (type(item_parent) is tuple) else (item_parent,): + if item is None or _item_is_fn(item): + yield None, -1 + else: + yield item, i + i += 1 + + # Special internal function, gives use items that contain keymaps. + @staticmethod + def _tools_flatten_with_keymap(tools): + for item_parent in tools: + if item_parent is None: + continue + for item in item_parent if (type(item_parent) is tuple) else (item_parent,): + # skip None or generator function + if item is None or _item_is_fn(item): + continue + if item.keymap is not None: + yield item @classmethod def _tool_get_active(cls, context, space_type, mode, with_icon=False): @@ -413,19 +436,6 @@ class ToolSelectPanelHelper: keymap_fn[0](km) keymap_fn[0] = km.name - # Special internal function, gives use items that contain keymaps. - @staticmethod - def _tools_flatten_with_keymap(tools): - for item_parent in tools: - if item_parent is None: - continue - for item in item_parent if (type(item_parent) is tuple) else (item_parent,): - # skip None or generator function - if item is None or _item_is_fn(item): - continue - if item.keymap is not None: - yield item - @classmethod def register(cls): wm = bpy.context.window_manager -- cgit v1.2.3 From be2bc97eba499c48e3856c8e5ec4d869e28b4d04 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 20 Feb 2020 14:53:53 +0100 Subject: EEVEE: Render Passes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds new render passes to EEVEE. These passes include: * Emission * Diffuse Light * Diffuse Color * Glossy Light * Glossy Color * Environment * Volume Scattering * Volume Transmission * Bloom * Shadow With these passes it will be possible to use EEVEE effectively for compositing. During development we kept a close eye on how to get similar results compared to cycles render passes there are some differences that are related to how EEVEE works. For EEVEE we combined the passes to `Diffuse` and `Specular`. There are no transmittance or sss passes anymore. Cycles will be changed accordingly. Cycles volume transmittance is added to multiple surface col passes. For EEVEE we left the volume transmittance as a separate pass. Known Limitations * All materials that use alpha blending will not be rendered in the render passes. Other transparency modes are supported. * More GPU memory is required to store the render passes. When rendering a HD image with all render passes enabled at max extra 570MB GPU memory is required. Implementation Details An overview of render passes have been described in https://wiki.blender.org/wiki/Source/Render/EEVEE/RenderPasses Future Developments * In this implementation the materials are re-rendered for Diffuse/Glossy and Emission passes. We could use multi target rendering to improve the render speed. * Other passes can be added later * Don't render material based passes when only requesting AO or Shadow. * Add more passes to the system. These could include Cryptomatte, AOV's, Vector, ObjectID, MaterialID, UV. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D6331 --- .../scripts/startup/bl_ui/properties_view_layer.py | 95 ++++++++++++++++++++-- 1 file changed, 86 insertions(+), 9 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 121b8f2f401..25244b7f065 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -59,14 +59,25 @@ class VIEWLAYER_PT_eevee_layer_passes(ViewLayerButtonsPanel, Panel): COMPAT_ENGINES = {'BLENDER_EEVEE'} def draw(self, context): - layout = self.layout + pass - layout.use_property_split = True - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) +class VIEWLAYER_PT_eevee_layer_passes_data(ViewLayerButtonsPanel, Panel): + bl_label = "Data" + bl_parent_id = "VIEWLAYER_PT_eevee_layer_passes" + COMPAT_ENGINES = {'BLENDER_EEVEE'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + scene = context.scene + rd = scene.render view_layer = context.view_layer + flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) col = flow.column() col.prop(view_layer, "use_pass_combined") col = flow.column() @@ -75,17 +86,83 @@ class VIEWLAYER_PT_eevee_layer_passes(ViewLayerButtonsPanel, Panel): col.prop(view_layer, "use_pass_mist") col = flow.column() col.prop(view_layer, "use_pass_normal") - col = flow.column() - col.prop(view_layer, "use_pass_ambient_occlusion") - col = flow.column() - col.prop(view_layer, "use_pass_subsurface_direct", text="Subsurface Direct") - col = flow.column() - col.prop(view_layer, "use_pass_subsurface_color", text="Subsurface Color") +class VIEWLAYER_PT_eevee_layer_passes_light(ViewLayerButtonsPanel, Panel): + bl_label = "Light" + bl_parent_id = "VIEWLAYER_PT_eevee_layer_passes" + COMPAT_ENGINES = {'BLENDER_EEVEE'} + + def draw(self, context): + layout = self.layout + + layout.use_property_split = True + layout.use_property_decorate = False + + view_layer = context.view_layer + view_layer_eevee = view_layer.eevee + scene = context.scene + scene_eevee = scene.eevee + + split = layout.split(factor=0.35) + split.use_property_split = False + split.label(text="Diffuse") + row = split.row(align=True) + row.prop(view_layer, "use_pass_diffuse_direct", text="Light", toggle=True) + row.prop(view_layer, "use_pass_diffuse_color", text="Color", toggle=True) + + split = layout.split(factor=0.35) + split.use_property_split = False + split.label(text="Specular") + row = split.row(align=True) + row.prop(view_layer, "use_pass_glossy_direct", text="Light", toggle=True) + row.prop(view_layer, "use_pass_glossy_color", text="Color", toggle=True) + + split = layout.split(factor=0.35) + split.use_property_split = False + split.label(text="Volume") + row = split.row(align=True) + row.prop(view_layer_eevee, "use_pass_volume_transmittance", text="Transmittance", toggle=True) + row.prop(view_layer_eevee, "use_pass_volume_scatter", text="Scatter", toggle=True) + flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) + + col = layout.column(align=True) + col.prop(view_layer, "use_pass_emit", text="Emission") + col.prop(view_layer, "use_pass_environment") + col.prop(view_layer, "use_pass_shadow") + row = col.row() + row.prop(view_layer, "use_pass_ambient_occlusion", text="Ambient Occlusion") + row.active = scene_eevee.use_gtao + + +class VIEWLAYER_PT_eevee_layer_passes_effects(ViewLayerButtonsPanel, Panel): + bl_label = "Effects" + bl_parent_id = "VIEWLAYER_PT_eevee_layer_passes" + COMPAT_ENGINES = {'BLENDER_EEVEE'} + + def draw(self, context): + layout = self.layout + + layout.use_property_split = True + layout.use_property_decorate = False + + flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) + + view_layer = context.view_layer + view_layer_eevee = view_layer.eevee + scene = context.scene + scene_eevee = scene.eevee + + col = flow.column() + col.prop(view_layer_eevee, "use_pass_bloom", text="Bloom") + col.active = scene_eevee.use_bloom + classes = ( VIEWLAYER_PT_layer, VIEWLAYER_PT_eevee_layer_passes, + VIEWLAYER_PT_eevee_layer_passes_data, + VIEWLAYER_PT_eevee_layer_passes_light, + VIEWLAYER_PT_eevee_layer_passes_effects, ) if __name__ == "__main__": # only for live edit. -- cgit v1.2.3 From 24ea6b713d7db459327cf2c62e8d596eebf74d59 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Sun, 23 Feb 2020 16:52:43 +0100 Subject: UI: Remove Width/Percentage control from Bevel tool settings Since this control is set as you drag in the viewport anyway, this amount value is effectively useless. It was only recently added by mistake with the Bevel GSOC. --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 9 --------- 1 file changed, 9 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index cd1fc49ac8b..2541613d1e6 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -608,15 +608,6 @@ class _defs_edit_mesh: region_type = context.region.type if not extra: - if props.offset_type == 'PERCENT': - layout.prop(props, "offset_pct") - else: - offset_text = "Width" - if props.offset_type == 'DEPTH': - offset_text = "Depth" - elif props.offset_type == 'OFFSET': - offset_text = "Offset" - layout.prop(props, "offset", text=offset_text) if region_type == 'TOOL_HEADER': layout.prop(props, "offset_type", text="") else: -- cgit v1.2.3 From 6e23433c1a747660d582bfe0d15179a9c7bed51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 25 Feb 2020 13:25:49 +0100 Subject: EEVEE: Lookdev: Add support for partially blurred background This is using the GGX probe as background. This has the drawback of having the resolution choosed in the indirect lighting setting. The blurring is not really high-quality. The pros is that it has a simple implementation and is fast to evaluate. This patch also fades the background alpha to make overlay engine draw the default background color in the correct color space. Removing one colorspace hack. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6895 --- release/scripts/startup/bl_ui/space_view3d.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 5ca6bbb20b7..e92490bcbdc 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5415,6 +5415,7 @@ class VIEW3D_PT_shading_lighting(Panel): col.prop(shading, "studiolight_rotate_z", text="Rotation") col.prop(shading, "studiolight_intensity") col.prop(shading, "studiolight_background_alpha") + col.prop(shading, "studiolight_background_blur") col = split.column() # to align properly with above elif shading.type == 'RENDERED': @@ -5438,6 +5439,7 @@ class VIEW3D_PT_shading_lighting(Panel): col.prop(shading, "studiolight_rotate_z", text="Rotation") col.prop(shading, "studiolight_intensity") col.prop(shading, "studiolight_background_alpha") + col.prop(shading, "studiolight_background_blur") col = split.column() # to align properly with above -- cgit v1.2.3 From d95dbd1f4f1ca270e1f1d53ef75be29e7a423c28 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 26 Feb 2020 22:26:40 +1100 Subject: UI: add kerning menu for 3D text editing --- release/scripts/startup/bl_ui/space_view3d.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index e92490bcbdc..1dc5afe7c5e 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4329,6 +4329,23 @@ class VIEW3D_MT_edit_font(Menu): layout.operator("font.style_toggle", text="Toggle Underline", icon='UNDERLINE').style = 'UNDERLINE' layout.operator("font.style_toggle", text="Toggle Small Caps", icon='SMALL_CAPS').style = 'SMALL_CAPS' + layout.menu("VIEW3D_MT_edit_font_kerning") + + +class VIEW3D_MT_edit_font_kerning(Menu): + bl_label = "Kerning" + + def draw(self, context): + layout = self.layout + + ob = context.active_object + text = ob.data + kerning = text.edit_format.kerning + + layout.operator("font.change_spacing", text="Decrease Kerning").delta = -1 + layout.operator("font.change_spacing", text="Increase Kerning").delta = 1 + layout.operator("font.change_spacing", text="Reset Kerning").delta = -kerning + class VIEW3D_MT_edit_text_chars(Menu): bl_label = "Special Characters" @@ -7105,6 +7122,7 @@ classes = ( VIEW3D_MT_edit_curve_showhide, VIEW3D_MT_edit_surface, VIEW3D_MT_edit_font, + VIEW3D_MT_edit_font_kerning, VIEW3D_MT_edit_text_chars, VIEW3D_MT_edit_meta, VIEW3D_MT_edit_meta_showhide, -- cgit v1.2.3 From 41cc3ffaf31d8ef44552b25bf137a0fed6a11ba2 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Wed, 26 Feb 2020 16:25:25 +0100 Subject: UI: Add Separate to bone and curve edit context menus Makes it more consistent with mesh edit mode. --- release/scripts/startup/bl_ui/space_view3d.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 1dc5afe7c5e..8607c0c43b3 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4290,6 +4290,7 @@ class VIEW3D_MT_edit_curve_context_menu(Menu): # Remove layout.operator("curve.split") layout.operator("curve.decimate") + layout.operator("curve.separate") layout.operator("curve.dissolve_verts") layout.operator("curve.delete", text="Delete Segment").type = 'SEGMENT' layout.operator("curve.delete", text="Delete Point").type = 'VERT' @@ -4537,6 +4538,7 @@ class VIEW3D_MT_armature_context_menu(Menu): # Remove layout.operator("armature.split") + layout.operator("armature.separate") layout.operator("armature.merge") layout.operator("armature.dissolve") layout.operator("armature.delete") -- cgit v1.2.3 From 1a1f2912e65e99a38528e4cf18094a29412e17d5 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 26 Feb 2020 17:33:17 -0500 Subject: UI: Clarify Laplacian Deform - Match UI Style - Clarify that the vertex group is different then other modifiers --- release/scripts/startup/bl_ui/properties_data_modifier.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 5028c78f4c3..158202b0ba3 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -494,13 +494,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.prop(md, "iterations") - row = layout.row() - row.active = not is_bind - row.label(text="Anchors Vertex Group:") - - row = layout.row() + row = layout.row(align=True) row.enabled = not is_bind - row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop_search(md, "vertex_group", ob, "vertex_groups") row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') layout.separator() -- cgit v1.2.3 From f38c54d56ef5d7a4a02982c004509d66d9a9e55d Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 20 Feb 2020 16:45:33 +0100 Subject: Fix Vertex weight gradient tool show wrong weight/strength values in the UI Main issue is that the UI doesn not respect the Unified Weight/Strength setting (but instead alwasy shows the brushes weight/strength) Was working before, but somewhat missed in rBfb74dcc5d69d. See discussion in T74025 on why the Gradient Tool in its current state is not very user friendly in general, what I think we should do though is at least have the values in the UI respect Unified Weight / Unified Strength since this is what the tool will use internally... ref T74025 Maniphest Tasks: T74025 Differential Revision: https://developer.blender.org/D6900 --- .../startup/bl_ui/space_toolsystem_toolbar.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 2541613d1e6..d976de1762f 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1127,8 +1127,25 @@ class _defs_weight_paint: def draw_settings(context, layout, tool): brush = context.tool_settings.weight_paint.brush if brush is not None: - layout.prop(brush, "weight", slider=True) - layout.prop(brush, "strength", slider=True) + from bl_ui.properties_paint_common import UnifiedPaintPanel + UnifiedPaintPanel.prop_unified( + layout, + context, + brush, + "weight", + unified_name="use_unified_weight", + slider=True, + header=True + ) + UnifiedPaintPanel.prop_unified( + layout, + context, + brush, + "strength", + unified_name="use_unified_strength", + header=True + ) + props = tool.operator_properties("paint.weight_gradient") layout.prop(props, "type", expand=True) -- cgit v1.2.3 From 28fca2c588fdfb44919ec82eddab19d8cf2e8c9e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 28 Feb 2020 08:58:34 +1100 Subject: Docs: update the tool key-map docs, reference them from the toolbar --- .../startup/bl_ui/space_toolsystem_common.py | 31 ++++++++++++++++++---- .../startup/bl_ui/space_toolsystem_toolbar.py | 3 +++ 2 files changed, 29 insertions(+), 5 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index d2deb70d4a2..796c089906d 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -68,8 +68,8 @@ ToolDef = namedtuple( "idname", # The name to display in the interface. "label", - # Description (for tooltip), when not set, use the description of 'operator', - # may be a string or a 'function(context, item, keymap) -> string'. + # Description (for tool-tip), when not set, use the description of 'operator', + # may be a string or a 'function(context, item, key-map) -> string'. "description", # The name of the icon to use (found in ``release/datafiles/icons``) or None for no icon. "icon", @@ -77,13 +77,34 @@ ToolDef = namedtuple( "cursor", # An optional gizmo group to activate when the tool is set or None for no gizmo. "widget", - # Optional keymap for tool, either: - # - A function that populates a keymaps passed in as an argument. + # Optional key-map for tool, possible values are: + # + # - ``None`` when the tool doesn't have a key-map. + # Also the default value when no key-map value is defined. + # + # - A string literal for the key-map name, the key-map items are located in the default key-map. + # + # - ``()`` an empty tuple for a default name. + # This is convenience functionality for generating a key-map name. + # So if a tool name is "Bone Size", in "Edit Armature" mode for the "3D View", + # All of these values are combined into an id, e.g: + # "3D View Tool: Edit Armature, Bone Envelope" + # + # Typically searching for a string ending with the tool name + # in the default key-map will lead you to the key-map for a tool. + # + # - A function that populates a key-maps passed in as an argument. + # # - A tuple filled with triple's of: # ``(operator_id, operator_properties, keymap_item_args)``. # + # Use this to define the key-map in-line. + # + # Note that this isn't used for Blender's built in tools which use the built-in key-map. + # Keep this functionality since it's likely useful for add-on key-maps. + # # Warning: currently 'from_dict' this is a list of one item, - # so internally we can swap the keymap function for the keymap it's self. + # so internally we can swap the key-map function for the key-map it's self. # This isn't very nice and may change, tool definitions shouldn't care about this. "keymap", # Optional data-block associated with this tool. diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index d976de1762f..2c79ceb5763 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -18,6 +18,9 @@ # +# For documentation on tool definitions: see "bl_ui.space_toolsystem_common.ToolDef" +# where there are comments for each field and their use. + # For now group all tools together # we may want to move these into per space-type files. # -- cgit v1.2.3 From d9c25f0192f4f16337f65630b8d405e2d3b6e69d Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 28 Feb 2020 11:35:36 +0100 Subject: UI: Move menu shadow theme options next to each other For some reason they were separated, even though they are closely related. --- release/scripts/startup/bl_ui/space_userpref.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index a4e8ce0f3e3..22308f5f275 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -861,11 +861,11 @@ class USERPREF_PT_theme_interface_styles(ThemePanel, CenterAlignMixIn, Panel): flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) flow.prop(ui, "menu_shadow_fac") + flow.prop(ui, "menu_shadow_width") flow.prop(ui, "icon_alpha") flow.prop(ui, "icon_saturation") flow.prop(ui, "editor_outline") flow.prop(ui, "widget_text_cursor") - flow.prop(ui, "menu_shadow_width") flow.prop(ui, "widget_emboss") -- cgit v1.2.3 From 4a373afa5fb8f9eab92314fac1b140b7803f30fe Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 28 Feb 2020 14:40:40 +0100 Subject: Sculpt: Cloth brush This brush has a simple physics solver that helps when sculpting cloth. - The mass and the damping properties of the simulation are properties of the brush. - It has two additional radius control to limit the influence and falloff of the simulation. - Masked vertices are pinned in the simulation, and it applies the sculpt gravity directly in the solver. - The Cloth Brush has 7 deformation modes with 2 falloff types (radial and plane). The brush can create the constraints only on the required PBVH nodes, so the simulation is isolated on high poly meshes. As long as the brush size is not too big it should be possible to keep it real time. Known issues: - The way constraints are created is extremely basic and it creates repeated constraints. Maybe there is another way to create fewer constraints while keeping the simulation quality decent. This part can also be multithreaded. (As it is it works ok, but it could be better) Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6715 --- release/scripts/startup/bl_ui/properties_paint_common.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 24016061194..704af1ae307 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -626,6 +626,18 @@ def brush_settings(layout, context, brush, popover=False): layout.prop(brush, "pose_ik_segments") layout.prop(brush, "use_pose_ik_anchored") layout.separator() + + if brush.sculpt_tool == 'CLOTH': + layout.separator() + layout.prop(brush, "cloth_sim_limit") + layout.prop(brush, "cloth_sim_falloff") + layout.separator() + layout.prop(brush, "cloth_deform_type") + layout.prop(brush, "cloth_force_falloff_type") + layout.separator() + layout.prop(brush, "cloth_mass") + layout.prop(brush, "cloth_damping") + layout.separator() if brush.sculpt_tool == 'SCRAPE': row = layout.row() -- cgit v1.2.3 From 85f980c517e42d41352bf7190ae850239edc2f88 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 28 Feb 2020 08:45:17 -0800 Subject: UI: Remove Support for Large Cursors Removing the 'Large Cursors' option as it is no longer applicable or useful on any platform. Differential Revision: https://developer.blender.org/D6958 Reviewed by Brecht Van Lommel --- release/scripts/startup/bl_ui/space_userpref.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 22308f5f275..7e868b21e8a 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -197,7 +197,6 @@ class USERPREF_PT_interface_display(InterfacePanel, CenterAlignMixIn, Panel): flow.prop(view, "show_tooltips") flow.prop(view, "show_tooltips_python") flow.prop(view, "show_developer_ui") - flow.prop(view, "show_large_cursors") class USERPREF_PT_interface_text(InterfacePanel, CenterAlignMixIn, Panel): -- cgit v1.2.3 From ff0124418f42dc12f31b00faf23276db961e2e51 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Sun, 1 Mar 2020 19:57:44 +0100 Subject: Sculpt: Hardness brush property The hardness property moves the brush falloff towards the edges, making the brush sharper. This should be the intended way to control the brush falloff instead of tweaking the falloff curve manually, as it can be mapped to pressure to make the falloff variable during the stroke. It is also a good idea to show in the UI that the custom curves is an advance features and it should almost never be modified when sculpting/ painting unless you want to create some advanced effects. By modifying the curves freely it is really easy to break the brushes and make them produce artifacts. This needs to be done in a later after merging the pending projects to reorganize all the brush properties accordingly. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6902 --- release/scripts/startup/bl_ui/properties_paint_common.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 704af1ae307..1e2ba13f467 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -536,6 +536,7 @@ def brush_settings(layout, context, brush, popover=False): # normal_radius_factor layout.prop(brush, "normal_radius_factor", slider=True) + layout.prop(brush, "hardness", slider=True) # auto_smooth_factor and use_inverse_smooth_pressure if capabilities.has_auto_smooth: -- cgit v1.2.3 From 2841b2be3949b7592b50cd2ebd03b9b32a5f2058 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 3 Mar 2020 17:21:28 +0100 Subject: IDs: change FILTER_ID_* to 64 bit to make space for new ID types And change file browser to boolean from bitflag enum, which is only 32 bit. Differential Revision: https://developer.blender.org/D7004 --- release/scripts/startup/bl_ui/space_filebrowser.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 8ff85459d35..95046678b27 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -148,7 +148,12 @@ class FILEBROWSER_PT_filter(Panel): if params.use_filter_blendid: row = col.row() row.label(icon='BLANK1') # Indentation - row.prop(params, "filter_id_category", text="") + + sub = row.column(align=True) + filter_id = params.filter_id + for identifier in dir(filter_id): + if identifier.startswith("category_"): + sub.prop(filter_id, identifier, toggle=True) col.separator() @@ -314,8 +319,11 @@ class FILEBROWSER_PT_advanced_filter(Panel): layout.prop(params, "use_filter_blendid") if params.use_filter_blendid: layout.separator() - col = layout.column() - col.prop(params, "filter_id") + col = layout.column(align=True) + filter_id = params.filter_id + for identifier in dir(filter_id): + if identifier.startswith("filter_"): + col.prop(filter_id, identifier, toggle=True) class FILEBROWSER_PT_directory_path(Panel): -- cgit v1.2.3 From 059f3c1a7eb8a48aa06467e19cce4daa29091c1a Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 3 Mar 2020 18:41:50 +0100 Subject: Modifiers: Wave add invert vgroup option Adds the invert vgroup option to the Wave modifier. Differential Revision: https://developer.blender.org/D6893 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 158202b0ba3..603c873c290 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1217,7 +1217,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.separator() layout.prop(md, "start_position_object") - layout.prop_search(md, "vertex_group", ob, "vertex_groups") + row = layout.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') split = layout.split(factor=0.33) col = split.column() col.label(text="Texture") -- cgit v1.2.3 From 6958ec3f7fc23b0ad605c0cfbdbb38417e89f81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Wed, 4 Mar 2020 17:23:09 +0100 Subject: Fluid: Added an option to delete fluid inside obstacles Simple checkbox that - if enabled - will tell the solver to clear density or liquid particles in obstacle cells. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 4d6d3d8f607..04297fc725b 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -271,10 +271,10 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col.prop(effector_settings, "use_plane_init", text="Is Planar") col.prop(effector_settings, "surface_distance", text="Surface Thickness") + col.prop(effector_settings, "delete_in_obstacle", text="Delete In Obstacle") if effector_settings.effector_type == 'GUIDE': col.prop(effector_settings, "velocity_factor", text="Velocity Factor") - col = flow.column() col.prop(effector_settings, "guide_mode", text="Guide Mode") -- cgit v1.2.3 From 5b0f1e7649acca541559ef2536b15d1525422571 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Mar 2020 08:05:21 +1100 Subject: Cleanup: formatting, strip trailing space --- release/scripts/startup/bl_ui/properties_paint_common.py | 2 +- release/scripts/startup/bl_ui/properties_view_layer.py | 2 +- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 1e2ba13f467..83455ae4af2 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -639,7 +639,7 @@ def brush_settings(layout, context, brush, popover=False): layout.prop(brush, "cloth_mass") layout.prop(brush, "cloth_damping") layout.separator() - + if brush.sculpt_tool == 'SCRAPE': row = layout.row() row.prop(brush, "area_radius_factor", slider=True) diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 25244b7f065..5fe06ebbb6e 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -67,7 +67,7 @@ class VIEWLAYER_PT_eevee_layer_passes_data(ViewLayerButtonsPanel, Panel): bl_parent_id = "VIEWLAYER_PT_eevee_layer_passes" COMPAT_ENGINES = {'BLENDER_EEVEE'} - + def draw(self, context): layout = self.layout layout.use_property_split = True diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index cf1b99cee89..9c8378438c7 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1870,7 +1870,7 @@ classes = ( VIEW3D_PT_tools_curveedit_options_stroke, VIEW3D_PT_tools_armatureedit_options, VIEW3D_PT_tools_posemode_options, - + VIEW3D_PT_slots_projectpaint, VIEW3D_PT_tools_brush_select, VIEW3D_PT_tools_brush_settings, @@ -1910,7 +1910,7 @@ classes = ( VIEW3D_PT_tools_imagepaint_symmetry, VIEW3D_PT_tools_imagepaint_options, - + VIEW3D_PT_tools_imagepaint_options_external, VIEW3D_MT_tools_projectpaint_stencil, -- cgit v1.2.3 From 55b465f976a0535553f30fa830b2a1f7fa755469 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 4 Mar 2020 16:13:10 -0500 Subject: UI: Fluid: Use updated preset UI Part of T73617 --- .../startup/bl_ui/properties_physics_fluid.py | 23 +++++++--------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 04297fc725b..98faabeb728 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -19,20 +19,18 @@ # import bpy -from bpy.types import ( - Panel, - Menu, -) +from bpy.types import Menu, Panel +from bl_ui.utils import PresetPanel from .properties_physics_common import ( effector_weights_ui, ) -class FLUID_MT_presets(Menu): +class FLUID_MT_presets(PresetPanel, Panel): bl_label = "Fluid Presets" preset_subdir = "fluid" preset_operator = "script.execute_preset" - draw = Menu.draw_preset + preset_add_operator = "fluid.preset_add" class PhysicButtonsPanel: @@ -962,6 +960,9 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): return (context.engine in cls.COMPAT_ENGINES) + def draw_header_preset(self, _context): + FLUID_MT_presets.draw_panel_header(self.layout) + def draw(self, context): layout = self.layout layout.use_property_split = True @@ -975,16 +976,6 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) flow.enabled = not is_baking_any and not has_baked_any and not has_baked_data - row = flow.row() - - col = row.column() - col.label(text="Viscosity Presets:") - col.menu("FLUID_MT_presets", text=bpy.types.FLUID_MT_presets.bl_label) - - col = row.column(align=True) - col.operator("fluid.preset_add", text="", icon='ADD') - col.operator("fluid.preset_add", text="", icon='REMOVE').remove_active = True - col = flow.column(align=True) col.prop(domain, "viscosity_base", text="Base") col.prop(domain, "viscosity_exponent", text="Exponent", slider=True) -- cgit v1.2.3 From bd0f5fa71f16e5052a82e902579fdd2f53718aa9 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 4 Mar 2020 16:16:40 -0500 Subject: UI: Fluid Group Liquid/Gas Panels Part of T73617 Differential Revision: https://developer.blender.org/D6994 --- .../startup/bl_ui/properties_physics_fluid.py | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 98faabeb728..353223ba771 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -316,8 +316,8 @@ class PHYSICS_PT_borders(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): - bl_label = "Smoke" - bl_parent_id = 'PHYSICS_PT_settings' + bl_label = "Gas" + bl_parent_id = 'PHYSICS_PT_fluid' COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @classmethod @@ -393,7 +393,7 @@ class PHYSICS_PT_smoke_dissolve(PhysicButtonsPanel, Panel): class PHYSICS_PT_fire(PhysicButtonsPanel, Panel): bl_label = "Fire" - bl_parent_id = 'PHYSICS_PT_settings' + bl_parent_id = 'PHYSICS_PT_smoke' bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @@ -431,7 +431,7 @@ class PHYSICS_PT_fire(PhysicButtonsPanel, Panel): class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): bl_label = "Liquid" - bl_parent_id = 'PHYSICS_PT_settings' + bl_parent_id = 'PHYSICS_PT_fluid' COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} @classmethod @@ -620,7 +620,7 @@ class PHYSICS_PT_flow_texture(PhysicButtonsPanel, Panel): class PHYSICS_PT_adaptive_domain(PhysicButtonsPanel, Panel): bl_label = "Adaptive Domain" - bl_parent_id = 'PHYSICS_PT_fluid' + bl_parent_id = 'PHYSICS_PT_settings' bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} @@ -672,7 +672,7 @@ class PHYSICS_PT_adaptive_domain(PhysicButtonsPanel, Panel): class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): bl_label = "Noise" - bl_parent_id = 'PHYSICS_PT_fluid' + bl_parent_id = 'PHYSICS_PT_smoke' bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @@ -744,7 +744,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): bl_label = "Mesh" - bl_parent_id = 'PHYSICS_PT_fluid' + bl_parent_id = 'PHYSICS_PT_liquid' bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @@ -829,7 +829,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): bl_label = "Particles" - bl_parent_id = 'PHYSICS_PT_fluid' + bl_parent_id = 'PHYSICS_PT_liquid' bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} @@ -948,7 +948,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): bl_label = "Diffusion" - bl_parent_id = 'PHYSICS_PT_fluid' + bl_parent_id = 'PHYSICS_PT_liquid' bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @@ -1315,23 +1315,23 @@ classes = ( PHYSICS_PT_fluid, PHYSICS_PT_settings, PHYSICS_PT_borders, + PHYSICS_PT_adaptive_domain, PHYSICS_PT_smoke, PHYSICS_PT_smoke_dissolve, + PHYSICS_PT_noise, PHYSICS_PT_fire, PHYSICS_PT_liquid, - PHYSICS_PT_flow_source, - PHYSICS_PT_flow_initial_velocity, - PHYSICS_PT_flow_texture, - PHYSICS_PT_adaptive_domain, - PHYSICS_PT_noise, - PHYSICS_PT_mesh, - PHYSICS_PT_particles, PHYSICS_PT_diffusion, + PHYSICS_PT_particles, + PHYSICS_PT_mesh, PHYSICS_PT_guide, PHYSICS_PT_collections, PHYSICS_PT_cache, PHYSICS_PT_export, PHYSICS_PT_field_weights, + PHYSICS_PT_flow_source, + PHYSICS_PT_flow_initial_velocity, + PHYSICS_PT_flow_texture, PHYSICS_PT_viewport_display, PHYSICS_PT_viewport_display_color, PHYSICS_PT_viewport_display_debug, -- cgit v1.2.3 From 6ab14d971cff27febf527edea6d74e304bfed4ed Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 4 Mar 2020 17:40:23 -0500 Subject: UI: Fluid: Viewport Display Cleanup the order of properties and hide sub setting as they were confusing before. --- .../startup/bl_ui/properties_physics_fluid.py | 34 ++++++++++------------ 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 353223ba771..329f0feaad2 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -1222,35 +1222,31 @@ class PHYSICS_PT_viewport_display(PhysicButtonsPanel, Panel): flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True) domain = context.fluid.domain_settings - - col = flow.column() - col.prop(domain, "display_thickness") - - col.separator() - - col.prop(domain, "slice_method", text="Slicing") - slice_method = domain.slice_method axis_slice_method = domain.axis_slice_method do_axis_slicing = (slice_method == 'AXIS_ALIGNED') do_full_slicing = (axis_slice_method == 'FULL') - col = col.column() - col.enabled = do_axis_slicing - col.prop(domain, "axis_slice_method") + col = flow.column(align=False) + col.prop(domain, "display_thickness") + col.prop(domain, "display_interpolation") + col.separator() col = flow.column() - sub = col.column() - sub.enabled = not do_full_slicing and do_axis_slicing - sub.prop(domain, "slice_axis") - sub.prop(domain, "slice_depth") + col.prop(domain, "slice_method", text="Slicing") - row = col.row() - row.enabled = do_full_slicing or not do_axis_slicing - row.prop(domain, "slice_per_voxel") + col = col.column() + col.active = do_axis_slicing + col.prop(domain, "axis_slice_method") - col.prop(domain, "display_interpolation") + if not do_full_slicing and do_axis_slicing: + col.prop(domain, "slice_axis") + col.prop(domain, "slice_depth") + + col = col.column() + col.active = do_full_slicing or not do_axis_slicing + col.prop(domain, "slice_per_voxel") class PHYSICS_PT_viewport_display_color(PhysicButtonsPanel, Panel): -- cgit v1.2.3 From 337e86148688aa608d007381ee9ca78879050754 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 4 Mar 2020 17:41:06 -0500 Subject: UI: Fluid: Fix wrong uses of enabled --- .../startup/bl_ui/properties_physics_fluid.py | 42 ++++++++++------------ 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 329f0feaad2..5a741533795 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -177,12 +177,11 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col.prop(domain, "time_scale", text="Time Scale") col.prop(domain, "cfl_condition", text="CFL Number") - col = flow.column() + col = flow.column(align=True) col.prop(domain, "use_adaptive_timesteps") - col1 = col.column(align=True) - col1.enabled = domain.use_adaptive_timesteps - col1.prop(domain, "timesteps_max", text="Timesteps Maximum") - col1.prop(domain, "timesteps_min", text="Minimum") + col.active = domain.use_adaptive_timesteps + col.prop(domain, "timesteps_max", text="Timesteps Maximum") + col.prop(domain, "timesteps_min", text="Minimum") col.separator() @@ -479,9 +478,8 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): col = flow.column() col.prop(domain, "use_fractions", text="Fractional Obstacles") - col1 = col.column() - col1.enabled = domain.use_fractions - col1.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") + col.active = domain.use_fractions + col.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): @@ -695,7 +693,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): layout.use_property_split = True domain = context.fluid.domain_settings - layout.enabled = domain.use_noise + layout.active = domain.use_noise is_baking_any = domain.is_cache_baking_any has_baked_noise = domain.has_cache_baked_noise @@ -767,7 +765,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): layout.use_property_split = True domain = context.fluid.domain_settings - layout.enabled = domain.use_mesh + layout.active = domain.use_mesh is_baking_any = domain.is_cache_baking_any has_baked_mesh = domain.has_cache_baked_mesh @@ -854,21 +852,20 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): flow.enabled = not is_baking_any sndparticle_combined_export = domain.sndparticle_combined_export + row = flow.row() + row.enabled = sndparticle_combined_export in {'OFF', 'FOAM + BUBBLES'} + row.prop(domain, "use_spray_particles", text="Spray") + row.prop(domain, "use_foam_particles", text="Foam") + row.prop(domain, "use_bubble_particles", text="Bubbles") + col = flow.column() - col.enabled = sndparticle_combined_export in {'OFF', 'FOAM + BUBBLES'} - col.prop(domain, "use_spray_particles", text="Spray") - col = flow.column() - col.enabled = sndparticle_combined_export in {'OFF', 'SPRAY + BUBBLES'} - col.prop(domain, "use_foam_particles", text="Foam") - col = flow.column() - col.enabled = sndparticle_combined_export in {'OFF', 'SPRAY + FOAM'} - col.prop(domain, "use_bubble_particles", text="Bubbles") + col.prop(domain, "sndparticle_combined_export") flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - flow.enabled = not is_baking_any and not has_baked_particles and using_particles + flow.enabled = not is_baking_any and not has_baked_particles + flow.active = using_particles col = flow.column() - col.prop(domain, "sndparticle_combined_export") col.prop(domain, "particle_scale", text="Upres Factor") col.separator() @@ -1269,8 +1266,7 @@ class PHYSICS_PT_viewport_display_color(PhysicButtonsPanel, Panel): domain = context.fluid.domain_settings col = layout.column() - col.enabled = domain.use_color_ramp - + col.active = domain.use_color_ramp col.prop(domain, "coba_field") col.use_property_split = False @@ -1301,7 +1297,7 @@ class PHYSICS_PT_viewport_display_debug(PhysicButtonsPanel, Panel): domain = context.fluid.domain_settings col = flow.column() - col.enabled = domain.show_velocity + col.active = domain.show_velocity col.prop(domain, "vector_display_type", text="Display As") col.prop(domain, "vector_scale") -- cgit v1.2.3 From 3da2dc82132f82356ffdfaf3e4c9bf3e643e8aaf Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 4 Mar 2020 17:43:17 -0500 Subject: Fix RNA runtime warning from recent commit --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 5a741533795..117352bf8f4 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -26,7 +26,7 @@ from .properties_physics_common import ( ) -class FLUID_MT_presets(PresetPanel, Panel): +class FLUID_PT_presets(PresetPanel, Panel): bl_label = "Fluid Presets" preset_subdir = "fluid" preset_operator = "script.execute_preset" @@ -958,7 +958,7 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): return (context.engine in cls.COMPAT_ENGINES) def draw_header_preset(self, _context): - FLUID_MT_presets.draw_panel_header(self.layout) + FLUID_PT_presets.draw_panel_header(self.layout) def draw(self, context): layout = self.layout @@ -1303,7 +1303,7 @@ class PHYSICS_PT_viewport_display_debug(PhysicButtonsPanel, Panel): classes = ( - FLUID_MT_presets, + FLUID_PT_presets, PHYSICS_PT_fluid, PHYSICS_PT_settings, PHYSICS_PT_borders, -- cgit v1.2.3 From ae223ff52bed52811873c110ecf1045d2da35b9b Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 5 Mar 2020 11:40:05 +1100 Subject: Addons: deprecate 'wiki_url' When running with debug enabled ('-d' argument), warnings are printed for add-ons which are not yet updated. Reminder to name things based on what they do, not the technologies they use :) --- release/scripts/startup/bl_ui/space_userpref.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 7e868b21e8a..c3c99ebb826 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1873,16 +1873,16 @@ class USERPREF_PT_addons(AddOnPanel, Panel): split.label(text=" " + info["warning"], icon='ERROR') user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths) - tot_row = bool(info["wiki_url"]) + bool(user_addon) + tot_row = bool(info["doc_url"]) + bool(user_addon) if tot_row: split = colsub.row().split(factor=0.15) split.label(text="Internet:") sub = split.row() - if info["wiki_url"]: + if info["doc_url"]: sub.operator( "wm.url_open", text="Documentation", icon='HELP', - ).url = info["wiki_url"] + ).url = info["doc_url"] # Only add "Report a Bug" button if tracker_url is set # or the add-on is bundled (use official tracker then). if info.get("tracker_url"): -- cgit v1.2.3 From cd0a6ff5c45382fa5620dc6dbf089e2909e38a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Thu, 5 Mar 2020 12:35:50 +0100 Subject: Fluid: Diffusion settings now optional For optimization purposes these settings need to be enabled explicitly from now on. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 117352bf8f4..71170c04494 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -957,6 +957,14 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): return (context.engine in cls.COMPAT_ENGINES) + def draw_header(self, context): + md = context.fluid.domain_settings + domain = context.fluid.domain_settings + is_baking_any = domain.is_cache_baking_any + has_baked_any = domain.has_cache_baked_any + self.layout.enabled = not is_baking_any and not has_baked_any + self.layout.prop(md, "use_diffusion", text="") + def draw_header_preset(self, _context): FLUID_PT_presets.draw_panel_header(self.layout) -- cgit v1.2.3 From 38d6533f212bf9001cd5f70ed8757eccb9b39dad Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 5 Mar 2020 14:53:23 +0100 Subject: Sculpt Face Sets Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces. This initial commit includes: - Sculpt Face Sets data structures and PBVH rendering. - Face Set overlay and opacity controls. - Sculpt Undo support. - Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing. - Automasking and Mesh filter support. - Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding). - Sculpt Mode Face Sets and Visibility API. - Sculpt Face Sets creation and visibility management operators. - Operator to randomize the Face Sets colors. - Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke. - Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide). - Pie menu on the W key with Face common Sets operations. Know limitations: - Multires support. The Face Sets and Visibility API needs to be implemented for Multires. Reviewed By: jbakker, #user_interface, Severin Differential Revision: https://developer.blender.org/D6070 --- .../scripts/startup/bl_ui/properties_data_mesh.py | 1 + .../startup/bl_ui/properties_paint_common.py | 3 ++ .../startup/bl_ui/space_toolsystem_toolbar.py | 1 + release/scripts/startup/bl_ui/space_view3d.py | 54 ++++++++++++++++++++++ .../scripts/startup/bl_ui/space_view3d_toolbar.py | 1 + 5 files changed, 60 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index d6aa986613d..347c41b23fb 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -487,6 +487,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel): col.prop(mesh, "use_remesh_smooth_normals") col.prop(mesh, "use_remesh_preserve_volume") col.prop(mesh, "use_remesh_preserve_paint_mask") + col.prop(mesh, "remesh_preserve_sculpt_face_sets") col.operator("object.voxel_remesh", text="Voxel Remesh") else: col.operator("object.quadriflow_remesh", text="QuadriFlow Remesh") diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 83455ae4af2..f1f6e9898b1 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -807,6 +807,9 @@ def brush_settings_advanced(layout, context, brush, popover=False): # topology automasking layout.prop(brush, "use_automasking_topology") + # face masks automasking + layout.prop(brush, "use_automasking_face_sets") + # sculpt plane settings if capabilities.has_sculpt_plane: layout.prop(brush, "sculpt_plane") diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 2c79ceb5763..63fb72a71bd 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1030,6 +1030,7 @@ class _defs_sculpt: layout.prop(props, "type", expand=False) layout.prop(props, "strength") layout.prop(props, "deform_axis") + layout.prop(props, "use_face_sets") return dict( idname="builtin.mesh_filter", diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 8607c0c43b3..078ad967789 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -878,6 +878,7 @@ class VIEW3D_MT_editor_menus(Menu): layout.menu("VIEW3D_MT_%s" % mode_string.lower()) if mode_string == 'SCULPT': layout.menu("VIEW3D_MT_mask") + layout.menu("VIEW3D_MT_face_sets") else: layout.menu("VIEW3D_MT_object") @@ -2996,12 +2997,14 @@ class VIEW3D_MT_mask(Menu): props.keep_previous_mask = False props.invert = True props.smooth_iterations = 2 + props.create_face_set = False props = layout.operator("sculpt.mask_expand", text="Expand Mask By Curvature") props.use_normals = True props.keep_previous_mask = True props.invert = False props.smooth_iterations = 0 + props.create_face_set = False layout.separator() @@ -3020,6 +3023,31 @@ class VIEW3D_MT_mask(Menu): props = layout.operator("sculpt.dirty_mask", text='Dirty Mask') +class VIEW3D_MT_face_sets(Menu): + bl_label = "Face Sets" + + def draw(self, _context): + layout = self.layout + + + op = layout.operator("sculpt.face_sets_create", text='Face Set From Masked') + op.mode = 'MASKED' + + op = layout.operator("sculpt.face_sets_create", text='Face Set From Visible') + op.mode = 'VISIBLE' + + layout.separator() + + op = layout.operator("sculpt.face_set_change_visibility", text='Invert Visible Face Sets') + op.mode = 'INVERT' + + op = layout.operator("sculpt.face_set_change_visibility", text='Show All Face Sets') + op.mode = 'SHOW_ALL' + + layout.separator() + + op = layout.operator("sculpt.face_sets_randomize_colors", text='Randomize Colors') + class VIEW3D_MT_sculpt_set_pivot(Menu): bl_label = "Sculpt Set Pivot" @@ -5037,6 +5065,24 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu): op.filter_type = 'CONTRAST_DECREASE' op.auto_iteration_count = False +class VIEW3D_MT_sculpt_face_sets_edit_pie(Menu): + bl_label = "Face Sets Edit" + + def draw(self, _context): + layout = self.layout + pie = layout.menu_pie() + + op = pie.operator("sculpt.face_sets_create", text='Face Set From Masked') + op.mode = 'MASKED' + + op = pie.operator("sculpt.face_sets_create", text='Face Set From Visible') + op.mode = 'VISIBLE' + + op = pie.operator("sculpt.face_set_change_visibility", text='Invert Visible') + op.mode = 'INVERT' + + op = pie.operator("sculpt.face_set_change_visibility", text='Show All') + op.mode = 'SHOW_ALL' class VIEW3D_MT_wpaint_vgroup_lock_pie(Menu): bl_label = "Vertex Group Locks" @@ -6121,6 +6167,12 @@ class VIEW3D_PT_overlay_sculpt(Panel): sub.active = sculpt.show_mask sub.prop(overlay, "sculpt_mode_mask_opacity", text="Mask") + row = layout.row(align=True) + row.prop(sculpt, "show_face_sets", text="") + sub = row.row() + sub.active = sculpt.show_face_sets + row.prop(overlay, "sculpt_mode_face_sets_opacity", text="Face Sets") + class VIEW3D_PT_overlay_pose(Panel): bl_space_type = 'VIEW_3D' @@ -7064,6 +7116,7 @@ classes = ( VIEW3D_MT_sculpt, VIEW3D_MT_sculpt_set_pivot, VIEW3D_MT_mask, + VIEW3D_MT_face_sets, VIEW3D_MT_particle, VIEW3D_MT_particle_context_menu, VIEW3D_MT_particle_showhide, @@ -7148,6 +7201,7 @@ classes = ( VIEW3D_MT_proportional_editing_falloff_pie, VIEW3D_MT_sculpt_mask_edit_pie, VIEW3D_MT_wpaint_vgroup_lock_pie, + VIEW3D_MT_sculpt_face_sets_edit_pie, VIEW3D_PT_active_tool, VIEW3D_PT_active_tool_duplicate, VIEW3D_PT_view3d_properties, diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 9c8378438c7..1990e9a7260 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -846,6 +846,7 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel): col.prop(mesh, "use_remesh_smooth_normals") col.prop(mesh, "use_remesh_preserve_volume") col.prop(mesh, "use_remesh_preserve_paint_mask") + col.prop(mesh, "use_remesh_preserve_sculpt_face_sets") col.operator("object.voxel_remesh", text="Remesh") -- cgit v1.2.3 From e65f5c07b04e592dc7a5490ebc5f271d52729b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Fri, 6 Mar 2020 12:26:22 +0100 Subject: Fluid: Added missing UI options for effector objects UI was missing some of the new functionality introduced in a5c4a44df67e. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 71170c04494..ba21fe47519 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -262,12 +262,16 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): row = layout.row() row.prop(effector_settings, "effector_type") - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) + grid = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - col = flow.column() + col = grid.column() + col.prop(effector_settings, "subframes", text="Sampling Substeps") + col.prop(effector_settings, "surface_distance", text="Surface Thickness") + + col = grid.column() + col.prop(effector_settings, "use_effector", text="Use Effector") col.prop(effector_settings, "use_plane_init", text="Is Planar") - col.prop(effector_settings, "surface_distance", text="Surface Thickness") col.prop(effector_settings, "delete_in_obstacle", text="Delete In Obstacle") if effector_settings.effector_type == 'GUIDE': -- cgit v1.2.3 From 8bb0ac27dc1483b0d919ad68f2f7aaa21f5fa6f8 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 6 Mar 2020 14:17:30 +0100 Subject: Fix using wrong property name for preserve face sets when remeshing Spotted by Roel Koster in the initial face set commit. --- release/scripts/startup/bl_ui/properties_data_mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 347c41b23fb..d91b2ceb7f7 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -487,7 +487,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel): col.prop(mesh, "use_remesh_smooth_normals") col.prop(mesh, "use_remesh_preserve_volume") col.prop(mesh, "use_remesh_preserve_paint_mask") - col.prop(mesh, "remesh_preserve_sculpt_face_sets") + col.prop(mesh, "use_remesh_preserve_sculpt_face_sets") col.operator("object.voxel_remesh", text="Voxel Remesh") else: col.operator("object.quadriflow_remesh", text="QuadriFlow Remesh") -- cgit v1.2.3 From a9ac87be36984b89d95bb6ba6ee095465429400e Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 4 Mar 2020 17:31:36 +0100 Subject: Fix T73842: UI: add cloth collision settings to Hair Dynamics panel Since hair collisions were integrated with the cloth solver (rBd42a7bbd6ea5), there are a couple of relevant settings which were not exposed to the User: - Collision Quality - Minimum Distance (this was reported in T73842, default of 0.015m was still limiting in certain scenarios - this can now be made smaller) - Impulse clamping - Collision collection This will add a 'Collisions' panel to Hair Dynamics with those settings Note: in contrast to 'real' cloth, self-collisions are not supported for hair Maniphest Tasks: T73842 Differential Revision: https://developer.blender.org/D7032 --- .../scripts/startup/bl_ui/properties_particle.py | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 3384032e332..7eb173c88bb 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -413,6 +413,38 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel): box.label(text="Error: %.5f .. %.5f (avg. %.5f)" % (result.min_error, result.max_error, result.avg_error)) +class PARTICLE_PT_hair_dynamics_collision(ParticleButtonsPanel, Panel): + bl_label = "Collisions" + bl_parent_id = "PARTICLE_PT_hair_dynamics" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + @classmethod + def poll(cls, context): + return context.particle_system.cloth is not None + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + cloth_md = psys.cloth + cloth_collision = cloth_md.collision_settings + + layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked is False + + layout.use_property_split = True + + col = layout.column() + col.prop(cloth_collision, "collision_quality", text="Quality") + + layout.separator() + + col = layout.column() + col.prop(cloth_collision, "distance_min", slider=True, text="Distance") + col.prop(cloth_collision, "impulse_clamp") + col.prop(cloth_collision, "collection") + + class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel): bl_label = "Structure" bl_parent_id = "PARTICLE_PT_hair_dynamics" @@ -1986,6 +2018,7 @@ classes = ( PARTICLE_PT_emission, PARTICLE_PT_emission_source, PARTICLE_PT_hair_dynamics, + PARTICLE_PT_hair_dynamics_collision, PARTICLE_PT_hair_dynamics_structure, PARTICLE_PT_hair_dynamics_volume, PARTICLE_PT_cache, -- cgit v1.2.3 From 29f3af95272590d26f610ae828b2eeee89c82a00 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 9 Mar 2020 16:27:24 +0100 Subject: GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293 --- .../startup/bl_ui/properties_data_gpencil.py | 23 +- .../startup/bl_ui/properties_data_modifier.py | 551 +++++--------------- .../startup/bl_ui/properties_data_shaderfx.py | 40 +- .../bl_ui/properties_grease_pencil_common.py | 564 ++++++++++----------- .../startup/bl_ui/properties_material_gpencil.py | 80 ++- release/scripts/startup/bl_ui/properties_object.py | 22 + .../startup/bl_ui/properties_paint_common.py | 49 +- release/scripts/startup/bl_ui/space_dopesheet.py | 11 + release/scripts/startup/bl_ui/space_image.py | 5 + .../startup/bl_ui/space_toolsystem_toolbar.py | 75 ++- release/scripts/startup/bl_ui/space_topbar.py | 6 +- release/scripts/startup/bl_ui/space_userpref.py | 1 - release/scripts/startup/bl_ui/space_view3d.py | 269 ++++++++-- .../scripts/startup/bl_ui/space_view3d_toolbar.py | 454 +++++++++++++++-- 14 files changed, 1248 insertions(+), 902 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py index 883673ffd7a..4ed5264549f 100644 --- a/release/scripts/startup/bl_ui/properties_data_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py @@ -22,6 +22,7 @@ from bpy.types import Menu, Panel, UIList from rna_prop_ui import PropertyPanel from bl_ui.properties_grease_pencil_common import ( + GreasePencilLayerMasksPanel, GreasePencilLayerAdjustmentsPanel, GreasePencilLayerRelationsPanel, GreasePencilLayerDisplayPanel, @@ -116,7 +117,7 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel): def draw(self, context): layout = self.layout - #layout.use_property_split = True + # layout.use_property_split = True layout.use_property_decorate = False gpd = context.gpencil @@ -166,7 +167,6 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel): col = layout.column(align=True) if gpl: - layout = self.layout layout.use_property_split = True layout.use_property_decorate = True @@ -178,6 +178,15 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel): col = layout.row(align=True) col.prop(gpl, "opacity", text="Opacity", slider=True) + col = layout.row(align=True) + col.prop(gpl, "use_lights") + + +class DATA_PT_gpencil_layer_masks(LayerDataButtonsPanel, GreasePencilLayerMasksPanel, Panel): + bl_label = "Masks" + bl_parent_id = 'DATA_PT_gpencil_layers' + bl_options = {'DEFAULT_CLOSED'} + class DATA_PT_gpencil_layer_adjustments(LayerDataButtonsPanel, GreasePencilLayerAdjustmentsPanel, Panel): bl_label = "Adjustments" @@ -264,7 +273,7 @@ class DATA_PT_gpencil_onion_skinning_display(DataButtonsPanel, Panel): col.prop(gpd, "use_onion_fade", text="Fade") sub = layout.column() sub.active = gpd.onion_mode in {'RELATIVE', 'SELECTED'} - sub.prop(gpd, "use_onion_loop", text="Loop") + sub.prop(gpd, "use_onion_loop", text="Show Start Frame") class GPENCIL_MT_gpencil_vertex_group(Menu): @@ -364,9 +373,6 @@ class DATA_PT_gpencil_strokes(DataButtonsPanel, Panel): sub.active = gpd.stroke_thickness_space == 'WORLDSPACE' sub.prop(gpd, "pixel_factor", text="Thickness Scale") - layout.prop(gpd, "use_force_fill_recalc", text="Force Fill Update") - layout.prop(gpd, "use_adaptive_uv", text="Adaptive UVs") - class DATA_PT_gpencil_display(DataButtonsPanel, Panel): bl_label = "Viewport Display" @@ -381,8 +387,6 @@ class DATA_PT_gpencil_display(DataButtonsPanel, Panel): gpl = gpd.layers.active layout.prop(gpd, "edit_line_color", text="Edit Line Color") - if gpl: - layout.prop(gpd, "show_stroke_direction", text="Show Stroke Directions") class DATA_PT_gpencil_canvas(DataButtonsPanel, Panel): @@ -411,6 +415,7 @@ class DATA_PT_custom_props_gpencil(DataButtonsPanel, PropertyPanel, Panel): _context_path = "object.data" _property_type = bpy.types.GreasePencil + ############################### @@ -420,6 +425,7 @@ classes = ( DATA_PT_gpencil_onion_skinning, DATA_PT_gpencil_onion_skinning_custom_colors, DATA_PT_gpencil_onion_skinning_display, + DATA_PT_gpencil_layer_masks, DATA_PT_gpencil_layer_adjustments, DATA_PT_gpencil_layer_relations, DATA_PT_gpencil_layer_display, @@ -437,5 +443,6 @@ classes = ( if __name__ == "__main__": # only for live edit. from bpy.utils import register_class + for cls in classes: register_class(cls) diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 603c873c290..9070aa5faee 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1746,132 +1746,102 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): # ...to avoid lengthy if statements # so each type must have a function here. - def GP_NOISE(self, layout, ob, md): + def gpencil_masking(self, layout, ob, md, use_vertex, use_curve=False): gpd = ob.data - split = layout.split() - - col = split.column() - row = col.row(align=True) - row.prop(md, "factor") - row.prop(md, "random", text="", icon='TIME', toggle=True) - row = col.row() - row.enabled = md.random - row.prop(md, "step") - row = col.row() - row.enabled = md.random - row.prop(md, "seed") - col.prop(md, "full_stroke") - col.prop(md, "move_extreme") - - row = layout.row(align=True) - row.label(text="Affect:") - row = layout.row(align=True) - row.prop(md, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True) - row.prop(md, "use_edit_strength", text="Strength", icon='COLOR', toggle=True) - row.prop(md, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True) - row.prop(md, "use_edit_uv", text="UV", icon='MOD_UVPROJECT', toggle=True) + layout.separator() + layout.label(text="Influence Filters:") - col = layout.column() - col.separator() - col.label(text="Vertex Group:") - row = col.row(align=True) - row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") - row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT') + split = layout.split(factor=0.25) - col = layout.column() - col.separator() + col1 = split.column() - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') + col1.label(text="Layer:") + col1.label(text="Material:") + if use_vertex: + col1.label(text="Vertex Group:") - col = layout.column() - col.separator() + col2 = split.column() - col.label(text="Layer:") - row = col.row(align=True) + split = col2.split(factor=0.6) + row = split.row(align=True) row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) + + row = split.row(align=True) row.prop(md, "layer_pass", text="Pass") row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') - def GP_SMOOTH(self, layout, ob, md): - gpd = ob.data - col = layout.column() - col.prop(md, "factor") - col.prop(md, "step") + split = col2.split(factor=0.6) - col.label(text="Affect:") - row = col.row(align=True) - row.prop(md, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True) - row.prop(md, "use_edit_strength", text="Strength", icon='COLOR', toggle=True) - row.prop(md, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True) - row.prop(md, "use_edit_uv", text="UV", icon='MOD_UVPROJECT', toggle=True) - - col.separator() - col.label(text="Vertex Group:") - row = col.row(align=True) - row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") - row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) + row = split.row(align=True) row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) + + row = split.row(align=True) row.prop(md, "pass_index", text="Pass") row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') - col = layout.column() - col.separator() + if use_vertex: + row = col2.row(align=True) + row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT') - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + if use_curve: + col = layout.column() + col.separator() + col.prop(md, "use_custom_curve") + if md.use_custom_curve: + col.template_curve_mapping(md, "curve") - def GP_SUBDIV(self, layout, ob, md): - gpd = ob.data + def GP_NOISE(self, layout, ob, md): split = layout.split() col = split.column() row = col.row(align=True) - row.prop(md, "level") - row.prop(md, "simple", text="", icon='PARTICLE_POINT') + row.prop(md, "factor", text="Position") + row = col.row(align=True) + row.prop(md, "factor_strength", text="Strength") + row = col.row(align=True) + row.prop(md, "factor_thickness", text="Thickness") + row = col.row(align=True) + row.prop(md, "factor_uvs", text="UV") - col = layout.column() col.separator() - - col.label(text="Material:") row = col.row(align=True) + row.prop(md, "random", text="", icon='TIME', toggle=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') + subrow = row.row(align=True) + subrow.enabled = md.random + subrow.prop(md, "step") + subrow.prop(md, "seed") - col = layout.column() col.separator() + col.prop(md, "noise_scale") - col.label(text="Layer:") + self.gpencil_masking(layout, ob, md, True, True) + + def GP_SMOOTH(self, layout, ob, md): + col = layout.column() + col.prop(md, "factor") + col.prop(md, "step", text="Repeat") + + col.label(text="Affect:") row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + row.prop(md, "use_edit_position", text="Position", toggle=True) + row.prop(md, "use_edit_strength", text="Strength", toggle=True) + row.prop(md, "use_edit_thickness", text="Thickness", toggle=True) + row.prop(md, "use_edit_uv", text="UV", toggle=True) + + self.gpencil_masking(layout, ob, md, True, True) + + def GP_SUBDIV(self, layout, ob, md): + layout.row().prop(md, "subdivision_type", expand=True) + split = layout.split() + col = split.column() + row = col.row(align=True) + row.prop(md, "level", text="Subdivisions") + + self.gpencil_masking(layout, ob, md, False) def GP_SIMPLIFY(self, layout, ob, md): gpd = ob.data @@ -1893,77 +1863,21 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): elif md.mode == 'MERGE': col.prop(md, "distance") - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, False) def GP_THICK(self, layout, ob, md): - gpd = ob.data - split = layout.split() - - col = split.column() - row = col.row(align=True) - row.prop(md, "thickness", text="Thickness Factor") - - col.prop(md, "normalize_thickness") - - if not md.normalize_thickness: - split = layout.split() - col = split.column() - col.prop(md, "use_custom_curve") - - if md.use_custom_curve: - col.template_curve_mapping(md, "curve") - - col = layout.column() - col.separator() - col.label(text="Vertex Group:") - row = col.row(align=True) - row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") - row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT') - col = layout.column() - col.separator() - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') + col.prop(md, "normalize_thickness") - col = layout.column() - col.separator() + if md.normalize_thickness: + col.prop(md, "thickness") + else: + col.prop(md, "thickness_factor") - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, True, True) def GP_TINT(self, layout, ob, md): - gpd = ob.data split = layout.split() col = split.column() @@ -1971,30 +1885,9 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "factor") row = layout.row() - row.prop(md, "create_materials") row.prop(md, "modify_color") - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, False, True) def GP_TIME(self, layout, ob, md): gpd = ob.data @@ -2040,7 +1933,6 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') def GP_COLOR(self, layout, ob, md): - gpd = ob.data split = layout.split() col = split.column() @@ -2050,134 +1942,66 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "value", text="V", slider=True) row = layout.row() - row.prop(md, "create_materials") row.prop(md, "modify_color") - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, False, True) def GP_OPACITY(self, layout, ob, md): - gpd = ob.data split = layout.split() col = split.column() - col.label(text="Opacity:") - col.prop(md, "factor") - - row = layout.row() - row.prop(md, "opacity_mode", text="Mode") - - if md.opacity_mode == 'MATERIAL': - row = layout.row() - row.prop(md, "create_materials") - row.prop(md, "modify_color", text="Change") + col.prop(md, "normalize_opacity") + if md.normalize_opacity is True: + text="Strength" else: - col = layout.column() - col.separator() - col.label(text="Vertex Group:") - row = col.row(align=True) - row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") - row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') + text="Opacity Factor" - col = layout.column() - col.separator() + col.prop(md, "factor", text=text) + col.prop(md, "modify_color") - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, True, True) def GP_ARRAY(self, layout, ob, md): - gpd = ob.data - col = layout.column() col.prop(md, "count") split = layout.split() col = split.column() - col.label(text="Offset:") - col.prop(md, "offset", text="") - col.prop(md, "offset_object", text="Object") + col.prop(md, "use_constant_offset", text="Constant Offset") + subcol = col.column() + subcol.enabled = md.use_constant_offset + subcol.prop(md, "constant_offset", text="") + + col.prop(md, "use_object_offset") + subcol = col.column() + subcol.enabled = md.use_object_offset + subcol.prop(md, "offset_object", text="") col = split.column() - col.label(text="Shift:") - col.prop(md, "shift", text="") + col.prop(md, "use_relative_offset", text="Relative Offset") + subcol = col.column() + subcol.enabled = md.use_relative_offset + subcol.prop(md, "relative_offset", text="") split = layout.split() col = split.column() - col.label(text="Rotation:") - col.prop(md, "rotation", text="") - col.separator() - row = col.row(align=True) - row.prop(md, "random_rot", text="", icon='TIME', toggle=True) - row.prop(md, "rot_factor", text="") + col.label(text="Random Offset:") + col.prop(md, "random_offset", text="") col = split.column() - col.label(text="Scale:") - col.prop(md, "scale", text="") - col.separator() - row = col.row(align=True) - row.prop(md, "random_scale", text="", icon='TIME', toggle=True) - row.prop(md, "scale_factor", text="") + col.label(text="Random Rotation:") + col.prop(md, "random_rotation", text="") - col = layout.column() - col.prop(md, "replace_material", text="Material") - col.prop(md, "keep_on_top", text="Keep original stroke on top") - - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') + col = split.column() + col.label(text="Random Scale:") + col.prop(md, "random_scale", text="") col = layout.column() + col.prop(md, "seed") col.separator() + col.prop(md, "replace_material", text="Material Override") - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, False) def GP_BUILD(self, layout, ob, md): gpd = ob.data @@ -2215,7 +2039,6 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') def GP_LATTICE(self, layout, ob, md): - gpd = ob.data split = layout.split() col = split.column() @@ -2224,70 +2047,20 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): layout.prop(md, "strength", slider=True) - col = layout.column() - col.separator() - col.label(text="Vertex Group:") - row = col.row(align=True) - row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") - row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, True) def GP_MIRROR(self, layout, ob, md): - gpd = ob.data - row = layout.row(align=True) row.prop(md, "x_axis") row.prop(md, "y_axis") row.prop(md, "z_axis") - layout.label(text="Object:") + layout.label(text="Mirror Object:") layout.prop(md, "object", text="") - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, False) def GP_HOOK(self, layout, ob, md): - gpd = ob.data split = layout.split() col = split.column() @@ -2317,71 +2090,16 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.prop(md, "use_falloff_uniform") - col = layout.column() - col.separator() - col.label(text="Vertex Group:") - row = col.row(align=True) - row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") - row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, True) def GP_OFFSET(self, layout, ob, md): - gpd = ob.data - col = layout.column() - - col.prop(md, "location") - col.prop(md, "scale") - col.prop(md, "rotation") - - col = layout.column() - col.separator() - col.label(text="Vertex Group:") - row = col.row(align=True) - row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") - row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT') - - col = layout.column() - col.separator() - - col.label(text="Material:") - row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') + split = layout.split() - col = layout.column() - col.separator() + split.column().prop(md, "location") + split.column().prop(md, "rotation") + split.column().prop(md, "scale") - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + self.gpencil_masking(layout, ob, md, True) def GP_ARMATURE(self, layout, ob, md): split = layout.split() @@ -2407,50 +2125,42 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') def GP_MULTIPLY(self, layout, ob, md): - gpd = ob.data col = layout.column() - col.prop(md, "duplications") + col.prop(md, "duplicates") subcol = col.column() - subcol.enabled = md.duplications > 0 + subcol.enabled = md.duplicates > 0 subcol.prop(md, "distance") subcol.prop(md, "offset", slider=True) subcol.separator() - subcol.prop(md, "enable_fading") - if md.enable_fading: + subcol.prop(md, "use_fade") + if md.use_fade: subcol.prop(md, "fading_center") subcol.prop(md, "fading_thickness", slider=True) subcol.prop(md, "fading_opacity", slider=True) - subcol.separator() - - col.prop(md, "enable_angle_splitting") - if md.enable_angle_splitting: - col.prop(md, "split_angle") + self.gpencil_masking(layout, ob, md, False) + def GP_VERTEXCOLOR(self, layout, ob, md): col = layout.column() - col.separator() + col.label(text="Object:") + col.prop(md, "object", text="") - col.label(text="Material:") + col.separator() row = col.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') - row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "pass_index", text="Pass") - row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT') + row.prop(md, "radius") + row.prop(md, "factor", text="Strength", slider=True) - col = layout.column() col.separator() + col.label(text="Colors:") + col.template_color_ramp(md, "colors") - col.label(text="Layer:") - row = col.row(align=True) - row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') - row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) - row.prop(md, "layer_pass", text="Pass") - row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') + col.separator() + col.prop(md, "vertex_mode") + + self.gpencil_masking(layout, ob, md, True, True) classes = ( @@ -2460,5 +2170,6 @@ classes = ( if __name__ == "__main__": # only for live edit. from bpy.utils import register_class + for cls in classes: register_class(cls) diff --git a/release/scripts/startup/bl_ui/properties_data_shaderfx.py b/release/scripts/startup/bl_ui/properties_data_shaderfx.py index fce86446dfc..48a851e8bef 100644 --- a/release/scripts/startup/bl_ui/properties_data_shaderfx.py +++ b/release/scripts/startup/bl_ui/properties_data_shaderfx.py @@ -56,27 +56,30 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): def FX_BLUR(self, layout, fx): - layout.prop(fx, "factor", text="Factor") + layout.prop(fx, "use_dof_mode", text="Use as Depth Of Field") + layout.separator() + + col = layout.column() + col.enabled = not fx.use_dof_mode + col.prop(fx, "size", text="Size") + col.separator() + col.prop(fx, "rotation") + layout.prop(fx, "samples", text="Samples") - layout.separator() - layout.prop(fx, "use_dof_mode") - if fx.use_dof_mode: - layout.prop(fx, "coc") def FX_COLORIZE(self, layout, fx): layout.prop(fx, "mode", text="Mode") - if fx.mode == 'BITONE': + if fx.mode == 'DUOTONE': layout.prop(fx, "low_color", text="Low Color") if fx.mode == 'CUSTOM': layout.prop(fx, "low_color", text="Color") - if fx.mode == 'BITONE': + if fx.mode == 'DUOTONE': layout.prop(fx, "high_color", text="High Color") - if fx.mode in {'BITONE', 'CUSTOM', 'TRANSPARENT'}: - layout.prop(fx, "factor") + layout.prop(fx, "factor") def FX_WAVE(self, layout, fx): row = layout.row(align=True) @@ -127,16 +130,21 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): def FX_GLOW(self, layout, fx): layout.prop(fx, "mode") - layout.prop(fx, "glow_color") if fx.mode == 'LUMINANCE': layout.prop(fx, "threshold") else: layout.prop(fx, "select_color") + layout.prop(fx, "glow_color") layout.separator() - layout.prop(fx, "radius") + layout.prop(fx, "blend_mode", text="Blend") + layout.prop(fx, "opacity") + + layout.prop(fx, "size") + layout.prop(fx, "rotation") layout.prop(fx, "samples") - layout.prop(fx, "use_alpha_mode", text="Use Alpha Mode") + + layout.prop(fx, "use_glow_under", text="Glow Under") def FX_SWIRL(self, layout, fx): layout.prop(fx, "object", text="Object") @@ -144,18 +152,10 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): layout.prop(fx, "radius") layout.prop(fx, "angle") - layout.prop(fx, "use_transparent") - def FX_FLIP(self, layout, fx): layout.prop(fx, "flip_horizontal") layout.prop(fx, "flip_vertical") - def FX_LIGHT(self, layout, fx): - layout.prop(fx, "object", text="Object") - - layout.prop(fx, "energy") - layout.prop(fx, "ambient") - classes = ( DATA_PT_shader_fx, diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 2001f46820f..fced848641e 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -19,7 +19,7 @@ # import bpy -from bpy.types import Menu, UIList +from bpy.types import Menu, UIList, Operator from bpy.app.translations import pgettext_iface as iface_ @@ -108,11 +108,6 @@ class AnnotationDrawingToolsPanel: sub.operator("gpencil.blank_frame_add", icon='FILE_NEW') sub.operator("gpencil.active_frames_delete_all", icon='X', text="Delete Frame(s)") - #sub = col.column(align=True) - #sub.prop(context.tool_settings, "use_gpencil_draw_additive", text="Additive Drawing") - #sub.prop(context.tool_settings, "use_gpencil_continuous_drawing", text="Continuous Drawing") - #sub.prop(context.tool_settings, "use_gpencil_draw_onback", text="Draw on Back") - col.separator() col.separator() @@ -125,9 +120,6 @@ class AnnotationDrawingToolsPanel: elif is_clip_editor: row.prop(context.space_data, "grease_pencil_source", expand=True) - # col.separator() - # col.separator() - gpencil_stroke_placement_settings(context, col) @@ -136,29 +128,33 @@ class GreasePencilSculptOptionsPanel: @classmethod def poll(cls, context): - settings = context.tool_settings.gpencil_sculpt - tool = settings.sculpt_tool + tool_settings = context.scene.tool_settings + settings = tool_settings.gpencil_sculpt_paint + brush = settings.brush + tool = brush.gpencil_sculpt_tool - return bool(tool in {'SMOOTH', 'RANDOMIZE', 'SMOOTH'}) + return bool(tool in {'SMOOTH', 'RANDOMIZE'}) def draw(self, context): layout = self.layout layout.use_property_split = True layout.use_property_decorate = False - settings = context.tool_settings.gpencil_sculpt - tool = settings.sculpt_tool + tool_settings = context.scene.tool_settings + settings = tool_settings.gpencil_sculpt_paint brush = settings.brush + gp_settings = brush.gpencil_settings + tool = brush.gpencil_sculpt_tool if tool in {'SMOOTH', 'RANDOMIZE'}: - layout.prop(settings, "use_edit_position", text="Affect Position") - layout.prop(settings, "use_edit_strength", text="Affect Strength") - layout.prop(settings, "use_edit_thickness", text="Affect Thickness") + layout.prop(gp_settings, "use_edit_position", text="Affect Position") + layout.prop(gp_settings, "use_edit_strength", text="Affect Strength") + layout.prop(gp_settings, "use_edit_thickness", text="Affect Thickness") if tool == 'SMOOTH': - layout.prop(brush, "use_edit_pressure") + layout.prop(gp_settings, "use_edit_pressure") - layout.prop(settings, "use_edit_uv", text="Affect UV") + layout.prop(gp_settings, "use_edit_uv", text="Affect UV") # GP Object Tool Settings @@ -174,7 +170,7 @@ class GreasePencilDisplayPanel: if context.mode == 'PAINT_GPENCIL': return brush.gpencil_tool != 'ERASE' else: - # GP Sculpt and Weight Paint always have Brush Tip panel. + # GP Sculpt, Vertex and Weight Paint always have Brush Tip panel. return True return False @@ -182,16 +178,18 @@ class GreasePencilDisplayPanel: if self.is_popover: return + tool_settings = context.tool_settings if context.mode == 'PAINT_GPENCIL': - brush = context.tool_settings.gpencil_paint.brush - gp_settings = brush.gpencil_settings - - self.layout.prop(gp_settings, "use_cursor", text="") - elif context.mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}: - settings = context.tool_settings.gpencil_sculpt - brush = settings.brush - - self.layout.prop(brush, "use_cursor", text="") + settings = tool_settings.gpencil_paint + elif context.mode == 'SCULPT_GPENCIL': + settings = tool_settings.gpencil_sculpt_paint + elif context.mode == 'WEIGHT_GPENCIL': + settings = tool_settings.gpencil_weight_paint + elif context.mode == 'VERTEX_GPENCIL': + settings = tool_settings.gpencil_vertex_paint + brush = settings.brush + if brush: + self.layout.prop(settings, "show_brush", text="") def draw(self, context): layout = self.layout @@ -199,279 +197,101 @@ class GreasePencilDisplayPanel: layout.use_property_decorate = False tool_settings = context.tool_settings - ob = context.active_object + if context.mode == 'PAINT_GPENCIL': + settings = tool_settings.gpencil_paint + elif context.mode == 'SCULPT_GPENCIL': + settings = tool_settings.gpencil_sculpt_paint + elif context.mode == 'WEIGHT_GPENCIL': + settings = tool_settings.gpencil_weight_paint + elif context.mode == 'VERTEX_GPENCIL': + settings = tool_settings.gpencil_vertex_paint + brush = settings.brush + gp_settings = brush.gpencil_settings + ob = context.active_object if ob.mode == 'PAINT_GPENCIL': - brush = tool_settings.gpencil_paint.brush - gp_settings = brush.gpencil_settings if self.is_popover: row = layout.row(align=True) - row.prop(gp_settings, "use_cursor", text="") + row.prop(settings, "show_brush", text="") row.label(text="Display Cursor") col = layout.column(align=True) - col.active = gp_settings.use_cursor + col.active = settings.show_brush if brush.gpencil_tool == 'DRAW': col.prop(gp_settings, "show_lasso", text="Show Fill Color While Drawing") - if brush.gpencil_tool == 'FILL': - col.prop(brush, "cursor_color_add", text="Cursor Color") - - elif ob.mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}: - settings = tool_settings.gpencil_sculpt - brush = settings.brush - tool = settings.sculpt_tool - - if self.is_popover: - row = layout.row(align=True) - row.prop(brush, "use_cursor", text="") - row.label(text="Display Cursor") - + elif ob.mode == 'SCULPT_GPENCIL': col = layout.column(align=True) - col.active = brush.use_cursor + col.active = settings.show_brush col.prop(brush, "cursor_color_add", text="Cursor Color") - if tool in {'THICKNESS', 'STRENGTH', 'PINCH', 'TWIST'}: - col.prop(brush, "cursor_color_sub", text="Inverse Cursor Color") - - -class GPENCIL_MT_pie_tool_palette(Menu): - """A pie menu for quick access to Grease Pencil tools""" - bl_label = "Grease Pencil Tools" - - def draw(self, context): - layout = self.layout - - pie = layout.menu_pie() - gpd = context.gpencil_data - - # W - Drawing Types - col = pie.column() - col.operator("gpencil.draw", text="Draw", icon='GREASEPENCIL').mode = 'DRAW' - col.operator("gpencil.draw", text="Straight Lines", icon='LINE_DATA').mode = 'DRAW_STRAIGHT' - col.operator("gpencil.draw", text="Poly", icon='MESH_DATA').mode = 'DRAW_POLY' - - # E - Eraser - # XXX: needs a dedicated icon... - col = pie.column() - col.operator("gpencil.draw", text="Eraser", icon='FORCE_CURVE').mode = 'ERASER' - - # E - "Settings" Palette is included here too, since it needs to be in a stable position... - if gpd and gpd.layers.active: - col.separator() - col.operator( - "wm.call_menu_pie", - text="Settings...", - icon='SCRIPTWIN').name = "GPENCIL_MT_pie_settings_palette" - - # Editing tools - if gpd: - if gpd.use_stroke_edit_mode and context.editable_gpencil_strokes: - # S - Exit Edit Mode - pie.operator("gpencil.editmode_toggle", text="Exit Edit Mode", icon='EDIT') - - # N - Transforms - col = pie.column() - row = col.row(align=True) - row.operator("transform.translate", icon='MAN_TRANS') - row.operator("transform.rotate", icon='MAN_ROT') - row.operator("transform.resize", text="Scale", icon='MAN_SCALE') - row = col.row(align=True) - row.label(text="Proportional Edit:") - row.prop(context.tool_settings, "use_proportional_edit", text="", icon_only=True) - row.prop(context.tool_settings, "proportional_edit_falloff", text="", icon_only=True) - - # NW - Select (Non-Modal) - col = pie.column() - col.operator("gpencil.select_all", text="Select All", icon='PARTICLE_POINT') - col.operator("gpencil.select_all", text="Select Inverse", icon='BLANK1') - col.operator("gpencil.select_linked", text="Select Linked", icon='LINKED') - col.operator("gpencil.palettecolor_select", text="Select Color", icon='COLOR') - - # NE - Select (Modal) - col = pie.column() - col.operator("gpencil.select_box", text="Box Select", icon='BORDER_RECT') - col.operator("gpencil.select_circle", text="Circle Select", icon='META_EMPTY') - col.operator("gpencil.select_lasso", text="Lasso Select", icon='BORDER_LASSO') - col.operator("gpencil.select_alternate", text="Alternate Select", icon='BORDER_LASSO') - - # SW - Edit Tools - col = pie.column() - col.operator("gpencil.duplicate_move", icon='PARTICLE_PATH', text="Duplicate") - col.operator("gpencil.delete", icon='X', text="Delete...") - - # SE - More Tools - pie.operator("wm.call_menu_pie", text="More...").name = "GPENCIL_MT_pie_tools_more" - else: - # Toggle Edit Mode - pie.operator("gpencil.editmode_toggle", text="Enable Stroke Editing", icon='EDIT') + if brush.gpencil_sculpt_tool in {'THICKNESS', 'STRENGTH', 'PINCH', 'TWIST'}: + col.prop(brush, "cursor_color_subtract", text="Inverse Cursor Color") + elif ob.mode == 'WEIGHT_GPENCIL': + col = layout.column(align=True) + col.active = settings.show_brush -class GPENCIL_MT_pie_settings_palette(Menu): - """A pie menu for quick access to Grease Pencil settings""" - bl_label = "Grease Pencil Settings" + col.prop(brush, "cursor_color_add", text="Cursor Color") - @classmethod - def poll(cls, context): - return bool(context.gpencil_data and context.active_gpencil_layer) + elif ob.mode == 'VERTEX_GPENCIL': + row = layout.row(align=True) + row.prop(settings, "show_brush", text="") + row.label(text="Display Cursor") - def draw(self, context): - layout = self.layout - pie = layout.menu_pie() - gpd = context.gpencil_data - gpl = context.active_gpencil_layer - palcolor = None # context.active_gpencil_palettecolor - - is_editmode = bool(gpd and gpd.use_stroke_edit_mode and context.editable_gpencil_strokes) - - # W - Stroke draw settings - col = pie.column(align=True) - if palcolor is not None: - col.enabled = not palcolor.lock - col.label(text="Stroke") - col.prop(palcolor, "color", text="") - col.prop(palcolor, "alpha", text="", slider=True) - - # E - Fill draw settings - col = pie.column(align=True) - if palcolor is not None: - col.enabled = not palcolor.lock - col.label(text="Fill") - col.prop(palcolor, "fill_color", text="") - col.prop(palcolor, "fill_alpha", text="", slider=True) - - # S Brush settings - gpencil_active_brush_settings_simple(context, pie) - - # N - Active Layer - col = pie.column() - col.label(text="Active Layer: ") - - row = col.row() - row.operator_context = 'EXEC_REGION_WIN' - row.operator_menu_enum("gpencil.layer_change", "layer", text="", icon='GREASEPENCIL') - row.prop(gpl, "info", text="") - row.operator("gpencil.layer_remove", text="", icon='X') - - row = col.row() - row.prop(gpl, "lock") - row.prop(gpl, "hide") - col.prop(gpl, "use_onion_skinning") - - # NW/NE/SW/SE - These operators are only available in editmode - # as they require strokes to be selected to work - if is_editmode: - # NW - Move stroke Down - col = pie.column(align=True) - col.label(text="Arrange Strokes") - col.operator("gpencil.stroke_arrange", text="Send to Back").direction = 'BOTTOM' - col.operator("gpencil.stroke_arrange", text="Send Backward").direction = 'DOWN' - - # NE - Move stroke Up - col = pie.column(align=True) - col.label(text="Arrange Strokes") - col.operator("gpencil.stroke_arrange", text="Bring to Front").direction = 'TOP' - col.operator("gpencil.stroke_arrange", text="Bring Forward").direction = 'UP' - - # SW - Move stroke to color - col = pie.column(align=True) - col.operator("gpencil.stroke_change_color", text="Move to Color") - - # SE - Join strokes - col = pie.column(align=True) - col.label(text="Join Strokes") - row = col.row() - row.operator("gpencil.stroke_join", text="Join").type = 'JOIN' - row.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' - col.operator("gpencil.stroke_flip", text="Flip Direction") - - col.prop(gpd, "show_stroke_direction", text="Show Drawing Direction") - - -class GPENCIL_MT_pie_tools_more(Menu): - """A pie menu for accessing more Grease Pencil tools""" - bl_label = "More Grease Pencil Tools" +class GreasePencilBrushFalloff: + bl_label = "Falloff" + bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): - gpd = context.gpencil_data - return bool(gpd and gpd.use_stroke_edit_mode and context.editable_gpencil_strokes) - - def draw(self, _context): - layout = self.layout - - pie = layout.menu_pie() - # gpd = context.gpencil_data - - col = pie.column(align=True) - col.operator("gpencil.copy", text="Copy", icon='COPYDOWN') - col.operator("gpencil.paste", text="Paste", icon='PASTEDOWN').type = 'ACTIVE' - col.operator("gpencil.paste", text="Paste by Layer").type = 'LAYER' - - col = pie.column(align=True) - col.operator("gpencil.select_more", icon='ADD') - col.operator("gpencil.select_less", icon='REMOVE') - - pie.operator("transform.mirror", icon='MOD_MIRROR') - pie.operator("transform.bend", icon='MOD_SIMPLEDEFORM') - pie.operator("transform.shear", icon='MOD_TRIANGULATE') - pie.operator("transform.tosphere", icon='MOD_MULTIRES') - - pie.operator("gpencil.convert", icon='OUTLINER_OB_CURVE', text="Convert...") - pie.operator("wm.call_menu_pie", text="Back to Main Palette...").name = "GPENCIL_MT_pie_tool_palette" - - -class GPENCIL_MT_pie_sculpt(Menu): - """A pie menu for accessing Grease Pencil stroke sculpt settings""" - bl_label = "Grease Pencil Sculpt" + ts = context.tool_settings + settings = None + if context.mode == 'PAINT_GPENCIL': + settings = ts.gpencil_paint + if context.mode == 'SCULPT_GPENCIL': + settings = ts.gpencil_sculpt_paint + elif context.mode == 'WEIGHT_GPENCIL': + settings = ts.gpencil_weight_paint + elif context.mode == 'VERTEX_GPENCIL': + settings = ts.gpencil_vertex_paint - @classmethod - def poll(cls, context): - gpd = context.gpencil_data - return bool(gpd and gpd.use_stroke_edit_mode and context.editable_gpencil_strokes) + return (settings and settings.brush and settings.brush.curve) def draw(self, context): layout = self.layout + ts = context.tool_settings + settings = None + if context.mode == 'PAINT_GPENCIL': + settings = ts.gpencil_paint + if context.mode == 'SCULPT_GPENCIL': + settings = ts.gpencil_sculpt_paint + elif context.mode == 'WEIGHT_GPENCIL': + settings = ts.gpencil_weight_paint + elif context.mode == 'VERTEX_GPENCIL': + settings = ts.gpencil_vertex_paint + + if settings: + brush = settings.brush - pie = layout.menu_pie() - - settings = context.tool_settings.gpencil_sculpt - brush = settings.brush - - # W - Launch Sculpt Mode - col = pie.column() - # col.label(text="Tool:") - col.prop(settings, "sculpt_tool", text="") - col.operator("gpencil.sculpt_paint", text="Sculpt", icon='SCULPTMODE_HLT') - - # E - Common Settings - col = pie.column(align=True) - col.prop(brush, "size", slider=True) - row = col.row(align=True) - row.prop(brush, "strength", slider=True) - # row.prop(brush, "use_pressure_strength", text="", icon_only=True) - col.prop(brush, "use_falloff") - if settings.sculpt_tool in {'SMOOTH', 'RANDOMIZE'}: + col = layout.column(align=True) row = col.row(align=True) - row.prop(settings, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True) - row.prop(settings, "use_edit_strength", text="Strength", icon='COLOR', toggle=True) - row.prop(settings, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True) + row.prop(brush, "curve_preset", text="") - # S - Change Brush Type Shortcuts - row = pie.row() - row.prop_enum(settings, "tool", value='GRAB') - row.prop_enum(settings, "tool", value='PUSH') - row.prop_enum(settings, "tool", value='CLONE') + if brush.curve_preset == 'CUSTOM': + layout.template_curve_mapping(brush, "curve", brush=True) - # N - Change Brush Type Shortcuts - row = pie.row() - row.prop_enum(settings, "tool", value='SMOOTH') - row.prop_enum(settings, "tool", value='THICKNESS') - row.prop_enum(settings, "tool", value='STRENGTH') - row.prop_enum(settings, "tool", value='RANDOMIZE') + col = layout.column(align=True) + row = col.row(align=True) + row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' + row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND' + row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT' + row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP' + row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' + row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' class GPENCIL_MT_snap(Menu): @@ -515,6 +335,32 @@ class GPENCIL_MT_move_to_layer(Menu): layout.operator("gpencil.layer_add", text="New Layer", icon='ADD') +class GPENCIL_MT_layer_active(Menu): + bl_label = "Change Active Layer" + + def draw(self, context): + layout = self.layout + layout.operator_context = 'INVOKE_REGION_WIN' + + gpd = context.gpencil_data + if gpd: + gpl_active = context.active_gpencil_layer + tot_layers = len(gpd.layers) + i = tot_layers - 1 + while i >= 0: + gpl = gpd.layers[i] + if gpl.info == gpl_active.info: + icon = 'GREASEPENCIL' + else: + icon = 'NONE' + layout.operator("gpencil.layer_active", text=gpl.info, icon=icon).layer = i + i -= 1 + + layout.separator() + + layout.operator("gpencil.layer_add", text="New Layer", icon='ADD') + + class GPENCIL_MT_gpencil_draw_delete(Menu): bl_label = "Delete" @@ -800,11 +646,7 @@ class GreasePencilMaterialsPanel: if ma is not None and ma.grease_pencil is not None: gpcolor = ma.grease_pencil - if ( - gpcolor.stroke_style == 'SOLID' or - gpcolor.use_stroke_pattern or - gpcolor.use_stroke_texture_mix - ): + if gpcolor.stroke_style == 'SOLID': row = layout.row() row.prop(gpcolor, "color", text="Stroke Color") @@ -813,6 +655,48 @@ class GreasePencilMaterialsPanel: row.template_ID(space, "pin_id") +class GreasePencilVertexcolorPanel: + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + ts = context.scene.tool_settings + is_vertex = context.mode == 'VERTEX_GPENCIL' + gpencil_paint = ts.gpencil_vertex_paint if is_vertex else ts.gpencil_paint + brush = gpencil_paint.brush + gp_settings = brush.gpencil_settings + tool = brush.gpencil_vertex_tool if is_vertex else brush.gpencil_tool + + ob = context.object + + if ob: + col = layout.column() + col.template_color_picker(brush, "color", value_slider=True) + + sub_row = layout.row(align=True) + sub_row.prop(brush, "color", text="") + sub_row.prop(brush, "secondary_color", text="") + + sub_row.operator("gpencil.tint_flip", icon='FILE_REFRESH', text="") + + row = layout.row(align=True) + row.template_ID(gpencil_paint, "palette", new="palette.new") + if gpencil_paint.palette: + layout.template_palette(gpencil_paint, "palette", color=True) + + if tool in {'DRAW', 'FILL'} and is_vertex is False: + row = layout.row(align=True) + row.prop(gp_settings, "vertex_mode", text="Mode") + row = layout.row(align=True) + row.prop(gp_settings, "vertex_color_factor", slider=True, text="Mix Factor") + + if tool == 'TINT' or is_vertex is True: + row = layout.row(align=True) + row.prop(gp_settings, "vertex_mode", text="Mode") + + class GPENCIL_UL_layer(UIList): def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index): # assert(isinstance(item, bpy.types.GPencilLayer) @@ -830,9 +714,10 @@ class GPENCIL_UL_layer(UIList): row.prop(gpl, "info", text="", emboss=False) row = layout.row(align=True) - row.prop(gpl, "mask_layer", text="", - icon='MOD_MASK' if gpl.mask_layer else 'LAYER_ACTIVE', - emboss=False) + + icon_mask = 'MOD_MASK' if gpl.use_mask_layer else 'LAYER_ACTIVE' + + row.prop(gpl, "use_mask_layer", text="", icon=icon_mask, emboss=False) subrow = row.row(align=True) subrow.prop( @@ -868,16 +753,12 @@ class GreasePencilSimplifyPanel: layout.active = rd.simplify_gpencil col = layout.column() - col.prop(rd, "simplify_gpencil_onplay", text="Playback Only") - col.prop(rd, "simplify_gpencil_view_modifier", text="Modifiers") - col.prop(rd, "simplify_gpencil_shader_fx", text="ShaderFX") - col.prop(rd, "simplify_gpencil_blend", text="Layers Blending") - col.prop(rd, "simplify_gpencil_tint", text="Layers Tinting") - + col.prop(rd, "simplify_gpencil_onplay") col.prop(rd, "simplify_gpencil_view_fill") - sub = col.column() - sub.active = rd.simplify_gpencil_view_fill - sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines") + col.prop(rd, "simplify_gpencil_modifier") + col.prop(rd, "simplify_gpencil_shader_fx") + col.prop(rd, "simplify_gpencil_tint") + col.prop(rd, "simplify_gpencil_antialiasing") class GreasePencilLayerAdjustmentsPanel: @@ -913,6 +794,65 @@ class GreasePencilLayerAdjustmentsPanel: col.prop(gpl, "lock_material") +class GPENCIL_UL_masks(UIList): + def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index): + mask = item + if self.layout_type in {'DEFAULT', 'COMPACT'}: + row = layout.row(align=True) + row.prop(mask, "name", text="", emboss=False, icon_value=icon) + row.prop(mask, "invert", text="", emboss=False) + row.prop(mask, "hide", text="", emboss=False) + elif self.layout_type == 'GRID': + layout.alignment = 'CENTER' + layout.prop(mask, "name", text="", emboss=False, icon_value=icon) + + +class GPENCIL_MT_layer_mask_menu(Menu): + bl_label = "Layer Specials" + + def draw(self, context): + layout = self.layout + ob = context.object + gpd = ob.data + gpl_active = gpd.layers.active + done = False + for gpl in gpd.layers: + if gpl != gpl_active and gpl.info not in gpl_active.mask_layers: + done = True + layout.operator("gpencil.layer_mask_add", text=gpl.info).name=gpl.info + + if done is False: + layout.label(text="No layers to add") + + +class GreasePencilLayerMasksPanel: + def draw_header(self, context): + ob = context.active_object + gpd = ob.data + gpl = gpd.layers.active + + self.layout.prop(gpl, "use_mask_layer", text="") + + def draw(self, context): + ob = context.active_object + gpd = ob.data + gpl = gpd.layers.active + + layout = self.layout + layout.enabled = gpl.use_mask_layer + + if gpl: + rows = 4 + row = layout.row() + col = row.column() + col.template_list("GPENCIL_UL_masks", "", gpl, "mask_layers", gpl.mask_layers, + "active_mask_index", rows=rows, sort_lock=True) + + col2 = row.column(align=True) + col2.menu("GPENCIL_MT_layer_mask_menu", icon='ADD', text="") + col2.operator("gpencil.layer_mask_remove", icon='REMOVE', text="") + + class GreasePencilLayerRelationsPanel: def draw(self, context): @@ -952,20 +892,58 @@ class GreasePencilLayerDisplayPanel: col.prop(gpl, "use_solo_mode", text="Show Only On Keyframed") -classes = ( - GPENCIL_MT_pie_tool_palette, - GPENCIL_MT_pie_settings_palette, - GPENCIL_MT_pie_tools_more, - GPENCIL_MT_pie_sculpt, +class GreasePencilFlipTintColors(Operator): + bl_label = "Flip Colors" + bl_idname = "gpencil.tint_flip" + bl_description = "Switch Tint colors" + + def execute(self, context): + try: + ts = context.tool_settings + settings = None + if context.mode == 'PAINT_GPENCIL': + settings = ts.gpencil_paint + if context.mode == 'SCULPT_GPENCIL': + settings = ts.gpencil_sculpt_paint + elif context.mode == 'WEIGHT_GPENCIL': + settings = ts.gpencil_weight_paint + elif context.mode == 'VERTEX_GPENCIL': + settings = ts.gpencil_vertex_paint + brush = settings.brush + if brush is not None: + color = brush.color + secondary_color = brush.secondary_color + + orig_prim = color.hsv + orig_sec = secondary_color.hsv + + color.hsv = orig_sec + secondary_color.hsv = orig_prim + + return {'FINISHED'} + + except Exception as e: + utils_core.error_handlers(self, "gpencil.tint_flip", e, + "Flip Colors could not be completed") + + return {'CANCELLED'} + + +classes = ( GPENCIL_MT_snap, GPENCIL_MT_cleanup, GPENCIL_MT_move_to_layer, + GPENCIL_MT_layer_active, GPENCIL_MT_gpencil_draw_delete, + GPENCIL_MT_layer_mask_menu, GPENCIL_UL_annotation_layer, GPENCIL_UL_layer, + GPENCIL_UL_masks, + + GreasePencilFlipTintColors, ) if __name__ == "__main__": # only for live edit. diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index 4f419ec1f18..56201b29e7f 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -47,6 +47,11 @@ class GPENCIL_MT_color_context_menu(Menu): layout.separator() layout.operator("object.material_slot_remove_unused") + layout.operator("gpencil.stroke_merge_material", text="Merge Similar") + + layout.separator() + layout.operator("gpencil.material_to_vertex_color", text="Convert Materials to Vertex Color") + layout.operator("gpencil.extract_palette_vertex", text="Extract Palette from Vertex Color") class GPENCIL_UL_matslots(UIList): @@ -142,27 +147,25 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel): col.prop(gpcolor, "stroke_style", text="Style") + row = col.row() + row.prop(gpcolor, "color", text="Base Color") + if gpcolor.stroke_style == 'TEXTURE': row = col.row() row.enabled = not gpcolor.lock col = row.column(align=True) col.template_ID(gpcolor, "stroke_image", open="image.open") + + if gpcolor.stroke_style == 'TEXTURE': + row = col.row() + row.prop(gpcolor, "mix_stroke_factor", text="Blend", slider=True) if gpcolor.mode == 'LINE': col.prop(gpcolor, "pixel_size", text="UV Factor") - col.prop(gpcolor, "use_stroke_pattern", text="Use As Stencil Mask") - if gpcolor.use_stroke_pattern is False: - col.prop(gpcolor, "use_stroke_texture_mix", text="Mix Color") - if gpcolor.use_stroke_texture_mix is True: - col.prop(gpcolor, "mix_stroke_factor", text="Factor") - - if (gpcolor.stroke_style == 'SOLID' or gpcolor.use_stroke_pattern or gpcolor.use_stroke_texture_mix): - col.prop(gpcolor, "color", text="Color") - if gpcolor.mode in {'DOTS', 'BOX'}: col.prop(gpcolor, "alignment_mode") - if gpcolor.mode == 'LINE' and gpcolor.stroke_style != 'TEXTURE': + if gpcolor.mode == 'LINE': col.prop(gpcolor, "use_overlap_strokes") @@ -188,55 +191,35 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel): col.enabled = not gpcolor.lock col.prop(gpcolor, "fill_style", text="Style") - if gpcolor.fill_style == 'GRADIENT': - col.prop(gpcolor, "gradient_type") - if gpcolor.fill_style != 'TEXTURE': - col.prop(gpcolor, "fill_color", text="Color") + if gpcolor.fill_style == 'SOLID': + col.prop(gpcolor, "fill_color", text="Base Color") - if gpcolor.fill_style in {'GRADIENT', 'CHECKER'}: - col.prop(gpcolor, "mix_color", text="Secondary Color") - - if gpcolor.fill_style == 'GRADIENT': - col.prop(gpcolor, "mix_factor", text="Mix Factor", slider=True) - - if gpcolor.fill_style in {'GRADIENT', 'CHECKER'}: - col.prop(gpcolor, "flip", text="Flip Colors") - - col.prop(gpcolor, "pattern_shift", text="Location") - col.prop(gpcolor, "pattern_scale", text="Scale") + elif gpcolor.fill_style == 'GRADIENT': + col.prop(gpcolor, "gradient_type") - if gpcolor.gradient_type == 'RADIAL' and gpcolor.fill_style not in {'SOLID', 'CHECKER'}: - col.prop(gpcolor, "pattern_radius", text="Radius") - else: - if gpcolor.fill_style != 'SOLID': - col.prop(gpcolor, "pattern_angle", text="Angle") + col.prop(gpcolor, "fill_color", text="Base Color") + col.prop(gpcolor, "mix_color", text="Secondary Color") + col.prop(gpcolor, "mix_factor", text="Blend in Fill Gradient", slider=True) + col.prop(gpcolor, "flip", text="Flip Colors") - if gpcolor.fill_style == 'CHECKER': - col.prop(gpcolor, "pattern_gridsize", text="Box Size") + col.prop(gpcolor, "texture_offset", text="Location") + col.prop(gpcolor, "texture_scale", text="Scale") + if gpcolor.gradient_type == 'LINEAR': + col.prop(gpcolor, "texture_angle", text="Rotation") - # Texture - if gpcolor.fill_style == 'TEXTURE' or (gpcolor.use_fill_texture_mix is True and gpcolor.fill_style == 'SOLID'): + elif gpcolor.fill_style == 'TEXTURE': col.template_ID(gpcolor, "fill_image", open="image.open") - if gpcolor.fill_style == 'TEXTURE': - col.prop(gpcolor, "use_fill_pattern", text="Use as Stencil Mask") - if gpcolor.use_fill_pattern is True: - col.prop(gpcolor, "fill_color", text="Color") + col.prop(gpcolor, "fill_color", text="Base Color") + col.prop(gpcolor, "texture_opacity", slider=True) + col.prop(gpcolor, "mix_factor", text="Blend in Fill Texture", slider=True) - col.prop(gpcolor, "texture_offset", text="Offset") + col.prop(gpcolor, "texture_offset", text="Location") + col.prop(gpcolor, "texture_angle", text="Rotation") col.prop(gpcolor, "texture_scale", text="Scale") - col.prop(gpcolor, "texture_angle") - col.prop(gpcolor, "texture_opacity") col.prop(gpcolor, "texture_clamp", text="Clip Image") - if gpcolor.use_fill_pattern is False: - col.prop(gpcolor, "use_fill_texture_mix", text="Mix with Color") - - if gpcolor.use_fill_texture_mix is True: - col.prop(gpcolor, "fill_color", text="Mix Color") - col.prop(gpcolor, "mix_factor", text="Mix Factor", slider=True) - class MATERIAL_PT_gpencil_preview(GPMaterialButtonsPanel, Panel): bl_label = "Preview" @@ -291,5 +274,6 @@ classes = ( if __name__ == "__main__": # only for live edit. from bpy.utils import register_class + for cls in classes: register_class(cls) diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index bb020084b03..33ba981e235 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -397,6 +397,27 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): col.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True) +class OBJECT_PT_greasepencil_light(ObjectButtonsPanel, Panel): + bl_label = "Grease Pencil" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + @classmethod + def poll(cls, context): + return (context.object) and (context.engine in cls.COMPAT_ENGINES) and (context.object.type == 'GPENCIL') + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + layout = self.layout + ob = context.object + + col = flow.column() + col.prop(ob, "use_grease_pencil_lights", toggle=False) + + class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} _context_path = "object" @@ -417,6 +438,7 @@ classes = ( OBJECT_PT_display, OBJECT_PT_display_bounds, OBJECT_PT_visibility, + OBJECT_PT_greasepencil_light, OBJECT_PT_custom_props, ) diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index f1f6e9898b1..df3dc930f97 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -89,8 +89,12 @@ class UnifiedPaintPanel: # Grease Pencil settings elif mode == 'PAINT_GPENCIL': return tool_settings.gpencil_paint - elif mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}: - return tool_settings.gpencil_sculpt + elif mode == 'SCULPT_GPENCIL': + return tool_settings.gpencil_sculpt_paint + elif mode == 'WEIGHT_GPENCIL': + return tool_settings.gpencil_weight_paint + elif mode == 'VERTEX_GPENCIL': + return tool_settings.gpencil_vertex_paint return None @staticmethod @@ -1019,6 +1023,8 @@ def brush_basic_texpaint_settings(layout, context, brush, *, compact=False): def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False): + tool_settings = context.tool_settings + settings = tool_settings.gpencil_paint gp_settings = brush.gpencil_settings tool = context.workspace.tools.from_space_view3d_mode(context.mode, create=False) if gp_settings is None: @@ -1043,7 +1049,7 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) row.prop(gp_settings, "eraser_thickness_factor") row = layout.row(align=True) - row.prop(gp_settings, "use_cursor", text="Display Cursor") + row.prop(settings, "show_brush", text="Display Cursor") # FIXME: tools must use their own UI drawing! elif brush.gpencil_tool == 'FILL': @@ -1091,52 +1097,63 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) def brush_basic_gpencil_sculpt_settings(layout, context, brush, *, compact=False): - tool_settings = context.tool_settings - settings = tool_settings.gpencil_sculpt - tool = settings.sculpt_tool + gp_settings = brush.gpencil_settings + tool = brush.gpencil_sculpt_tool row = layout.row(align=True) row.prop(brush, "size", slider=True) sub = row.row(align=True) sub.enabled = tool not in {'GRAB', 'CLONE'} - sub.prop(brush, "use_pressure_radius", text="") + sub.prop(gp_settings, "use_pressure", text="") row = layout.row(align=True) row.prop(brush, "strength", slider=True) row.prop(brush, "use_pressure_strength", text="") - layout.prop(brush, "use_falloff") - if compact: if tool in {'THICKNESS', 'STRENGTH', 'PINCH', 'TWIST'}: row.separator() - row.prop(brush, "direction", expand=True, text="") + row.prop(gp_settings, "direction", expand=True, text="") else: use_property_split_prev = layout.use_property_split layout.use_property_split = False if tool in {'THICKNESS', 'STRENGTH'}: - layout.row().prop(brush, "direction", expand=True) + layout.row().prop(gp_settings, "direction", expand=True) elif tool == 'PINCH': row = layout.row(align=True) - row.prop_enum(brush, "direction", value='ADD', text="Pinch") - row.prop_enum(brush, "direction", value='SUBTRACT', text="Inflate") + row.prop_enum(gp_settings, "direction", value='ADD', text="Pinch") + row.prop_enum(gp_settings, "direction", value='SUBTRACT', text="Inflate") elif tool == 'TWIST': row = layout.row(align=True) - row.prop_enum(brush, "direction", value='ADD', text="CCW") - row.prop_enum(brush, "direction", value='SUBTRACT', text="CW") + row.prop_enum(gp_settings, "direction", value='ADD', text="CCW") + row.prop_enum(gp_settings, "direction", value='SUBTRACT', text="CW") layout.use_property_split = use_property_split_prev def brush_basic_gpencil_weight_settings(layout, _context, brush, *, compact=False): + gp_settings = brush.gpencil_settings layout.prop(brush, "size", slider=True) row = layout.row(align=True) row.prop(brush, "strength", slider=True) row.prop(brush, "use_pressure_strength", text="") + layout.prop(brush, "weight", slider=True) - layout.prop(brush, "use_falloff") +def brush_basic_gpencil_vertex_settings(layout, _context, brush, *, compact=False): + gp_settings = brush.gpencil_settings + + # Brush details + row = layout.row(align=True) + row.prop(brush, "size", text="Radius") + row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE') + + if brush.gpencil_vertex_tool in {'DRAW', 'BLUR', 'SMEAR'}: + row = layout.row(align=True) + row.prop(gp_settings, "pen_strength", slider=True) + row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') + classes = ( VIEW3D_MT_tools_projectpaint_clone, ) diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index a09e263fd87..41adea0b922 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -26,6 +26,7 @@ from bpy.types import ( ) from bl_ui.properties_grease_pencil_common import ( + GreasePencilLayerMasksPanel, GreasePencilLayerAdjustmentsPanel, GreasePencilLayerRelationsPanel, GreasePencilLayerDisplayPanel, @@ -699,6 +700,15 @@ class DOPESHEET_PT_gpencil_mode(LayersDopeSheetPanel, Panel): row = layout.row(align=True) row.prop(gpl, "opacity", text="Opacity", slider=True) + row = layout.row(align=True) + row.prop(gpl, "use_lights") + + +class DOPESHEET_PT_gpencil_layer_masks(LayersDopeSheetPanel, GreasePencilLayerMasksPanel, Panel): + bl_label = "Masks" + bl_parent_id = 'DOPESHEET_PT_gpencil_mode' + bl_options = {'DEFAULT_CLOSED'} + class DOPESHEET_PT_gpencil_layer_adjustments(LayersDopeSheetPanel, GreasePencilLayerAdjustmentsPanel, Panel): bl_label = "Adjustments" @@ -736,6 +746,7 @@ classes = ( DOPESHEET_MT_snap_pie, DOPESHEET_PT_filters, DOPESHEET_PT_gpencil_mode, + DOPESHEET_PT_gpencil_layer_masks, DOPESHEET_PT_gpencil_layer_adjustments, DOPESHEET_PT_gpencil_layer_relations, DOPESHEET_PT_gpencil_layer_display, diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index c6f490f9d26..980f89eaaa4 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -238,6 +238,11 @@ class IMAGE_MT_image(Menu): layout.separator() layout.operator("image.pack", text="Pack") + if ima: + layout.separator() + layout.operator("palette.extract_from_image", text="Extract Palette") + layout.operator("gpencil.image_to_grease_pencil", text="Generate Grease Pencil") + class IMAGE_MT_image_invert(Menu): bl_label = "Invert" diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 63fb72a71bd..583d8ea44cf 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1455,6 +1455,11 @@ class _defs_gpencil_paint: @ToolDef.from_fn def eyedropper(): + def draw_settings(context, layout, tool): + props = tool.operator_properties("ui.eyedropper_gpencil_color") + row = layout.row() + row.use_property_split = False + row.prop(props, "mode", expand=True) return dict( idname="builtin.eyedropper", label="Eyedropper", @@ -1462,6 +1467,7 @@ class _defs_gpencil_paint: cursor='EYEDROPPER', widget=None, keymap=(), + draw_settings=draw_settings, ) @@ -1594,6 +1600,23 @@ class _defs_gpencil_edit: draw_settings=_template_widget.VIEW3D_GGT_xform_extrude.draw_settings, ) + @ToolDef.from_fn + def transform_fill(): + def draw_settings(context, layout, tool): + props = tool.operator_properties("gpencil.transform_fill") + row = layout.row() + row.use_property_split = False + row.prop(props, "mode", expand=True) + + return dict( + idname="builtin.transform_fill", + label="Transform Fill", + icon="ops.gpencil.transform_fill", + cursor='DEFAULT', + widget=None, + keymap=(), + draw_settings=draw_settings, + ) class _defs_gpencil_sculpt: @@ -1613,11 +1636,10 @@ class _defs_gpencil_sculpt: context, idname_prefix="builtin_brush.", icon_prefix="ops.gpencil.sculpt_", - type=bpy.types.GPencilSculptSettings, - attr="sculpt_tool", + type=bpy.types.Brush, + attr="gpencil_sculpt_tool", tooldef_keywords=dict( operator="gpencil.sculpt_paint", - keymap="3D View Tool: Sculpt Gpencil, Paint", ), ) @@ -1630,11 +1652,37 @@ class _defs_gpencil_weight: context, idname_prefix="builtin_brush.", icon_prefix="ops.gpencil.sculpt_", - type=bpy.types.GPencilSculptSettings, - attr="weight_tool", + type=bpy.types.Brush, + attr="gpencil_weight_tool", tooldef_keywords=dict( - operator="gpencil.sculpt_paint", - keymap="3D View Tool: Sculpt Gpencil, Paint", + operator="gpencil.weight_paint", + ), + ) + + +class _defs_gpencil_vertex: + + @staticmethod + def poll_select_mask(context): + if context is None: + return True + ob = context.active_object + ts = context.scene.tool_settings + return ob and ob.type == 'GPENCIL' and (ts.use_gpencil_vertex_select_mask_point or + ts.use_gpencil_vertex_select_mask_stroke or + ts.use_gpencil_vertex_select_mask_segment) + + @staticmethod + def generate_from_brushes(context): + return generate_from_enum_ex( + context, + idname_prefix="builtin_brush.", + icon_prefix="brush.paint_vertex.", + type=bpy.types.Brush, + attr="gpencil_vertex_tool", + cursor='DOT', + tooldef_keywords=dict( + operator="gpencil.vertex_paint", ), ) @@ -2202,6 +2250,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): _defs_gpencil_edit.tosphere, ), None, + _defs_gpencil_edit.transform_fill, + None, *_tools_annotate, ], 'SCULPT_GPENCIL': [ @@ -2219,6 +2269,17 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): None, *_tools_annotate, ], + 'VERTEX_GPENCIL': [ + _defs_gpencil_vertex.generate_from_brushes, + None, + *_tools_annotate, + None, + lambda context: ( + VIEW3D_PT_tools_active._tools_gpencil_select + if _defs_gpencil_vertex.poll_select_mask(context) + else () + ), + ], } class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel): bl_space_type = 'SEQUENCE_EDITOR' diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 192b239ac03..1f52323f540 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -165,11 +165,11 @@ class TOPBAR_PT_gpencil_layers(Panel): srow = col.row(align=True) srow.prop(gpl, "opacity", text="Opacity", slider=True) - srow.prop(gpl, "mask_layer", text="", - icon='MOD_MASK' if gpl.mask_layer else 'LAYER_ACTIVE') + srow.prop(gpl, "use_mask_layer", text="", + icon='MOD_MASK' if gpl.use_mask_layer else 'LAYER_ACTIVE') srow = col.row(align=True) - srow.prop(gpl, "use_solo_mode", text="Show Only On Keyframed") + srow.prop(gpl, "use_lights") col = row.column() diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index c3c99ebb826..b8051a1d98a 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -668,7 +668,6 @@ class USERPREF_PT_viewport_quality(ViewportPanel, CenterAlignMixIn, Panel): flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) flow.prop(system, "viewport_aa") - flow.prop(system, "gpencil_multi_sample", text="Grease Pencil Multisampling") flow.prop(system, "use_overlay_smooth_wire") flow.prop(system, "use_edit_mode_smooth_wire") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 078ad967789..447386b8f9d 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -31,6 +31,7 @@ from bl_ui.properties_grease_pencil_common import ( AnnotationDataPanel, AnnotationOnionSkin, GreasePencilMaterialsPanel, + GreasePencilVertexcolorPanel, ) from bl_ui.space_toolsystem_common import ( ToolActivePanelHelper, @@ -119,21 +120,27 @@ class VIEW3D_HT_tool_header(Header): if is_valid_context: brush = context.tool_settings.gpencil_paint.brush if brush.gpencil_tool != 'ERASE': - layout.popover("VIEW3D_PT_tools_grease_pencil_brush_advanced") + if brush.gpencil_tool != 'TINT': + layout.popover("VIEW3D_PT_tools_grease_pencil_brush_advanced") - if brush.gpencil_tool != 'FILL': + if brush.gpencil_tool not in {'FILL', 'TINT'}: layout.popover("VIEW3D_PT_tools_grease_pencil_brush_stroke") layout.popover("VIEW3D_PT_tools_grease_pencil_brushcurves") layout.popover("VIEW3D_PT_tools_grease_pencil_paint_appearance") elif tool_mode == 'SCULPT_GPENCIL': - settings = context.tool_settings.gpencil_sculpt - tool = settings.sculpt_tool - if tool in {'SMOOTH', 'RANDOMIZE', 'SMOOTH'}: - layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_options") - layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_appearance") + if is_valid_context: + brush = context.tool_settings.gpencil_sculpt_paint.brush + tool = brush.gpencil_tool + if tool in ('SMOOTH', 'RANDOMIZE'): + layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_options") + layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_appearance") elif tool_mode == 'WEIGHT_GPENCIL': - layout.popover("VIEW3D_PT_tools_grease_pencil_weight_appearance") + if is_valid_context: + layout.popover("VIEW3D_PT_tools_grease_pencil_weight_appearance") + elif tool_mode == 'VERTEX_GPENCIL': + if is_valid_context: + layout.popover("VIEW3D_PT_tools_grease_pencil_vertex_appearance") def draw_mode_settings(self, context): layout = self.layout @@ -425,6 +432,15 @@ class _draw_tool_settings_context_mode: row.prop(gp_settings, "use_material_pin", text="") + if brush.gpencil_tool in {'DRAW', 'FILL'} and ma: + row.separator(factor=1.0) + subrow = row.row(align=True) + row.prop_enum(settings, "color_mode", 'MATERIAL', text="", icon='MATERIAL') + row.prop_enum(settings, "color_mode", 'VERTEXCOLOR', text="", icon='VPAINT_HLT') + sub_row = row.row(align=True) + sub_row.enabled = settings.color_mode == 'VERTEXCOLOR' + sub_row.prop_with_popover(brush, "color", text="", panel="TOPBAR_PT_gpencil_vertexcolor") + row = layout.row(align=True) tool_settings = context.scene.tool_settings settings = tool_settings.gpencil_paint @@ -433,6 +449,10 @@ class _draw_tool_settings_context_mode: if context.object and brush.gpencil_tool in {'FILL', 'DRAW'}: draw_color_selector() + if context.object and brush.gpencil_tool == 'TINT': + row.separator(factor=0.4) + row.prop_with_popover(brush, "color", text="", panel="TOPBAR_PT_gpencil_vertexcolor") + from bl_ui.properties_paint_common import ( brush_basic_gpencil_paint_settings, ) @@ -444,9 +464,8 @@ class _draw_tool_settings_context_mode: def SCULPT_GPENCIL(context, layout, tool): if (tool is None) or (not tool.has_datablock): return False - tool_settings = context.tool_settings - settings = tool_settings.gpencil_sculpt - brush = settings.brush + paint = context.tool_settings.gpencil_sculpt_paint + brush = paint.brush from bl_ui.properties_paint_common import ( brush_basic_gpencil_sculpt_settings, @@ -459,9 +478,8 @@ class _draw_tool_settings_context_mode: def WEIGHT_GPENCIL(context, layout, tool): if (tool is None) or (not tool.has_datablock): return False - tool_settings = context.tool_settings - settings = tool_settings.gpencil_sculpt - brush = settings.brush + paint = context.tool_settings.gpencil_weight_paint + brush = paint.brush from bl_ui.properties_paint_common import ( brush_basic_gpencil_weight_settings, @@ -470,6 +488,31 @@ class _draw_tool_settings_context_mode: return True + @staticmethod + def VERTEX_GPENCIL(context, layout, tool): + if (tool is None) or (not tool.has_datablock): + return False + + paint = context.tool_settings.gpencil_vertex_paint + brush = paint.brush + + row = layout.row(align=True) + tool_settings = context.scene.tool_settings + settings = tool_settings.gpencil_vertex_paint + row.template_ID_preview(settings, "brush", rows=3, cols=8, hide_buttons=True) + + if brush.gpencil_vertex_tool not in {'BLUR', 'AVERAGE', 'SMEAR'}: + row.separator(factor=0.4) + row.prop_with_popover(brush, "color", text="", panel="TOPBAR_PT_gpencil_vertexcolor") + + from bl_ui.properties_paint_common import ( + brush_basic_gpencil_vertex_settings, + ) + + brush_basic_gpencil_vertex_settings(layout, context, brush, compact=True) + + return True + @staticmethod def PARTICLE(context, layout, tool): if (tool is None) or (not tool.has_datablock): @@ -550,7 +593,7 @@ class VIEW3D_HT_header(Header): else: if (object_mode not in { 'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT', - 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL' + 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL', 'VERTEX_GPENCIL' }) or has_pose_mode: show_snap = True else: @@ -687,7 +730,14 @@ class VIEW3D_HT_header(Header): row.prop(tool_settings, "use_gpencil_select_mask_stroke", text="") row.prop(tool_settings, "use_gpencil_select_mask_segment", text="") - if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode or gpd.is_stroke_weight_mode: + # Select mode for Vertex Paint + if gpd.is_stroke_vertex_mode: + row = layout.row(align=True) + row.prop(tool_settings, "use_gpencil_vertex_select_mask_point", text="") + row.prop(tool_settings, "use_gpencil_vertex_select_mask_stroke", text="") + row.prop(tool_settings, "use_gpencil_vertex_select_mask_segment", text="") + + if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode or gpd.is_stroke_weight_mode or gpd.is_stroke_vertex_mode: row = layout.row(align=True) row.prop(gpd, "use_multiedit", text="", icon='GP_MULTIFRAME_EDITING') @@ -812,7 +862,8 @@ class VIEW3D_MT_editor_menus(Menu): obj = context.active_object mode_string = context.mode edit_object = context.edit_object - gp_edit = obj and obj.mode in {'EDIT_GPENCIL', 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'} + gp_edit = obj and obj.mode in {'EDIT_GPENCIL', 'PAINT_GPENCIL', 'SCULPT_GPENCIL', + 'WEIGHT_GPENCIL', 'VERTEX_GPENCIL'} ts = context.scene.tool_settings layout.menu("VIEW3D_MT_view") @@ -827,6 +878,8 @@ class VIEW3D_MT_editor_menus(Menu): layout.menu("VIEW3D_MT_select_gpencil") elif mode_string == 'EDIT_GPENCIL': layout.menu("VIEW3D_MT_select_gpencil") + elif mode_string == 'VERTEX_GPENCIL': + layout.menu("VIEW3D_MT_select_gpencil") elif mode_string in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}: mesh = obj.data if mesh.use_paint_mask: @@ -4650,6 +4703,10 @@ class VIEW3D_MT_paint_gpencil(Menu): layout = self.layout + layout.menu("GPENCIL_MT_layer_active", text="Active Layer") + + layout.separator() + layout.menu("VIEW3D_MT_gpencil_animation") layout.menu("VIEW3D_MT_edit_gpencil_interpolate") @@ -4708,6 +4765,10 @@ class VIEW3D_MT_edit_gpencil(Menu): layout.separator() + layout.menu("GPENCIL_MT_layer_active", text="Active Layer") + + layout.separator() + layout.menu("VIEW3D_MT_gpencil_animation") layout.menu("VIEW3D_MT_edit_gpencil_interpolate") @@ -4742,6 +4803,7 @@ class VIEW3D_MT_edit_gpencil_stroke(Menu): def draw(self, _context): layout = self.layout + settings = _context.tool_settings.gpencil_sculpt layout.operator("gpencil.stroke_subdivide", text="Subdivide").only_selected = False layout.menu("VIEW3D_MT_gpencil_simplify") @@ -4767,6 +4829,10 @@ class VIEW3D_MT_edit_gpencil_stroke(Menu): layout.operator("gpencil.stroke_cyclical_set", text="Toggle Cyclic").type = 'TOGGLE' layout.operator_menu_enum("gpencil.stroke_caps_set", text="Toggle Caps", property="type") layout.operator("gpencil.stroke_flip", text="Switch Direction") + layout.prop(settings, "use_scale_thickness") + + layout.separator() + layout.operator("gpencil.reset_transform_fill", text="Reset Fill Transform") class VIEW3D_MT_edit_gpencil_point(Menu): @@ -4811,6 +4877,22 @@ class VIEW3D_MT_weight_gpencil(Menu): layout.menu("VIEW3D_MT_gpencil_autoweights") +class VIEW3D_MT_vertex_gpencil(Menu): + bl_label = "Paint" + + def draw(self, _context): + layout = self.layout + layout.operator("gpencil.vertex_color_set", text="Set Vertex Colors") + layout.separator() + layout.operator("gpencil.vertex_color_invert", text="Invert") + layout.operator("gpencil.vertex_color_levels", text="Levels") + layout.operator("gpencil.vertex_color_hsv", text="Hue Saturation Value") + layout.operator("gpencil.vertex_color_brightness_contrast", text="Bright/Contrast") + + layout.separator() + layout.menu("VIEW3D_MT_join_palette") + + class VIEW3D_MT_gpencil_animation(Menu): bl_label = "Animation" @@ -6473,6 +6555,7 @@ class VIEW3D_PT_overlay_gpencil_options(Panel): 'EDIT_GPENCIL': "Edit Grease Pencil", 'SCULPT_GPENCIL': "Sculpt Grease Pencil", 'WEIGHT_GPENCIL': "Weight Grease Pencil", + 'VERTEX_GPENCIL': "Vertex Grease Pencil", 'OBJECT': "Grease Pencil", }[context.mode]) @@ -6497,17 +6580,32 @@ class VIEW3D_PT_overlay_gpencil_options(Panel): sub.prop(overlay, "gpencil_fade_layer", text="Fade Layers", slider=True) row = col.row() - row.prop(overlay, "use_gpencil_paper", text="") + row.prop(overlay, "use_gpencil_fade_objects", text="") sub = row.row(align=True) - sub.active = overlay.use_gpencil_paper - sub.prop(overlay, "gpencil_paper_opacity", text="Fade Objects", slider=True) - sub.prop(overlay, "use_gpencil_fade_objects", text="", icon='OUTLINER_OB_GREASEPENCIL') + sub.active = overlay.use_gpencil_fade_objects + sub.prop(overlay, "gpencil_fade_objects", text="Fade Objects", slider=True) + sub.prop(overlay, "use_gpencil_fade_gp_objects", text="", icon='OUTLINER_OB_GREASEPENCIL') + + if context.object.mode in {'EDIT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL', 'VERTEX_GPENCIL'}: + split = layout.split() + col = split.column() + col.prop(overlay, "use_gpencil_edit_lines", text="Edit Lines") + col = split.column() + col.prop(overlay, "use_gpencil_multiedit_line_only", text="Only in Multiframe") + + if context.object.mode == 'EDIT_GPENCIL': + split = layout.split() + col = split.column() + col.prop(overlay, "use_gpencil_show_directions") + col = split.column() + col.prop(overlay, "use_gpencil_show_material_name", text="Material Name") - if context.object.mode in {'EDIT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}: - layout.prop(overlay, "use_gpencil_edit_lines", text="Edit Lines") - layout.prop(overlay, "use_gpencil_multiedit_line_only", text="Show Edit Lines only in multiframe") layout.prop(overlay, "vertex_opacity", text="Vertex Opacity", slider=True) + if context.object.mode in {'PAINT_GPENCIL', 'VERTEX_GPENCIL'}: + layout.label(text="Vertex Paint") + layout.prop(overlay, "gpencil_vertex_paint_opacity", text="Opacity", slider=True) + class VIEW3D_PT_quad_view(Panel): bl_space_type = 'VIEW_3D' @@ -6783,77 +6881,127 @@ class VIEW3D_MT_gpencil_edit_context_menu(Menu): col.operator("gpencil.reproject", text="Reproject Strokes") +def draw_gpencil_layer_active(context, layout): + gpl = context.active_gpencil_layer + if gpl: + layout.label(text="Active Layer") + row = layout.row(align=True) + row.operator_context = 'EXEC_REGION_WIN' + row.operator_menu_enum("gpencil.layer_change", "layer", text="", icon='GREASEPENCIL') + row.prop(gpl, "info", text="") + row.operator("gpencil.layer_remove", text="", icon='X') + + class VIEW3D_PT_gpencil_sculpt_context_menu(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'WINDOW' bl_label = "Sculpt Context Menu" + bl_ui_units_x = 12 def draw(self, context): - brush = context.tool_settings.gpencil_sculpt.brush + ts = context.tool_settings + settings = ts.gpencil_paint + brush = settings.brush layout = self.layout - if context.mode == 'WEIGHT_GPENCIL': - layout.prop(brush, "weight") layout.prop(brush, "size", slider=True) layout.prop(brush, "strength") - layout.separator() - - # Frames - layout.label(text="Frames:") + # Layers + draw_gpencil_layer_active(context, layout) - layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("gpencil.blank_frame_add", text="Insert Blank in Active Layer", icon='ADD') - layout.operator("gpencil.blank_frame_add", text="Insert Blank in All Layers", icon='ADD').all_layers = True +class VIEW3D_PT_gpencil_weight_context_menu(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'WINDOW' + bl_label = "Weight Paint Context Menu" + bl_ui_units_x = 12 - layout.separator() + def draw(self, context): + ts = context.tool_settings + settings = ts.gpencil_paint + brush = settings.brush - layout.operator("gpencil.frame_duplicate", text="Duplicate Active Layer", icon='DUPLICATE') - layout.operator("gpencil.frame_duplicate", text="Duplicate All Layers", icon='DUPLICATE').mode = 'ALL' + layout = self.layout - layout.separator() + layout.prop(brush, "size", slider=True) + layout.prop(brush, "strength") + layout.prop(brush, "weight") - layout.operator("gpencil.delete", text="Delete Active Layer", icon='REMOVE').type = 'FRAME' - layout.operator("gpencil.active_frames_delete_all", text="Delete All Layers", icon='REMOVE') + # Layers + draw_gpencil_layer_active(context, layout) class VIEW3D_PT_gpencil_draw_context_menu(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'WINDOW' bl_label = "Draw Context Menu" + bl_ui_units_x = 12 def draw(self, context): - brush = context.tool_settings.gpencil_paint.brush + ts = context.tool_settings + settings = ts.gpencil_paint + brush = settings.brush gp_settings = brush.gpencil_settings layout = self.layout + if brush.gpencil_tool not in {'ERASE', 'CUTTER', 'EYEDROPPER'} and settings.color_mode == 'VERTEXCOLOR': + split = layout.split(factor=0.1) + split.prop(brush, "color", text="") + split.template_color_picker(brush, "color", value_slider=True) + + col = layout.column() + col.separator() + col.prop_menu_enum(gp_settings, "vertex_mode", text="Mode") + col.separator() + if brush.gpencil_tool not in {'FILL', 'CUTTER'}: layout.prop(brush, "size", slider=True) if brush.gpencil_tool not in {'ERASE', 'FILL', 'CUTTER'}: layout.prop(gp_settings, "pen_strength") - layout.separator() + # Layers + draw_gpencil_layer_active(context, layout) - # Frames - layout.label(text="Frames:") - layout.operator_context = 'INVOKE_REGION_WIN' +class VIEW3D_PT_gpencil_vertex_context_menu(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'WINDOW' + bl_label = "Vertex Paint Context Menu" + bl_ui_units_x = 12 - layout.operator("gpencil.blank_frame_add", text="Insert Blank in Active Layer", icon='ADD') - layout.operator("gpencil.blank_frame_add", text="Insert Blank in All Layers", icon='ADD').all_layers = True + def draw(self, context): + layout = self.layout + ts = context.tool_settings + settings = ts.gpencil_vertex_paint + brush = settings.brush + gp_settings = brush.gpencil_settings - layout.separator() + col = layout.column() - layout.operator("gpencil.frame_duplicate", text="Duplicate Active Layer", icon='DUPLICATE') - layout.operator("gpencil.frame_duplicate", text="Duplicate All Layers", icon='DUPLICATE').mode = 'ALL' + if brush.gpencil_vertex_tool in {'DRAW', 'REPLACE'}: + split = layout.split(factor=0.1) + split.prop(brush, "color", text="") + split.template_color_picker(brush, "color", value_slider=True) - layout.separator() + col = layout.column() + col.separator() + col.prop_menu_enum(gp_settings, "vertex_mode", text="Mode") + col.separator() + + row = col.row(align=True) + row.prop(brush, "size", text="Radius") + row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE') - layout.operator("gpencil.delete", text="Delete Active Layer", icon='REMOVE').type = 'FRAME' - layout.operator("gpencil.active_frames_delete_all", text="Delete All Layers", icon='REMOVE') + if brush.gpencil_vertex_tool in {'DRAW', 'BLUR', 'SMEAR'}: + row = layout.row(align=True) + row.prop(gp_settings, "pen_strength", slider=True) + row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') + + # Layers + draw_gpencil_layer_active(context, layout) class VIEW3D_PT_paint_vertex_context_menu(Panel): @@ -7037,6 +7185,17 @@ class TOPBAR_PT_gpencil_materials(GreasePencilMaterialsPanel, Panel): return ob and ob.type == 'GPENCIL' +class TOPBAR_PT_gpencil_vertexcolor(GreasePencilVertexcolorPanel, Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'HEADER' + bl_label = "Vertex Color" + bl_ui_units_x = 10 + + @classmethod + def poll(cls, context): + ob = context.object + return ob and ob.type == 'GPENCIL' + classes = ( VIEW3D_HT_header, VIEW3D_HT_tool_header, @@ -7163,6 +7322,7 @@ classes = ( VIEW3D_MT_edit_gpencil_delete, VIEW3D_MT_edit_gpencil_showhide, VIEW3D_MT_weight_gpencil, + VIEW3D_MT_vertex_gpencil, VIEW3D_MT_gpencil_animation, VIEW3D_MT_gpencil_simplify, VIEW3D_MT_gpencil_copy_layer, @@ -7249,10 +7409,13 @@ classes = ( VIEW3D_PT_paint_vertex_context_menu, VIEW3D_PT_paint_texture_context_menu, VIEW3D_PT_paint_weight_context_menu, + VIEW3D_PT_gpencil_vertex_context_menu, VIEW3D_PT_gpencil_sculpt_context_menu, + VIEW3D_PT_gpencil_weight_context_menu, VIEW3D_PT_gpencil_draw_context_menu, VIEW3D_PT_sculpt_context_menu, TOPBAR_PT_gpencil_materials, + TOPBAR_PT_gpencil_vertexcolor, TOPBAR_PT_annotation_layers, ) diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 1990e9a7260..9ad339b418c 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -21,6 +21,7 @@ from bpy.types import Menu, Panel, UIList from bl_ui.properties_grease_pencil_common import ( GreasePencilSculptOptionsPanel, GreasePencilDisplayPanel, + GreasePencilBrushFalloff, ) from bl_ui.properties_paint_common import ( UnifiedPaintPanel, @@ -71,6 +72,33 @@ class VIEW3D_MT_brush_context_menu(Menu): layout.operator("brush.reset") +class VIEW3D_MT_brush_gpencil_context_menu(Menu): + bl_label = "Brush Specials" + + def draw(self, context): + layout = self.layout + ts = context.tool_settings + + settings = None + if context.mode == 'PAINT_GPENCIL': + settings = ts.gpencil_paint + if context.mode == 'SCULPT_GPENCIL': + settings = ts.gpencil_sculpt_paint + elif context.mode == 'WEIGHT_GPENCIL': + settings = ts.gpencil_weight_paint + elif context.mode == 'VERTEX_GPENCIL': + settings = ts.gpencil_vertex_paint + + brush = getattr(settings, "brush", None) + # skip if no active brush + if not brush: + layout.label(text="No Brushes currently available", icon='INFO') + return + + layout.operator("gpencil.brush_reset") + layout.operator("gpencil.brush_reset_all") + + class VIEW3D_MT_brush_context_menu_paint_modes(Menu): bl_label = "Enabled Modes" @@ -1339,7 +1367,7 @@ class VIEW3D_PT_tools_particlemode_options_display(View3DPanel, Panel): # Grease Pencil drawing brushes -class GreasePencilPanel: +class GreasePencilPaintPanel: bl_context = ".greasepencil_paint" bl_category = "Tool" @@ -1355,7 +1383,7 @@ class GreasePencilPanel: return True -class VIEW3D_PT_tools_grease_pencil_brush_select(Panel, View3DPanel, GreasePencilPanel): +class VIEW3D_PT_tools_grease_pencil_brush_select(Panel, View3DPanel, GreasePencilPaintPanel): bl_label = "Brushes" def draw(self, context): @@ -1370,7 +1398,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_select(Panel, View3DPanel, GreasePenci row.column().template_ID_preview(gpencil_paint, "brush", new="brush.add_gpencil", rows=3, cols=8) col = row.column() - col.operator("gpencil.brush_presets_create", icon='PRESET_NEW', text="") + col.menu("VIEW3D_MT_brush_gpencil_context_menu", icon='DOWNARROW_HLT', text="") if context.mode == 'PAINT_GPENCIL': brush = tool_settings.gpencil_paint.brush @@ -1383,7 +1411,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_select(Panel, View3DPanel, GreasePenci layout.row().prop(brush, "icon_filepath", text="") -class VIEW3D_PT_tools_grease_pencil_brush_settings(Panel, View3DPanel, GreasePencilPanel): +class VIEW3D_PT_tools_grease_pencil_brush_settings(Panel, View3DPanel, GreasePencilPaintPanel): bl_label = "Brush Settings" # What is the point of brush presets? Seems to serve the exact same purpose as brushes themselves?? @@ -1431,7 +1459,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.tool_settings.gpencil_paint.brush - return brush is not None and brush.gpencil_tool != 'ERASE' + return brush is not None and brush.gpencil_tool not in {'ERASE', 'TINT'} def draw(self, context): layout = self.layout @@ -1463,11 +1491,11 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel): ma = brush.gpencil_settings.material col.separator() + col.prop(gp_settings, "hardeness", slider=True) subcol = col.column(align=True) if ma and ma.grease_pencil.mode == 'LINE': subcol.enabled = False - subcol.prop(gp_settings, "gradient_factor", slider=True) - subcol.prop(gp_settings, "gradient_shape") + subcol.prop(gp_settings, "aspect") elif brush.gpencil_tool == 'FILL': row = col.row(align=True) @@ -1479,6 +1507,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel): col.prop(gp_settings, "show_fill", text="Ignore Transparent Strokes") col.prop(gp_settings, "fill_threshold", text="Threshold") + class VIEW3D_PT_tools_grease_pencil_brush_stroke(Panel, View3DPanel): bl_context = ".greasepencil_paint" bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_settings' @@ -1545,7 +1574,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_post_processing(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.tool_settings.gpencil_paint.brush - return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'} + return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'} def draw_header(self, context): if self.is_popover: @@ -1575,13 +1604,8 @@ class VIEW3D_PT_tools_grease_pencil_brush_post_processing(View3DPanel, Panel): col1.prop(gp_settings, "pen_smooth_factor") col1.prop(gp_settings, "pen_smooth_steps") - col1 = col.column(align=True) - col1.prop(gp_settings, "pen_thick_smooth_factor") - col1.prop(gp_settings, "pen_thick_smooth_steps", text="Iterations") - col1 = col.column(align=True) col1.prop(gp_settings, "pen_subdivision_steps") - col1.prop(gp_settings, "random_subdiv", text="Randomness", slider=True) col1 = col.column(align=True) col1.prop(gp_settings, "simplify_factor") @@ -1600,7 +1624,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.tool_settings.gpencil_paint.brush - return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'} + return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'} def draw_header(self, context): if self.is_popover: @@ -1646,7 +1670,7 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.tool_settings.gpencil_paint.brush - return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'} + return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'} def draw(self, context): pass @@ -1703,6 +1727,24 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves_jitter(View3DPanel, Panel): use_negative_slope=True) +class VIEW3D_PT_tools_grease_pencil_brush_paint_falloff(GreasePencilBrushFalloff, Panel, View3DPaintPanel): + bl_context = ".greasepencil_paint" + bl_label = "Falloff" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + ts = context.tool_settings + settings = ts.gpencil_paint + brush = settings.brush + if brush is None: + return False + + tool = brush.gpencil_tool + + return (settings and settings.brush and settings.brush.curve and tool == 'TINT') + + # Grease Pencil stroke interpolation tools class VIEW3D_PT_tools_grease_pencil_interpolate(Panel): bl_space_type = 'VIEW_3D' @@ -1751,25 +1793,49 @@ class VIEW3D_PT_tools_grease_pencil_interpolate(Panel): # Grease Pencil stroke sculpting tools - -class VIEW3D_PT_tools_grease_pencil_sculpt_select(Panel, View3DPanel): +class GreasePencilSculptPanel: bl_context = ".greasepencil_sculpt" - bl_label = "Brushes" bl_category = "Tool" + @classmethod + def poll(cls, context): + if context.space_data.type in ('VIEW_3D', 'PROPERTIES'): + if context.gpencil_data is None: + return False + + gpd = context.gpencil_data + return bool(gpd.is_stroke_sculpt_mode) + else: + return True + + +class VIEW3D_PT_tools_grease_pencil_sculpt_select(Panel, View3DPanel, GreasePencilSculptPanel): + bl_label = "Brushes" + def draw(self, context): layout = self.layout layout.use_property_split = True layout.use_property_decorate = False - settings = context.tool_settings.gpencil_sculpt + tool_settings = context.scene.tool_settings + gpencil_paint = tool_settings.gpencil_sculpt_paint - layout.template_icon_view(settings, "sculpt_tool", show_labels=True) + row = layout.row() + row.column().template_ID_preview(gpencil_paint, "brush", new="brush.add_gpencil", rows=3, cols=8) + col = row.column() + col.menu("VIEW3D_MT_brush_gpencil_context_menu", icon='DOWNARROW_HLT', text="") -class VIEW3D_PT_tools_grease_pencil_sculpt_settings(Panel, View3DPanel): - bl_context = ".greasepencil_sculpt" - bl_category = "Tool" + if context.mode == 'SCULPT_GPENCIL': + brush = tool_settings.gpencil_sculpt_paint.brush + if brush is not None: + col.prop(brush, "use_custom_icon", toggle=True, icon='FILE_IMAGE', text="") + + if(brush.use_custom_icon): + layout.row().prop(brush, "icon_filepath", text="") + + +class VIEW3D_PT_tools_grease_pencil_sculpt_settings(Panel, View3DPanel, GreasePencilSculptPanel): bl_label = "Brush Settings" def draw(self, context): @@ -1777,7 +1843,8 @@ class VIEW3D_PT_tools_grease_pencil_sculpt_settings(Panel, View3DPanel): layout.use_property_split = True layout.use_property_decorate = False - settings = context.tool_settings.gpencil_sculpt + tool_settings = context.scene.tool_settings + settings = tool_settings.gpencil_sculpt_paint brush = settings.brush if not self.is_popover: @@ -1786,27 +1853,63 @@ class VIEW3D_PT_tools_grease_pencil_sculpt_settings(Panel, View3DPanel): ) brush_basic_gpencil_sculpt_settings(layout, context, brush) -# Grease Pencil weight painting tools +class VIEW3D_PT_tools_grease_pencil_brush_sculpt_falloff(GreasePencilBrushFalloff, Panel, View3DPaintPanel): + bl_context = ".greasepencil_sculpt" + bl_label = "Falloff" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + ts = context.tool_settings + settings = ts.gpencil_sculpt_paint + return (settings and settings.brush and settings.brush.curve) -class VIEW3D_PT_tools_grease_pencil_weight_paint_select(View3DPanel, Panel): + +# Grease Pencil weight painting tools +class GreasePencilWeightPanel: bl_context = ".greasepencil_weight" - bl_label = "Brushes" bl_category = "Tool" + @classmethod + def poll(cls, context): + if context.space_data.type in ('VIEW_3D', 'PROPERTIES'): + if context.gpencil_data is None: + return False + + gpd = context.gpencil_data + return bool(gpd.is_stroke_weight_mode) + else: + return True + + +class VIEW3D_PT_tools_grease_pencil_weight_paint_select(View3DPanel, Panel, GreasePencilWeightPanel): + bl_label = "Brushes" + def draw(self, context): layout = self.layout layout.use_property_split = True layout.use_property_decorate = False - settings = context.tool_settings.gpencil_sculpt + tool_settings = context.scene.tool_settings + gpencil_paint = tool_settings.gpencil_weight_paint - layout.template_icon_view(settings, "weight_tool", show_labels=True) + row = layout.row() + row.column().template_ID_preview(gpencil_paint, "brush", new="brush.add_gpencil", rows=3, cols=8) + col = row.column() + col.menu("VIEW3D_MT_brush_gpencil_context_menu", icon='DOWNARROW_HLT', text="") -class VIEW3D_PT_tools_grease_pencil_weight_paint_settings(Panel, View3DPanel): - bl_context = ".greasepencil_weight" - bl_category = "Tool" + if context.mode == 'WEIGHT_GPENCIL': + brush = tool_settings.gpencil_weight_paint.brush + if brush is not None: + col.prop(brush, "use_custom_icon", toggle=True, icon='FILE_IMAGE', text="") + + if(brush.use_custom_icon): + layout.row().prop(brush, "icon_filepath", text="") + + +class VIEW3D_PT_tools_grease_pencil_weight_paint_settings(Panel, View3DPanel, GreasePencilWeightPanel): bl_label = "Brush Settings" def draw(self, context): @@ -1814,7 +1917,8 @@ class VIEW3D_PT_tools_grease_pencil_weight_paint_settings(Panel, View3DPanel): layout.use_property_split = True layout.use_property_decorate = False - settings = context.tool_settings.gpencil_sculpt + tool_settings = context.scene.tool_settings + settings = tool_settings.gpencil_weight_paint brush = settings.brush if not self.is_popover: @@ -1824,6 +1928,272 @@ class VIEW3D_PT_tools_grease_pencil_weight_paint_settings(Panel, View3DPanel): brush_basic_gpencil_weight_settings(layout, context, brush) +class VIEW3D_PT_tools_grease_pencil_brush_weight_falloff(GreasePencilBrushFalloff, Panel, View3DPaintPanel): + bl_context = ".greasepencil_weight" + bl_label = "Falloff" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + ts = context.tool_settings + settings = ts.gpencil_weight_paint + brush = settings.brush + return (settings and settings.brush and settings.brush.curve) + + +# Grease Pencil vertex painting tools +class GreasePencilVertexPanel: + bl_context = ".greasepencil_vertex" + bl_category = "Tool" + + @classmethod + def poll(cls, context): + if context.space_data.type in ('VIEW_3D', 'PROPERTIES'): + if context.gpencil_data is None: + return False + + gpd = context.gpencil_data + return bool(gpd.is_stroke_vertex_mode) + else: + return True + + +class VIEW3D_PT_tools_grease_pencil_vertex_paint_select(View3DPanel, Panel, GreasePencilVertexPanel): + bl_label = "Brushes" + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + tool_settings = context.scene.tool_settings + gpencil_paint = tool_settings.gpencil_vertex_paint + + row = layout.row() + row.column().template_ID_preview(gpencil_paint, "brush", new="brush.add_gpencil", rows=3, cols=8) + + col = row.column() + col.menu("VIEW3D_MT_brush_gpencil_context_menu", icon='DOWNARROW_HLT', text="") + + if context.mode == 'VERTEX_GPENCIL': + brush = tool_settings.gpencil_vertex_paint.brush + if brush is not None: + col.prop(brush, "use_custom_icon", toggle=True, icon='FILE_IMAGE', text="") + + if(brush.use_custom_icon): + layout.row().prop(brush, "icon_filepath", text="") + + +class VIEW3D_PT_tools_grease_pencil_vertex_paint_settings(Panel, View3DPanel, GreasePencilVertexPanel): + bl_label = "Brush Settings" + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + tool_settings = context.scene.tool_settings + settings = tool_settings.gpencil_vertex_paint + brush = settings.brush + + if not self.is_popover: + from bl_ui.properties_paint_common import ( + brush_basic_gpencil_vertex_settings, + ) + brush_basic_gpencil_vertex_settings(layout, context, brush) + + +class VIEW3D_PT_tools_grease_pencil_brush_vertex_color(View3DPanel, Panel): + bl_context = ".greasepencil_vertex" + bl_label = "Color" + bl_category = "Tool" + + @classmethod + def poll(cls, context): + ob = context.object + ts = context.tool_settings + settings = ts.gpencil_vertex_paint + brush = settings.brush + + if ob is None or brush is None: + return False + + if context.region.type == 'TOOL_HEADER' or brush.gpencil_vertex_tool in {'BLUR', 'AVERAGE', 'SMEAR'}: + return False + + return True + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + ts = context.tool_settings + settings = ts.gpencil_vertex_paint + brush = settings.brush + gp_settings = brush.gpencil_settings + + col = layout.column() + + col.template_color_picker(brush, "color", value_slider=True) + + sub_row = col.row(align=True) + sub_row.prop(brush, "color", text="") + sub_row.prop(brush, "secondary_color", text="") + + sub_row.operator("gpencil.tint_flip", icon='FILE_REFRESH', text="") + + col.prop(gp_settings, "vertex_mode", text="Mode") + + +class VIEW3D_PT_tools_grease_pencil_brush_vertex_falloff(GreasePencilBrushFalloff, Panel, View3DPaintPanel): + bl_context = ".greasepencil_vertex" + bl_label = "Falloff" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + ts = context.tool_settings + settings = ts.gpencil_vertex_paint + return (settings and settings.brush and settings.brush.curve) + + +class VIEW3D_PT_tools_grease_pencil_brush_vertex_palette(View3DPanel, Panel): + bl_context = ".greasepencil_vertex" + bl_label = "Palette" + bl_category = "Tool" + bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_vertex_color' + + @classmethod + def poll(cls, context): + ob = context.object + ts = context.tool_settings + settings = ts.gpencil_vertex_paint + brush = settings.brush + + if ob is None or brush is None: + return False + + if brush.gpencil_vertex_tool in {'BLUR', 'AVERAGE', 'SMEAR'}: + return False + + return True + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + ts = context.tool_settings + settings = ts.gpencil_vertex_paint + + col = layout.column() + + row = col.row(align=True) + row.template_ID(settings, "palette", new="palette.new") + if settings.palette: + col.template_palette(settings, "palette", color=True) + + +class VIEW3D_PT_tools_grease_pencil_brush_mixcolor(View3DPanel, Panel): + bl_context = ".greasepencil_paint" + bl_label = "Color" + bl_category = "Tool" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + ob = context.object + ts = context.tool_settings + settings = ts.gpencil_paint + brush = settings.brush + + if ob is None or brush is None: + return False + + if context.region.type == 'TOOL_HEADER': + return False + + if brush.gpencil_tool == 'TINT': + return True + + if brush.gpencil_tool not in {'DRAW', 'FILL'}: + return False + + return True + + def draw(self, context): + layout = self.layout + ts = context.tool_settings + settings = ts.gpencil_paint + brush = settings.brush + gp_settings = brush.gpencil_settings + + if brush.gpencil_tool != 'TINT': + row = layout.row() + row.prop(settings, "color_mode", expand=True) + + layout.use_property_split = True + layout.use_property_decorate = False + col = layout.column() + col.enabled = settings.color_mode == 'VERTEXCOLOR' or brush.gpencil_tool == 'TINT' + + col.template_color_picker(brush, "color", value_slider=True) + + sub_row = col.row(align=True) + sub_row.prop(brush, "color", text="") + sub_row.prop(brush, "secondary_color", text="") + + sub_row.operator("gpencil.tint_flip", icon='FILE_REFRESH', text="") + + if brush.gpencil_tool in {'DRAW', 'FILL'}: + col.prop(gp_settings, "vertex_mode", text="Mode") + col.prop(gp_settings, "vertex_color_factor", slider=True, text="Mix Factor") + + if brush.gpencil_tool == 'TINT': + col.prop(gp_settings, "vertex_mode", text="Mode") + + +class VIEW3D_PT_tools_grease_pencil_brush_mix_palette(View3DPanel, Panel): + bl_context = ".greasepencil_paint" + bl_label = "Palette" + bl_category = "Tool" + bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_mixcolor' + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + ob = context.object + ts = context.tool_settings + settings = ts.gpencil_paint + brush = settings.brush + + if ob is None or brush is None: + return False + + if brush.gpencil_tool == 'TINT': + return True + + if brush.gpencil_tool not in {'DRAW', 'FILL'}: + return False + + return True + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + ts = context.tool_settings + settings = ts.gpencil_paint + brush = settings.brush + + col = layout.column() + col.enabled = settings.color_mode == 'VERTEXCOLOR' or brush.gpencil_tool == 'TINT' + + row = col.row(align=True) + row.template_ID(settings, "palette", new="palette.new") + if settings.palette: + col.template_palette(settings, "palette", color=True) + + class VIEW3D_PT_tools_grease_pencil_sculpt_options(GreasePencilSculptOptionsPanel, Panel, View3DPanel): bl_context = ".greasepencil_sculpt" bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_sculpt_settings' @@ -1852,6 +2222,11 @@ class VIEW3D_PT_tools_grease_pencil_weight_appearance(GreasePencilDisplayPanel, bl_category = "Tool" bl_label = "Cursor" +class VIEW3D_PT_tools_grease_pencil_vertex_appearance(GreasePencilDisplayPanel, Panel, View3DPanel): + bl_context = ".greasepencil_vertex" + bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_vertex_paint_settings' + bl_category = "Tool" + bl_label = "Cursor" class VIEW3D_PT_gpencil_brush_presets(Panel, PresetPanel): """Brush settings""" @@ -1863,6 +2238,7 @@ class VIEW3D_PT_gpencil_brush_presets(Panel, PresetPanel): classes = ( VIEW3D_MT_brush_context_menu, + VIEW3D_MT_brush_gpencil_context_menu, VIEW3D_MT_brush_context_menu_paint_modes, VIEW3D_PT_tools_object_options, VIEW3D_PT_tools_object_options_transform, @@ -1940,7 +2316,19 @@ classes = ( VIEW3D_PT_tools_grease_pencil_weight_paint_select, VIEW3D_PT_tools_grease_pencil_weight_paint_settings, VIEW3D_PT_tools_grease_pencil_weight_appearance, + VIEW3D_PT_tools_grease_pencil_vertex_paint_select, + VIEW3D_PT_tools_grease_pencil_vertex_paint_settings, + VIEW3D_PT_tools_grease_pencil_vertex_appearance, VIEW3D_PT_tools_grease_pencil_interpolate, + VIEW3D_PT_tools_grease_pencil_brush_mixcolor, + VIEW3D_PT_tools_grease_pencil_brush_mix_palette, + + VIEW3D_PT_tools_grease_pencil_brush_paint_falloff, + VIEW3D_PT_tools_grease_pencil_brush_sculpt_falloff, + VIEW3D_PT_tools_grease_pencil_brush_weight_falloff, + VIEW3D_PT_tools_grease_pencil_brush_vertex_color, + VIEW3D_PT_tools_grease_pencil_brush_vertex_palette, + VIEW3D_PT_tools_grease_pencil_brush_vertex_falloff, ) if __name__ == "__main__": # only for live edit. -- cgit v1.2.3 From 5543572cd2a6f68db1da5583d0b3c04f614f4d48 Mon Sep 17 00:00:00 2001 From: Adrian Newton Date: Mon, 9 Mar 2020 16:49:59 +0100 Subject: Cleanup: remove unnecessary space at end of label Differential Revision: https://developer.blender.org/D7070 --- release/scripts/startup/bl_ui/properties_particle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 7eb173c88bb..f1dd6a1c890 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -639,7 +639,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel): col.separator() col.prop(part, "phase_factor", slider=True) - col.prop(part, "phase_factor_random", text="Randomize Phase ", slider=True) + col.prop(part, "phase_factor_random", text="Randomize Phase", slider=True) if part.type != 'HAIR': col.prop(part, "use_dynamic_rotation") -- cgit v1.2.3 From 58e6306b1533ef0b4668079eaac6f14b82cef313 Mon Sep 17 00:00:00 2001 From: Adrian Newton Date: Mon, 9 Mar 2020 16:50:45 +0100 Subject: UI: reorder viewport/render toggle in particles for consistency with modifiers Differential Revision: https://developer.blender.org/D7069 --- release/scripts/startup/bl_ui/properties_particle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index f1dd6a1c890..cc8fa511e42 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -136,13 +136,13 @@ class PARTICLE_UL_particle_systems(bpy.types.UIList): if md: row.prop( md, - "show_viewport", + "show_render", emboss=False, icon_only=True, ) row.prop( md, - "show_render", + "show_viewport", emboss=False, icon_only=True, ) -- cgit v1.2.3 From da101eddef02ccdb8f2cb4735343f6c0070ca3b3 Mon Sep 17 00:00:00 2001 From: Yevgeny Makarov Date: Mon, 9 Mar 2020 16:54:38 +0100 Subject: UI: input preferences layout tweaks for keymap search and zoom settings Differential Revision: https://developer.blender.org/D6979 --- release/scripts/startup/bl_ui/space_userpref.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index b8051a1d98a..77e642f5e1f 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1470,9 +1470,9 @@ class USERPREF_PT_navigation_zoom(NavigationPanel, CenterAlignMixIn, Panel): flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - flow.row().prop(inputs, "view_zoom_method", text="Zoom Method", expand=True) + flow.row().prop(inputs, "view_zoom_method", text="Zoom Method") if inputs.view_zoom_method in {'DOLLY', 'CONTINUE'}: - flow.row().prop(inputs, "view_zoom_axis", expand=True) + flow.row().prop(inputs, "view_zoom_axis") flow.prop(inputs, "invert_mouse_zoom", text="Invert Mouse Zoom Direction") flow.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction") -- cgit v1.2.3 From 2d8d30e17b560598dc29de626c6a605ac1a99b94 Mon Sep 17 00:00:00 2001 From: Adrian Newton Date: Mon, 9 Mar 2020 19:52:42 +0100 Subject: UI: make workbench viewport samples label consistent with Cycles and Eevee Differential Revision: https://developer.blender.org/D7082 --- release/scripts/startup/bl_ui/properties_render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 9c422b58ee5..fa9778da53b 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -561,7 +561,7 @@ class RENDER_PT_opengl_sampling(RenderButtonsPanel, Panel): col = layout.column() col.prop(props, "render_aa", text="Render") - col.prop(props, "viewport_aa", text="Viewport Render") + col.prop(props, "viewport_aa", text="Viewport") class RENDER_PT_opengl_film(RenderButtonsPanel, Panel): -- cgit v1.2.3 From 04e9ba7169c0889cce28171a55e81ea983d1dd79 Mon Sep 17 00:00:00 2001 From: Yevgeny Makarov Date: Mon, 9 Mar 2020 19:53:59 +0100 Subject: UI: add menus for preferences editor This only applies to the case where preferences are opened as an editor in a workspace, not with Edit > Preferences in a new window. Differential Revision: https://developer.blender.org/D7001 --- release/scripts/startup/bl_ui/space_userpref.py | 36 ++++++++++++++++++------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 77e642f5e1f..6aa0f51c55c 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -37,18 +37,13 @@ class USERPREF_HT_header(Header): def draw_buttons(layout, context): prefs = context.preferences - layout.scale_x = 1.0 - layout.scale_y = 1.0 layout.operator_context = 'EXEC_AREA' - row = layout.row() - row.menu("USERPREF_MT_save_load", text="", icon='COLLAPSEMENU') - if prefs.use_preferences_save and (not bpy.app.use_userpref_skip_save_on_exit): pass else: # Show '*' to let users know the preferences have been modified. - row.operator( + layout.operator( "wm.save_userpref", text="Save Preferences{:s}".format(" *" if prefs.is_dirty else ""), ) @@ -59,7 +54,10 @@ class USERPREF_HT_header(Header): layout.template_header() + USERPREF_MT_editor_menus.draw_collapsible(context, layout) + layout.separator_spacer() + self.draw_buttons(layout, context) @@ -84,6 +82,25 @@ class USERPREF_PT_navigation_bar(Panel): col.prop(prefs, "active_section", expand=True) +class USERPREF_MT_editor_menus(Menu): + bl_idname = "USERPREF_MT_editor_menus" + bl_label = "" + + def draw(self, _context): + layout = self.layout + layout.menu("USERPREF_MT_view") + layout.menu("USERPREF_MT_save_load", text="Preferences") + + +class USERPREF_MT_view(Menu): + bl_label = "View" + + def draw(self, context): + layout = self.layout + + layout.menu("INFO_MT_area") + + class USERPREF_MT_save_load(Menu): bl_label = "Save & Load" @@ -125,11 +142,10 @@ class USERPREF_PT_save_preferences(Panel): return False def draw(self, context): - layout = self.layout + layout = self.layout.row() layout.operator_context = 'EXEC_AREA' - layout.scale_x = 1.3 - layout.scale_y = 1.3 + layout.menu("USERPREF_MT_save_load", text="", icon='COLLAPSEMENU') USERPREF_HT_header.draw_buttons(layout, context) @@ -2128,6 +2144,8 @@ classes = ( USERPREF_HT_header, USERPREF_PT_navigation_bar, USERPREF_PT_save_preferences, + USERPREF_MT_editor_menus, + USERPREF_MT_view, USERPREF_MT_save_load, USERPREF_PT_interface_display, -- cgit v1.2.3 From 84b94f9e7b8b36ac74980e31b6a2c69bc49b2e0d Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 9 Mar 2020 21:14:47 +0100 Subject: Sculpt: Edge Automasking This automasking option protects the open boundary edges of the mesh from the brush deformation. This is needed to sculpt cloths and it works nicely with the cloth brush. It has a Propagation Steps property that controls the falloff of the mask from the edge. Limitations: - The automask is recalculated at the beginning of each stroke, creating a little bit of lag in high poly meshes, but it is not necessary. This can be fixed in the future by caching the edge distances, increasing a little bit the complexity of the code. - The boundary vertex detection in meshes is not ideal and it fails with triangulated geometry, but it is the same as in the smooth brush. After fixing this, we should refactor the smooth brush to use the API and let the automasking option manually control the affected vertices. - It does not work in Multires (it needs to be implemented in the API). The smooth brush in Multires is also not making boundary vertices. - The falloff has a visible line artifact on grid patterns. We can smooth the final automasking factors several iterations, but it will make the initialization much slower. This can also be added in the future if we decided to cache the distances. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6705 --- release/scripts/startup/bl_ui/properties_paint_common.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index df3dc930f97..b50791050c4 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -813,6 +813,11 @@ def brush_settings_advanced(layout, context, brush, popover=False): # face masks automasking layout.prop(brush, "use_automasking_face_sets") + + # boundary edges automasking + layout.prop(brush, "use_automasking_boundary_edges") + layout.prop(brush, "automasking_boundary_edges_propagation_steps") + # sculpt plane settings if capabilities.has_sculpt_plane: -- cgit v1.2.3 From 915998111bc45336247a7aaf91eaa1dcd5e8881b Mon Sep 17 00:00:00 2001 From: Lucas Veber Date: Tue, 10 Mar 2020 12:47:43 +0100 Subject: Modifiers: Corrective Smooth modifier, new Scale parameter When scaling the root bone of a rig to apply a global scale, the corrective smooth modifier results in wrong deformation due to incorrect scaling. The delta calculations are not taking into account any scale value. To fix it, a scale property is added to the modifier, allowing to set manually the scale value for the deltas by simply multiplying the vectors by this value. There is a similar implementation in Maya's Delta Mush deformer. This property can be for example driven by the scale of the root bone of the rig, to dynamically update when the animator scale this bone. Reviewed By: brecht, sybren Differential Revision: https://developer.blender.org/D6622 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 9070aa5faee..3cefbee8c17 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1677,7 +1677,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.prop(md, "factor", text="Factor") layout.prop(md, "iterations") - + layout.prop(md, "scale") row = layout.row() row.prop(md, "smooth_type") -- cgit v1.2.3 From a801487ef5049d9f4ecf947942761566bc64a176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 10 Mar 2020 14:02:16 +0100 Subject: Fix T65076: Missing EasingType implementation on the Dopesheet EasingType was implemented rBdaccaa713b6e for the GraphEditor (but never made it to the Dopesheet). If you can select Easing Mode in the DopeSheet, then you should also be able to select the associated Easing Type. Thanks @lichtwerk for the initial implementation. Maniphest Tasks: T65076 Differential Revision: https://developer.blender.org/D6094 --- release/scripts/startup/bl_ui/space_dopesheet.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 41adea0b922..f12d8597d37 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -498,6 +498,7 @@ class DOPESHEET_MT_key(Menu): layout.operator_menu_enum("action.keyframe_type", "type", text="Keyframe Type") layout.operator_menu_enum("action.handle_type", "type", text="Handle Type") layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode") + layout.operator_menu_enum("action.easing_type", "type", text="Easing Mode") layout.separator() layout.operator("action.clean").channels = False @@ -600,6 +601,7 @@ class DOPESHEET_MT_context_menu(Menu): layout.operator_menu_enum("action.keyframe_type", "type", text="Keyframe Type") layout.operator_menu_enum("action.handle_type", "type", text="Handle Type") layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode") + layout.operator_menu_enum("action.easing_type", "type", text="Easing Mode") layout.separator() -- cgit v1.2.3 From a52f6d7a31e9ef52ba5f8f8c4e83a59fc2c8b667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 10 Mar 2020 14:18:19 +0100 Subject: Fix T66269: Menu for Extrapolation Mode is disabled in Graph Editor The Extrapolation Mode menu in the graph editor channel list was incorrectly using the operator for the Action/Dopesheet editor. The operator was even missing in the generic dopesheet hotkeys, so {key Shift E} was listed as hotkey but didn't work. This is now all fixed. --- release/scripts/startup/bl_ui/space_dopesheet.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index f12d8597d37..8117445e4af 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -619,7 +619,7 @@ class DOPESHEET_MT_context_menu(Menu): class DOPESHEET_MT_channel_context_menu(Menu): bl_label = "Dope Sheet Channel Context Menu" - def draw(self, _context): + def draw(self, context): layout = self.layout layout.operator("anim.channels_setting_enable", text="Mute Channels").type = 'MUTE' @@ -634,7 +634,12 @@ class DOPESHEET_MT_channel_context_menu(Menu): layout.separator() layout.operator("anim.channels_editable_toggle") - layout.operator_menu_enum("action.extrapolation_type", "type", text="Extrapolation Mode") + + if bpy.ops.graph.extrapolation_type.poll(context.copy()): + operator = "graph.extrapolation_type" + else: + operator = "action.extrapolation_type" + layout.operator_menu_enum(operator, "type", text="Extrapolation Mode") layout.separator() layout.operator("anim.channels_expand") -- cgit v1.2.3 From e1b70e9f9c8ce204027796ed216a708cbc8a3a45 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 11 Mar 2020 10:14:23 +0100 Subject: Fix T74635: GPencil RMB-menu brush settings not working in Sculpt and Weight Paint modes --- release/scripts/startup/bl_ui/space_view3d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 447386b8f9d..ece23db7a31 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6900,7 +6900,7 @@ class VIEW3D_PT_gpencil_sculpt_context_menu(Panel): def draw(self, context): ts = context.tool_settings - settings = ts.gpencil_paint + settings = ts.gpencil_sculpt_paint brush = settings.brush layout = self.layout @@ -6920,7 +6920,7 @@ class VIEW3D_PT_gpencil_weight_context_menu(Panel): def draw(self, context): ts = context.tool_settings - settings = ts.gpencil_paint + settings = ts.gpencil_weight_paint brush = settings.brush layout = self.layout -- cgit v1.2.3 From 6a632f11c85f161bb53207651841979577b4139a Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 11 Mar 2020 16:10:10 +0100 Subject: GPencil: Add missing Layer buttons in Dopesheet header and remove unneeded options Update Dopesheet header to include missing buttons, remove Scene Active only buttton and also removed duplicated search box. The removed options come from old 2.7x version and they are not required now. Reviewed By: mendio, pepeland Differential Revision: https://developer.blender.org/D7107 --- release/scripts/startup/bl_ui/space_dopesheet.py | 29 +++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 8117445e4af..76ba4dfb78e 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -252,15 +252,25 @@ class DOPESHEET_HT_editor_buttons(Header): # Layer management if st.mode == 'GPENCIL': - row = layout.row(align=True) - row.operator("gpencil.layer_move", icon='TRIA_UP', text="").type = 'UP' - row.operator("gpencil.layer_move", icon='TRIA_DOWN', text="").type = 'DOWN' + ob = context.active_object + selected = st.dopesheet.show_only_selected + enable_but = selected and ob is not None and ob.type == 'GPENCIL' row = layout.row(align=True) + row.enabled = enable_but row.operator("gpencil.layer_add", icon='ADD', text="") row.operator("gpencil.layer_remove", icon='REMOVE', text="") + row.menu("GPENCIL_MT_layer_context_menu", icon='DOWNARROW_HLT', text="") - layout.separator_spacer() + row = layout.row(align=True) + row.enabled = enable_but + row.operator("gpencil.layer_move", icon='TRIA_UP', text="").type = 'UP' + row.operator("gpencil.layer_move", icon='TRIA_DOWN', text="").type = 'DOWN' + + row = layout.row(align=True) + row.enabled = enable_but + row.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True + row.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False layout.separator_spacer() @@ -270,15 +280,8 @@ class DOPESHEET_HT_editor_buttons(Header): dopesheet_filter(layout, context) elif st.mode == 'GPENCIL': row = layout.row(align=True) - row.prop(st.dopesheet, "show_gpencil_3d_only", text="Active Only") - - if st.dopesheet.show_gpencil_3d_only: - row = layout.row(align=True) - row.prop(st.dopesheet, "show_only_selected", text="") - row.prop(st.dopesheet, "show_hidden", text="") - - row = layout.row(align=True) - row.prop(st.dopesheet, "filter_text", text="") + row.prop(st.dopesheet, "show_only_selected", text="") + row.prop(st.dopesheet, "show_hidden", text="") layout.popover( panel="DOPESHEET_PT_filters", -- cgit v1.2.3 From 6ce709dceb8db65ec6baae21100a7ce93829b1f6 Mon Sep 17 00:00:00 2001 From: Phil Stopford Date: Thu, 12 Mar 2020 13:35:22 +1100 Subject: Ocean: add new spectra modes to the ocean modifier This extends the ocean modifier to add new spectra (Pierson-Moskowitz, Jonswap, TMA). These models are very different to the Phillips spectrum. They are intended for more established, large area, oceans and/or shallow water situations. --- release/scripts/startup/bl_ui/properties_data_modifier.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 3cefbee8c17..7448fbcc145 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -725,6 +725,19 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "size") col.prop(md, "spatial_size") + layout.separator() + + layout.prop(md, "spectrum") + + if md.spectrum in {'TEXEL_MARSEN_ARSLOE', 'JONSWAP'}: + split = layout.split() + + col = split.column() + col.prop(md, "sharpen_peak_jonswap") + + col = split.column() + col.prop(md, "fetch_jonswap") + layout.label(text="Waves:") split = layout.split() -- cgit v1.2.3 From 456595fd39c2db59be9de4652c7232a04d2322b6 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 3 Mar 2020 09:58:48 +0100 Subject: Fix T74392: HDRI preview spheres appear in render passes and reflections Do not render HDRI Previews when a renderpass is active Reviewed By: fclem Differential Revision: https://developer.blender.org/D7005 --- release/scripts/startup/bl_ui/space_view3d.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index ece23db7a31..969f9b4bd1a 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5888,7 +5888,9 @@ class VIEW3D_PT_overlay_guides(Panel): sub.prop(overlay, "show_cursor", text="3D Cursor") if shading.type == 'MATERIAL': - col.prop(overlay, "show_look_dev") + row = col.row() + row.active = shading.render_pass == 'COMBINED' + row.prop(overlay, "show_look_dev") col.prop(overlay, "show_annotation", text="Annotations") -- cgit v1.2.3 From 4ba6a00afc6a22965f8fccd88ee66c95462ed42a Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 12 Mar 2020 10:39:41 +0100 Subject: GPencil: Change Build modifier UI layout for Influence Filters The layer filter was not following the standard layout --- .../scripts/startup/bl_ui/properties_data_modifier.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 7448fbcc145..99508bf8fab 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -2041,13 +2041,22 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): sub.prop(md, "frame_start", text="Start") sub.prop(md, "frame_end", text="End") - col = layout.column() - col.separator() - col.label(text="Layer:") - row = col.row(align=True) + layout.label(text="Influence Filters:") + + split = layout.split(factor=0.25) + + col1 = split.column() + + col1.label(text="Layer:") + + col2 = split.column() + + split = col2.split(factor=0.6) + row = split.row(align=True) row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT') - row = layout.row(align=True) + + row = split.row(align=True) row.prop(md, "layer_pass", text="Pass") row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT') -- cgit v1.2.3 From 2050baa139006760fc43ea94cbfb1290698575f5 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 12 Mar 2020 20:29:04 +0100 Subject: GPencil: Move Vertex Paint mode to topbar It's more easy to find in the topbar --- .../scripts/startup/bl_ui/properties_grease_pencil_common.py | 4 ---- release/scripts/startup/bl_ui/properties_paint_common.py | 10 +++++++++- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index fced848641e..7c79349a245 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -692,10 +692,6 @@ class GreasePencilVertexcolorPanel: row = layout.row(align=True) row.prop(gp_settings, "vertex_color_factor", slider=True, text="Mix Factor") - if tool == 'TINT' or is_vertex is True: - row = layout.row(align=True) - row.prop(gp_settings, "vertex_mode", text="Mode") - class GPENCIL_UL_layer(UIList): def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index): diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index b50791050c4..34afcc09407 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1065,13 +1065,16 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) row = layout.row(align=True) row.prop(gp_settings, "fill_simplify_level", text="Simplify") - else: # brush.gpencil_tool == 'DRAW': + else: # brush.gpencil_tool == 'DRAW/TINT': row = layout.row(align=True) row.prop(brush, "size", text="Radius") row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE') row = layout.row(align=True) row.prop(gp_settings, "pen_strength", slider=True) row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') + if brush.gpencil_tool == 'TINT': + row = layout.row(align=True) + row.prop(gp_settings, "vertex_mode", text="Mode") # FIXME: tools must use their own UI drawing! if tool.idname in { @@ -1159,6 +1162,11 @@ def brush_basic_gpencil_vertex_settings(layout, _context, brush, *, compact=Fals row.prop(gp_settings, "pen_strength", slider=True) row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') + if brush.gpencil_vertex_tool in {'DRAW', 'REPLACE'}: + row = layout.row(align=True) + row.prop(gp_settings, "vertex_mode", text="Mode") + + classes = ( VIEW3D_MT_tools_projectpaint_clone, ) -- cgit v1.2.3 From de9c7bae7b9e7c66584531953c5acae274c013c2 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 13 Mar 2020 10:28:30 +0100 Subject: GPencil: Join Tint and Vertex Color modifier Both are doing almost the same and can be merged. This reduce complexity for user and less code to maintain. Reviewed By: mendio, pepeland, fclem Differential Revision: https://developer.blender.org/D7134 --- .../startup/bl_ui/properties_data_modifier.py | 51 +++++++++++----------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 99508bf8fab..bcf1c285d2b 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1891,16 +1891,34 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): self.gpencil_masking(layout, ob, md, True, True) def GP_TINT(self, layout, ob, md): - split = layout.split() + layout.row().prop(md, "tint_type", expand=True) - col = split.column() - col.prop(md, "color") - col.prop(md, "factor") + if md.tint_type == 'UNIFORM': + col = layout.column() + col.prop(md, "color") - row = layout.row() - row.prop(md, "modify_color") + col.separator() + col.prop(md, "factor") - self.gpencil_masking(layout, ob, md, False, True) + if md.tint_type == 'GRADIENT': + col = layout.column() + col.label(text="Colors:") + col.template_color_ramp(md, "colors") + + col.separator() + + col.label(text="Object:") + col.prop(md, "object", text="") + + col.separator() + row = col.row(align=True) + row.prop(md, "radius") + row.prop(md, "factor") + + col.separator() + col.prop(md, "vertex_mode") + + self.gpencil_masking(layout, ob, md, True, True) def GP_TIME(self, layout, ob, md): gpd = ob.data @@ -2165,25 +2183,6 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): self.gpencil_masking(layout, ob, md, False) - def GP_VERTEXCOLOR(self, layout, ob, md): - col = layout.column() - col.label(text="Object:") - col.prop(md, "object", text="") - - col.separator() - row = col.row(align=True) - row.prop(md, "radius") - row.prop(md, "factor", text="Strength", slider=True) - - col.separator() - col.label(text="Colors:") - col.template_color_ramp(md, "colors") - - col.separator() - col.prop(md, "vertex_mode") - - self.gpencil_masking(layout, ob, md, True, True) - classes = ( DATA_PT_modifiers, -- cgit v1.2.3 From 48e0af52e63b71394a244f689d127142b1b8bde5 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 13 Mar 2020 13:08:45 +0100 Subject: GPencil: Fix typo error --- release/scripts/startup/bl_ui/properties_data_shaderfx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_shaderfx.py b/release/scripts/startup/bl_ui/properties_data_shaderfx.py index 48a851e8bef..8c9ea749d0a 100644 --- a/release/scripts/startup/bl_ui/properties_data_shaderfx.py +++ b/release/scripts/startup/bl_ui/properties_data_shaderfx.py @@ -56,7 +56,7 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): def FX_BLUR(self, layout, fx): - layout.prop(fx, "use_dof_mode", text="Use as Depth Of Field") + layout.prop(fx, "use_dof_mode", text="Use Depth of Field") layout.separator() col = layout.column() -- cgit v1.2.3 From be76a37c91dbd7c2c1f7946ac8a0815876e94f32 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 13 Mar 2020 15:50:08 +0100 Subject: GPencil: Fix UI typo --- release/scripts/startup/bl_ui/properties_data_shaderfx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_shaderfx.py b/release/scripts/startup/bl_ui/properties_data_shaderfx.py index 8c9ea749d0a..1d4bf37b282 100644 --- a/release/scripts/startup/bl_ui/properties_data_shaderfx.py +++ b/release/scripts/startup/bl_ui/properties_data_shaderfx.py @@ -98,7 +98,7 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): layout.prop(fx, "rim_color") layout.prop(fx, "mask_color") - layout.prop(fx, "mode") + layout.prop(fx, "mode", text="Blend") layout.prop(fx, "blur") layout.prop(fx, "samples") @@ -114,7 +114,7 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): layout.prop(fx, "samples") layout.separator() - layout.prop(fx, "use_object", text="Use Object As Pivot") + layout.prop(fx, "use_object", text="Use Object as Pivot") if fx.use_object: row = layout.row() row.prop(fx, "object", text="Object") -- cgit v1.2.3 From d50d410a7066549c69523ba3e0748e437de49949 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 14 Mar 2020 10:30:59 +0100 Subject: GPencil: Rename operator color_select to select_material The old name was related to the old palettes. --- release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 7c79349a245..95997b48680 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -632,8 +632,8 @@ class GreasePencilMaterialsPanel: if ob.data.use_stroke_edit_mode: row = layout.row(align=True) row.operator("gpencil.stroke_change_color", text="Assign") - row.operator("gpencil.color_select", text="Select").deselect = False - row.operator("gpencil.color_select", text="Deselect").deselect = True + row.operator("gpencil.select_material", text="Select").deselect = False + row.operator("gpencil.select_material", text="Deselect").deselect = True # stroke color ma = None if is_view3d and brush is not None: -- cgit v1.2.3 From b8211a4d7c90447ea88d96ff2630a2774e0921b3 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 14 Mar 2020 10:45:23 +0100 Subject: GPencil: Add Select Vertex Color to menu This option was missing --- release/scripts/startup/bl_ui/space_view3d.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 969f9b4bd1a..4bc7d1ae4c9 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1902,6 +1902,9 @@ class VIEW3D_MT_select_gpencil(Menu): layout.operator("gpencil.select_alternate") layout.operator_menu_enum("gpencil.select_grouped", "type", text="Grouped") + if _context.mode == 'VERTEX_GPENCIL': + layout.operator("gpencil.select_vertex_color", text="Vertex Color") + layout.separator() layout.operator("gpencil.select_first") -- cgit v1.2.3 From 94bad2f30d665b8fc0b844094801f06079687171 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 14 Mar 2020 11:58:22 +0100 Subject: GPencil: Fix missing context wheel color in Tint tool --- release/scripts/startup/bl_ui/space_view3d.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 4bc7d1ae4c9..f8b291c0c5f 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6951,8 +6951,9 @@ class VIEW3D_PT_gpencil_draw_context_menu(Panel): gp_settings = brush.gpencil_settings layout = self.layout + is_vertex = settings.color_mode == 'VERTEXCOLOR' or brush.gpencil_tool == 'TINT' - if brush.gpencil_tool not in {'ERASE', 'CUTTER', 'EYEDROPPER'} and settings.color_mode == 'VERTEXCOLOR': + if brush.gpencil_tool not in {'ERASE', 'CUTTER', 'EYEDROPPER'} and is_vertex: split = layout.split(factor=0.1) split.prop(brush, "color", text="") split.template_color_picker(brush, "color", value_slider=True) -- cgit v1.2.3 From 20d7c04305a39bc18d483baba26dfb54960bb92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Mon, 16 Mar 2020 19:10:25 +0100 Subject: Fluid: Re-dded Empty Space option in the UI This option existed already and was just hidden in the UI. With the new fluids system though, it will only be used for rendering - and not to optimize the cache. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index ba21fe47519..65992a4e4e9 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -192,8 +192,7 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): sub.prop(domain, "gravity", text="Using Scene Gravity", icon='SCENE_DATA') else: col.prop(domain, "gravity", text="Gravity") - # TODO (sebbas): Clipping var useful for manta openvdb caching? - # col.prop(domain, "clipping", text="Empty Space") + col.prop(domain, "clipping", text="Empty Space") if domain.cache_type == 'MODULAR': col.separator() -- cgit v1.2.3 From b852db57ba24adfcfaa0ada7e9ff513a79a399a2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 17 Mar 2020 12:29:36 +0100 Subject: Add experimental global undo speedup. The feature is hidden behind an experimental option, you'll have to enable it in the preferences to try it. This feature is not yet considered fully stable, crashes may happen, as well as .blend file corruptions (very unlikely, but still possible). In a nutshell, the ideas behind this code are to: * Detect unchanged IDs across an undo step. * Reuse as much as possible existing IDs memory, even when its content did change. * Re-use existing depsgraphs instead of building new ones from scratch. * Store accumulated recalc flags, to avoid needless re-compute of things that did not change, when the ID itself is detected as modified. See T60695 and D6580 for more technical details. --- release/scripts/startup/bl_ui/space_userpref.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 6aa0f51c55c..2ca0e73bd74 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2133,6 +2133,25 @@ class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel): """ +class USERPREF_PT_experimental_system(ExperimentalPanel, Panel): + bl_label = "System" + + def draw(self, context): + prefs = context.preferences + experimental = prefs.experimental + + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + task = "T60695" + split = layout.split(factor=0.66) + col = split.split() + col.prop(experimental, "use_undo_speedup") + col = split.split() + col.operator("wm.url_open", text=task, icon='URL').url = self.url_prefix + task + + # ----------------------------------------------------------------------------- # Class Registration @@ -2222,6 +2241,8 @@ classes = ( # Popovers. USERPREF_PT_ndof_settings, + USERPREF_PT_experimental_system, + # Add dynamically generated editor theme panels last, # so they show up last in the theme section. *ThemeGenericClassGenerator.generate_panel_classes_from_theme_areas(), -- cgit v1.2.3 From f1eb86c458f256d983fbb553be07b509dbdd0714 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Tue, 17 Mar 2020 18:29:18 +0100 Subject: GPencil: Rename old color operators to material The color was used in old version when palettes were used, but now all are materials --- .../startup/bl_ui/properties_grease_pencil_common.py | 6 +++--- .../scripts/startup/bl_ui/properties_material_gpencil.py | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 95997b48680..64d4b6e2d4a 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -605,7 +605,7 @@ class GreasePencilMaterialsPanel: col.separator() - col.menu("GPENCIL_MT_color_context_menu", icon='DOWNARROW_HLT', text="") + col.menu("GPENCIL_MT_material_context_menu", icon='DOWNARROW_HLT', text="") if is_sortable: col.separator() @@ -616,8 +616,8 @@ class GreasePencilMaterialsPanel: col.separator() sub = col.column(align=True) - sub.operator("gpencil.color_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True - sub.operator("gpencil.color_isolate", icon='LOCKED', text="").affect_visibility = False + sub.operator("gpencil.material_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True + sub.operator("gpencil.material_isolate", icon='LOCKED', text="").affect_visibility = False if show_full_ui: row = layout.row() diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index 56201b29e7f..6dff706e839 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -27,21 +27,21 @@ from bl_ui.properties_grease_pencil_common import ( ) -class GPENCIL_MT_color_context_menu(Menu): +class GPENCIL_MT_material_context_menu(Menu): bl_label = "Material Specials" def draw(self, _context): layout = self.layout - layout.operator("gpencil.color_reveal", icon='RESTRICT_VIEW_OFF', text="Show All") - layout.operator("gpencil.color_hide", icon='RESTRICT_VIEW_ON', text="Hide Others").unselected = True + layout.operator("gpencil.material_reveal", icon='RESTRICT_VIEW_OFF', text="Show All") + layout.operator("gpencil.material_hide", icon='RESTRICT_VIEW_ON', text="Hide Others").unselected = True layout.separator() - layout.operator("gpencil.color_lock_all", icon='LOCKED', text="Lock All") - layout.operator("gpencil.color_unlock_all", icon='UNLOCKED', text="UnLock All") + layout.operator("gpencil.material_lock_all", icon='LOCKED', text="Lock All") + layout.operator("gpencil.material_unlock_all", icon='UNLOCKED', text="UnLock All") - layout.operator("gpencil.stroke_lock_color", text="Lock Unselected") + layout.operator("gpencil.material_lock_unused", text="Lock Unselected") layout.operator("gpencil.lock_layer", text="Lock Unused") layout.separator() @@ -261,7 +261,7 @@ class MATERIAL_PT_gpencil_material_presets(PresetPanel, Panel): classes = ( GPENCIL_UL_matslots, - GPENCIL_MT_color_context_menu, + GPENCIL_MT_material_context_menu, MATERIAL_PT_gpencil_slots, MATERIAL_PT_gpencil_preview, MATERIAL_PT_gpencil_material_presets, -- cgit v1.2.3 From 084bf7daee3ebcd57696f5b2a0c83db1b1f3d472 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 7 Oct 2018 18:25:51 +0300 Subject: Weight Paint: Implement a new Lock-Relative mode. This check box alters how weights are displayed and painted, similar to Multi Paint, but in a different way. Specifically, weights are presented as if all locked vertex groups were deleted, and the remaining deform groups normalized. The new feature is intended for use when balancing weights within a group of bones while all others are locked. Enabling the option presents weight as if the locked bones didn't exist, and their weight was proportionally redistributed to the editable bones. Conversely, the Multi-Paint feature allows balancing a group of bones as a whole against all unselected bones, while ignoring weight distribution within the selected group. This mode also allows temporarily viewing non-normalized weights as if they were normalized, without actually changing the values. Differential Revision: https://developer.blender.org/D3837 --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 9ad339b418c..758f0686bb4 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1058,6 +1058,7 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel): col = layout.column() col.prop(tool_settings, "use_auto_normalize", text="Auto Normalize") + col.prop(tool_settings, "use_lock_relative", text="Lock-Relative") col.prop(tool_settings, "use_multipaint", text="Multi-Paint") col.prop(wpaint, "use_group_restrict") -- cgit v1.2.3 From b0a1cf2c9ae696b07f7a236bc855a5ab4a493dcb Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 17 Mar 2020 14:41:48 +0100 Subject: Objects: add Volume object type, and prototypes for Hair and PointCloud Only the volume object is exposed in the user interface. It is based on OpenVDB internally. Drawing and rendering code will follow in another commit. https://wiki.blender.org/wiki/Source/Objects/Volume https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES build option. These are unfinished, and included only to make it easier to cooperate on development in the future and avoid tricky merges. https://wiki.blender.org/wiki/Source/Objects/New_Object_Types Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6945 --- release/scripts/startup/bl_ui/__init__.py | 3 + .../scripts/startup/bl_ui/properties_data_hair.py | 78 ++++++++++ .../startup/bl_ui/properties_data_pointcloud.py | 78 ++++++++++ .../startup/bl_ui/properties_data_volume.py | 173 +++++++++++++++++++++ release/scripts/startup/bl_ui/properties_object.py | 2 +- release/scripts/startup/bl_ui/space_dopesheet.py | 6 + release/scripts/startup/bl_ui/space_filebrowser.py | 3 + release/scripts/startup/bl_ui/space_node.py | 3 +- release/scripts/startup/bl_ui/space_outliner.py | 3 + release/scripts/startup/bl_ui/space_userpref.py | 9 +- release/scripts/startup/bl_ui/space_view3d.py | 24 +++ 11 files changed, 378 insertions(+), 4 deletions(-) create mode 100644 release/scripts/startup/bl_ui/properties_data_hair.py create mode 100644 release/scripts/startup/bl_ui/properties_data_pointcloud.py create mode 100644 release/scripts/startup/bl_ui/properties_data_volume.py (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index c2bcb7d5ea5..7d3ecceca41 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -35,14 +35,17 @@ _modules = [ "properties_data_curve", "properties_data_empty", "properties_data_gpencil", + "properties_data_hair", "properties_data_light", "properties_data_lattice", "properties_data_mesh", "properties_data_metaball", "properties_data_modifier", + "properties_data_pointcloud", "properties_data_shaderfx", "properties_data_lightprobe", "properties_data_speaker", + "properties_data_volume", "properties_mask_common", "properties_material", "properties_material_gpencil", diff --git a/release/scripts/startup/bl_ui/properties_data_hair.py b/release/scripts/startup/bl_ui/properties_data_hair.py new file mode 100644 index 00000000000..6017765b83d --- /dev/null +++ b/release/scripts/startup/bl_ui/properties_data_hair.py @@ -0,0 +1,78 @@ +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# +import bpy +from bpy.types import Panel, UIList +from rna_prop_ui import PropertyPanel + + +class DataButtonsPanel: + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_context = "data" + + @classmethod + def poll(cls, context): + engine = context.scene.render.engine + return hasattr(context, 'hair') and context.hair and (engine in cls.COMPAT_ENGINES) + + +class DATA_PT_context_hair(DataButtonsPanel, Panel): + bl_label = "" + bl_options = {'HIDE_HEADER'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + + ob = context.object + hair = context.hair + space = context.space_data + + if ob: + layout.template_ID(ob, "data") + elif hair: + layout.template_ID(space, "pin_id") + + +class DATA_PT_hair(DataButtonsPanel, Panel): + bl_label = "Hair" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + hair = context.hair + pass + +class DATA_PT_custom_props_hair(DataButtonsPanel, PropertyPanel, Panel): + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + _context_path = "object.data" + _property_type = bpy.types.Hair if hasattr(bpy.types, "Hair") else None + + +classes = ( + DATA_PT_context_hair, + DATA_PT_hair, + DATA_PT_custom_props_hair, +) + +if __name__ == "__main__": # only for live edit. + from bpy.utils import register_class + for cls in classes: + register_class(cls) diff --git a/release/scripts/startup/bl_ui/properties_data_pointcloud.py b/release/scripts/startup/bl_ui/properties_data_pointcloud.py new file mode 100644 index 00000000000..10ebdea3155 --- /dev/null +++ b/release/scripts/startup/bl_ui/properties_data_pointcloud.py @@ -0,0 +1,78 @@ +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# +import bpy +from bpy.types import Panel, UIList +from rna_prop_ui import PropertyPanel + + +class DataButtonsPanel: + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_context = "data" + + @classmethod + def poll(cls, context): + engine = context.scene.render.engine + return hasattr(context, 'pointcloud') and context.pointcloud and (engine in cls.COMPAT_ENGINES) + + +class DATA_PT_context_pointcloud(DataButtonsPanel, Panel): + bl_label = "" + bl_options = {'HIDE_HEADER'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + + ob = context.object + pointcloud = context.pointcloud + space = context.space_data + + if ob: + layout.template_ID(ob, "data") + elif pointcloud: + layout.template_ID(space, "pin_id") + + +class DATA_PT_pointcloud(DataButtonsPanel, Panel): + bl_label = "Point Cloud" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + pointcloud = context.pointcloud + pass + +class DATA_PT_custom_props_pointcloud(DataButtonsPanel, PropertyPanel, Panel): + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + _context_path = "object.data" + _property_type = bpy.types.PointCloud if hasattr(bpy.types, "PointCloud") else None + + +classes = ( + DATA_PT_context_pointcloud, + DATA_PT_pointcloud, + DATA_PT_custom_props_pointcloud, +) + +if __name__ == "__main__": # only for live edit. + from bpy.utils import register_class + for cls in classes: + register_class(cls) diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py new file mode 100644 index 00000000000..29e28aa2c02 --- /dev/null +++ b/release/scripts/startup/bl_ui/properties_data_volume.py @@ -0,0 +1,173 @@ +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# +import bpy +from bpy.types import Panel, UIList +from rna_prop_ui import PropertyPanel + + +class DataButtonsPanel: + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_context = "data" + + @classmethod + def poll(cls, context): + engine = context.scene.render.engine + return context.volume and (engine in cls.COMPAT_ENGINES) + + +class DATA_PT_context_volume(DataButtonsPanel, Panel): + bl_label = "" + bl_options = {'HIDE_HEADER'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + + ob = context.object + volume = context.volume + space = context.space_data + + if ob: + layout.template_ID(ob, "data") + elif volume: + layout.template_ID(space, "pin_id") + + +class DATA_PT_volume_file(DataButtonsPanel, Panel): + bl_label = "OpenVDB File" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + + volume = context.volume + volume.grids.load() + + layout.prop(volume, "filepath", text="") + + if len(volume.filepath): + layout.use_property_split = True + layout.use_property_decorate = False + + col = layout.column(align=True) + col.prop(volume, "is_sequence") + if volume.is_sequence: + col.prop(volume, "frame_duration", text="Frames") + col.prop(volume, "frame_start", text="Start") + col.prop(volume, "frame_offset", text="Offset") + col.prop(volume, "sequence_mode", text="Mode") + + error_msg = volume.grids.error_message + if len(error_msg): + layout.separator() + col = layout.column(align=True) + col.label(text="Failed to load volume:") + col.label(text=error_msg) + + +class VOLUME_UL_grids(UIList): + def draw_item(self, context, layout, data, grid, icon, active_data, active_propname, index): + name = grid.name + data_type = grid.bl_rna.properties['data_type'].enum_items[grid.data_type] + + layout.label(text=name) + row = layout.row() + row.alignment = 'RIGHT' + row.active = False + row.label(text=data_type.name) + + +class DATA_PT_volume_grids(DataButtonsPanel, Panel): + bl_label = "Grids" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + + volume = context.volume + volume.grids.load() + + layout.template_list("VOLUME_UL_grids", "grids", volume, "grids", volume.grids, "active_index", rows=3) + + +class DATA_PT_volume_render(DataButtonsPanel, Panel): + bl_label = "Render" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + scene = context.scene + volume = context.volume + render = volume.render + + col = layout.column(align=True) + col.prop(render, "space") + col.prop(render, "step_size") + + if scene.render.engine == 'CYCLES': + col = layout.column(align=True) + col.prop(render, "clipping") + + +class DATA_PT_volume_viewport_display(DataButtonsPanel, Panel): + bl_label = "Viewport Display" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + volume = context.volume + display = volume.display + + col = layout.column(align=True) + col.prop(display, "wireframe_type") + sub = col.row() + sub.active = display.wireframe_type in {'BOXES', 'POINTS'} + sub.prop(display, "wireframe_detail", text="Detail") + + layout.prop(display, "density") + + +class DATA_PT_custom_props_volume(DataButtonsPanel, PropertyPanel, Panel): + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + _context_path = "object.data" + _property_type = bpy.types.Volume + + +classes = ( + DATA_PT_context_volume, + DATA_PT_volume_grids, + DATA_PT_volume_file, + DATA_PT_volume_viewport_display, + DATA_PT_volume_render, + DATA_PT_custom_props_volume, + VOLUME_UL_grids, +) + +if __name__ == "__main__": # only for live edit. + from bpy.utils import register_class + for cls in classes: + register_class(cls) diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 33ba981e235..91bd055741c 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -216,7 +216,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): obj = context.object obj_type = obj.type - is_geometry = (obj_type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'}) + is_geometry = (obj_type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'VOLUME', 'HAIR', 'POINTCLOUD'}) is_wire = (obj_type in {'CAMERA', 'EMPTY'}) is_empty_image = (obj_type == 'EMPTY' and obj.empty_display_type == 'IMAGE') is_dupli = (obj.instance_type != 'NONE') diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 76ba4dfb78e..3f8c41e4f21 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -126,6 +126,12 @@ class DopesheetFilterPopoverBase: flow.prop(dopesheet, "show_lattices", text="Lattices") if bpy.data.metaballs: flow.prop(dopesheet, "show_metaballs", text="Metaballs") + if hasattr(bpy.data, "hairs") and bpy.data.hairs: + flow.prop(dopesheet, "show_hairs", text="Hairs") + if hasattr(bpy.data, "pointclouds") and bpy.data.pointclouds: + flow.prop(dopesheet, "show_pointclouds", text="Point Clouds") + if bpy.data.volumes: + flow.prop(dopesheet, "show_volumes", text="Volumes") # data types flow.prop(dopesheet, "show_worlds", text="Worlds") diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 95046678b27..3bf5bbf7b46 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -137,6 +137,9 @@ class FILEBROWSER_PT_filter(Panel): row = col.row() row.label(icon='FILE_TEXT') row.prop(params, "use_filter_text", text="Text Files", toggle=0) + row = col.row() + row.label(icon='FILE_VOLUME') + row.prop(params, "use_filter_volume", text="Volume Files", toggle=0) col.separator() diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 8fe758b8bf6..bdda0ebbe9a 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -76,7 +76,8 @@ class NODE_HT_header(Header): layout.separator_spacer() - types_that_support_material = {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META', 'GPENCIL'} + types_that_support_material = {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META', + 'GPENCIL', 'VOLUME', 'HAIR', 'POINTCLOUD'} # disable material slot buttons when pinned, cannot find correct slot within id_from (#36589) # disable also when the selected object does not support materials has_material_slots = not snode.pin and ob_type in types_that_support_material diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 6ac31aeb3d0..cc773300d9e 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -397,6 +397,9 @@ class OUTLINER_PT_filter(Panel): if ( bpy.data.curves or bpy.data.metaballs or + (hasattr(bpy.data, "hairs") and bpy.data.hairs) or + (hasattr(bpy.data, "pointclouds") and bpy.data.pointclouds) or + bpy.data.volumes or bpy.data.lightprobes or bpy.data.lattices or bpy.data.fonts or diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 2ca0e73bd74..4cccf429179 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -390,18 +390,23 @@ class USERPREF_PT_edit_objects_duplicate_data(EditingPanel, CenterAlignMixIn, Pa col.prop(edit, "use_duplicate_armature", text="Armature") col.prop(edit, "use_duplicate_curve", text="Curve") # col.prop(edit, "use_duplicate_fcurve", text="F-Curve") # Not implemented. + col.prop(edit, "use_duplicate_grease_pencil", text="Grease Pencil") + if hasattr(edit, "use_duplicate_hair"): + col.prop(edit, "use_duplicate_hair", text="Hair") col.prop(edit, "use_duplicate_light", text="Light") - col.prop(edit, "use_duplicate_lightprobe", text="Light Probe") col = flow.column() + col.prop(edit, "use_duplicate_lightprobe", text="Light Probe") col.prop(edit, "use_duplicate_material", text="Material") col.prop(edit, "use_duplicate_mesh", text="Mesh") col.prop(edit, "use_duplicate_metaball", text="Metaball") col.prop(edit, "use_duplicate_particle", text="Particle") col = flow.column() + if hasattr(edit, "use_duplicate_pointcloud"): + col.prop(edit, "use_duplicate_pointcloud", text="Point Cloud") col.prop(edit, "use_duplicate_surface", text="Surface") col.prop(edit, "use_duplicate_text", text="Text") # col.prop(edit, "use_duplicate_texture", text="Texture") # Not implemented. - col.prop(edit, "use_duplicate_grease_pencil", text="Grease Pencil") + col.prop(edit, "use_duplicate_volume", text="Volume") class USERPREF_PT_edit_cursor(EditingPanel, CenterAlignMixIn, Panel): diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index f8b291c0c5f..a2bfd711c04 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2157,6 +2157,16 @@ class VIEW3D_MT_camera_add(Menu): layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA') +class VIEW3D_MT_volume_add(Menu): + bl_idname = "VIEW3D_MT_volume_add" + bl_label = "Volume" + + def draw(self, _context): + layout = self.layout + layout.operator("object.volume_import", text="Import OpenVDB...", icon='OUTLINER_DATA_VOLUME') + layout.operator("object.volume_add", text="Empty", icon='OUTLINER_DATA_VOLUME') + + class VIEW3D_MT_add(Menu): bl_label = "Add" bl_translation_context = i18n_contexts.operator_default @@ -2179,6 +2189,11 @@ class VIEW3D_MT_add(Menu): layout.menu("VIEW3D_MT_surface_add", icon='OUTLINER_OB_SURFACE') layout.menu("VIEW3D_MT_metaball_add", text="Metaball", icon='OUTLINER_OB_META') layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT') + if hasattr(bpy.data, "hairs"): + layout.operator("object.hair_add", text="Hair", icon='OUTLINER_OB_HAIR') + if hasattr(bpy.data, "pointclouds"): + layout.operator("object.pointcloud_add", text="Point Cloud", icon='OUTLINER_OB_POINTCLOUD') + layout.menu("VIEW3D_MT_volume_add", text="Volume", icon='OUTLINER_OB_VOLUME') layout.operator_menu_enum("object.gpencil_add", "type", text="Grease Pencil", icon='OUTLINER_OB_GREASEPENCIL') layout.separator() @@ -5428,6 +5443,9 @@ class VIEW3D_PT_object_type_visibility(Panel): ("surf", "Surface"), ("meta", "Meta"), ("font", "Text"), + ("hair", "Hair"), + ("pointcloud", "Point Cloud"), + ("volume", "Volume"), ("grease_pencil", "Grease Pencil"), (None, None), # Other @@ -5445,6 +5463,11 @@ class VIEW3D_PT_object_type_visibility(Panel): col.separator() continue + if attr == "hair" and not hasattr(bpy.data, "hairs"): + continue + elif attr == "pointcloud" and not hasattr(bpy.data, "pointclouds"): + continue + attr_v = "show_object_viewport_" f"{attr:s}" attr_s = "show_object_select_" f"{attr:s}" @@ -7254,6 +7277,7 @@ classes = ( VIEW3D_MT_light_add, VIEW3D_MT_lightprobe_add, VIEW3D_MT_camera_add, + VIEW3D_MT_volume_add, VIEW3D_MT_add, VIEW3D_MT_image_add, VIEW3D_MT_object, -- cgit v1.2.3 From fd53b72871e045dfebfb9ddbe2b3c491491aa913 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 17 Mar 2020 16:27:08 +0100 Subject: Objects: Eevee and workbench rendering of new Volume, Hair, PointCloud Only the volume drawing part is really finished and exposed to the user. Hair plugs into the existing hair rendering code and is fairly straightforward. The pointcloud drawing is a hack using overlays rather than Eevee and workbench. The most tricky part for volume rendering is the case where each volume grid has a different transform, which requires an additional matrix in the shader and non-trivial logic in Eevee volume drawing. In the common case were all the transforms match we don't use the additional per-grid matrix in the shader. Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6955 --- .../startup/bl_ui/properties_data_volume.py | 23 ---------------------- 1 file changed, 23 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py index 29e28aa2c02..bc098e81ffb 100644 --- a/release/scripts/startup/bl_ui/properties_data_volume.py +++ b/release/scripts/startup/bl_ui/properties_data_volume.py @@ -108,28 +108,6 @@ class DATA_PT_volume_grids(DataButtonsPanel, Panel): layout.template_list("VOLUME_UL_grids", "grids", volume, "grids", volume.grids, "active_index", rows=3) -class DATA_PT_volume_render(DataButtonsPanel, Panel): - bl_label = "Render" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False - - scene = context.scene - volume = context.volume - render = volume.render - - col = layout.column(align=True) - col.prop(render, "space") - col.prop(render, "step_size") - - if scene.render.engine == 'CYCLES': - col = layout.column(align=True) - col.prop(render, "clipping") - - class DATA_PT_volume_viewport_display(DataButtonsPanel, Panel): bl_label = "Viewport Display" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @@ -162,7 +140,6 @@ classes = ( DATA_PT_volume_grids, DATA_PT_volume_file, DATA_PT_volume_viewport_display, - DATA_PT_volume_render, DATA_PT_custom_props_volume, VOLUME_UL_grids, ) -- cgit v1.2.3 From 7537cad5761e4778da7aed02410c5811114c24e5 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 16 Mar 2020 14:42:56 +0100 Subject: Volumes: add render settings for volume datablock * Space: volume density and step size in object or world space * Step Size: override automatic step size * Clipping: values below this are ignored for tighter volume bounds The last two are Cycles only currently. Ref T73201 --- .../startup/bl_ui/properties_data_volume.py | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py index bc098e81ffb..b10bb808edd 100644 --- a/release/scripts/startup/bl_ui/properties_data_volume.py +++ b/release/scripts/startup/bl_ui/properties_data_volume.py @@ -108,6 +108,29 @@ class DATA_PT_volume_grids(DataButtonsPanel, Panel): layout.template_list("VOLUME_UL_grids", "grids", volume, "grids", volume.grids, "active_index", rows=3) +class DATA_PT_volume_render(DataButtonsPanel, Panel): + bl_label = "Render" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + scene = context.scene + volume = context.volume + render = volume.render + + col = layout.column(align=True) + col.prop(render, "space") + + if scene.render.engine == 'CYCLES': + col.prop(render, "step_size") + + col = layout.column(align=True) + col.prop(render, "clipping") + + class DATA_PT_volume_viewport_display(DataButtonsPanel, Panel): bl_label = "Viewport Display" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @@ -140,6 +163,7 @@ classes = ( DATA_PT_volume_grids, DATA_PT_volume_file, DATA_PT_volume_viewport_display, + DATA_PT_volume_render, DATA_PT_custom_props_volume, VOLUME_UL_grids, ) -- cgit v1.2.3 From 0af739ae8a7d16e1756a66342d85a3213ecf9b0f Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 18 Mar 2020 13:16:27 +0100 Subject: GPencil: Remove duplicated Mode parameter from Color Subpanel in Vertex Paint This parameter is now at Brush level, so it was duplicated in the Color panel. --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 758f0686bb4..c612b47895c 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -2043,8 +2043,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_vertex_color(View3DPanel, Panel): sub_row.operator("gpencil.tint_flip", icon='FILE_REFRESH', text="") - col.prop(gp_settings, "vertex_mode", text="Mode") - class VIEW3D_PT_tools_grease_pencil_brush_vertex_falloff(GreasePencilBrushFalloff, Panel, View3DPaintPanel): bl_context = ".greasepencil_vertex" -- cgit v1.2.3 From 52c0742560d0fbd16e8cc6ac887c260dcace3d4a Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 18 Mar 2020 13:48:18 +0100 Subject: GPencil: Remove Panel Grease Pencil and move Use Lights to Visibility It was too much to have a panel for that. --- release/scripts/startup/bl_ui/properties_object.py | 24 +++------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 91bd055741c..a805b965af2 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -396,26 +396,9 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): col = flow.column() col.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True) - -class OBJECT_PT_greasepencil_light(ObjectButtonsPanel, Panel): - bl_label = "Grease Pencil" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} - - @classmethod - def poll(cls, context): - return (context.object) and (context.engine in cls.COMPAT_ENGINES) and (context.object.type == 'GPENCIL') - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - layout = self.layout - ob = context.object - - col = flow.column() - col.prop(ob, "use_grease_pencil_lights", toggle=False) + if context.object.type == 'GPENCIL': + col = flow.column() + col.prop(ob, "use_grease_pencil_lights", toggle=False) class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel): @@ -438,7 +421,6 @@ classes = ( OBJECT_PT_display, OBJECT_PT_display_bounds, OBJECT_PT_visibility, - OBJECT_PT_greasepencil_light, OBJECT_PT_custom_props, ) -- cgit v1.2.3 From 348d2fa09e0c01d62372f5999b62d06ac3b810f9 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Thu, 19 Mar 2020 00:05:18 +0100 Subject: VSE: Disk cache This patch implements dumping images from cache to HDD. The main goal of this system is to provide a means to achieve consistent playback speed mainly for strips that are not possible to preview in real time. How to use: Disk cache has own settings in user preferences for path to storage, size limit and compression level. To use disk cache, you need to check `Use Disk Cache` box, set `Disk Cache Directory`, `Disk Cache Limit` and save or open existing .blend file. By default sequencer output will be cached only. Manual setting is possible in cache panel. Uses: - Replacement or alternative for proxies. Disk cache will work with any strip type, supports float images as well. - Storage for strip thumbnails. - Less RAM needs to be allocated for preview cache How it works: Disk cache is extension of RAM cache. Every image, that is stored or deleted in RAM will be stored or deleted on HDD as well. Images can be compressed to save space and for use on slower drives. Compressed images are slower to write and read though. Images are stored in bulk of 100 rendered frames per one file. This is to overcome slow file access time for large amount of files. Drawback is, that if one frame needs to be redrawn, all 100 frames are deleted. Reviewed By: sergey Differential Revision: https://developer.blender.org/D5524 --- release/scripts/startup/bl_ui/space_userpref.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 4cccf429179..03828632d64 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -628,6 +628,15 @@ class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel): flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + flow.prop(system, "use_sequencer_disk_cache") + flow.prop(system, "sequencer_disk_cache_dir") + flow.prop(system, "sequencer_disk_cache_size_limit") + flow.prop(system, "sequencer_disk_cache_compression") + + layout.separator() + + flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + flow.prop(system, "texture_time_out", text="Texture Time Out") flow.prop(system, "texture_collection_rate", text="Garbage Collection Rate") -- cgit v1.2.3 From b62e1146e13cf94e14d7ef8003b8a4cde87d0437 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 19 Mar 2020 11:40:04 +1100 Subject: UI: add view aligned gizmo color Was hard coded to white making white backgrounds impractical. D7162 by @billreynish with edits. --- release/scripts/startup/bl_ui/space_userpref.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 03828632d64..afea9b8bdbf 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -916,6 +916,7 @@ class USERPREF_PT_theme_interface_gizmos(ThemePanel, CenterAlignMixIn, Panel): col = flow.column() col.prop(ui, "gizmo_primary") col.prop(ui, "gizmo_secondary") + col.prop(ui, "gizmo_view_align") col = flow.column() col.prop(ui, "gizmo_a") -- cgit v1.2.3 From 91c1759956d235c252e6f6220929b52de1a7da4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Thu, 19 Mar 2020 13:15:25 +0100 Subject: Fluid: Cleaned up some parts of the fluid modifier UI Especially when expanding the UI panel horizontally, there were some problems with empty space. --- .../startup/bl_ui/properties_physics_fluid.py | 69 ++++++++++++---------- 1 file changed, 38 insertions(+), 31 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 65992a4e4e9..8d8070bad7a 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -173,7 +173,6 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col = flow.column() col.enabled = not domain.has_cache_baked_guide col.prop(domain, "resolution_max", text="Resolution Divisions") - col = flow.column() col.prop(domain, "time_scale", text="Time Scale") col.prop(domain, "cfl_condition", text="CFL Number") @@ -192,6 +191,8 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): sub.prop(domain, "gravity", text="Using Scene Gravity", icon='SCENE_DATA') else: col.prop(domain, "gravity", text="Gravity") + + col = flow.column() col.prop(domain, "clipping", text="Empty Space") if domain.cache_type == 'MODULAR': @@ -421,14 +422,16 @@ class PHYSICS_PT_fire(PhysicButtonsPanel, Panel): col = flow.column() col.prop(domain, "burning_rate", text="Reaction Speed") - col = flow.column(align=True) - col.prop(domain, "flame_smoke", text="Flame Smoke") - col.prop(domain, "flame_vorticity", text="Vorticity") + row = col.row() + sub = row.column(align=True) + sub.prop(domain, "flame_smoke", text="Flame Smoke") + sub.prop(domain, "flame_vorticity", text="Vorticity") + col = flow.column(align=True) col.prop(domain, "flame_max_temp", text="Temperature Maximum") col.prop(domain, "flame_ignition", text="Minimum") - col = flow.column() - col.prop(domain, "flame_smoke_color", text="Flame Color") + row = col.row() + row.prop(domain, "flame_smoke_color", text="Flame Color") class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): @@ -468,21 +471,23 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): col = flow.column() col.prop(domain, "simulation_method", expand=False) col.prop(domain, "flip_ratio", text="FLIP Ratio") - col.prop(domain, "particle_radius", text="Particle Radius") + row = col.row() + sub = row.column(align=True) + sub.prop(domain, "particle_radius", text="Particle Radius") + sub.prop(domain, "particle_number", text="Sampling") + sub.prop(domain, "particle_randomness", text="Randomness") col = flow.column() - col.prop(domain, "particle_max", text="Particles Maximum") - col.prop(domain, "particle_min", text="Minimum") - - col = flow.column() - col.prop(domain, "particle_number", text="Particle Sampling") + row = col.row() + sub = row.column(align=True) + sub.prop(domain, "particle_max", text="Particles Maximum") + sub.prop(domain, "particle_min", text="Minimum") col.prop(domain, "particle_band_width", text="Narrow Band Width") - col.prop(domain, "particle_randomness", text="Particle Randomness") - - col = flow.column() - col.prop(domain, "use_fractions", text="Fractional Obstacles") - col.active = domain.use_fractions - col.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") + row = col.row() + sub = row.column(align=True) + sub.prop(domain, "use_fractions", text="Fractional Obstacles") + sub.active = domain.use_fractions + sub.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): @@ -1123,35 +1128,37 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): col.prop(domain, "cache_type", expand=False) col.enabled = not is_baking_any - col = flow.column(align=True) col.separator() + row = col.row() + col = row.column(align=True) col.prop(domain, "cache_frame_start", text="Frame Start") col.prop(domain, "cache_frame_end", text="End") - col.enabled = not is_baking_any + row.enabled = not is_baking_any col.separator() col = flow.column() - col.enabled = not is_baking_any and not has_baked_data - col.prop(domain, "cache_data_format", text="Data File Format") + row = col.row() + row.enabled = not is_baking_any and not has_baked_data + row.prop(domain, "cache_data_format", text="Data File Format") if md.domain_settings.domain_type in {'GAS'}: if domain.use_noise: - col = flow.column() - col.enabled = not is_baking_any and not has_baked_noise - col.prop(domain, "cache_noise_format", text="Noise File Format") + row = col.row() + row.enabled = not is_baking_any and not has_baked_noise + row.prop(domain, "cache_noise_format", text="Noise File Format") if md.domain_settings.domain_type in {'LIQUID'}: # File format for all particle systemes (FLIP and secondary) - col = flow.column() - col.enabled = not is_baking_any and not has_baked_particles and not has_baked_data - col.prop(domain, "cache_particle_format", text="Particle File Format") + row = col.row() + row.enabled = not is_baking_any and not has_baked_particles and not has_baked_data + row.prop(domain, "cache_particle_format", text="Particle File Format") if domain.use_mesh: - col = flow.column() - col.enabled = not is_baking_any and not has_baked_mesh - col.prop(domain, "cache_mesh_format", text="Mesh File Format") + row = col.row() + row.enabled = not is_baking_any and not has_baked_mesh + row.prop(domain, "cache_mesh_format", text="Mesh File Format") if domain.cache_type == 'FINAL': -- cgit v1.2.3 From 83f171b6269fa5f1491c8517882984801e6b49cc Mon Sep 17 00:00:00 2001 From: Adrian Newton Date: Thu, 19 Mar 2020 20:32:18 +0100 Subject: UI: remove unnecessary Shadow from Shadow Samples label in Eevee volumetrics Differential Revision: https://developer.blender.org/D7161 --- release/scripts/startup/bl_ui/properties_render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index fa9778da53b..3d4c70e0143 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -294,7 +294,7 @@ class RENDER_PT_eevee_volumetric_shadows(RenderButtonsPanel, Panel): props = scene.eevee layout.active = props.use_volumetric_shadows - layout.prop(props, "volumetric_shadow_samples", text="Shadow Samples") + layout.prop(props, "volumetric_shadow_samples", text="Samples") class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel): -- cgit v1.2.3 From 86cc29d0cf3be547cd93ac0daec420d57dc687f7 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 20 Mar 2020 09:50:00 +0100 Subject: Multires: Disallow changing mode and quality after subdivision Avoids possible final object shape destruction since those options defines how displacement is applied and propagated. --- .../scripts/startup/bl_ui/properties_data_modifier.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index bcf1c285d2b..7508b0e2321 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -665,7 +665,19 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "offset_v") def MULTIRES(self, layout, ob, md): - layout.row().prop(md, "subdivision_type", expand=True) + # Changing some of the properties can not be done once there is an + # actual displacement stored for this multires modifier. This check + # will disallow those properties from change. + # This is a bit stupid check but should be sufficient for the usual + # multires usage. It might become less strict and only disallow + # modifications if there is CD_MDISPS layer, or if there is actual + # non-zero displacement but such checks will be too slow to be done + # on every redraw. + have_displacement = (md.total_levels != 0) + + row = layout.row() + row.enabled = not have_displacement + row.prop(md, "subdivision_type", expand=True) split = layout.split() col = split.column() @@ -673,7 +685,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): # TODO(sergey): Expose it again after T58473 is solved. # col.prop(md, "sculpt_levels", text="Sculpt") col.prop(md, "render_levels", text="Render") - col.prop(md, "quality") + + row = col.row() + row.enabled = not have_displacement + row.prop(md, "quality") col = split.column() -- cgit v1.2.3 From a22cd6b6a95138d73e9e23f7ac0d40de17a5a25f Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Fri, 20 Mar 2020 20:04:11 -0400 Subject: UI: Weight Paint: add a menu for locking and unlocking vertex groups. This is a follow up on rBa1e50cfe6b4dbc360b6118c63a0dc7445023c37b --- release/scripts/startup/bl_ui/space_view3d.py | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index a2bfd711c04..0d51bef0d8d 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2939,6 +2939,32 @@ class VIEW3D_MT_gpencil_vertex_group(Menu): layout.operator("gpencil.vertex_group_deselect", text="Deselect") +class VIEW3D_MT_paint_weight_lock(Menu): + bl_label = "Vertex Group Locks" + + def draw(self, _context): + layout = self.layout + + op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All") + op.action, op.mask = 'LOCK', 'ALL' + op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All") + op.action, op.mask = 'UNLOCK', 'ALL' + op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Selected") + op.action, op.mask = 'LOCK', 'SELECTED' + op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Selected") + op.action, op.mask = 'UNLOCK', 'SELECTED' + op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Unselected") + op.action, op.mask = 'LOCK', 'UNSELECTED' + op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Unselected") + op.action, op.mask = 'UNLOCK', 'UNSELECTED' + op = layout.operator("object.vertex_group_lock", text="Lock Only Selected") + op.action, op.mask = 'LOCK', 'INVERT_UNSELECTED' + op = layout.operator("object.vertex_group_lock", text="Lock Only Unselected") + op.action, op.mask = 'UNLOCK', 'INVERT_UNSELECTED' + op = layout.operator("object.vertex_group_lock", text="Invert Locks") + op.action, op.mask = 'INVERT', 'ALL' + + class VIEW3D_MT_paint_weight(Menu): bl_label = "Weights" @@ -2980,6 +3006,8 @@ class VIEW3D_MT_paint_weight(Menu): layout.operator("paint.weight_set") + layout.menu("VIEW3D_MT_paint_weight_lock", text="Locks") + def draw(self, _context): self.draw_generic(self.layout, is_editmode=False) @@ -7302,6 +7330,7 @@ classes = ( VIEW3D_MT_vertex_group, VIEW3D_MT_gpencil_vertex_group, VIEW3D_MT_paint_weight, + VIEW3D_MT_paint_weight_lock, VIEW3D_MT_sculpt, VIEW3D_MT_sculpt_set_pivot, VIEW3D_MT_mask, -- cgit v1.2.3 From d924e31b421a51fed343fbd2a17291cfd289d9bc Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 20 Mar 2020 15:37:56 +0100 Subject: GPencil: New Hardeness mode for Opacity modifier Add new option to change the stroke hardeness. This option works at stroke level, not at point level. Also replaced the "Both" name mode by "Stroke and Fill". Differential Revision: https://developer.blender.org/D7195 --- .../startup/bl_ui/properties_data_modifier.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 7508b0e2321..277791a9f53 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1996,16 +1996,21 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): split = layout.split() col = split.column() - col.prop(md, "normalize_opacity") - if md.normalize_opacity is True: - text="Strength" - else: - text="Opacity Factor" - - col.prop(md, "factor", text=text) col.prop(md, "modify_color") - self.gpencil_masking(layout, ob, md, True, True) + if md.modify_color == 'HARDENESS': + col.prop(md, "hardeness") + show = False + else: + col.prop(md, "normalize_opacity") + if md.normalize_opacity is True: + text="Strength" + else: + text="Opacity Factor" + + col.prop(md, "factor", text=text) + show = True + self.gpencil_masking(layout, ob, md, show, show) def GP_ARRAY(self, layout, ob, md): col = layout.column() -- cgit v1.2.3 From c95b522856c590e31278548ec02bbac1a64e217d Mon Sep 17 00:00:00 2001 From: Michael Soluyanov Date: Mon, 23 Mar 2020 16:00:42 +0100 Subject: UI: Theme options for checkerboard pattern colors and size This patch adds ability to set up colors and size of background (transparency) checkerboard pattern in viewport and 2d editors. No new backgrounds, only changing colors in existing ones. This is not the background of the viewport, it is a transparency checkerboard that is turned on only in render mode, when the transparency mode is on. And also in 2D-editors, (image, sequencer, etc). Reviewed By: Pablo Vazquez, Julian Eisel Differential Revision: https://developer.blender.org/D6791 --- release/scripts/startup/bl_ui/space_userpref.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index afea9b8bdbf..e6ee779d89b 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -897,6 +897,23 @@ class USERPREF_PT_theme_interface_styles(ThemePanel, CenterAlignMixIn, Panel): flow.prop(ui, "widget_emboss") +class USERPREF_PT_theme_interface_transparent_checker(ThemePanel, CenterAlignMixIn, Panel): + bl_label = "Transparent Checkerboard" + bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = "USERPREF_PT_theme_user_interface" + + def draw_centered(self, context, layout): + theme = context.preferences.themes[0] + ui = theme.user_interface + + flow = layout.grid_flow( + row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + + flow.prop(ui, "transparent_checker_primary") + flow.prop(ui, "transparent_checker_secondary") + flow.prop(ui, "transparent_checker_size") + + class USERPREF_PT_theme_interface_gizmos(ThemePanel, CenterAlignMixIn, Panel): bl_label = "Axis & Gizmo Colors" bl_options = {'DEFAULT_CLOSED'} @@ -2219,6 +2236,7 @@ classes = ( USERPREF_PT_theme_interface_state, USERPREF_PT_theme_interface_styles, USERPREF_PT_theme_interface_gizmos, + USERPREF_PT_theme_interface_transparent_checker, USERPREF_PT_theme_interface_icons, USERPREF_PT_theme_text_style, USERPREF_PT_theme_bone_color_sets, -- cgit v1.2.3 From cda81d5a4d391a8a7b298eb1b6f2fdf1a0ed838a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Mon, 23 Mar 2020 23:50:25 +0100 Subject: Fluid: Enforce minimum thickness to planar flow / effector objects Planar object now have a thickness by default. This should make it more intuitive for users as there is no need to specify an object thickness. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 8d8070bad7a..b5a19bdc8ca 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -194,6 +194,7 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col = flow.column() col.prop(domain, "clipping", text="Empty Space") + col.prop(domain, "delete_in_obstacle", text="Delete In Obstacle") if domain.cache_type == 'MODULAR': col.separator() @@ -272,7 +273,6 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col.prop(effector_settings, "use_effector", text="Use Effector") col.prop(effector_settings, "use_plane_init", text="Is Planar") - col.prop(effector_settings, "delete_in_obstacle", text="Delete In Obstacle") if effector_settings.effector_type == 'GUIDE': col.prop(effector_settings, "velocity_factor", text="Velocity Factor") -- cgit v1.2.3 From c46dcdf8871e7404516a234087cfc4bf4e2794d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 24 Mar 2020 11:34:18 +1100 Subject: UI: add menu search functionality to operator search menu This has some advantages over operator search: - Some operators need options set to be usefully accessed. - Shows key bindings to access menus (for actions that don't have key bindings themselves). - Non operator actions such as check-boxes are also shown. - Menu items can control execution context, using invoke or execute where appropriate so we can control how the operator runs. Part of the design task T74157. This can be tested using the 'Experimental' preferences section or selected in the key-map editor. --- release/scripts/startup/bl_ui/space_topbar.py | 3 +- release/scripts/startup/bl_ui/space_userpref.py | 68 +++++++++++++------------ 2 files changed, 38 insertions(+), 33 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 1f52323f540..7ffb61fef5a 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -207,7 +207,8 @@ class TOPBAR_MT_editor_menus(Menu): def draw(self, context): layout = self.layout - if context.area.show_menus: + # Allow calling this menu directly (this might not be a header area). + if getattr(context.area, "show_menus"): layout.menu("TOPBAR_MT_app", text="", icon='BLENDER') else: layout.menu("TOPBAR_MT_app", text="Blender") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index e6ee779d89b..165761254d0 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2134,6 +2134,21 @@ class ExperimentalPanel: url_prefix = "https://developer.blender.org/" + def _draw_items(self, context, items): + prefs = context.preferences + experimental = prefs.experimental + + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + for prop_keywords, task in items: + split = layout.split(factor=0.66) + col = split.split() + col.prop(experimental, **prop_keywords) + col = split.split() + col.operator("wm.url_open", text=task, icon='URL').url = self.url_prefix + task + """ # Example panel, leave it here so we always have a template to follow even # after the features are gone from the experimental panel. @@ -2142,46 +2157,34 @@ class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel): bl_label = "Virtual Reality" def draw(self, context): - prefs = context.preferences - experimental = prefs.experimental + self._draw_items( + context, ( + ({"property": "use_virtual_reality_scene_inspection"}, "T71347"), + ({"property": "use_virtual_reality_immersive_drawing"}, "T71348"), + ) + ) +""" - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False +class USERPREF_PT_experimental_ui(ExperimentalPanel, Panel): + bl_label = "UI" - task = "T71347" - split = layout.split(factor=0.66) - col = split.split() - col.prop(experimental, "use_virtual_reality_scene_inspection", text="Scene Inspection") - col = split.split() - col.operator("wm.url_open", text=task, icon='URL').url = self.url_prefix + task - - task = "T71348" - split = layout.split(factor=0.66) - col = split.column() - col.prop(experimental, "use_virtual_reality_immersive_drawing", text="Continuous Immersive Drawing") - col = split.column() - col.operator("wm.url_open", text=task, icon='URL').url = self.url_prefix + task -""" + def draw(self, context): + self._draw_items( + context, ( + ({"property": "use_menu_search"}, "T74157"), + ), + ) class USERPREF_PT_experimental_system(ExperimentalPanel, Panel): bl_label = "System" def draw(self, context): - prefs = context.preferences - experimental = prefs.experimental - - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False - - task = "T60695" - split = layout.split(factor=0.66) - col = split.split() - col.prop(experimental, "use_undo_speedup") - col = split.split() - col.operator("wm.url_open", text=task, icon='URL').url = self.url_prefix + task + self._draw_items( + context, ( + ({"property": "use_undo_speedup"}, "T60695"), + ), + ) # ----------------------------------------------------------------------------- @@ -2274,6 +2277,7 @@ classes = ( # Popovers. USERPREF_PT_ndof_settings, + USERPREF_PT_experimental_ui, USERPREF_PT_experimental_system, # Add dynamically generated editor theme panels last, -- cgit v1.2.3 From 15b0c764808da1dec122c13849340ea84ff69716 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 24 Mar 2020 14:04:33 +1100 Subject: UI: add Blender -> System menu Include technical operators here so they're available when using menu-search. --- release/scripts/startup/bl_ui/space_topbar.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 7ffb61fef5a..40824cbeb52 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -243,6 +243,10 @@ class TOPBAR_MT_app(Menu): layout.operator("preferences.app_template_install", text="Install Application Template...") + layout.separator() + + layout.menu("TOPBAR_MT_app_system") + class TOPBAR_MT_file_cleanup(Menu): bl_label = "Clean Up" @@ -442,6 +446,26 @@ class TOPBAR_MT_app_support(Menu): ).url = "https://store.blender.org" +# Include technical operators here which would otherwise have no way for users to access. +class TOPBAR_MT_app_system(Menu): + bl_label = "System" + + def draw(self, _context): + layout = self.layout + + layout.operator("script.reload") + + layout.separator() + + layout.operator("wm.memory_statistics") + layout.operator("wm.debug_menu") + layout.operator_menu_enum("wm.redraw_timer", "type") + + layout.separator() + + layout.operator("screen.spacedata_cleanup") + + class TOPBAR_MT_templates_more(Menu): bl_label = "Templates" @@ -828,6 +852,7 @@ classes = ( TOPBAR_MT_editor_menus, TOPBAR_MT_app, TOPBAR_MT_app_about, + TOPBAR_MT_app_system, TOPBAR_MT_app_support, TOPBAR_MT_file, TOPBAR_MT_file_new, -- cgit v1.2.3 From 26ef4fa85ef4ea0f010f31c93d1086c515c3b5d4 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Tue, 24 Mar 2020 17:48:46 +0100 Subject: Modifiers: Vertex Weight Edit add invert curve falloff option This commit adds the option to invert the resulting weights of the falloff curve. There is a workflow used by some to convert a texture mask into vertex weights by using a custom curve and inverting the points. This allows the same effect with a single click, and gives the modifier more procedural functionality. With minor UI tweaks by @mont29. Differential Revision: https://developer.blender.org/D6899 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 277791a9f53..670f937e52a 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1350,7 +1350,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.separator() - layout.prop(md, "falloff_type") + row = layout.row(align=True) + row.prop(md, "falloff_type") + row.prop(md, "invert_falloff", text="", icon='ARROW_LEFTRIGHT') if md.falloff_type == 'CURVE': layout.template_curve_mapping(md, "map_curve") -- cgit v1.2.3 From bb26c1359e4f4bb21ec4ec4ab37e28d1fada20b8 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 24 Mar 2020 18:28:09 +0100 Subject: Add invert mapping option to proximity weight edit modifier, and some cleanup. --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 670f937e52a..e72e826ce23 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1410,7 +1410,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "max_dist") layout.separator() - layout.prop(md, "falloff_type") + row = layout.row(align=True) + row.prop(md, "falloff_type") + row.prop(md, "invert_falloff", text="", icon='ARROW_LEFTRIGHT') # Common mask options layout.separator() -- cgit v1.2.3 From acd84ab10524638fce848631d6f87f1c2ead507a Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 25 Mar 2020 17:16:25 +0100 Subject: GPencil: Fix unreported missing parameter for Cutter tool --- release/scripts/startup/bl_ui/space_view3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 0d51bef0d8d..4f4272c879a 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -393,7 +393,7 @@ class _draw_tool_settings_context_mode: }: # is_paint = False pass - elif tool.idname == "Cutter": + elif tool.idname == "builtin.cutter": row = layout.row(align=True) row.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") return False -- cgit v1.2.3 From 6681a33a6f9978239b2ee37065c3fab6cd372277 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 25 Mar 2020 17:34:11 +0100 Subject: GPencil: Fix unreported Threshold parameter visible in wrong context The threshold only must be vsisible in Segment mode. --- .../startup/bl_ui/space_toolsystem_toolbar.py | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 583d8ea44cf..c501c4f66a1 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1472,6 +1472,17 @@ class _defs_gpencil_paint: class _defs_gpencil_edit: + def is_segment(context): + ts = context.scene.tool_settings + if context.mode == 'EDIT_GPENCIL': + return ts.gpencil_selectmode_edit == 'SEGMENT' + elif context.mode == 'SCULPT_GPENCIL': + return ts.use_gpencil_select_mask_segment + elif context.mode == 'VERTEX_GPENCIL': + return ts.use_gpencil_vertex_select_mask_segment + else: + return False + @ToolDef.from_fn def bend(): return dict( @@ -1485,7 +1496,8 @@ class _defs_gpencil_edit: @ToolDef.from_fn def select(): def draw_settings(context, layout, _tool): - layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") + if _defs_gpencil_edit.is_segment(context): + layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") return dict( idname="builtin.select", label="Tweak", @@ -1502,7 +1514,8 @@ class _defs_gpencil_edit: row = layout.row() row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) - layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") + if _defs_gpencil_edit.is_segment(context): + layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") return dict( idname="builtin.select_box", label="Select Box", @@ -1519,7 +1532,8 @@ class _defs_gpencil_edit: row = layout.row() row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) - layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") + if _defs_gpencil_edit.is_segment(context): + layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") return dict( idname="builtin.select_lasso", label="Select Lasso", @@ -1537,7 +1551,8 @@ class _defs_gpencil_edit: row.use_property_split = False row.prop(props, "mode", text="", expand=True, icon_only=True) layout.prop(props, "radius") - layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") + if _defs_gpencil_edit.is_segment(context): + layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold") def draw_cursor(_context, tool, xy): from gpu_extras.presets import draw_circle_2d -- cgit v1.2.3 From a218be308032ac4c270950f450bc7a5e05f066ce Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 26 Mar 2020 16:05:46 +0100 Subject: Sculpt: Surface Smooth Brush and Mesh Filter This implements the Surface Smooth Brush as a mode inside the Smooth tool, which uses the HC algorithm from "Improved Laplacian Smoothing of Noisy Surface Meshes". Comparted to the regular smooth brush with laplacian smooth, this brush removes the surface while preserving the volume of the object. The smooth result can be controlled by tweaing the original shape preservation, displacement and iteration count. The same surface smooth operation is also available as a mesh filter. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7057 --- release/scripts/startup/bl_ui/properties_paint_common.py | 8 ++++++++ release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 3 +++ 2 files changed, 11 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 34afcc09407..3d2474d006a 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -665,6 +665,14 @@ def brush_settings(layout, context, brush, popover=False): col.prop(brush, "use_multiplane_scrape_dynamic") col.prop(brush, "show_multiplane_scrape_planes_preview") + if brush.sculpt_tool == 'SMOOTH': + col = layout.column() + col.prop(brush, "smooth_deform_type") + if brush.smooth_deform_type == 'SURFACE': + col.prop(brush, "surface_smooth_shape_preservation") + col.prop(brush, "surface_smooth_current_vertex") + col.prop(brush, "surface_smooth_iterations") + if brush.sculpt_tool == 'MASK': layout.row().prop(brush, "mask_tool", expand=True) diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index c501c4f66a1..9a7e42bdbce 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1031,6 +1031,9 @@ class _defs_sculpt: layout.prop(props, "strength") layout.prop(props, "deform_axis") layout.prop(props, "use_face_sets") + if (props.type == "SURFACE_SMOOTH"): + layout.prop(props, "surface_smooth_shape_preservation", expand=False) + layout.prop(props, "surface_smooth_current_vertex", expand=False) return dict( idname="builtin.mesh_filter", -- cgit v1.2.3 From 99530ef4ed70a479523d8e99a40fce24eb9ba658 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Sat, 21 Mar 2020 23:24:53 +0100 Subject: Sculpt: Face Sets Init operator This operator initializes all face sets in the sculpt at once using different mesh properties. It can create face sets by mesh connectivity, material slots, face normals, UV seams, creases, sharp edges, bevel weights and face maps. For properties that are already in the faces, this is implemented as a loop. Properties that depend on edge attributes use a similar operation to sculpt flood fill, but using face adjacency instead of edge vertex connectivity. As Multires also stores the face sets in the base mesh, this should work in the face sets Multires implementation without any changes. This is implemented as a separate operator as this resets the visibility and creates all face sets at once, while the create face set operator creates a single face sets, leaving the rest of the face sets in the mesh as they are. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7209 --- release/scripts/startup/bl_ui/space_view3d.py | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 4f4272c879a..db128c14cf9 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3135,6 +3135,10 @@ class VIEW3D_MT_face_sets(Menu): op = layout.operator("sculpt.face_sets_create", text='Face Set From Visible') op.mode = 'VISIBLE' + layout.separator() + + layout.menu("VIEW3D_MT_face_sets_init", text="Init Face Sets") + layout.separator() op = layout.operator("sculpt.face_set_change_visibility", text='Invert Visible Face Sets') @@ -3169,6 +3173,37 @@ class VIEW3D_MT_sculpt_set_pivot(Menu): props = layout.operator("sculpt.set_pivot_position", text="Pivot to Surface Under Cursor") props.mode = 'SURFACE' +class VIEW3D_MT_face_sets_init(Menu): + bl_label = "Face Sets Init" + + def draw(self, _context): + layout = self.layout + + op = layout.operator("sculpt.face_sets_init", text='By Loose Parts') + op.mode = 'LOOSE_PARTS' + + op = layout.operator("sculpt.face_sets_init", text='By Materials') + op.mode = 'MATERIALS' + + op = layout.operator("sculpt.face_sets_init", text='By Normals') + op.mode = 'NORMALS' + + op = layout.operator("sculpt.face_sets_init", text='By UV Seams') + op.mode = 'UV_SEAMS' + + op = layout.operator("sculpt.face_sets_init", text='By Edge Creases') + op.mode = 'CREASES' + + op = layout.operator("sculpt.face_sets_init", text='By Edge Bevel Weight') + op.mode = 'BEVEL_WEIGHT' + + op = layout.operator("sculpt.face_sets_init", text='By Sharp Edges') + op.mode = 'SHARP_EDGES' + + op = layout.operator("sculpt.face_sets_init", text='By Face Maps') + op.mode = 'FACE_MAPS' + + class VIEW3D_MT_particle(Menu): bl_label = "Particle" @@ -7335,6 +7370,7 @@ classes = ( VIEW3D_MT_sculpt_set_pivot, VIEW3D_MT_mask, VIEW3D_MT_face_sets, + VIEW3D_MT_face_sets_init, VIEW3D_MT_particle, VIEW3D_MT_particle_context_menu, VIEW3D_MT_particle_showhide, -- cgit v1.2.3 From 48ea173a7dbf9fb3678692b12909973854932c60 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Sun, 22 Mar 2020 00:29:19 +0100 Subject: Sculpt: Create Face Set by Edit Mode Selection This implements a new mode in the Face Sets Create operator to create a new face sets from the faces selection in edit mode. This can be used when the user considers that the edit mode tools are more convenient for a more precise control or a certain type of selection, like creating a face set from a face loop. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7211 --- release/scripts/startup/bl_ui/space_view3d.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index db128c14cf9..cb5f02b03fd 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3134,6 +3134,9 @@ class VIEW3D_MT_face_sets(Menu): op = layout.operator("sculpt.face_sets_create", text='Face Set From Visible') op.mode = 'VISIBLE' + + op = layout.operator("sculpt.face_sets_create", text='Face Set From Edit Mode Selection') + op.mode = 'SELECTION' layout.separator() -- cgit v1.2.3 From a921a4daad437e8ef00adc1f7076449a7cf505e0 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 26 Mar 2020 16:28:06 -0400 Subject: Mantaflow: remove reminents of high res smoke It appears this slipped through the code review Reviewed By: sebbas Differential Revision: https://developer.blender.org/D6760 --- release/scripts/startup/bl_ui/properties_render.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 3d4c70e0143..fd4859f3620 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -648,9 +648,6 @@ class RENDER_PT_simplify_viewport(RenderButtonsPanel, Panel): col = flow.column() col.prop(rd, "simplify_child_particles", text="Max Child Particles") - col = flow.column() - col.prop(rd, "use_simplify_smoke_highres", text="High-resolution Smoke") - class RENDER_PT_simplify_render(RenderButtonsPanel, Panel): bl_label = "Render" -- cgit v1.2.3 From b7666f27d33737f1499fd416e2da3562ea4bca03 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 26 Mar 2020 18:49:54 -0400 Subject: UI: Address Issues with recent fluid ui changes See rB337e86148688aa608d007381ee9ca78879050754 --- .../startup/bl_ui/properties_physics_fluid.py | 42 ++++++++++++---------- 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index b5a19bdc8ca..ba9e2110817 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -176,11 +176,12 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col.prop(domain, "time_scale", text="Time Scale") col.prop(domain, "cfl_condition", text="CFL Number") - col = flow.column(align=True) + col = flow.column() col.prop(domain, "use_adaptive_timesteps") - col.active = domain.use_adaptive_timesteps - col.prop(domain, "timesteps_max", text="Timesteps Maximum") - col.prop(domain, "timesteps_min", text="Minimum") + sub = col.column(align=True) + sub.active = domain.use_adaptive_timesteps + sub.prop(domain, "timesteps_max", text="Timesteps Maximum") + sub.prop(domain, "timesteps_min", text="Minimum") col.separator() @@ -471,21 +472,24 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): col = flow.column() col.prop(domain, "simulation_method", expand=False) col.prop(domain, "flip_ratio", text="FLIP Ratio") - row = col.row() - sub = row.column(align=True) - sub.prop(domain, "particle_radius", text="Particle Radius") - sub.prop(domain, "particle_number", text="Sampling") - sub.prop(domain, "particle_randomness", text="Randomness") + col = col.column(align=True) + col.prop(domain, "particle_radius", text="Particle Radius") + col.prop(domain, "particle_number", text="Sampling") + col.prop(domain, "particle_randomness", text="Randomness") col = flow.column() - row = col.row() - sub = row.column(align=True) - sub.prop(domain, "particle_max", text="Particles Maximum") - sub.prop(domain, "particle_min", text="Minimum") + col = col.column(align=True) + col.prop(domain, "particle_max", text="Particles Maximum") + col.prop(domain, "particle_min", text="Minimum") + + col.separator() + + col = col.column() col.prop(domain, "particle_band_width", text="Narrow Band Width") - row = col.row() - sub = row.column(align=True) - sub.prop(domain, "use_fractions", text="Fractional Obstacles") + + col = col.column() + col.prop(domain, "use_fractions", text="Fractional Obstacles") + sub = col.column() sub.active = domain.use_fractions sub.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold") @@ -860,13 +864,15 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): flow.enabled = not is_baking_any sndparticle_combined_export = domain.sndparticle_combined_export - row = flow.row() + col = flow.column() + row = col.row() row.enabled = sndparticle_combined_export in {'OFF', 'FOAM + BUBBLES'} row.prop(domain, "use_spray_particles", text="Spray") row.prop(domain, "use_foam_particles", text="Foam") row.prop(domain, "use_bubble_particles", text="Bubbles") - col = flow.column() + col.separator() + col.prop(domain, "sndparticle_combined_export") flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) -- cgit v1.2.3 From fcd6fac0a75db66f8dc0f147d2a17feaac092d7b Mon Sep 17 00:00:00 2001 From: Robert Guetzkow Date: Fri, 27 Mar 2020 00:44:08 +0100 Subject: Fix T74996: material custom properties not displayed for Cycles Differential Revision: https://developer.blender.org/D7223 --- release/scripts/startup/bl_ui/properties_material.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 0849437b680..ab70c4c25c0 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -74,7 +74,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel, Panel): class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} _context_path = "material" _property_type = bpy.types.Material -- cgit v1.2.3 From 3b59c111821b8002020ee76edf25258d7c38b381 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Mar 2020 17:15:12 +1100 Subject: Fix T66655: Add-on tool keymap not working after restart - Use addon keyconfig for registered tools so reloading the keymap doesn't clear them. - Ensure there is a default keymap, needed for addon keymaps to be available in the user keyconfig. --- .../scripts/startup/bl_ui/space_toolsystem_common.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index 796c089906d..ace39a4cdf3 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -449,19 +449,27 @@ class ToolSelectPanelHelper: return context.button_operator.name @classmethod - def _km_action_simple(cls, kc, context_descr, label, keymap_fn): + def _km_action_simple(cls, kc_default, kc, context_descr, label, keymap_fn): km_idname = f"{cls.keymap_prefix:s} {context_descr:s}, {label:s}" km = kc.keymaps.get(km_idname) + km_kwargs = dict(space_type=cls.bl_space_type, region_type='WINDOW', tool=True) if km is None: - km = kc.keymaps.new(km_idname, space_type=cls.bl_space_type, region_type='WINDOW', tool=True) + km = kc.keymaps.new(km_idname, **km_kwargs) keymap_fn[0](km) + print(len(km.keymap_items)) + if km.keymap_items: + print(km.keymap_items[0].to_string()) keymap_fn[0] = km.name + # Ensure we have a default key map, so the add-ons keymap is properly overlayed. + if kc_default is not kc: + kc_default.keymaps.new(km_idname, **km_kwargs) + @classmethod def register(cls): wm = bpy.context.window_manager # Write into defaults, users may modify in preferences. - kc = wm.keyconfigs.default + kc_default = wm.keyconfigs.default # Track which tool-group was last used for non-active groups. # Blender stores the active tool-group index. @@ -470,7 +478,7 @@ class ToolSelectPanelHelper: cls._tool_group_active = {} # ignore in background mode - if kc is None: + if kc_default is None: return for context_mode, tools in cls.tools_all(): @@ -482,7 +490,7 @@ class ToolSelectPanelHelper: for item in cls._tools_flatten_with_keymap(tools): keymap_data = item.keymap if callable(keymap_data[0]): - cls._km_action_simple(kc, context_descr, item.label, keymap_data) + cls._km_action_simple(kc_default, kc_default, context_descr, item.label, keymap_data) @classmethod def keymap_ui_hierarchy(cls, context_mode): -- cgit v1.2.3 From 96b3463e250c31466aa4ff91dd6236d3fab8119e Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 27 Mar 2020 10:23:34 +0100 Subject: Cleanup: Remove debug print Leftover from rB3b59c111821b. --- release/scripts/startup/bl_ui/space_toolsystem_common.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index ace39a4cdf3..86a505cf889 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -456,7 +456,6 @@ class ToolSelectPanelHelper: if km is None: km = kc.keymaps.new(km_idname, **km_kwargs) keymap_fn[0](km) - print(len(km.keymap_items)) if km.keymap_items: print(km.keymap_items[0].to_string()) keymap_fn[0] = km.name -- cgit v1.2.3 From ba1f7acc3f5091398c0c1f2eaabfd7546dde39f8 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Fri, 27 Mar 2020 10:27:00 +0100 Subject: Warp modifier: add bone from and bone to options when using armature objects This commit adds the option to use armature bones for the From and To targets when using armature objects. The changes are based on the UV Warp modifier. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6820 --- .../startup/bl_ui/properties_data_modifier.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index e72e826ce23..1f7c5bfd054 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1173,11 +1173,27 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.label(text="From:") col.prop(md, "object_from", text="") - col.prop(md, "use_volume_preserve") - col = split.column() col.label(text="To:") col.prop(md, "object_to", text="") + + split = layout.split() + col = split.column() + obj = md.object_from + if obj and obj.type == 'ARMATURE': + col.label(text="Bone:") + col.prop_search(md, "bone_from", obj.data, "bones", text="") + + col = split.column() + obj = md.object_to + if obj and obj.type == 'ARMATURE': + col.label(text="Bone:") + col.prop_search(md, "bone_to", obj.data, "bones", text="") + + split = layout.split() + col = split.column() + col.prop(md, "use_volume_preserve") + col = split.column() row = col.row(align=True) row.prop_search(md, "vertex_group", ob, "vertex_groups", text="") row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') -- cgit v1.2.3 From bd86edf11631d597aba19d5d2792590dca832e53 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Fri, 27 Mar 2020 10:56:14 +0100 Subject: Solidify modifier: add option to assign shell & rim geometry to selected vertex groups. This commit gives the solidify modifier the ability to assign the newly created shell and rim geometries to selected vertex groups. This expands the procedural control over the modifier stack by letting users apply modifiers to the shell geometry without affecting the original geometry. This will be especially helpful for NPR users that use solidify to create backface culling lines on their characters giving them the ability to add displace noise and other effects. Differential Revision: https://developer.blender.org/D6903 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 1f7c5bfd054..4a213c3528e 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1072,6 +1072,17 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row.active = md.use_rim row.prop(md, "material_offset_rim", text="Rim") + col.separator() + + row = col.row(align=True) + row.label(text="Shell Vertex Group:") + row = col.row(align=True) + row.prop_search(md, "shell_vertex_group", ob, "vertex_groups", text="") + row = col.row(align=True) + row.label(text="Rim Vertex Group:") + row = col.row(align=True) + row.prop_search(md, "rim_vertex_group", ob, "vertex_groups", text="") + def SUBSURF(self, layout, ob, md): from bpy import context layout.row().prop(md, "subdivision_type", expand=True) -- cgit v1.2.3 From b498edb1895bc016382eed0543631ff182a056ae Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 27 Mar 2020 11:32:58 +0100 Subject: Fix T75118: Remove Texture Opacity parameter for Fill materials This parameter was used in previous version and must be removed from UI panel. --- release/scripts/startup/bl_ui/properties_material_gpencil.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index 6dff706e839..9e0ad832fc9 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -212,7 +212,6 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel): col.template_ID(gpcolor, "fill_image", open="image.open") col.prop(gpcolor, "fill_color", text="Base Color") - col.prop(gpcolor, "texture_opacity", slider=True) col.prop(gpcolor, "mix_factor", text="Blend in Fill Texture", slider=True) col.prop(gpcolor, "texture_offset", text="Location") -- cgit v1.2.3 From 6e505a45a1167537e7628e3feb31893cf8898ec8 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Fri, 27 Mar 2020 12:20:31 +0100 Subject: Surface Deform modifier: add vertex group and strength control. This commit aims to add functionality to the surface deform modifier that gives more control and allows it to work better with the modifier stack. * Maintains compatibility with older files. The default settings keep it so that the whole object is bound and vertex coordinates get overwritten as the modifier currently does. * Turns the deformations from an absolute vertex coordinate overwrite into an additive offset from the vertex location before the modifier to the resulting bound deformation. This gives the ability to control the strength of the deformation and mix the deformation of the modifier with the modifier stack that comes before it. * Also adds in a vertex group with the invert option. This is applied after the bind deformation is added. So the whole object is still bound to target, and the vertex group filters afterwards what parts get affected. I experimented with a version to only binds the geometry weighted to the vertex group, but that would break compatibility with old files. I may bring it in later as a separate option/mode for the surface deform. With several fixes from @mont29. Reviewed By: mont29 Differencial Revision: https://developer.blender.org/D6894 --- .../scripts/startup/bl_ui/properties_data_modifier.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 4a213c3528e..e5ea1a94945 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1141,13 +1141,24 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.label(text="Settings are inside the Physics tab") def SURFACE_DEFORM(self, layout, _ob, md): - col = layout.column() + split = layout.split() + col = split.column() col.active = not md.is_bound - col.prop(md, "target") - col.prop(md, "falloff") + col.label(text="Target:") + col.prop(md, "target", text="") - layout.separator() + col = split.column() + col.label(text="Vertex Group:") + row = col.row(align=True) + row.prop_search(md, "vertex_group", _ob, "vertex_groups", text="") + row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT') + + split = layout.split() + col = split.column() + col.prop(md, "falloff") + col = split.column() + col.prop(md, "strength") col = layout.column() -- cgit v1.2.3 From 70f56167d013d5ad5de040151648c5c86cc39bc4 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 27 Mar 2020 12:36:13 +0100 Subject: UI: Add missing Annotation tool to Paint modes --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 9a7e42bdbce..cb3d2909205 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1919,6 +1919,8 @@ class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel): ], 'PAINT': [ _defs_texture_paint.generate_from_brushes, + None, + *_tools_annotate, ], } -- cgit v1.2.3 From 0db055338ab22be926a5c9ce46b4e45689947038 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 27 Mar 2020 16:38:15 +0100 Subject: GPencil: Small tweaks to Fill material panel --- .../scripts/startup/bl_ui/properties_material_gpencil.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index 9e0ad832fc9..5d10a2cef4a 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -191,7 +191,6 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel): col.enabled = not gpcolor.lock col.prop(gpcolor, "fill_style", text="Style") - if gpcolor.fill_style == 'SOLID': col.prop(gpcolor, "fill_color", text="Base Color") @@ -200,19 +199,23 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel): col.prop(gpcolor, "fill_color", text="Base Color") col.prop(gpcolor, "mix_color", text="Secondary Color") - col.prop(gpcolor, "mix_factor", text="Blend in Fill Gradient", slider=True) + col.prop(gpcolor, "mix_factor", text="Blend", slider=True) col.prop(gpcolor, "flip", text="Flip Colors") col.prop(gpcolor, "texture_offset", text="Location") + + row = col.row() + row.enabled = gpcolor.gradient_type == 'LINEAR' + row.prop(gpcolor, "texture_angle", text="Rotation") + col.prop(gpcolor, "texture_scale", text="Scale") - if gpcolor.gradient_type == 'LINEAR': - col.prop(gpcolor, "texture_angle", text="Rotation") elif gpcolor.fill_style == 'TEXTURE': + col.prop(gpcolor, "fill_color", text="Base Color") + col.template_ID(gpcolor, "fill_image", open="image.open") - col.prop(gpcolor, "fill_color", text="Base Color") - col.prop(gpcolor, "mix_factor", text="Blend in Fill Texture", slider=True) + col.prop(gpcolor, "mix_factor", text="Blend", slider=True) col.prop(gpcolor, "texture_offset", text="Location") col.prop(gpcolor, "texture_angle", text="Rotation") -- cgit v1.2.3 From 9120191fe2a28a3d01a51f536df7b433a7764803 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 27 Mar 2020 18:14:14 +0100 Subject: Sculpt: Pose Brush Face Sets origin mode This commit introduces a new mode for calculating the positions and weights of the IK segments in the Pose Brush based on the Face Sets. The first segment of the chain will always include all face sets inside the brush radius and it will propagate until the boundary of the last face sets added in the flood fill. Then consecutive connected face sets are added to the chain until the chain length limit is reached or all face sets of the mesh are already part of the chain. This feature enables complete control over the pose brush origins in case that is needed. Also, with this mode, the user can have a library of base meshes with face sets already configured to get to the initial pose as fast as possible. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7235 --- release/scripts/startup/bl_ui/properties_paint_common.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 3d2474d006a..6e0613874d1 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -626,6 +626,7 @@ def brush_settings(layout, context, brush, popover=False): if brush.sculpt_tool == 'POSE': layout.separator() + layout.prop(brush, "pose_origin_type") layout.prop(brush, "pose_offset") layout.prop(brush, "pose_smooth_iterations") layout.prop(brush, "pose_ik_segments") -- cgit v1.2.3 From bd74f5f7abff2b51923d60b5018da70f17f5a5d6 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Sun, 29 Mar 2020 15:09:42 +0200 Subject: Fix T73945: Don't grey out "Calculate to Frames" in some cases The button seems to behave more as I'd expect without these additional checks. Previously, the button was often grayed out when it was actually working. Reviewers: ISS Differential Revision: https://developer.blender.org/D7252 --- release/scripts/startup/bl_ui/properties_physics_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 5397020a521..479782f1e3b 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -227,7 +227,7 @@ def point_cache_ui(self, cache, enabled, cachetype): col.operator("ptcache.bake", text="Bake").bake = True sub = col.row() - sub.enabled = (cache.is_frame_skip or cache.is_outdated) and enabled + sub.enabled = enabled sub.operator("ptcache.bake", text="Calculate To Frame").bake = False sub = col.column() -- cgit v1.2.3 From a022cb8f62bed6487247697dc66337080b0ac558 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sun, 29 Mar 2020 14:09:02 -0400 Subject: UI: Add missing operators to menus in the 3D Viewport Mesh Edit mode Differential Revision: https://developer.blender.org/D7263 --- release/scripts/startup/bl_ui/space_view3d.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index cb5f02b03fd..7b5824c83d3 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3859,6 +3859,7 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): _extrude_funcs = { 'VERT': lambda layout: + layout.operator("mesh.extrude_repeat", text="Extrude Array") | layout.operator("mesh.extrude_vertices_move", text="Extrude Vertices"), 'EDGE': lambda layout: layout.operator("mesh.extrude_edges_move", text="Extrude Edges"), @@ -3924,6 +3925,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu): layout.operator("transform.vert_slide", text="Slide Vertices") layout.operator_context = 'EXEC_DEFAULT' layout.operator("mesh.vertices_smooth", text="Smooth Vertices").factor = 0.5 + layout.operator("mesh.vertices_smooth_laplacian", text="Smooth Vertices (Laplacian)") layout.operator_context = 'INVOKE_REGION_WIN' layout.separator() @@ -3993,6 +3995,7 @@ class VIEW3D_MT_edit_mesh_edges(Menu): layout.operator("mesh.extrude_edges_move", text="Extrude Edges") layout.operator("mesh.bevel", text="Bevel Edges").vertex_only = False layout.operator("mesh.bridge_edge_loops") + layout.operator("mesh.screw") layout.separator() -- cgit v1.2.3 From a103d09df485e644813141193a15439018b830d0 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sun, 29 Mar 2020 17:34:40 -0400 Subject: UI: Move Array Extrude Below Verticies --- release/scripts/startup/bl_ui/space_view3d.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 7b5824c83d3..7af7bb871b9 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3134,12 +3134,12 @@ class VIEW3D_MT_face_sets(Menu): op = layout.operator("sculpt.face_sets_create", text='Face Set From Visible') op.mode = 'VISIBLE' - + op = layout.operator("sculpt.face_sets_create", text='Face Set From Edit Mode Selection') op.mode = 'SELECTION' layout.separator() - + layout.menu("VIEW3D_MT_face_sets_init", text="Init Face Sets") layout.separator() @@ -3859,8 +3859,8 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): _extrude_funcs = { 'VERT': lambda layout: - layout.operator("mesh.extrude_repeat", text="Extrude Array") | - layout.operator("mesh.extrude_vertices_move", text="Extrude Vertices"), + layout.operator("mesh.extrude_vertices_move", text="Extrude Vertices") | + layout.operator("mesh.extrude_repeat", text="Extrude Array"), 'EDGE': lambda layout: layout.operator("mesh.extrude_edges_move", text="Extrude Edges"), 'REGION': lambda layout: -- cgit v1.2.3 From 6b24f7d87cba0d3272210f113c87045e240a78b4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 30 Mar 2020 10:27:42 +1100 Subject: UI: move extrude repeat out of the vertex menu This works for all selection modes, include last below a separator since it's a specialized function. Note that the previous commit was raising an exception as operator properties don't support 'or'. --- release/scripts/startup/bl_ui/space_view3d.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 7af7bb871b9..4482180a8c1 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3859,8 +3859,7 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): _extrude_funcs = { 'VERT': lambda layout: - layout.operator("mesh.extrude_vertices_move", text="Extrude Vertices") | - layout.operator("mesh.extrude_repeat", text="Extrude Array"), + layout.operator("mesh.extrude_vertices_move", text="Extrude Vertices"), 'EDGE': lambda layout: layout.operator("mesh.extrude_edges_move", text="Extrude Edges"), 'REGION': lambda layout: @@ -3895,6 +3894,10 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): for menu_id in self.extrude_options(context): self._extrude_funcs[menu_id](layout) + layout.separator() + + layout.operator("mesh.extrude_repeat", text="Extrude Array") + class VIEW3D_MT_edit_mesh_vertices(Menu): bl_label = "Vertex" -- cgit v1.2.3 From ec3da20896a66225c0e3f48cd4082a286109b371 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 30 Mar 2020 11:41:44 +1100 Subject: UI: use operator name for extrude repeat Match names between the redo popup and the menu item. --- release/scripts/startup/bl_ui/space_view3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 4482180a8c1..2349d9cc1f3 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3896,7 +3896,7 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): layout.separator() - layout.operator("mesh.extrude_repeat", text="Extrude Array") + layout.operator("mesh.extrude_repeat") class VIEW3D_MT_edit_mesh_vertices(Menu): -- cgit v1.2.3 From 7b347b225adc2a3835aed51299a870e901fb5ecc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 30 Mar 2020 14:34:32 +1100 Subject: Cleanup: remove print left in recent fix for T66655 --- release/scripts/startup/bl_ui/space_toolsystem_common.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index 86a505cf889..e0651dcac2b 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -456,8 +456,6 @@ class ToolSelectPanelHelper: if km is None: km = kc.keymaps.new(km_idname, **km_kwargs) keymap_fn[0](km) - if km.keymap_items: - print(km.keymap_items[0].to_string()) keymap_fn[0] = km.name # Ensure we have a default key map, so the add-ons keymap is properly overlayed. -- cgit v1.2.3 From 15cb567c8e2f35eca15165d376a53802921a9a22 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 30 Mar 2020 18:02:09 +1100 Subject: Armature: remove merge function, use dissolve instead This was crashing, when looking into a fix I noticed that it gave hap-hazard results dissolving past forks in the parent/child hierarchy arbitrarily following one chain. This functionality is almost identical to "dissolve" which delimits forks in the chain predictably. So remove this in favor of dissolve (available from the delete menu). --- release/scripts/startup/bl_ui/space_view3d.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 2349d9cc1f3..2d3b4af4ae5 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4636,7 +4636,6 @@ class VIEW3D_MT_edit_armature(Menu): layout.operator("armature.extrude_forked") layout.operator("armature.duplicate_move") - layout.operator("armature.merge") layout.operator("armature.fill") layout.operator("armature.split") layout.operator("armature.separate") @@ -4710,7 +4709,6 @@ class VIEW3D_MT_armature_context_menu(Menu): # Remove layout.operator("armature.split") layout.operator("armature.separate") - layout.operator("armature.merge") layout.operator("armature.dissolve") layout.operator("armature.delete") -- cgit v1.2.3 From 6f15bc3b52fceaeec87f0c4afd89d763d39f42df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Mon, 30 Mar 2020 17:34:16 +0200 Subject: Fluid: Removed Empty Space option for liquid domains The option only makes sense for gas domains where there is some density. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index ba9e2110817..390b5de7d37 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -194,7 +194,8 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col.prop(domain, "gravity", text="Gravity") col = flow.column() - col.prop(domain, "clipping", text="Empty Space") + if PhysicButtonsPanel.poll_gas_domain(context): + col.prop(domain, "clipping", text="Empty Space") col.prop(domain, "delete_in_obstacle", text="Delete In Obstacle") if domain.cache_type == 'MODULAR': -- cgit v1.2.3 From 0f5c94bbd1709f3942553281460673ba86e715fd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 31 Mar 2020 14:39:41 +1100 Subject: Armature: add Select Linked (Ctrl-L) This matches select linked for other modes (curve, mesh) --- release/scripts/startup/bl_ui/space_view3d.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 2d3b4af4ae5..142175ace51 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1859,6 +1859,10 @@ class VIEW3D_MT_select_edit_armature(Menu): layout.separator() + layout.operator("armature.select_linked", text="Linked") + + layout.separator() + props = layout.operator("armature.select_hierarchy", text="Parent") props.extend = False props.direction = 'PARENT' -- cgit v1.2.3 From c1722a3a8c961ce270408fde9e22c63e60766c17 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 31 Mar 2020 18:01:06 +1100 Subject: Keymap: 'M' for edit-mesh merge menu, 'Alt-M' for split menu As the 'M' key is free, it's convenient to use for the merge menu, especially since this contains "Merge by Distance", a frequently used action. Use 'Alt-M' for a new split menu, following our convention of Alt being used for opposite functionality. Also move merge/split menu's into the "Mesh" menu as neither operate solely on a single mesh element type. --- release/scripts/startup/bl_ui/space_view3d.py | 28 +++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 142175ace51..7a33a244758 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3612,7 +3612,14 @@ class VIEW3D_MT_edit_mesh(Menu): layout.operator("mesh.duplicate_move", text="Duplicate") layout.menu("VIEW3D_MT_edit_mesh_extrude") - layout.operator("mesh.split") + + layout.separator() + + layout.menu("VIEW3D_MT_edit_mesh_merge", text="Merge") + layout.menu("VIEW3D_MT_edit_mesh_split", text="Split") + + layout.separator() + layout.operator("mesh.bisect") layout.operator("mesh.knife_project") @@ -3942,10 +3949,6 @@ class VIEW3D_MT_edit_mesh_vertices(Menu): layout.separator() - layout.menu("VIEW3D_MT_edit_mesh_merge", text="Merge Vertices") - - layout.separator() - layout.menu("VIEW3D_MT_vertex_group") layout.menu("VIEW3D_MT_hook") @@ -4018,7 +4021,6 @@ class VIEW3D_MT_edit_mesh_edges(Menu): layout.separator() layout.operator("transform.edge_slide") - layout.operator("mesh.edge_split") layout.separator() @@ -4296,6 +4298,19 @@ class VIEW3D_MT_edit_mesh_merge(Menu): layout.operator("mesh.remove_doubles", text="By Distance") +class VIEW3D_MT_edit_mesh_split(Menu): + bl_label = "Split" + + def draw(self, _context): + layout = self.layout + + layout.operator("mesh.split", text="Selection") + + layout.separator() + + layout.operator_enum("mesh.edge_split", "type") + + class VIEW3D_MT_edit_mesh_showhide(ShowHideMenu, Menu): _operator_name = "mesh" @@ -7419,6 +7434,7 @@ classes = ( VIEW3D_MT_edit_mesh_clean, VIEW3D_MT_edit_mesh_delete, VIEW3D_MT_edit_mesh_merge, + VIEW3D_MT_edit_mesh_split, VIEW3D_MT_edit_mesh_showhide, VIEW3D_MT_paint_gpencil, VIEW3D_MT_assign_material, -- cgit v1.2.3 From 24f8c8491d8255b3d10d5fa6fcadf8c7f336076c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 31 Mar 2020 18:12:17 +1100 Subject: UI: group edit-mesh Separate with Split & Merge This was already the case for curve & armature. --- release/scripts/startup/bl_ui/space_view3d.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 7a33a244758..c3245b943da 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3617,6 +3617,7 @@ class VIEW3D_MT_edit_mesh(Menu): layout.menu("VIEW3D_MT_edit_mesh_merge", text="Merge") layout.menu("VIEW3D_MT_edit_mesh_split", text="Split") + layout.operator_menu_enum("mesh.separate", "type") layout.separator() @@ -3641,7 +3642,6 @@ class VIEW3D_MT_edit_mesh(Menu): layout.separator() layout.menu("VIEW3D_MT_edit_mesh_showhide") - layout.operator_menu_enum("mesh.separate", "type") layout.menu("VIEW3D_MT_edit_mesh_clean") layout.separator() @@ -4352,6 +4352,9 @@ def draw_curve(self, _context): layout.operator("curve.split") layout.operator("curve.separate") + + layout.separator() + layout.operator("curve.cyclic_toggle") layout.operator_menu_enum("curve.spline_type_set", "type") @@ -4656,6 +4659,9 @@ class VIEW3D_MT_edit_armature(Menu): layout.operator("armature.duplicate_move") layout.operator("armature.fill") + + layout.separator() + layout.operator("armature.split") layout.operator("armature.separate") -- cgit v1.2.3 From 6c036a65c9741786deb53191fa77d83e7ffb1be3 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 31 Mar 2020 17:06:17 +0200 Subject: Add Voxel Mode to the Remesh modifier This adds the Voxel Mode to the current remesh modifier. It works exactly the same way as the voxel remesh operator and uses the same properties to control the remeshing. We can exand this with more options in the future (fix poles, reprojection...) Reviewed By: brecht Differential Revision: https://developer.blender.org/D7292 --- .../startup/bl_ui/properties_data_modifier.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index e5ea1a94945..cbcd6e2b614 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1317,17 +1317,22 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.prop(md, "mode") row = layout.row() - row.prop(md, "octree_depth") - row.prop(md, "scale") + if md.mode == 'VOXEL': + layout.prop(md, "voxel_size") + layout.prop(md, "adaptivity") + else: + row.prop(md, "octree_depth") + row.prop(md, "scale") - if md.mode == 'SHARP': - layout.prop(md, "sharpness") + if md.mode == 'SHARP': + layout.prop(md, "sharpness") + + layout.prop(md, "use_remove_disconnected") + row = layout.row() + row.active = md.use_remove_disconnected + row.prop(md, "threshold") layout.prop(md, "use_smooth_shade") - layout.prop(md, "use_remove_disconnected") - row = layout.row() - row.active = md.use_remove_disconnected - row.prop(md, "threshold") @staticmethod def vertex_weight_mask(layout, ob, md): -- cgit v1.2.3 From 5b88ab25bd83804af007136a1c7b9d8a9d1c1514 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Tue, 31 Mar 2020 18:54:41 +0200 Subject: Fix T75219: Move to New Layer not working This was an old design problem. --- release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 64d4b6e2d4a..5647f35383a 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -332,7 +332,7 @@ class GPENCIL_MT_move_to_layer(Menu): layout.separator() - layout.operator("gpencil.layer_add", text="New Layer", icon='ADD') + layout.operator("gpencil.move_to_layer", text="New Layer", icon='ADD').layer = -1 class GPENCIL_MT_layer_active(Menu): -- cgit v1.2.3 From ca0dcd830c5e880b9ea25d4b95a581b2aaeef4e4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 Apr 2020 20:59:50 +1100 Subject: Fix T75222: Crash activating menu search --- release/scripts/startup/bl_ui/space_topbar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 40824cbeb52..1e6f03c2b0c 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -208,7 +208,7 @@ class TOPBAR_MT_editor_menus(Menu): layout = self.layout # Allow calling this menu directly (this might not be a header area). - if getattr(context.area, "show_menus"): + if getattr(context.area, "show_menus", False): layout.menu("TOPBAR_MT_app", text="", icon='BLENDER') else: layout.menu("TOPBAR_MT_app", text="Blender") -- cgit v1.2.3 From 7c88968c8954321f9bc267b83a1d61dcc5483057 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 2 Apr 2020 16:41:32 +0200 Subject: Scultp: Face Set boundary automasking With this brush option it is possible to mask the boundary vertices of all face sets. This is especially useful in the cloth brush, where face sets can be used to simulate seams between different patches of cloth and produce different patterns and effects. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7230 --- release/scripts/startup/bl_ui/properties_paint_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 6e0613874d1..0b006c9cea3 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -823,8 +823,9 @@ def brush_settings_advanced(layout, context, brush, popover=False): # face masks automasking layout.prop(brush, "use_automasking_face_sets") - # boundary edges automasking + # boundary edges/face sets automasking layout.prop(brush, "use_automasking_boundary_edges") + layout.prop(brush, "use_automasking_boundary_face_sets") layout.prop(brush, "automasking_boundary_edges_propagation_steps") -- cgit v1.2.3 From e6c732e0cbe3e9ccb0b279b9e4af68772d7229dc Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 2 Apr 2020 16:27:14 +0200 Subject: GPencil: Cleanup typo error for hardness The variable cannot be names because it was already renamed. --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 ++-- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index cbcd6e2b614..5510941c4a5 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -2045,8 +2045,8 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.prop(md, "modify_color") - if md.modify_color == 'HARDENESS': - col.prop(md, "hardeness") + if md.modify_color == 'HARDNESS': + col.prop(md, "hardness") show = False else: col.prop(md, "normalize_opacity") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index c612b47895c..27159b6e609 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1492,7 +1492,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel): ma = brush.gpencil_settings.material col.separator() - col.prop(gp_settings, "hardeness", slider=True) + col.prop(gp_settings, "hardness", slider=True) subcol = col.column(align=True) if ma and ma.grease_pencil.mode == 'LINE': subcol.enabled = False -- cgit v1.2.3 From 1f745e2c72b24cfdbd466e8558d8b66536320acd Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 2 Apr 2020 16:56:05 +0200 Subject: Sculpt: Add global automasking options for all brushes This adds the automasking options to the Sculpt Tool options in a way that they affect all brushes. This is more convenient when working with some of these options while switching brushes as they don't need to be enabled/disabled per brush. An automasking option is enabled if it is enabled in the brush or in the sculpt options. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7304 --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 27159b6e609..351b72f79fb 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -905,6 +905,13 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): col = flow.column() col.prop(sculpt, "use_deform_only") + col = flow.column() + col.separator() + col.prop(sculpt, "use_automasking_topology") + col.prop(sculpt, "use_automasking_face_sets") + col.prop(sculpt, "use_automasking_boundary_edges") + col.prop(sculpt, "use_automasking_boundary_face_sets") + class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel): bl_context = ".sculpt_mode" # dot on purpose (access from topbar) -- cgit v1.2.3 From b8d9b5e3315232bb157de43713ec2a54433cf9a6 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 12 Mar 2020 17:51:39 +0100 Subject: Sculpt: Delay Viewport Updates In Blender 2.81 we update and draw all nodes inside the view planes. When navigating with a pen tablet after an operation that tags the whole mesh to update (like undo or inverting the mask), this introduces some lag as nodes are updating when they enter the view. The viewport is not fully responsive again until all nodes have entered the view after the operation. This commit delays nodes updates until the view navigation stops, so the viewport navigation is always fully responsive. This introduces some artifacts while navigating, so it can be disabled if you don't want to see them. I'm storing the update planes in the PBVH. This way I can add support for some tools to update in real-time only the nodes inside this plane while running the operator, like the mesh filter. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6269 --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 351b72f79fb..6aaeec3f3cf 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -903,6 +903,8 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): col = flow.column() col.prop(sculpt, "show_low_resolution") col = flow.column() + col.prop(sculpt, "use_sculpt_delay_updates") + col = flow.column() col.prop(sculpt, "use_deform_only") col = flow.column() -- cgit v1.2.3 From e455536943a862334a765fdef7edfd16b2e9b5b1 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 4 Apr 2020 12:41:58 -0400 Subject: UI: 3D Viewport text edit menus - Adds select menu - Removes undo/redo controls - Adds delete menu - Refactor - Combines font and text menu The goal is to match other edit menus better and match the text editor. --- release/scripts/startup/bl_ui/space_view3d.py | 160 +++++++++++++++----------- 1 file changed, 95 insertions(+), 65 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index c3245b943da..88b94a86f00 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1706,60 +1706,33 @@ class VIEW3D_MT_select_edit_surface(Menu): layout.operator("curve.select_less") -class VIEW3D_MT_edit_text_context_menu(Menu): - bl_label = "Text Context Menu" - - def draw(self, _context): - layout = self.layout - - layout.operator_context = 'INVOKE_DEFAULT' - - layout.operator("font.text_cut", text="Cut") - layout.operator("font.text_copy", text="Copy", icon='COPYDOWN') - layout.operator("font.text_paste", text="Paste", icon='PASTEDOWN') - - layout.separator() - - layout.operator("font.select_all") - - layout.separator() - - layout.menu("VIEW3D_MT_edit_font") - - class VIEW3D_MT_select_edit_text(Menu): - # intentional name mismatch - # select menu for 3d-text doesn't make sense - bl_label = "Edit" + bl_label = "Select" def draw(self, _context): layout = self.layout - layout.operator("ed.undo") - layout.operator("ed.redo") - - layout.separator() - - layout.operator("font.text_cut", text="Cut") - layout.operator("font.text_copy", text="Copy", icon='COPYDOWN') - layout.operator("font.text_paste", text="Paste", icon='PASTEDOWN') + layout.operator("font.select_all", text="All") layout.separator() - layout.operator("font.text_paste_from_file") + layout.operator("font.move_select", text="Previous Block").type = 'PREVIOUS_PAGE' + layout.operator("font.move_select", text="Next Block").type = 'NEXT_PAGE' layout.separator() - layout.operator("font.select_all") + layout.operator("font.move_select", text="Line Begin").type = 'LINE_BEGIN' + layout.operator("font.move_select", text="Line End").type = 'LINE_END' layout.separator() - layout.operator("font.case_set", text="To Uppercase").case = 'UPPER' - layout.operator("font.case_set", text="To Lowercase").case = 'LOWER' + layout.operator("font.move_select", text="Previous Line").type = 'PREVIOUS_LINE' + layout.operator("font.move_select", text="Next Line").type = 'NEXT_LINE' layout.separator() - layout.menu("VIEW3D_MT_edit_text_chars") + layout.operator("font.move_select", text="Previous Word").type = 'PREVIOUS_WORD' + layout.operator("font.move_select", text="Next Word").type = 'NEXT_WORD' class VIEW3D_MT_select_edit_metaball(Menu): @@ -4512,18 +4485,44 @@ class VIEW3D_MT_edit_surface(Menu): draw = draw_curve -class VIEW3D_MT_edit_font(Menu): - bl_label = "Font" +class VIEW3D_MT_edit_font_chars(Menu): + bl_label = "Special Characters" def draw(self, _context): layout = self.layout - layout.operator("font.style_toggle", text="Toggle Bold", icon='BOLD').style = 'BOLD' - layout.operator("font.style_toggle", text="Toggle Italic", icon='ITALIC').style = 'ITALIC' - layout.operator("font.style_toggle", text="Toggle Underline", icon='UNDERLINE').style = 'UNDERLINE' - layout.operator("font.style_toggle", text="Toggle Small Caps", icon='SMALL_CAPS').style = 'SMALL_CAPS' + layout.operator("font.text_insert", text="Copyright").text = "\u00A9" + layout.operator("font.text_insert", text="Registered Trademark").text = "\u00AE" - layout.menu("VIEW3D_MT_edit_font_kerning") + layout.separator() + + layout.operator("font.text_insert", text="Degree Sign").text = "\u00B0" + layout.operator("font.text_insert", text="Multiplication Sign").text = "\u00D7" + layout.operator("font.text_insert", text="Circle").text = "\u008A" + + layout.separator() + + layout.operator("font.text_insert", text="Superscript 1").text = "\u00B9" + layout.operator("font.text_insert", text="Superscript 2").text = "\u00B2" + layout.operator("font.text_insert", text="Superscript 3").text = "\u00B3" + + layout.separator() + + layout.operator("font.text_insert", text="Double >>").text = "\u00BB" + layout.operator("font.text_insert", text="Double <<").text = "\u00AB" + layout.operator("font.text_insert", text="Promillage").text = "\u2030" + + layout.separator() + + layout.operator("font.text_insert", text="Dutch Florin").text = "\u00A4" + layout.operator("font.text_insert", text="British Pound").text = "\u00A3" + layout.operator("font.text_insert", text="Japanese Yen").text = "\u00A5" + + layout.separator() + + layout.operator("font.text_insert", text="German S").text = "\u00DF" + layout.operator("font.text_insert", text="Spanish Question Mark").text = "\u00BF" + layout.operator("font.text_insert", text="Spanish Exclamation Mark").text = "\u00A1" class VIEW3D_MT_edit_font_kerning(Menu): @@ -4541,44 +4540,74 @@ class VIEW3D_MT_edit_font_kerning(Menu): layout.operator("font.change_spacing", text="Reset Kerning").delta = -kerning -class VIEW3D_MT_edit_text_chars(Menu): - bl_label = "Special Characters" +class VIEW3D_MT_edit_font_delete(Menu): + bl_label = "Delete" def draw(self, _context): layout = self.layout - layout.operator("font.text_insert", text="Copyright").text = "\u00A9" - layout.operator("font.text_insert", text="Registered Trademark").text = "\u00AE" + layout.operator("font.delete", text="Previous Character").type = 'PREVIOUS_CHARACTER' + layout.operator("font.delete", text="Next Character").type = 'NEXT_CHARACTER' + layout.operator("font.delete", text="Previous Word").type = 'PREVIOUS_WORD' + layout.operator("font.delete", text="Next Word").type = 'NEXT_WORD' + + +class VIEW3D_MT_edit_font(Menu): + bl_label = "Text" + + def draw(self, _context): + layout = self.layout + + layout.operator("font.text_cut", text="Cut") + layout.operator("font.text_copy", text="Copy", icon='COPYDOWN') + layout.operator("font.text_paste", text="Paste", icon='PASTEDOWN') layout.separator() - layout.operator("font.text_insert", text="Degree Sign").text = "\u00B0" - layout.operator("font.text_insert", text="Multiplication Sign").text = "\u00D7" - layout.operator("font.text_insert", text="Circle").text = "\u008A" + layout.operator("font.text_paste_from_file") layout.separator() - layout.operator("font.text_insert", text="Superscript 1").text = "\u00B9" - layout.operator("font.text_insert", text="Superscript 2").text = "\u00B2" - layout.operator("font.text_insert", text="Superscript 3").text = "\u00B3" + layout.operator("font.case_set", text="To Uppercase").case = 'UPPER' + layout.operator("font.case_set", text="To Lowercase").case = 'LOWER' layout.separator() - layout.operator("font.text_insert", text="Double >>").text = "\u00BB" - layout.operator("font.text_insert", text="Double <<").text = "\u00AB" - layout.operator("font.text_insert", text="Promillage").text = "\u2030" + layout.menu("VIEW3D_MT_edit_font_chars") layout.separator() - layout.operator("font.text_insert", text="Dutch Florin").text = "\u00A4" - layout.operator("font.text_insert", text="British Pound").text = "\u00A3" - layout.operator("font.text_insert", text="Japanese Yen").text = "\u00A5" + layout.operator("font.style_toggle", text="Toggle Bold", icon='BOLD').style = 'BOLD' + layout.operator("font.style_toggle", text="Toggle Italic", icon='ITALIC').style = 'ITALIC' + layout.operator("font.style_toggle", text="Toggle Underline", icon='UNDERLINE').style = 'UNDERLINE' + layout.operator("font.style_toggle", text="Toggle Small Caps", icon='SMALL_CAPS').style = 'SMALL_CAPS' + + layout.menu("VIEW3D_MT_edit_font_kerning") layout.separator() - layout.operator("font.text_insert", text="German S").text = "\u00DF" - layout.operator("font.text_insert", text="Spanish Question Mark").text = "\u00BF" - layout.operator("font.text_insert", text="Spanish Exclamation Mark").text = "\u00A1" + layout.menu("VIEW3D_MT_edit_font_delete") + + +class VIEW3D_MT_edit_font_context_menu(Menu): + bl_label = "Text Context Menu" + + def draw(self, _context): + layout = self.layout + + layout.operator_context = 'INVOKE_DEFAULT' + + layout.operator("font.text_cut", text="Cut") + layout.operator("font.text_copy", text="Copy", icon='COPYDOWN') + layout.operator("font.text_paste", text="Paste", icon='PASTEDOWN') + + layout.separator() + + layout.operator("font.select_all") + + layout.separator() + + layout.menu("VIEW3D_MT_edit_font") class VIEW3D_MT_edit_meta(Menu): @@ -7351,7 +7380,6 @@ classes = ( VIEW3D_MT_select_edit_mesh, VIEW3D_MT_select_edit_curve, VIEW3D_MT_select_edit_surface, - VIEW3D_MT_edit_text_context_menu, VIEW3D_MT_select_edit_text, VIEW3D_MT_select_edit_metaball, VIEW3D_MT_edit_lattice_context_menu, @@ -7465,8 +7493,10 @@ classes = ( VIEW3D_MT_edit_curve_showhide, VIEW3D_MT_edit_surface, VIEW3D_MT_edit_font, + VIEW3D_MT_edit_font_chars, VIEW3D_MT_edit_font_kerning, - VIEW3D_MT_edit_text_chars, + VIEW3D_MT_edit_font_delete, + VIEW3D_MT_edit_font_context_menu, VIEW3D_MT_edit_meta, VIEW3D_MT_edit_meta_showhide, VIEW3D_MT_edit_lattice, -- cgit v1.2.3 From d0d20de183f1afc77a97a119afb66e64799ebc6f Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Mon, 6 Apr 2020 00:38:48 +0200 Subject: VSE: Draw f-curves for opacity and volume values on the strips Feature can be enabled or disabled in timeline view menu item "Show F-Curves". Author a.monti Reviewed By: ISS Differential Revision: https://developer.blender.org/D7205 --- release/scripts/startup/bl_ui/space_sequencer.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index f1a349d49b4..c0a2b8a1230 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -309,6 +309,7 @@ class SEQUENCER_MT_view(Menu): layout.prop(st, "show_seconds") layout.prop(st, "show_locked_time") layout.prop(st, "show_strip_offset") + layout.prop(st, "show_fcurves") layout.separator() layout.prop(st, "show_markers") -- cgit v1.2.3 From 4e7c65035b0821d89e3be4e6f7a415752913a2cd Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 6 Apr 2020 21:45:41 -0400 Subject: UI: Use Consitent Menu Layout for Bone Names --- release/scripts/startup/bl_ui/space_view3d.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 88b94a86f00..eefcb6a71be 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3316,13 +3316,7 @@ class VIEW3D_MT_pose(Menu): layout.separator() - layout.operator_context = 'EXEC_AREA' - layout.operator("pose.autoside_names", text="AutoName Left/Right").axis = 'XAXIS' - layout.operator("pose.autoside_names", text="AutoName Front/Back").axis = 'YAXIS' - layout.operator("pose.autoside_names", text="AutoName Top/Bottom").axis = 'ZAXIS' - - layout.operator("pose.flip_names") - + layout.menu("VIEW3D_MT_pose_names") layout.operator("pose.quaternions_flip") layout.separator() @@ -3459,6 +3453,19 @@ class VIEW3D_MT_pose_constraints(Menu): layout.operator("pose.constraints_clear") +class VIEW3D_MT_pose_names(Menu): + bl_label = "Names" + + def draw(self, _context): + layout = self.layout + + layout.operator_context = 'EXEC_REGION_WIN' + layout.operator("pose.autoside_names", text="AutoName Left/Right").axis = 'XAXIS' + layout.operator("pose.autoside_names", text="AutoName Front/Back").axis = 'YAXIS' + layout.operator("pose.autoside_names", text="AutoName Top/Bottom").axis = 'ZAXIS' + layout.operator("pose.flip_names") + + class VIEW3D_MT_pose_showhide(ShowHideMenu, Menu): _operator_name = "pose" @@ -7443,6 +7450,7 @@ classes = ( VIEW3D_MT_pose_group, VIEW3D_MT_pose_ik, VIEW3D_MT_pose_constraints, + VIEW3D_MT_pose_names, VIEW3D_MT_pose_showhide, VIEW3D_MT_pose_apply, VIEW3D_MT_pose_context_menu, -- cgit v1.2.3 From 17193f6c765775ff971cd6399fe0f9cbc4fa793c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Apr 2020 15:12:18 +1000 Subject: UI: rename 'smoothen' to 'smooth' Other smooth operators use term 'smooth'. --- release/scripts/startup/bl_ui/space_view3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index eefcb6a71be..167091815b4 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4179,7 +4179,7 @@ class VIEW3D_MT_edit_mesh_normals(Menu): layout.operator("mesh.normals_tools", text="Copy Vectors").mode = 'COPY' layout.operator("mesh.normals_tools", text="Paste Vectors").mode = 'PASTE' - layout.operator("mesh.smoothen_normals", text="Smoothen Vectors") + layout.operator("mesh.smooth_normals", text="Smooth Vectors") layout.operator("mesh.normals_tools", text="Reset Vectors").mode = 'RESET' layout.separator() -- cgit v1.2.3 From 968619d03626c7e4d92d4cb383ac304b72595af3 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Tue, 7 Apr 2020 13:25:49 -0700 Subject: UI: Language Selection Changes Removal of 'Translation' checkbox. Enable translation options when selecting non-English languages. Differential Revision: https://developer.blender.org/D7210 Reviewed by Brecht Van Lommel --- release/scripts/startup/bl_ui/space_userpref.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 165761254d0..76e80fdb414 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -242,21 +242,14 @@ class USERPREF_PT_interface_translation(InterfacePanel, CenterAlignMixIn, Panel) def poll(cls, context): return bpy.app.build_options.international - def draw_header(self, context): - prefs = context.preferences - view = prefs.view - - self.layout.prop(view, "use_international_fonts", text="") - def draw_centered(self, context, layout): prefs = context.preferences view = prefs.view - layout.active = view.use_international_fonts - layout.prop(view, "language") flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + flow.active = (bpy.app.translations.locale != 'en_US') flow.prop(view, "use_translate_tooltips", text="Tooltips") flow.prop(view, "use_translate_interface", text="Interface") -- cgit v1.2.3 From a7df9d6cdd767ec2f35386af6a714987d6c516af Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 9 Apr 2020 22:55:47 +1000 Subject: Fix menu search referencing image menu In this case it was called mask which wasn't correct since it's used for image & UV's, so rename the menu instead. --- release/scripts/startup/bl_ui/space_image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 980f89eaaa4..4506307067e 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -703,7 +703,7 @@ class IMAGE_HT_header(Header): layout.prop(tool_settings, "uv_select_mode", text="", expand=True) layout.prop(uvedit, "sticky_select_mode", icon_only=True) - MASK_MT_editor_menus.draw_collapsible(context, layout) + IMAGE_MT_editor_menus.draw_collapsible(context, layout) layout.separator_spacer() @@ -749,8 +749,8 @@ class IMAGE_HT_header(Header): row.operator("image.play_composite", icon='PLAY') -class MASK_MT_editor_menus(Menu): - bl_idname = "MASK_MT_editor_menus" +class IMAGE_MT_editor_menus(Menu): + bl_idname = "IMAGE_MT_editor_menus" bl_label = "" def draw(self, context): @@ -1465,7 +1465,7 @@ classes = ( IMAGE_MT_uvs_snap_pie, IMAGE_HT_tool_header, IMAGE_HT_header, - MASK_MT_editor_menus, + IMAGE_MT_editor_menus, IMAGE_PT_active_tool, IMAGE_PT_mask, IMAGE_PT_mask_layers, -- cgit v1.2.3 From 4f9a56cbc4e8719ee421a57fd6695bed633c591b Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Fri, 10 Apr 2020 14:03:36 +0200 Subject: Modifiers: Add Bone option for Texture Mask Object This patch adds the option to use an armature bone in place of an object for texture mask coordinates. This affects the 3 vertex weight modifiers, the displace modifier, the warp modifier, and the wave modifier. With minor changes from Bastien Montagne (@mont29). Differential Revision: https://developer.blender.org/D7348 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 5510941c4a5..61151b3e02b 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -396,6 +396,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if md.texture_coords == 'OBJECT': col.label(text="Object:") col.prop(md, "texture_coords_object", text="") + obj = md.texture_coords_object + if obj and obj.type == 'ARMATURE': + col.label(text="Bone:") + col.prop_search(md, "texture_coords_bone", obj.data, "bones", text="") elif md.texture_coords == 'UV' and ob.type == 'MESH': col.label(text="UV Map:") col.prop_search(md, "uv_layer", ob.data, "uv_layers", text="") @@ -1244,6 +1248,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if md.texture_coords == 'OBJECT': layout.prop(md, "texture_coords_object", text="Object") + obj = md.texture_coords_object + if obj and obj.type == 'ARMATURE': + layout.prop_search(md, "texture_coords_bone", obj.data, "bones", text="Bone") elif md.texture_coords == 'UV' and ob.type == 'MESH': layout.prop_search(md, "uv_layer", ob.data, "uv_layers") @@ -1296,6 +1303,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.prop_search(md, "uv_layer", ob.data, "uv_layers") elif md.texture_coords == 'OBJECT': layout.prop(md, "texture_coords_object") + obj = md.texture_coords_object + if obj and obj.type == 'ARMATURE': + layout.prop_search(md, "texture_coords_bone", obj.data, "bones") layout.separator() @@ -1366,6 +1376,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if md.mask_tex_mapping == 'OBJECT': layout.prop(md, "mask_tex_map_object", text="Object") + obj = md.mask_text_map_object + if obj and obj.type == 'ARMATURE': + layout.prop_search(md, "mask_tex_map_bone", obj.data, "bones", text="Bone") elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_layers") -- cgit v1.2.3 From 68ba6378b5b14059e52a26306bc8b9f3db2e7299 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Mon, 13 Apr 2020 00:28:27 +0200 Subject: VSE: Add sample tool This tool is set as default tool, so default action on click doesn't have pernament effect. Reviewed By: campbellbarton Differential Revision: D7064 --- .../scripts/startup/bl_ui/space_toolsystem_toolbar.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index cb3d2909205..5b7db2342e5 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1807,6 +1807,21 @@ class _defs_sequencer_generic: draw_settings=draw_settings, ) + @ToolDef.from_fn + def sample(): + def draw_settings(_context, layout, tool): + props = tool.operator_properties("sequencer.sample") + return dict( + idname="builtin.sample", + label="Sample", + description=( + "Sample pixel values under the cursor" + ), + icon="ops.paint.weight_sample", # XXX, needs own icon. + keymap="Sequencer Tool: Sample", + draw_settings=draw_settings, + ) + class _defs_sequencer_select: @ToolDef.from_fn @@ -2348,6 +2363,7 @@ class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel): None: [ ], 'PREVIEW': [ + _defs_sequencer_generic.sample, *_tools_annotate, ], 'SEQUENCER': [ @@ -2355,6 +2371,7 @@ class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel): _defs_sequencer_generic.blade, ], 'SEQUENCER_PREVIEW': [ + _defs_sequencer_generic.sample, *_tools_select, *_tools_annotate, _defs_sequencer_generic.blade, -- cgit v1.2.3 From c19f37764db96f5f5c781e8299a74a25a28e8ec2 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Mon, 13 Apr 2020 15:47:41 +0200 Subject: UI: Fix wrong icon used for Unified Color toggle --- release/scripts/startup/bl_ui/properties_paint_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 0b006c9cea3..32b386bf0ab 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -902,7 +902,7 @@ def draw_color_settings(context, layout, brush, color_type=False): UnifiedPaintPanel.prop_unified_color(row, context, brush, "secondary_color", text="") row.separator() row.operator("paint.brush_colors_flip", icon='FILE_REFRESH', text="", emboss=False) - row.prop(ups, "use_unified_color", text="", icon='WORLD') + row.prop(ups, "use_unified_color", text="", icon='BRUSHES_ALL') # Gradient elif brush.color_type == 'GRADIENT': layout.template_color_ramp(brush, "gradient", expand=True) -- cgit v1.2.3 From 5cf72833429f4c63d27ea0a72878af1fec6dcf4e Mon Sep 17 00:00:00 2001 From: Henrik Dick Date: Mon, 13 Apr 2020 17:15:16 +0200 Subject: Fix T75032: New complex solidify algorithm handles poorly merging threshold of small geometry details. * Implemented the algortihm that would merge vertices to the weighted center between them. * Exposed the merge threshold to the user. The new default tolerance is 0.0001 (versionning code ensures that previous default value remains in use to avoid any change in existing files). Review and minor changes/cleanups from Bastien Montagne (@mont29). --- release/scripts/startup/bl_ui/properties_data_modifier.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 61151b3e02b..62e19129923 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1049,6 +1049,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "edge_crease_inner", text="Inner") col.prop(md, "edge_crease_outer", text="Outer") col.prop(md, "edge_crease_rim", text="Rim") + else: + col.prop(md, "nonmanifold_merge_threshold") col = split.column() -- cgit v1.2.3 From 3bef5d15d8c0a3a23922c0658ea4e0654199f0b4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Apr 2020 18:34:07 +1000 Subject: UI: add spin to extrude menu This tool wasn't accessible anywhere in the interface (besides the interactive tool). Add to extrude since it's a kind of extrusion. --- release/scripts/startup/bl_ui/space_view3d.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 167091815b4..f38bbb46f85 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3879,6 +3879,8 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): return menu def draw(self, context): + from math import pi + layout = self.layout layout.operator_context = 'INVOKE_REGION_WIN' @@ -3888,6 +3890,7 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): layout.separator() layout.operator("mesh.extrude_repeat") + layout.operator("mesh.spin").angle = pi * 2 class VIEW3D_MT_edit_mesh_vertices(Menu): -- cgit v1.2.3 From 35b1cc806f76d427139cc0eef1cdd9ef96b671ad Mon Sep 17 00:00:00 2001 From: Henrik Dick Date: Tue, 14 Apr 2020 10:45:53 +0200 Subject: Improve Solidify/Bevel Modifier cooperation Adds a slider to solidify which allows the user to add bevel weight on the outside or remove bevel weight from the inside. Also includes a very small improvment for working with subsurface modifier where the rim edge in complex solidify will now also have a chance to get a crease if there is only two adjacent edges. Differential Revision: https://developer.blender.org/D7334 Reviewing and minor cleanups: Bastien Montagne (@mont29). --- release/scripts/startup/bl_ui/properties_data_modifier.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 62e19129923..e099aee9bb6 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1049,7 +1049,12 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "edge_crease_inner", text="Inner") col.prop(md, "edge_crease_outer", text="Outer") col.prop(md, "edge_crease_rim", text="Rim") + col.label(text="Bevel:") + col.prop(md, "bevel_convex") else: + col.label(text="Bevel:") + col.prop(md, "bevel_convex") + col.separator() col.prop(md, "nonmanifold_merge_threshold") col = split.column() -- cgit v1.2.3 From cc9bee9162b022a42b720a127c65b433fcbd8c60 Mon Sep 17 00:00:00 2001 From: Henrik Dick Date: Tue, 14 Apr 2020 12:22:00 +0200 Subject: Add Complex Solidify option for thickness per face Add an option to solidify complex which will make faces which have thickness controlled by vertex weights flat/even, and parallel to their original face. For each face it uses the minimal weight assigned to its vertices to control the thickness. This will help users for example in architecture or basic CAD design by finally making solidify work there at all if altering thickness is needed. Differential Revision: https://developer.blender.org/D7340 Reviewed and minor cleanups by Batien Montagne (@mont29). --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index e099aee9bb6..571811e49d6 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1043,6 +1043,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): sub = col.row() sub.active = bool(md.vertex_group) sub.prop(md, "thickness_vertex_group", text="Factor") + if solidify_mode == 'NON_MANIFOLD': + sub = col.row() + sub.active = bool(md.vertex_group) + sub.prop(md, "use_flat_faces") if solidify_mode == 'EXTRUDE': col.label(text="Crease:") -- cgit v1.2.3 From 7dd8c889f18e9df5c86356fedb063e5ff9261577 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Sun, 5 Apr 2020 02:00:50 +0200 Subject: Sculpt: Sharpen Mesh Filter This mesh filter sharpens and smooths the mesh based on its curvature, resulting in pinching hard edges and polishing flat surfaces. It fixes most of the artifacts of the voxel remesher and those produced when sculpting hard surfaces and stylized models with creasing and flattening brushes. It needs and accumulate_displacement step before each filter iteration which can't be multithreaded in an easy way (it would need something to sync the threads when modifying the data of neighbors in a different node), but this does not affect performance in a significant way. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7335 --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 5b7db2342e5..3c9355d0017 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1034,6 +1034,8 @@ class _defs_sculpt: if (props.type == "SURFACE_SMOOTH"): layout.prop(props, "surface_smooth_shape_preservation", expand=False) layout.prop(props, "surface_smooth_current_vertex", expand=False) + if (props.type == "SHARPEN"): + layout.prop(props, "sharpen_smooth_ratio", expand=False) return dict( idname="builtin.mesh_filter", -- cgit v1.2.3 From 47f46637be1bef9672ede0ab6795a7e9ea97fc6a Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 14 Apr 2020 21:06:49 +0200 Subject: Sculpt: New Layer Brush The Layer brush was in Blender before 2.81, when the sculpt API was introduced. It had a huge amount of bugs and glitches which made it almost unusable for anything but the most trivial cases. Also, it needed some hacks in the code just to support the persistent base. The brush was completely rewritten using the Sculpt API. It fulfills the same use case as the old one, but it has: - All previous artifacts fixed - Simpler code - Persistent base now works with multires thanks to the sculpt API - Small cursor widget to preview the layer height - More controllable and smoother strength and deformation - More correct masking support - More predictable invert support. When using persistent base, the brush invert mode resets to layer height 0, instead of jumping from +1 to -1. The brush can still be inverted in the brush direction property. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7147 --- .../scripts/startup/bl_ui/properties_paint_common.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 32b386bf0ab..a13f39da4a9 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -600,19 +600,10 @@ def brush_settings(layout, context, brush, popover=False): # use_persistent, set_persistent_base if capabilities.has_persistence: ob = context.sculpt_object - do_persistent = True - - # not supported yet for this case - for md in ob.modifiers: - if md.type == 'MULTIRES': - do_persistent = False - break - - if do_persistent: - layout.separator() - layout.prop(brush, "use_persistent") - layout.operator("sculpt.set_persistent_base") - layout.separator() + layout.separator() + layout.prop(brush, "use_persistent") + layout.operator("sculpt.set_persistent_base") + layout.separator() if brush.sculpt_tool == 'CLAY_STRIPS': row = layout.row() -- cgit v1.2.3 From af91bbc221fe21f9238172a8e152fe49dcd67d4b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Apr 2020 12:35:28 +1000 Subject: UI: expand names of collection menu --- release/scripts/startup/bl_ui/space_outliner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index cc773300d9e..413659735b6 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -243,10 +243,14 @@ class OUTLINER_MT_collection_new(Menu): bl_label = "Collection" def draw(self, context): + # Note: this menu is used in any context where collections exist, + # as a generic way to add data. The names here are expanded because + # this menu is often expended without it's title. + layout = self.layout - layout.operator("outliner.collection_new", text="New").nested = False - layout.operator("outliner.id_paste", text="Paste", icon='PASTEDOWN') + layout.operator("outliner.collection_new", text="New Collection").nested = False + layout.operator("outliner.id_paste", text="Paste Data-Blocks", icon='PASTEDOWN') layout.separator() -- cgit v1.2.3 From 92113e2da742e6b647578633a97ed6d16476fb97 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Apr 2020 12:42:01 +1000 Subject: Fix menu search omitting the outliner context menu Use a regular context menu as a fallback for the outliner. If there are no specific actions for the item under the cursor, fall through to opening a regular menu. This lets menu search find the context menu items which were previously unavailable as menu search wont run operators. --- release/scripts/startup/bl_ui/space_outliner.py | 38 ++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 413659735b6..a74d9cc9547 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -104,20 +104,26 @@ class OUTLINER_MT_editor_menus(Menu): layout.menu("OUTLINER_MT_edit_datablocks") -class OUTLINER_MT_context(Menu): - bl_label = "Outliner" +class OUTLINER_MT_context_menu(Menu): + bl_label = "Outliner Context Menu" + + def draw(self, context): + space = context.space_data - def draw(self, _context): layout = self.layout - layout.menu("OUTLINER_MT_context_view") + if space.display_mode == 'VIEW_LAYER': + OUTLINER_MT_collection_new.draw_without_context_menu(context, layout) + layout.separator() + + layout.menu("OUTLINER_MT_context_menu_view") layout.separator() layout.menu("INFO_MT_area") -class OUTLINER_MT_context_view(Menu): +class OUTLINER_MT_context_menu_view(Menu): bl_label = "View" def draw(self, _context): @@ -236,25 +242,25 @@ class OUTLINER_MT_collection(Menu): layout.separator() - OUTLINER_MT_context.draw(self, context) + OUTLINER_MT_context_menu.draw(self, context) class OUTLINER_MT_collection_new(Menu): bl_label = "Collection" - def draw(self, context): - # Note: this menu is used in any context where collections exist, - # as a generic way to add data. The names here are expanded because - # this menu is often expended without it's title. + @staticmethod + def draw_without_context_menu(context, layout): + layout.operator("outliner.collection_new", text="New Collection").nested = False + layout.operator("outliner.id_paste", text="Paste Data-Blocks", icon='PASTEDOWN') + def draw(self, context): layout = self.layout - layout.operator("outliner.collection_new", text="New Collection").nested = False - layout.operator("outliner.id_paste", text="Paste Data-Blocks", icon='PASTEDOWN') + self.draw_without_context_menu(context, layout) layout.separator() - OUTLINER_MT_context.draw(self, context) + OUTLINER_MT_context_menu.draw(self, context) class OUTLINER_MT_object(Menu): @@ -303,7 +309,7 @@ class OUTLINER_MT_object(Menu): layout.separator() - OUTLINER_MT_context.draw(self, context) + OUTLINER_MT_context_menu.draw(self, context) class OUTLINER_PT_filter(Panel): @@ -423,8 +429,8 @@ classes = ( OUTLINER_MT_collection_visibility, OUTLINER_MT_collection_view_layer, OUTLINER_MT_object, - OUTLINER_MT_context, - OUTLINER_MT_context_view, + OUTLINER_MT_context_menu, + OUTLINER_MT_context_menu_view, OUTLINER_PT_filter, ) -- cgit v1.2.3 From d6de81eed6ca60205af9b8d8e86d506a4f0c181d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Wed, 15 Apr 2020 13:49:41 +0200 Subject: Fluid: Minor UI fix for diffusion panel Was missing active option. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 390b5de7d37..960d2dff101 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -988,6 +988,7 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): layout.use_property_split = True domain = context.fluid.domain_settings + layout.active = domain.use_diffusion is_baking_any = domain.is_cache_baking_any has_baked_any = domain.has_cache_baked_any -- cgit v1.2.3 From debd8aab4a82d221b9b2207a2fd7a25bb34a1c16 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Apr 2020 00:32:30 +1000 Subject: UI: default to searching menus instead of operators Menus from the top-bar, space-header and key bindings are used to gather menus to populate the search popup. Giving better context and default options for operators. Part of T74157 Enabling "Developer Extras" exposes operator search in the Edit menu, as this can be useful for developers to run operators without first exposing them in the interface. --- release/scripts/startup/bl_ui/space_topbar.py | 7 +++++-- release/scripts/startup/bl_ui/space_userpref.py | 11 ----------- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 1e6f03c2b0c..7a23eb9282c 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -580,6 +580,8 @@ class TOPBAR_MT_edit(Menu): def draw(self, context): layout = self.layout + show_developer = context.preferences.view.show_developer_ui + layout.operator("ed.undo") layout.operator("ed.redo") @@ -598,8 +600,9 @@ class TOPBAR_MT_edit(Menu): layout.separator() - layout.operator("wm.search_menu", - text="Operator Search...", icon='VIEWZOOM') + layout.operator("wm.search_menu", text="Menu Search...", icon='VIEWZOOM') + if show_developer: + layout.operator("wm.search_operator", text="Operator Search...", icon='VIEWZOOM') layout.separator() diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 76e80fdb414..5ff463c4700 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2158,16 +2158,6 @@ class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel): ) """ -class USERPREF_PT_experimental_ui(ExperimentalPanel, Panel): - bl_label = "UI" - - def draw(self, context): - self._draw_items( - context, ( - ({"property": "use_menu_search"}, "T74157"), - ), - ) - class USERPREF_PT_experimental_system(ExperimentalPanel, Panel): bl_label = "System" @@ -2270,7 +2260,6 @@ classes = ( # Popovers. USERPREF_PT_ndof_settings, - USERPREF_PT_experimental_ui, USERPREF_PT_experimental_system, # Add dynamically generated editor theme panels last, -- cgit v1.2.3 From b79a5bdd5ae08fdb9c62ae311de7e08a0e971cfc Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Wed, 15 Apr 2020 12:01:43 -0300 Subject: View3D: New tool 'Extrude, Dissolve and Intersect' Basically this new tool constitutes a macro that uses the parameters of the Extrude and Translate operators that were recently implemented. Thanks to @CandleComet for initial implementation. Differential Revision: https://developer.blender.org/D7222 --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 3c9355d0017..0751d2b8c49 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -670,6 +670,20 @@ class _defs_edit_mesh: draw_settings=_template_widget.VIEW3D_GGT_xform_extrude.draw_settings, ) + @ToolDef.from_fn + def extrude_dissolve_and_intersect(): + return dict( + idname="builtin.extrude_dissolve_and_intersect", + label="Extrude Dissolve and Intersect", + description=( + "Extrude, dissolves edges whose faces form a flat surface and intersect new edges" + ), + icon="none", + widget="VIEW3D_GGT_tool_generic_handle_normal", + operator="view3d.edit_mesh_extrude_dissolve_and_intersect", + keymap=(), + ) + @ToolDef.from_fn def extrude_normals(): def draw_settings(_context, layout, tool): @@ -2114,6 +2128,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): None, ( _defs_edit_mesh.extrude, + _defs_edit_mesh.extrude_dissolve_and_intersect, _defs_edit_mesh.extrude_normals, _defs_edit_mesh.extrude_individual, _defs_edit_mesh.extrude_cursor, -- cgit v1.2.3 From eb46b55e569fdb23d89cd779df6575adcc2fec2e Mon Sep 17 00:00:00 2001 From: Vincent Blankfield Date: Wed, 15 Apr 2020 18:49:32 +0200 Subject: Fix T75613: "In Front" setting did not override image empty "Depth" Differential Revision: https://developer.blender.org/D7418 Reviewers: campbellbarton, brecht --- release/scripts/startup/bl_ui/properties_data_empty.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py index 88fdaae0433..898ab2e4359 100644 --- a/release/scripts/startup/bl_ui/properties_data_empty.py +++ b/release/scripts/startup/bl_ui/properties_data_empty.py @@ -49,7 +49,9 @@ class DATA_PT_empty(DataButtonsPanel, Panel): col.prop(ob, "empty_image_offset", text="Y", index=1) col = layout.column() - col.row().prop(ob, "empty_image_depth", text="Depth", expand=True) + depth_row = col.row() + depth_row.enabled = not ob.show_in_front + depth_row.prop(ob, "empty_image_depth", text="Depth", expand=True) col.row().prop(ob, "empty_image_side", text="Side", expand=True) col.prop(ob, "show_empty_image_orthographic", text="Display Orthographic") col.prop(ob, "show_empty_image_perspective", text="Display Perspective") -- cgit v1.2.3 From 03a931a87611b73f2ee81fc481a6d220a5bdd0db Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Wed, 15 Apr 2020 15:52:26 -0300 Subject: Cleanup: Remove unused operator --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 0751d2b8c49..5c17c19e84b 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -680,7 +680,6 @@ class _defs_edit_mesh: ), icon="none", widget="VIEW3D_GGT_tool_generic_handle_normal", - operator="view3d.edit_mesh_extrude_dissolve_and_intersect", keymap=(), ) -- cgit v1.2.3 From 002752f021a67ff8c4e3f5c488678525b766872a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Apr 2020 11:43:19 +1000 Subject: Object: only apply smooth/flat to the active object in paint modes Also some minor improvements: - Only run once per object data instance. - Correction for mesh smooth flag being used on curves. - Move curve operation into utility function. --- release/scripts/startup/bl_ui/space_view3d.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index f38bbb46f85..9381a591a4c 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5300,6 +5300,7 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu): op.auto_iteration_count = False class VIEW3D_MT_sculpt_face_sets_edit_pie(Menu): + bl_label = "Face Sets Edit" def draw(self, _context): -- cgit v1.2.3 From 90d3fe1e4dd5a4be86ef738dfaca08ae8c9ca3f7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Apr 2020 18:10:21 +1000 Subject: UV: support changing the opacity of the UV overlay Add this option as it's useful to adjust how much UV's cover the image when UV mapping. D5348 by @EitanSomething with edits --- release/scripts/startup/bl_ui/space_image.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 4506307067e..05924600db7 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -955,6 +955,7 @@ class IMAGE_PT_view_display_uv_edit_overlays(Panel): col = layout.column() col.prop(uvedit, "show_smooth_edges", text="Smooth") col.prop(uvedit, "show_modified_edges", text="Modified") + col.prop(uvedit, "uv_opacity") class IMAGE_PT_view_display_uv_edit_overlays_stretch(Panel): -- cgit v1.2.3 From 0733bd0d644a3f1f1d6b74cd6a11c686e06b40a3 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 16 Apr 2020 19:59:48 -0400 Subject: UI: Fix bad flow layout The layout of the new sequencer disk cache were not handled well with large preference windows. --- release/scripts/startup/bl_ui/space_userpref.py | 28 +++++++++---------------- 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 76e80fdb414..414444a6ee5 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -612,33 +612,25 @@ class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel): layout.separator() - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(system, "memory_cache_limit", text="Sequencer Cache Limit") - flow.prop(system, "scrollback", text="Console Scrollback Lines") + flow.prop(system, "texture_time_out", text="Texture Time Out") + flow.prop(system, "texture_collection_rate", text="Garbage Collection Rate") layout.separator() - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(system, "use_sequencer_disk_cache") - flow.prop(system, "sequencer_disk_cache_dir") - flow.prop(system, "sequencer_disk_cache_size_limit") - flow.prop(system, "sequencer_disk_cache_compression") + flow.prop(system, "vbo_time_out", text="Vbo Time Out") + flow.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") layout.separator() - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(system, "texture_time_out", text="Texture Time Out") - flow.prop(system, "texture_collection_rate", text="Garbage Collection Rate") + flow.prop(system, "scrollback", text="Console Scrollback Lines") layout.separator() - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(system, "vbo_time_out", text="Vbo Time Out") - flow.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") + flow.prop(system, "memory_cache_limit", text="Sequencer Cache Limit") + flow.prop(system, "use_sequencer_disk_cache") + flow.prop(system, "sequencer_disk_cache_dir") + flow.prop(system, "sequencer_disk_cache_size_limit") + flow.prop(system, "sequencer_disk_cache_compression") # ----------------------------------------------------------------------------- -- cgit v1.2.3 From c565d0764f75ba5a5bb51d5daa9152897db59eb8 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 17 Apr 2020 15:11:16 +0200 Subject: Enable new undo code by default. Note that given how experimental is working currently, I had to rename and inverse the effect of the experimental undo flag, which will now instead activate legacy code when set. --- release/scripts/startup/bl_ui/space_userpref.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 414444a6ee5..179b3612a62 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2167,7 +2167,7 @@ class USERPREF_PT_experimental_system(ExperimentalPanel, Panel): def draw(self, context): self._draw_items( context, ( - ({"property": "use_undo_speedup"}, "T60695"), + ({"property": "use_undo_legacy"}, "T60695"), ), ) -- cgit v1.2.3 From 7fc60bff14a6241c4a51cbc57b93774a90a0ea13 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Fri, 17 Apr 2020 16:54:03 +0200 Subject: UI: Layout changes for new checkbox layout possibilities Follow-up to previous commit. Some examples: {F8473507} {F8473508} {F8473509} {F8473510} For more screenshots, please see D7430. We use column or row headings here to bring more structure, and to give the eye visual anchors which aid eye-scanning. The left-aligned checkboxes likewise help with this. And we keep the adherence to the center line, so the alignment matches up between the various buttons and controls. * Changes the property split percentage from 50/50% to 40/60%. This is needed to give enough space for the checkboxes. But in most cases this looks better anyway - see Transform panel. In some cases it simply fills out the available space more efficently. * Fix various hacks where we previously used manually defined splits. When we did this, the alignment was never quite right, and the layout code was a mess. * Adds column headings to many places where a list of checkboxes all share a common purpose or leading text. * Add checkbox + value configurations various places where a checkbox only serves to enable the value slider * Removes most uses of grid flow layout. The grid flow layouts combine poorly with column headings, and also they would mess alignment up badly. The grid flow layouts also often made buttons and controls jump around on the screen if you would just resize editors slightly, causing visual confusion, making users lose their place. The logic for at what time the list of items would re-flow was often flawed, jumping to multiple columns too fast or too late - and frankly, the grid flow layouts would often just look bad. Maniphest Task: https://developer.blender.org/T65965 Differential Revision: https://developer.blender.org/D7430 Reviewed by: Brecht Van Lommel, Pablo Vazquez. Most work here by William Reynish, few changes by Julian Eisel. --- .../startup/bl_ui/properties_data_armature.py | 7 +- .../startup/bl_ui/properties_data_camera.py | 44 +-- .../scripts/startup/bl_ui/properties_data_curve.py | 12 +- .../scripts/startup/bl_ui/properties_data_empty.py | 8 +- .../scripts/startup/bl_ui/properties_data_mesh.py | 42 ++- release/scripts/startup/bl_ui/properties_object.py | 66 ++--- release/scripts/startup/bl_ui/properties_output.py | 57 +--- .../startup/bl_ui/properties_paint_common.py | 30 +- .../startup/bl_ui/properties_physics_common.py | 39 +-- release/scripts/startup/bl_ui/properties_render.py | 33 +-- .../scripts/startup/bl_ui/properties_view_layer.py | 53 +--- release/scripts/startup/bl_ui/space_sequencer.py | 57 ++-- release/scripts/startup/bl_ui/space_text.py | 21 +- .../startup/bl_ui/space_toolsystem_toolbar.py | 5 +- release/scripts/startup/bl_ui/space_userpref.py | 322 ++++++++++----------- release/scripts/startup/bl_ui/space_view3d.py | 33 ++- .../scripts/startup/bl_ui/space_view3d_toolbar.py | 117 +++----- 17 files changed, 393 insertions(+), 553 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index d44af702d46..05abfa02500 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -84,17 +84,12 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel): layout.prop(arm, "display_type", text="Display As") - flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=True) - col = flow.column() + col = layout.column(heading="Show") col.prop(arm, "show_names", text="Names") - col = flow.column() col.prop(arm, "show_axes", text="Axes") - col = flow.column() col.prop(arm, "show_bone_custom_shapes", text="Shapes") - col = flow.column() col.prop(arm, "show_group_colors", text="Group Colors") if ob: - col = flow.column() col.prop(ob, "show_in_front", text="In Front") diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index aee909e3a6c..62dffa3b6ba 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -360,8 +360,9 @@ class DATA_PT_camera_background_image(CameraButtonsPanel, Panel): col.prop(bg, "rotation") col.prop(bg, "scale") - col.prop(bg, "use_flip_x") - col.prop(bg, "use_flip_y") + col = box.column(heading="Flip") + col.prop(bg, "use_flip_x", text="X") + col.prop(bg, "use_flip_y", text="Y") class DATA_PT_camera_display(CameraButtonsPanel, Panel): @@ -377,21 +378,12 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel): col = layout.column(align=True) - col.separator() - col.prop(cam, "display_size", text="Size") - col.separator() - - flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False) - - col = flow.column() + col = layout.column(heading="Show") col.prop(cam, "show_limits", text="Limits") - col = flow.column() col.prop(cam, "show_mist", text="Mist") - col = flow.column() col.prop(cam, "show_sensor", text="Sensor") - col = flow.column() col.prop(cam, "show_name", text="Name") @@ -407,24 +399,20 @@ class DATA_PT_camera_display_composition_guides(CameraButtonsPanel, Panel): cam = context.camera - flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False) + layout.prop(cam, "show_composition_thirds") - col = flow.column() + col = layout.column(heading="Center", align=True) col.prop(cam, "show_composition_center") - col = flow.column() - col.prop(cam, "show_composition_center_diagonal") - col = flow.column() - col.prop(cam, "show_composition_thirds") - col = flow.column() - col.prop(cam, "show_composition_golden") - col = flow.column() - col.prop(cam, "show_composition_golden_tria_a") - col = flow.column() - col.prop(cam, "show_composition_golden_tria_b") - col = flow.column() - col.prop(cam, "show_composition_harmony_tri_a") - col = flow.column() - col.prop(cam, "show_composition_harmony_tri_b") + col.prop(cam, "show_composition_center_diagonal", text="Diagonal") + + col = layout.column(heading="Golden", align=True) + col.prop(cam, "show_composition_golden", text="Ratio") + col.prop(cam, "show_composition_golden_tria_a", text="Triangle A") + col.prop(cam, "show_composition_golden_tria_b", text="Triangle B") + + col = layout.column(heading="Harmony", align=True) + col.prop(cam, "show_composition_harmony_tri_a", text="Triangle A") + col.prop(cam, "show_composition_harmony_tri_b", text="Triangle B") class DATA_PT_camera_display_passepartout(CameraButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index b694062dfc5..7e7488f4cf1 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -276,23 +276,23 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, Panel): col.prop(act_spline, "use_smooth") else: - sub = col.column(align=True) - sub.prop(act_spline, "use_cyclic_u") + sub = col.column(heading="Cyclic", align=True) + sub.prop(act_spline, "use_cyclic_u", text="U") if is_surf: sub.prop(act_spline, "use_cyclic_v", text="V") if act_spline.type == 'NURBS': - sub = col.column(align=True) + sub = col.column(heading="Bezier", align=True) # sub.active = (not act_spline.use_cyclic_u) - sub.prop(act_spline, "use_bezier_u", text="Bezier U") + sub.prop(act_spline, "use_bezier_u", text="U") if is_surf: subsub = sub.column() subsub.active = (not act_spline.use_cyclic_v) subsub.prop(act_spline, "use_bezier_v", text="V") - sub = col.column(align=True) - sub.prop(act_spline, "use_endpoint_u", text="Endpoint U") + sub = col.column(heading="Endpoint", align=True) + sub.prop(act_spline, "use_endpoint_u", text="U") if is_surf: subsub = sub.column() diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py index 898ab2e4359..1523f69536f 100644 --- a/release/scripts/startup/bl_ui/properties_data_empty.py +++ b/release/scripts/startup/bl_ui/properties_data_empty.py @@ -53,9 +53,11 @@ class DATA_PT_empty(DataButtonsPanel, Panel): depth_row.enabled = not ob.show_in_front depth_row.prop(ob, "empty_image_depth", text="Depth", expand=True) col.row().prop(ob, "empty_image_side", text="Side", expand=True) - col.prop(ob, "show_empty_image_orthographic", text="Display Orthographic") - col.prop(ob, "show_empty_image_perspective", text="Display Perspective") - col.prop(ob, "show_empty_image_only_axis_aligned") + + col = layout.column(heading="Show in", align=True) + col.prop(ob, "show_empty_image_orthographic", text="Orthographic") + col.prop(ob, "show_empty_image_perspective", text="Perspective") + col.prop(ob, "show_empty_image_only_axis_aligned", text="Only Axis Aligned") class DATA_PT_empty_alpha(DataButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index d91b2ceb7f7..425c94dfdcd 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -189,28 +189,21 @@ class DATA_PT_normals(MeshButtonsPanel, Panel): bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} - def draw(self, context): - pass - - -class DATA_PT_normals_auto_smooth(MeshButtonsPanel, Panel): - bl_label = "Auto Smooth" - bl_parent_id = "DATA_PT_normals" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} - - def draw_header(self, context): - mesh = context.mesh - - self.layout.prop(mesh, "use_auto_smooth", text="") - def draw(self, context): layout = self.layout layout.use_property_split = True mesh = context.mesh - layout.active = mesh.use_auto_smooth and not mesh.has_custom_normals - layout.prop(mesh, "auto_smooth_angle", text="Angle") + col = layout.column(align=False, heading="Auto Smooth") + col.use_property_decorate = False + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(mesh, "use_auto_smooth", text="") + sub = sub.row(align=True) + sub.active = mesh.use_auto_smooth and not mesh.has_custom_normals + sub.prop(mesh, "auto_smooth_angle", text="") + row.prop_decorator(mesh, "auto_smooth_angle") class DATA_PT_texture_space(MeshButtonsPanel, Panel): @@ -485,9 +478,11 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel): col.prop(mesh, "remesh_voxel_adaptivity") col.prop(mesh, "use_remesh_fix_poles") col.prop(mesh, "use_remesh_smooth_normals") - col.prop(mesh, "use_remesh_preserve_volume") - col.prop(mesh, "use_remesh_preserve_paint_mask") - col.prop(mesh, "use_remesh_preserve_sculpt_face_sets") + + col = layout.column(heading="Preserve") + col.prop(mesh, "use_remesh_preserve_volume", text="Volume") + col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask") + col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets") col.operator("object.voxel_remesh", text="Voxel Remesh") else: col.operator("object.quadriflow_remesh", text="QuadriFlow Remesh") @@ -515,12 +510,12 @@ class DATA_PT_customdata(MeshButtonsPanel, Panel): else: col.operator("mesh.customdata_custom_splitnormals_add", icon='ADD') - col = layout.column() + col = layout.column(heading="Store") col.enabled = obj is not None and obj.mode != 'EDIT' - col.prop(me, "use_customdata_vertex_bevel") - col.prop(me, "use_customdata_edge_bevel") - col.prop(me, "use_customdata_edge_crease") + col.prop(me, "use_customdata_vertex_bevel", text="Vertex Bevel Weight") + col.prop(me, "use_customdata_edge_bevel", text="Edge Bevel Weight") + col.prop(me, "use_customdata_edge_crease", text="Edge Crease") class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel): @@ -544,7 +539,6 @@ classes = ( DATA_PT_vertex_colors, DATA_PT_face_maps, DATA_PT_normals, - DATA_PT_normals_auto_smooth, DATA_PT_texture_space, DATA_PT_remesh, DATA_PT_customdata, diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index a805b965af2..4beef62608d 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -212,7 +212,6 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): layout = self.layout layout.use_property_split = True - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) obj = context.object obj_type = obj.type @@ -222,35 +221,22 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): is_dupli = (obj.instance_type != 'NONE') is_gpencil = (obj_type == 'GPENCIL') - col = flow.column() + col = layout.column(heading="Show") col.prop(obj, "show_name", text="Name") - - col = flow.column() col.prop(obj, "show_axis", text="Axis") # Makes no sense for cameras, armatures, etc.! # but these settings do apply to dupli instances if is_geometry or is_dupli: - col = flow.column() col.prop(obj, "show_wire", text="Wireframe") if obj_type == 'MESH' or is_dupli: - col = flow.column() col.prop(obj, "show_all_edges", text="All Edges") - - col = flow.column() if is_geometry: col.prop(obj, "show_texture_space", text="Texture Space") - col = flow.column() col.prop(obj.display, "show_shadows", text="Shadow") - - col = flow.column() col.prop(obj, "show_in_front", text="In Front") # if obj_type == 'MESH' or is_empty_image: # col.prop(obj, "show_transparent", text="Transparency") - - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - - col = flow.column() if is_wire: # wire objects only use the max. display type for duplis col.active = is_dupli @@ -258,28 +244,17 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): if is_geometry or is_dupli or is_empty_image or is_gpencil: # Only useful with object having faces/materials... - col = flow.column() col.prop(obj, "color") - -class OBJECT_PT_display_bounds(ObjectButtonsPanel, Panel): - bl_label = "Bounds" - bl_parent_id = "OBJECT_PT_display" - bl_options = {'DEFAULT_CLOSED'} - - def draw_header(self, context): - - obj = context.object - - self.layout.prop(obj, "show_bounds", text="") - - def draw(self, context): - layout = self.layout - obj = context.object - layout.use_property_split = True - - layout.active = obj.show_bounds or (obj.display_type == 'BOUNDS') - layout.prop(obj, "display_bounds_type", text="Shape") + col = layout.column(align=False, heading="Bounds") + col.use_property_decorate = False + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(obj, "show_bounds", text="") + sub = sub.row(align=True) + sub.active = obj.show_bounds or (obj.display_type == 'BOUNDS') + sub.prop(obj, "display_bounds_type", text="") + row.prop_decorator(obj, "display_bounds_type") class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): @@ -295,7 +270,6 @@ class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): row.prop(ob, "instance_type", expand=True) layout.use_property_split = True - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) if ob.instance_type == 'VERTS': layout.prop(ob, "use_instance_vertices_rotation", text="Align to Vertex Normal") @@ -305,9 +279,9 @@ class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): col.prop(ob, "instance_collection", text="Collection") if ob.instance_type != 'NONE' or ob.particle_systems: - col = flow.column(align=True) - col.prop(ob, "show_instancer_for_viewport") - col.prop(ob, "show_instancer_for_render") + col = layout.column(heading="Show Instancer", align=True) + col.prop(ob, "show_instancer_for_viewport", text="Viewport") + col.prop(ob, "show_instancer_for_render", text="Render") class OBJECT_PT_instancing_size(ObjectButtonsPanel, Panel): @@ -385,19 +359,16 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): layout = self.layout layout.use_property_split = True - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) layout = self.layout ob = context.object - col = flow.column() - col.prop(ob, "hide_viewport", text="Show in Viewports", toggle=False, invert_checkbox=True) - col = flow.column() - col.prop(ob, "hide_render", text="Show in Renders", toggle=False, invert_checkbox=True) - col = flow.column() - col.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True) + layout.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True) + + col = layout.column(heading="Show in") + col.prop(ob, "hide_viewport", text="Viewports", toggle=False, invert_checkbox=True) + col.prop(ob, "hide_render", text="Renders", toggle=False, invert_checkbox=True) if context.object.type == 'GPENCIL': - col = flow.column() col.prop(ob, "use_grease_pencil_lights", toggle=False) @@ -419,7 +390,6 @@ classes = ( OBJECT_PT_motion_paths, OBJECT_PT_motion_paths_display, OBJECT_PT_display, - OBJECT_PT_display_bounds, OBJECT_PT_visibility, OBJECT_PT_custom_props, ) diff --git a/release/scripts/startup/bl_ui/properties_output.py b/release/scripts/startup/bl_ui/properties_output.py index 748961bb40f..e859798c085 100644 --- a/release/scripts/startup/bl_ui/properties_output.py +++ b/release/scripts/startup/bl_ui/properties_output.py @@ -94,14 +94,14 @@ class RENDER_PT_dimensions(RenderOutputButtonsPanel, Panel): return args @staticmethod - def draw_framerate(layout, sub, rd): + def draw_framerate(layout, rd): if RENDER_PT_dimensions._preset_class is None: RENDER_PT_dimensions._preset_class = bpy.types.RENDER_MT_framerate_presets args = rd.fps, rd.fps_base, RENDER_PT_dimensions._preset_class.bl_label fps_label_text, show_framerate = RENDER_PT_dimensions._draw_framerate_label(*args) - sub.menu("RENDER_MT_framerate_presets", text=fps_label_text) + layout.menu("RENDER_MT_framerate_presets", text=fps_label_text) if show_framerate: col = layout.column(align=True) @@ -136,10 +136,8 @@ class RENDER_PT_dimensions(RenderOutputButtonsPanel, Panel): col.prop(scene, "frame_end", text="End") col.prop(scene, "frame_step", text="Step") - col = layout.split() - col.alignment = 'RIGHT' - col.label(text="Frame Rate") - self.draw_framerate(layout, col, rd) + col = layout.column(heading="Frame Rate") + self.draw_framerate(col, rd) class RENDER_PT_frame_remapping(RenderOutputButtonsPanel, Panel): @@ -171,10 +169,8 @@ class RENDER_PT_post_processing(RenderOutputButtonsPanel, Panel): rd = context.scene.render - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - col = flow.column() + col = layout.column(heading="Pipeline") col.prop(rd, "use_compositing") - col = flow.column() col.prop(rd, "use_sequencer") layout.prop(rd, "dither_intensity", text="Dither", slider=True) @@ -192,44 +188,23 @@ class RENDER_PT_stamp(RenderOutputButtonsPanel, Panel): rd = context.scene.render - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) + if rd.use_sequencer: + layout.prop(rd, "metadata_input") - col = flow.column() + col = layout.column(heading="Include") col.prop(rd, "use_stamp_date", text="Date") - col = flow.column() col.prop(rd, "use_stamp_time", text="Time") - - col = flow.column() col.prop(rd, "use_stamp_render_time", text="Render Time") - col = flow.column() col.prop(rd, "use_stamp_frame", text="Frame") - col = flow.column() col.prop(rd, "use_stamp_frame_range", text="Frame Range") - col = flow.column() col.prop(rd, "use_stamp_memory", text="Memory") - col = flow.column() col.prop(rd, "use_stamp_hostname", text="Hostname") - - col = flow.column() col.prop(rd, "use_stamp_camera", text="Camera") - col = flow.column() col.prop(rd, "use_stamp_lens", text="Lens") - - col = flow.column() col.prop(rd, "use_stamp_scene", text="Scene") - col = flow.column() col.prop(rd, "use_stamp_marker", text="Marker") - - col = flow.column() col.prop(rd, "use_stamp_filename", text="Filename") - col = flow.column() - col.prop(rd, "use_stamp_sequencer_strip", text="Strip Name") - - if rd.use_sequencer: - col = flow.column() - col.prop(rd, "use_stamp_strip_meta", text="Use Strip Metadata") - class RENDER_PT_stamp_note(RenderOutputButtonsPanel, Panel): bl_label = "Note" @@ -293,21 +268,17 @@ class RENDER_PT_output(RenderOutputButtonsPanel, Panel): layout.use_property_split = True - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - - col = flow.column() - col.active = not rd.is_movie_format - col.prop(rd, "use_overwrite") - col = flow.column() - col.active = not rd.is_movie_format - col.prop(rd, "use_placeholder") - col = flow.column() + col = layout.column(heading="Saving") col.prop(rd, "use_file_extension") - col = flow.column() col.prop(rd, "use_render_cache") layout.template_image_settings(image_settings, color_management=False) + if not rd.is_movie_format: + col = layout.column(heading="Image Sequence") + col.prop(rd, "use_overwrite") + col.prop(rd, "use_placeholder") + class RENDER_PT_output_views(RenderOutputButtonsPanel, Panel): bl_label = "Views" diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index a13f39da4a9..bc467c4f42f 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -587,10 +587,12 @@ def brush_settings(layout, context, brush, popover=False): slider=True, ) - layout.prop(brush, "use_plane_trim", text="Plane Trim") - row = layout.row() - row.active = brush.use_plane_trim - row.prop(brush, "plane_trim", slider=True, text="Distance") + row = layout.row(heading="Plane Trim") + row.prop(brush, "use_plane_trim", text="") + sub = row.row() + sub.active = brush.use_plane_trim + sub.prop(brush, "plane_trim", slider=True, text="") + layout.separator() # height @@ -808,23 +810,27 @@ def brush_settings_advanced(layout, context, brush, popover=False): use_accumulate = capabilities.has_accumulate use_frontface = True + col = layout.column(heading="Auto-Masking", align=True) + # topology automasking - layout.prop(brush, "use_automasking_topology") + col.prop(brush, "use_automasking_topology", text="Topology") # face masks automasking - layout.prop(brush, "use_automasking_face_sets") - + col.prop(brush, "use_automasking_face_sets", text="Face Sets") + # boundary edges/face sets automasking - layout.prop(brush, "use_automasking_boundary_edges") - layout.prop(brush, "use_automasking_boundary_face_sets") - layout.prop(brush, "automasking_boundary_edges_propagation_steps") + col.prop(brush, "use_automasking_boundary_edges", text="Mesh Boundary") + col.prop(brush, "use_automasking_boundary_face_sets", text="Face Sets") + col.prop(brush, "automasking_boundary_edges_propagation_steps") + layout.separator() # sculpt plane settings if capabilities.has_sculpt_plane: layout.prop(brush, "sculpt_plane") - layout.prop(brush, "use_original_normal") - layout.prop(brush, "use_original_plane") + col = layout.column(heading="Use Original", align=True) + col.prop(brush, "use_original_normal", text="Normal") + col.prop(brush, "use_original_plane", text="Plane") layout.separator() # 3D and 2D Texture Paint. diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 479782f1e3b..2f4a60f622e 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -310,8 +310,10 @@ def basic_force_field_settings_ui(self, field): else: col.prop(field, "flow") - col.prop(field, "apply_to_location", text="Affect Location") - col.prop(field, "apply_to_rotation", text="Affect Rotation") + sub = col.column(heading="Affect") + + sub.prop(field, "apply_to_location", text="Location") + sub.prop(field, "apply_to_rotation", text="Rotation") col = flow.column() sub = col.column(align=True) @@ -336,26 +338,29 @@ def basic_force_field_falloff_ui(self, field): if not field or field.type == 'NONE': return - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True) - - col = flow.column() + col = layout.column() col.prop(field, "z_direction") col.prop(field, "falloff_power", text="Power") - col = flow.column() - col.prop(field, "use_min_distance", text="Use Minimum") - - sub = col.column(align=True) + col = layout.column(align=False, heading="Minimum Distance") + col.use_property_decorate = False + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(field, "use_min_distance", text="") + sub = sub.row(align=True) sub.active = field.use_min_distance - sub.prop(field, "distance_min", text="Min Distance") - - col = flow.column() - col.prop(field, "use_max_distance", text="Use Maximum") - - sub = col.column(align=True) + sub.prop(field, "distance_min", text="") + row.prop_decorator(field, "distance_min") + + col = layout.column(align=False, heading="Maximum Distance") + col.use_property_decorate = False + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(field, "use_max_distance", text="") + sub = sub.row(align=True) sub.active = field.use_max_distance - sub.prop(field, "distance_max", text="Max Distance") - + sub.prop(field, "distance_max", text="") + row.prop_decorator(field, "distance_max") classes = ( PHYSICS_PT_add, diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index fd4859f3620..2d13aed617c 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -475,33 +475,21 @@ class RENDER_PT_eevee_film(RenderButtonsPanel, Panel): scene = context.scene rd = scene.render + props = scene.eevee col = layout.column() col.prop(rd, "filter_size") col.prop(rd, "film_transparent", text="Transparent") - -class RENDER_PT_eevee_film_overscan(RenderButtonsPanel, Panel): - bl_label = "Overscan" - bl_parent_id = "RENDER_PT_eevee_film" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_EEVEE'} - - def draw_header(self, context): - - scene = context.scene - props = scene.eevee - - self.layout.prop(props, "use_overscan", text="") - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - scene = context.scene - props = scene.eevee - - layout.active = props.use_overscan - layout.prop(props, "overscan_size", text="Size") + col = layout.column(align=False, heading="Overscan") + col.use_property_decorate = False + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(props, "use_overscan", text="") + sub = sub.row(align=True) + sub.active = props.use_overscan + sub.prop(props, "overscan_size", text="") + row.prop_decorator(props, "overscan_size") class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel): @@ -696,7 +684,6 @@ classes = ( RENDER_PT_eevee_indirect_lighting, RENDER_PT_eevee_indirect_lighting_display, RENDER_PT_eevee_film, - RENDER_PT_eevee_film_overscan, RENDER_PT_opengl_sampling, RENDER_PT_opengl_lighting, RENDER_PT_opengl_color, diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 5fe06ebbb6e..3645f0dc2f2 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -40,17 +40,12 @@ class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel): layout.use_property_split = True - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - - layout.use_property_split = True - scene = context.scene rd = scene.render layer = context.view_layer - col = flow.column() + col = layout.column() col.prop(layer, "use", text="Use for Rendering") - col = flow.column() col.prop(rd, "use_single_layer", text="Render Single Layer") @@ -77,14 +72,10 @@ class VIEWLAYER_PT_eevee_layer_passes_data(ViewLayerButtonsPanel, Panel): rd = scene.render view_layer = context.view_layer - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - col = flow.column() + col = layout.column() col.prop(view_layer, "use_pass_combined") - col = flow.column() col.prop(view_layer, "use_pass_z") - col = flow.column() col.prop(view_layer, "use_pass_mist") - col = flow.column() col.prop(view_layer, "use_pass_normal") @@ -104,29 +95,19 @@ class VIEWLAYER_PT_eevee_layer_passes_light(ViewLayerButtonsPanel, Panel): scene = context.scene scene_eevee = scene.eevee - split = layout.split(factor=0.35) - split.use_property_split = False - split.label(text="Diffuse") - row = split.row(align=True) - row.prop(view_layer, "use_pass_diffuse_direct", text="Light", toggle=True) - row.prop(view_layer, "use_pass_diffuse_color", text="Color", toggle=True) - - split = layout.split(factor=0.35) - split.use_property_split = False - split.label(text="Specular") - row = split.row(align=True) - row.prop(view_layer, "use_pass_glossy_direct", text="Light", toggle=True) - row.prop(view_layer, "use_pass_glossy_color", text="Color", toggle=True) - - split = layout.split(factor=0.35) - split.use_property_split = False - split.label(text="Volume") - row = split.row(align=True) - row.prop(view_layer_eevee, "use_pass_volume_transmittance", text="Transmittance", toggle=True) - row.prop(view_layer_eevee, "use_pass_volume_scatter", text="Scatter", toggle=True) - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - - col = layout.column(align=True) + col = layout.column(heading="Diffuse", align=True) + col.prop(view_layer, "use_pass_diffuse_direct", text="Light") + col.prop(view_layer, "use_pass_diffuse_color", text="Color") + + col = layout.column(heading="Specular", align=True) + col.prop(view_layer, "use_pass_glossy_direct", text="Light") + col.prop(view_layer, "use_pass_glossy_color", text="Color") + + col = layout.column(heading="Volume", align=True) + col.prop(view_layer_eevee, "use_pass_volume_transmittance", text="Transmittance") + col.prop(view_layer_eevee, "use_pass_volume_scatter", text="Scatter") + + col = layout.column(heading="Other", align=True) col.prop(view_layer, "use_pass_emit", text="Emission") col.prop(view_layer, "use_pass_environment") col.prop(view_layer, "use_pass_shadow") @@ -146,14 +127,12 @@ class VIEWLAYER_PT_eevee_layer_passes_effects(ViewLayerButtonsPanel, Panel): layout.use_property_split = True layout.use_property_decorate = False - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - view_layer = context.view_layer view_layer_eevee = view_layer.eevee scene = context.scene scene_eevee = scene.eevee - col = flow.column() + col = layout.column() col.prop(view_layer_eevee, "use_pass_bloom", text="Bloom") col.active = scene_eevee.use_bloom diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index c0a2b8a1230..f0190e9ee13 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1687,18 +1687,15 @@ class SEQUENCER_PT_adjust_transform(SequencerButtonsPanel, Panel): layout = self.layout strip = act_strip(context) - layout.active = not strip.mute - - split = layout.split() + layout.use_property_split = True + layout.use_property_decorate = False - col = split.column() - col.alignment = 'RIGHT' - col.label(text="Mirror") + layout.active = not strip.mute - col = split.column() - row = col.row(align=True) - row.prop(strip, "use_flip_x", text="X", toggle=True) - row.prop(strip, "use_flip_y", text="Y", toggle=True) + row = layout.row(heading="Mirror") + sub = row.row(align=True) + sub.prop(strip, "use_flip_x", text="X", toggle=True) + sub.prop(strip, "use_flip_y", text="Y", toggle=True) class SEQUENCER_PT_adjust_video(SequencerButtonsPanel, Panel): @@ -1802,12 +1799,12 @@ class SEQUENCER_PT_cache_settings(SequencerButtonsPanel, Panel): ed = context.scene.sequence_editor - col = layout.column() + col = layout.column(heading="Cache", align=True) - col.prop(ed, "use_cache_raw") - col.prop(ed, "use_cache_preprocessed") - col.prop(ed, "use_cache_composite") - col.prop(ed, "use_cache_final") + col.prop(ed, "use_cache_raw", text="Raw") + col.prop(ed, "use_cache_preprocessed", text="Pre-Processed") + col.prop(ed, "use_cache_composite", text="Composite") + col.prop(ed, "use_cache_final", text="Final") col.separator() col.prop(ed, "recycle_max_cost") @@ -1871,21 +1868,19 @@ class SEQUENCER_PT_strip_proxy(SequencerButtonsPanel, Panel): flow = layout.column_flow() if ed.proxy_storage == 'PER_STRIP': - flow.prop(proxy, "use_proxy_custom_directory") - flow.prop(proxy, "use_proxy_custom_file") - + col = layout.column(heading="Custom Proxy") + col.prop(proxy, "use_proxy_custom_directory", text="Directory") if proxy.use_proxy_custom_directory and not proxy.use_proxy_custom_file: - flow.prop(proxy, "directory") + col.prop(proxy, "directory") + col.prop(proxy, "use_proxy_custom_file", text="File") if proxy.use_proxy_custom_file: - flow.prop(proxy, "filepath") + col.prop(proxy, "filepath") - box = layout.box() - row = box.row(align=True) - row.prop(strip.proxy, "build_25") - row.prop(strip.proxy, "build_75") - row = box.row(align=True) - row.prop(strip.proxy, "build_50") - row.prop(strip.proxy, "build_100") + row = layout.row(heading="Resolutions", align=True) + row.prop(strip.proxy, "build_25", toggle=True) + row.prop(strip.proxy, "build_75", toggle=True) + row.prop(strip.proxy, "build_50", toggle=True) + row.prop(strip.proxy, "build_100", toggle=True) layout.use_property_split = True layout.use_property_decorate = False @@ -1926,10 +1921,10 @@ class SEQUENCER_PT_strip_cache(SequencerButtonsPanel, Panel): strip = act_strip(context) layout.active = strip.override_cache_settings - col = layout.column() - col.prop(strip, "use_cache_raw") - col.prop(strip, "use_cache_preprocessed") - col.prop(strip, "use_cache_composite") + col = layout.column(heading="Cache") + col.prop(strip, "use_cache_raw", text="Raw") + col.prop(strip, "use_cache_preprocessed", text="Pre-Processed") + col.prop(strip, "use_cache_composite", text="Composite") class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index b7c5dcd5437..f6f22ad464f 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -129,18 +129,21 @@ class TEXT_PT_properties(Panel): layout.use_property_decorate = False st = context.space_data - flow = layout.column_flow() if not st.text: - flow.active = False - row = flow.row(align=True) + layout.active = False + st = context.space_data - row.prop(st, "show_margin", text="Margin") - rowsub = row.row() - rowsub.active = st.show_margin - rowsub.prop(st, "margin_column", text="") - flow.prop(st, "font_size") - flow.prop(st, "tab_width") + col = layout.column(align=False, heading="Margin") + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(st, "show_margin", text="") + sub = sub.row(align=True) + sub.active = st.show_margin + sub.prop(st, "margin_column", text="") + + layout.prop(st, "font_size") + layout.prop(st, "tab_width") text = st.text if text: diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 5c17c19e84b..8638f1a2a27 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -628,9 +628,10 @@ class _defs_edit_mesh: layout.prop(props, "vertex_only") layout.prop(props, "clamp_overlap") layout.prop(props, "loop_slide") - layout.prop(props, "mark_seam") - layout.prop(props, "mark_sharp") layout.prop(props, "harden_normals") + col = layout.column(heading="Mark") + col.prop(props, "mark_seam", text="Seam") + col.prop(props, "mark_sharp", text="Sharp") layout.prop(props, "material") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 10e7b43a310..7d01dfe7cec 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -200,19 +200,16 @@ class USERPREF_PT_interface_display(InterfacePanel, CenterAlignMixIn, Panel): prefs = context.preferences view = prefs.view - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(view, "ui_scale", text="Resolution Scale") - flow.prop(view, "ui_line_width", text="Line Width") - - layout.separator() + col = layout.column() - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + col.prop(view, "ui_scale", text="Resolution Scale") + col.prop(view, "ui_line_width", text="Line Width") + col.prop(view, "show_splash", text="Splash Screen") + col.prop(view, "show_developer_ui") - flow.prop(view, "show_splash", text="Splash Screen") - flow.prop(view, "show_tooltips") - flow.prop(view, "show_tooltips_python") - flow.prop(view, "show_developer_ui") + col = layout.column(heading="Tooltips") + col.prop(view, "show_tooltips") + col.prop(view, "show_tooltips_python") class USERPREF_PT_interface_text(InterfacePanel, CenterAlignMixIn, Panel): @@ -248,12 +245,11 @@ class USERPREF_PT_interface_translation(InterfacePanel, CenterAlignMixIn, Panel) layout.prop(view, "language") - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - flow.active = (bpy.app.translations.locale != 'en_US') - - flow.prop(view, "use_translate_tooltips", text="Tooltips") - flow.prop(view, "use_translate_interface", text="Interface") - flow.prop(view, "use_translate_new_dataname", text="New Data") + col = layout.column(heading="Affect") + col.active = (bpy.app.translations.locale != 'en_US') + col.prop(view, "use_translate_tooltips", text="Tooltips") + col.prop(view, "use_translate_interface", text="Interface") + col.prop(view, "use_translate_new_dataname", text="New Data") class USERPREF_PT_interface_editors(InterfacePanel, CenterAlignMixIn, Panel): @@ -264,14 +260,13 @@ class USERPREF_PT_interface_editors(InterfacePanel, CenterAlignMixIn, Panel): view = prefs.view system = prefs.system - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(system, "use_region_overlap") - flow.prop(view, "show_layout_ui", text="Corner Splitting") - flow.prop(view, "show_navigate_ui") - flow.prop(view, "color_picker_type") - flow.row().prop(view, "header_align") - flow.prop(view, "factor_display_type") + col = layout.column() + col.prop(system, "use_region_overlap") + col.prop(view, "show_layout_ui", text="Corner Splitting") + col.prop(view, "show_navigate_ui") + col.prop(view, "color_picker_type") + col.row().prop(view, "header_align") + col.prop(view, "factor_display_type") class USERPREF_PT_interface_temporary_windows(InterfacePanel, CenterAlignMixIn, Panel): @@ -283,10 +278,9 @@ class USERPREF_PT_interface_temporary_windows(InterfacePanel, CenterAlignMixIn, prefs = context.preferences view = prefs.view - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(view, "render_display_type", text="Render in") - flow.prop(view, "filebrowser_display_type", text="File Browser") + col = layout.column() + col.prop(view, "render_display_type", text="Render in") + col.prop(view, "filebrowser_display_type", text="File Browser") class USERPREF_PT_interface_menus(InterfacePanel, Panel): @@ -376,6 +370,8 @@ class USERPREF_PT_edit_objects_duplicate_data(EditingPanel, CenterAlignMixIn, Pa prefs = context.preferences edit = prefs.edit + layout.use_property_split = False + flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True) col = flow.column() @@ -409,10 +405,9 @@ class USERPREF_PT_edit_cursor(EditingPanel, CenterAlignMixIn, Panel): prefs = context.preferences edit = prefs.edit - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(edit, "use_mouse_depth_cursor") - flow.prop(edit, "use_cursor_lock_adjust") + col = layout.column() + col.prop(edit, "use_mouse_depth_cursor") + col.prop(edit, "use_cursor_lock_adjust") class USERPREF_PT_edit_gpencil(EditingPanel, CenterAlignMixIn, Panel): @@ -423,10 +418,9 @@ class USERPREF_PT_edit_gpencil(EditingPanel, CenterAlignMixIn, Panel): prefs = context.preferences edit = prefs.edit - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance") - flow.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance") + col = layout.column(heading="Distance") + col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan") + col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean") class USERPREF_PT_edit_annotations(EditingPanel, CenterAlignMixIn, Panel): @@ -436,10 +430,9 @@ class USERPREF_PT_edit_annotations(EditingPanel, CenterAlignMixIn, Panel): prefs = context.preferences edit = prefs.edit - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(edit, "grease_pencil_default_color", text="Default Color") - flow.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius") + col = layout.column() + col.prop(edit, "grease_pencil_default_color", text="Default Color") + col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius") class USERPREF_PT_edit_weight_paint(EditingPanel, CenterAlignMixIn, Panel): @@ -450,6 +443,8 @@ class USERPREF_PT_edit_weight_paint(EditingPanel, CenterAlignMixIn, Panel): prefs = context.preferences view = prefs.view + layout.use_property_split = False + layout.prop(view, "use_weight_color_range", text="Use Custom Colors") col = layout.column() @@ -465,10 +460,9 @@ class USERPREF_PT_edit_misc(EditingPanel, CenterAlignMixIn, Panel): prefs = context.preferences edit = prefs.edit - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") - flow.prop(edit, "node_margin", text="Node Auto-offset Margin") + col = layout.column() + col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") + col.prop(edit, "node_margin", text="Node Auto-offset Margin") # ----------------------------------------------------------------------------- @@ -488,20 +482,16 @@ class USERPREF_PT_animation_timeline(AnimationPanel, CenterAlignMixIn, Panel): view = prefs.view edit = prefs.edit - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - flow.prop(edit, "use_negative_frames") - - layout.separator() - - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + col = layout.column() + col.prop(edit, "use_negative_frames") - flow.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing") - flow.prop(view, "timecode_style") - flow.prop(view, "view_frame_type") + col.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing") + col.prop(view, "timecode_style") + col.prop(view, "view_frame_type") if view.view_frame_type == 'SECONDS': - flow.prop(view, "view_frame_seconds") + col.prop(view, "view_frame_seconds") elif view.view_frame_type == 'KEYFRAMES': - flow.prop(view, "view_frame_keyframes") + col.prop(view, "view_frame_keyframes") class USERPREF_PT_animation_keyframes(AnimationPanel, CenterAlignMixIn, Panel): @@ -511,25 +501,14 @@ class USERPREF_PT_animation_keyframes(AnimationPanel, CenterAlignMixIn, Panel): prefs = context.preferences edit = prefs.edit - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(edit, "use_visual_keying") - flow.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed") - - -class USERPREF_PT_animation_autokey(AnimationPanel, CenterAlignMixIn, Panel): - bl_label = "Auto-Keyframing" - bl_parent_id = "USERPREF_PT_animation_keyframes" - - def draw_centered(self, context, layout): - prefs = context.preferences - edit = prefs.edit - - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + col = layout.column() + col.prop(edit, "use_visual_keying") + col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed") - flow.prop(edit, "use_auto_keying_warning", text="Show Warning") - flow.prop(edit, "use_keyframe_insert_available", text="Only Insert Available") - flow.prop(edit, "use_auto_keying", text="Enable in New Scenes") + col = layout.column(heading="Auto-Keyframing") + col.prop(edit, "use_auto_keying_warning", text="Show Warning") + col.prop(edit, "use_keyframe_insert_available", text="Only Insert Available") + col.prop(edit, "use_auto_keying", text="Enable in New Scenes") class USERPREF_PT_animation_fcurves(AnimationPanel, CenterAlignMixIn, Panel): @@ -604,33 +583,36 @@ class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel): system = prefs.system edit = prefs.edit - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(edit, "undo_steps", text="Undo Steps") - flow.prop(edit, "undo_memory_limit", text="Undo Memory Limit") - flow.prop(edit, "use_global_undo") + col = layout.column() + col.prop(edit, "undo_steps", text="Undo Steps") + col.prop(edit, "undo_memory_limit", text="Undo Memory Limit") + col.prop(edit, "use_global_undo") layout.separator() - flow.prop(system, "texture_time_out", text="Texture Time Out") - flow.prop(system, "texture_collection_rate", text="Garbage Collection Rate") + col = layout.column() + col.prop(system, "memory_cache_limit", text="Sequencer Cache Limit") + col.prop(system, "scrollback", text="Console Scrollback Lines") layout.separator() - flow.prop(system, "vbo_time_out", text="Vbo Time Out") - flow.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") + col = layout.column() + col.prop(system, "use_sequencer_disk_cache") + col.prop(system, "sequencer_disk_cache_dir") + col.prop(system, "sequencer_disk_cache_size_limit") + col.prop(system, "sequencer_disk_cache_compression") layout.separator() - flow.prop(system, "scrollback", text="Console Scrollback Lines") + col = layout.column() + col.prop(system, "texture_time_out", text="Texture Time Out") + col.prop(system, "texture_collection_rate", text="Garbage Collection Rate") layout.separator() - flow.prop(system, "memory_cache_limit", text="Sequencer Cache Limit") - flow.prop(system, "use_sequencer_disk_cache") - flow.prop(system, "sequencer_disk_cache_dir") - flow.prop(system, "sequencer_disk_cache_size_limit") - flow.prop(system, "sequencer_disk_cache_compression") + col = layout.column() + col.prop(system, "vbo_time_out", text="Vbo Time Out") + col.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") # ----------------------------------------------------------------------------- @@ -649,23 +631,19 @@ class USERPREF_PT_viewport_display(ViewportPanel, CenterAlignMixIn, Panel): prefs = context.preferences view = prefs.view - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(view, "show_object_info", text="Object Info") - flow.prop(view, "show_view_name", text="View Name") - flow.prop(view, "show_playback_fps", text="Playback FPS") + col = layout.column(heading="Show") + col.prop(view, "show_object_info", text="Object Info") + col.prop(view, "show_view_name", text="View Name") + col.prop(view, "show_playback_fps", text="Playback FPS") layout.separator() - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - col = flow.column() + col = layout.column() col.prop(view, "gizmo_size") col.prop(view, "lookdev_sphere_size") - flow.separator() + col.separator() - col = flow.column() col.prop(view, "mini_axis_type", text="3D Viewport Axis") if view.mini_axis_type == 'MINIMAL': @@ -680,11 +658,12 @@ class USERPREF_PT_viewport_quality(ViewportPanel, CenterAlignMixIn, Panel): prefs = context.preferences system = prefs.system - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + col = layout.column() + col.prop(system, "viewport_aa") - flow.prop(system, "viewport_aa") - flow.prop(system, "use_overlay_smooth_wire") - flow.prop(system, "use_edit_mode_smooth_wire") + col = layout.column(heading="Smooth Wires") + col.prop(system, "use_overlay_smooth_wire", text="Overlay") + col.prop(system, "use_edit_mode_smooth_wire", text="Edit Mode") class USERPREF_PT_viewport_textures(ViewportPanel, CenterAlignMixIn, Panel): @@ -694,12 +673,11 @@ class USERPREF_PT_viewport_textures(ViewportPanel, CenterAlignMixIn, Panel): prefs = context.preferences system = prefs.system - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(system, "gl_texture_limit", text="Limit Size") - flow.prop(system, "anisotropic_filter") - flow.prop(system, "gl_clip_alpha", slider=True) - flow.prop(system, "image_draw_method", text="Image Display Method") + col = layout.column() + col.prop(system, "gl_texture_limit", text="Limit Size") + col.prop(system, "anisotropic_filter") + col.prop(system, "gl_clip_alpha", slider=True) + col.prop(system, "image_draw_method", text="Image Display Method") class USERPREF_PT_viewport_selection(ViewportPanel, CenterAlignMixIn, Panel): @@ -710,9 +688,7 @@ class USERPREF_PT_viewport_selection(ViewportPanel, CenterAlignMixIn, Panel): prefs = context.preferences system = prefs.system - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(system, "use_select_pick_depth") + layout.prop(system, "use_select_pick_depth") # ----------------------------------------------------------------------------- @@ -1320,37 +1296,40 @@ class USERPREF_PT_saveload_blend(SaveLoadPanel, CenterAlignMixIn, Panel): paths = prefs.filepaths view = prefs.view - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(paths, "use_relative_paths") - flow.prop(paths, "use_file_compression") - flow.prop(paths, "use_load_ui") - flow.prop(paths, "use_save_preview_images") - flow.prop(paths, "use_tabs_as_spaces") - flow.prop(view, "use_save_prompt") + col = layout.column(heading="Save") + col.prop(view, "use_save_prompt") + col.prop(paths, "use_save_preview_images") - layout.separator() + col = layout.column(heading="Default to") + col.prop(paths, "use_relative_paths") + col.prop(paths, "use_file_compression") + col.prop(paths, "use_load_ui") - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + col = layout.column(heading="Text Files") + col.prop(paths, "use_tabs_as_spaces") - flow.prop(paths, "save_version") - flow.prop(paths, "recent_files") + col = layout.column() + col.prop(paths, "save_version") + col.prop(paths, "recent_files") class USERPREF_PT_saveload_blend_autosave(SaveLoadPanel, CenterAlignMixIn, Panel): bl_label = "Auto Save" bl_parent_id = "USERPREF_PT_saveload_blend" - def draw_centered(self, context, layout): + def draw_header(self, context): prefs = context.preferences paths = prefs.filepaths - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + self.layout.prop(paths, "use_auto_save_temporary_files", text="") - flow.prop(paths, "use_auto_save_temporary_files") - sub = flow.column() - sub.active = paths.use_auto_save_temporary_files - sub.prop(paths, "auto_save_time", text="Timer (mins)") + def draw_centered(self, context, layout): + prefs = context.preferences + paths = prefs.filepaths + + col = layout.column() + col.active = paths.use_auto_save_temporary_files + col.prop(paths, "auto_save_time", text="Timer (mins)") class USERPREF_PT_saveload_file_browser(SaveLoadPanel, CenterAlignMixIn, Panel): @@ -1360,12 +1339,13 @@ class USERPREF_PT_saveload_file_browser(SaveLoadPanel, CenterAlignMixIn, Panel): prefs = context.preferences paths = prefs.filepaths - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + col = layout.column() + col.prop(paths, "use_filter_files") - flow.prop(paths, "use_filter_files") - flow.prop(paths, "show_hidden_files_datablocks") - flow.prop(paths, "hide_recent_locations") - flow.prop(paths, "hide_system_bookmarks") + col = layout.column(heading="Hide") + col.prop(paths, "show_hidden_files_datablocks", text="Dot File & Datablocks") + col.prop(paths, "hide_recent_locations", text="Recent Locations") + col.prop(paths, "hide_system_bookmarks", text="System Bookmarks") # ----------------------------------------------------------------------------- @@ -1424,10 +1404,9 @@ class USERPREF_PT_input_tablet(InputPanel, CenterAlignMixIn, Panel): layout.prop(inputs, "tablet_api") layout.separator() - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(inputs, "pressure_threshold_max") - flow.prop(inputs, "pressure_softness") + col = layout.column() + col.prop(inputs, "pressure_threshold_max") + col.prop(inputs, "pressure_softness") class USERPREF_PT_input_ndof(InputPanel, CenterAlignMixIn, Panel): @@ -1474,24 +1453,27 @@ class USERPREF_PT_navigation_orbit(NavigationPanel, CenterAlignMixIn, Panel): inputs = prefs.inputs view = prefs.view - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + col = layout.column() - flow.row().prop(inputs, "view_rotate_method", expand=True) + col.row().prop(inputs, "view_rotate_method", expand=True) if inputs.view_rotate_method == 'TURNTABLE': - flow.prop(inputs, "view_rotate_sensitivity_turntable") + col.prop(inputs, "view_rotate_sensitivity_turntable") else: - flow.prop(inputs, "view_rotate_sensitivity_trackball") + col.prop(inputs, "view_rotate_sensitivity_trackball") + col.prop(inputs, "use_rotate_around_active") + + col.separator() - flow.prop(inputs, "use_rotate_around_active") - flow.prop(inputs, "use_auto_perspective") - flow.prop(inputs, "use_mouse_depth_navigate") if sys.platform == "darwin": - flow.prop(inputs, "use_trackpad_natural", text="Natural Trackpad Direction") + col.prop(inputs, "use_trackpad_natural", text="Natural Trackpad Direction") - flow.separator() + col = layout.column(heading="Auto") + col.prop(inputs, "use_auto_perspective", text="Perspective") + col.prop(inputs, "use_mouse_depth_navigate", text="Depth") - flow.prop(view, "smooth_view") - flow.prop(view, "rotation_angle") + col = layout.column() + col.prop(view, "smooth_view") + col.prop(view, "rotation_angle") class USERPREF_PT_navigation_zoom(NavigationPanel, CenterAlignMixIn, Panel): @@ -1501,16 +1483,20 @@ class USERPREF_PT_navigation_zoom(NavigationPanel, CenterAlignMixIn, Panel): prefs = context.preferences inputs = prefs.inputs - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + col = layout.column() - flow.row().prop(inputs, "view_zoom_method", text="Zoom Method") + col.row().prop(inputs, "view_zoom_method", text="Zoom Method") if inputs.view_zoom_method in {'DOLLY', 'CONTINUE'}: - flow.row().prop(inputs, "view_zoom_axis") - flow.prop(inputs, "invert_mouse_zoom", text="Invert Mouse Zoom Direction") + col.row().prop(inputs, "view_zoom_axis") + col.prop(inputs, "use_zoom_to_mouse") + col = layout.column(heading="Invert Zoom Direction", align=True) + col.prop(inputs, "invert_mouse_zoom", text="Mouse") + col.prop(inputs, "invert_zoom_wheel", text="Wheel") + else: + col.prop(inputs, "use_zoom_to_mouse") + col.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction") - flow.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction") # sub.prop(view, "wheel_scroll_lines", text="Scroll Lines") - flow.prop(inputs, "use_zoom_to_mouse") class USERPREF_PT_navigation_fly_walk(NavigationPanel, CenterAlignMixIn, Panel): @@ -1541,15 +1527,14 @@ class USERPREF_PT_navigation_fly_walk_navigation(NavigationPanel, CenterAlignMix inputs = prefs.inputs walk = inputs.walk_navigation - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(walk, "use_mouse_reverse") - flow.prop(walk, "mouse_speed") - flow.prop(walk, "teleport_time") + col = layout.column() + col.prop(walk, "use_mouse_reverse") + col.prop(walk, "mouse_speed") + col.prop(walk, "teleport_time") - sub = flow.column(align=True) - sub.prop(walk, "walk_speed") - sub.prop(walk, "walk_speed_factor") + col = layout.column(align=True) + col.prop(walk, "walk_speed") + col.prop(walk, "walk_speed_factor") class USERPREF_PT_navigation_fly_walk_gravity(NavigationPanel, CenterAlignMixIn, Panel): @@ -1576,10 +1561,9 @@ class USERPREF_PT_navigation_fly_walk_gravity(NavigationPanel, CenterAlignMixIn, layout.active = walk.use_gravity - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(walk, "view_height") - flow.prop(walk, "jump_height") + col = layout.column() + col.prop(walk, "view_height") + col.prop(walk, "jump_height") # Special case, this is only exposed as a popover. @@ -2124,7 +2108,7 @@ class ExperimentalPanel: experimental = prefs.experimental layout = self.layout - layout.use_property_split = True + layout.use_property_split = False layout.use_property_decorate = False for prop_keywords, task in items: diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 9381a591a4c..b3cf06b77b3 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5396,8 +5396,8 @@ class VIEW3D_PT_view3d_properties(Panel): layout.use_property_split = True layout.use_property_decorate = False # No animation. - flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) - col = flow.column() + + col = layout.column() subcol = col.column() subcol.active = bool(view.region_3d.view_perspective != 'CAMERA' or view.region_quadviews) @@ -5409,14 +5409,16 @@ class VIEW3D_PT_view3d_properties(Panel): subcol.separator() - col = flow.column() - - subcol = col.column() - subcol.prop(view, "use_local_camera") + col = layout.column() - subcol = col.column() - subcol.enabled = view.use_local_camera - subcol.prop(view, "camera", text="Local Camera") + col = layout.column(align=False, heading="Local Camera") + col.use_property_decorate = False + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(view, "use_local_camera", text="") + sub = sub.row(align=True) + sub.enabled = view.use_local_camera + sub.prop(view, "camera", text="") subcol = col.column(align=True) subcol.prop(view, "use_render_border") @@ -5439,23 +5441,24 @@ class VIEW3D_PT_view3d_lock(Panel): view = context.space_data col = layout.column(align=True) - subcol = col.column() - subcol.active = bool(view.region_3d.view_perspective != 'CAMERA' or view.region_quadviews) + sub = col.column() + sub.active = bool(view.region_3d.view_perspective != 'CAMERA' or view.region_quadviews) - subcol.prop(view, "lock_object") + sub.prop(view, "lock_object") lock_object = view.lock_object if lock_object: if lock_object.type == 'ARMATURE': - subcol.prop_search( + sub.prop_search( view, "lock_bone", lock_object.data, "edit_bones" if lock_object.mode == 'EDIT' else "bones", text="", ) else: - subcol.prop(view, "lock_cursor", text="Lock to 3D Cursor") + subcol = sub.column(heading="Lock") + subcol.prop(view, "lock_cursor", text="To 3D Cursor") - col.prop(view, "lock_camera") + col.prop(view, "lock_camera", text="Camera to View") class VIEW3D_PT_view3d_cursor(Panel): diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 6aaeec3f3cf..04a3e6f62ea 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -125,21 +125,15 @@ class View3DPanel: # Used by vertex & weight paint def draw_vpaint_symmetry(layout, vpaint): - split = layout.split() - - col = split.column() - col.alignment = 'RIGHT' - col.label(text="Mirror") + col = layout.column() + col.use_property_split = True + col.use_property_decorate = False - col = split.column() - row = col.row(align=True) + row = col.row(heading="Mirror", align=True) row.prop(vpaint, "use_symmetry_x", text="X", toggle=True) row.prop(vpaint, "use_symmetry_y", text="Y", toggle=True) row.prop(vpaint, "use_symmetry_z", text="Z", toggle=True) - col = layout.column() - col.use_property_split = True - col.use_property_decorate = False col.prop(vpaint, "radial_symmetry", text="Radial") @@ -179,10 +173,10 @@ class VIEW3D_PT_tools_object_options_transform(View3DPanel, Panel): tool_settings = context.tool_settings - layout.label(text="Affect Only") - layout.prop(tool_settings, "use_transform_data_origin", text="Origins") - layout.prop(tool_settings, "use_transform_pivot_point_align", text="Locations") - layout.prop(tool_settings, "use_transform_skip_children", text="Parents") + col = layout.column(heading="Affect Only", align=True) + col.prop(tool_settings, "use_transform_data_origin", text="Origins") + col.prop(tool_settings, "use_transform_pivot_point_align", text="Locations") + col.prop(tool_settings, "use_transform_skip_children", text="Parents") # ********** default tools for editmode_mesh **************** @@ -209,16 +203,11 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): split = layout.split() - col = split.column() - col.alignment = 'RIGHT' - col.label(text="Mirror") - - col = split.column() - - row = col.row(align=True) - row.prop(mesh, "use_mirror_x", text="X", toggle=True) - row.prop(mesh, "use_mirror_y", text="Y", toggle=True) - row.prop(mesh, "use_mirror_z", text="Z", toggle=True) + row = layout.row(heading="Mirror") + sub = row.row(align=True) + sub.prop(mesh, "use_mirror_x", text="X", toggle=True) + sub.prop(mesh, "use_mirror_y", text="Y", toggle=True) + sub.prop(mesh, "use_mirror_z", text="Z", toggle=True) row = layout.row(align=True) row.active = ob.data.use_mirror_x or ob.data.use_mirror_y or ob.data.use_mirror_z @@ -872,10 +861,13 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel): col.prop(mesh, "remesh_voxel_adaptivity") col.prop(mesh, "use_remesh_fix_poles") col.prop(mesh, "use_remesh_smooth_normals") - col.prop(mesh, "use_remesh_preserve_volume") - col.prop(mesh, "use_remesh_preserve_paint_mask") - col.prop(mesh, "use_remesh_preserve_sculpt_face_sets") - col.operator("object.voxel_remesh", text="Remesh") + + col = layout.column(heading="Preserve", align=True) + col.prop(mesh, "use_remesh_preserve_volume", text="Volume") + col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask") + col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets") + + layout.operator("object.voxel_remesh", text="Remesh") # TODO, move to space_view3d.py @@ -896,23 +888,19 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): tool_settings = context.tool_settings sculpt = tool_settings.sculpt - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - - col = flow.column() + col = layout.column(heading="Display", align=True) col.prop(sculpt, "use_threaded", text="Threaded Sculpt") - col = flow.column() col.prop(sculpt, "show_low_resolution") - col = flow.column() col.prop(sculpt, "use_sculpt_delay_updates") - col = flow.column() col.prop(sculpt, "use_deform_only") - col = flow.column() col.separator() - col.prop(sculpt, "use_automasking_topology") - col.prop(sculpt, "use_automasking_face_sets") - col.prop(sculpt, "use_automasking_boundary_edges") - col.prop(sculpt, "use_automasking_boundary_face_sets") + + 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="Boundary Edges") + col.prop(sculpt, "use_automasking_boundary_face_sets", text="Boundary Face Sets") class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel): @@ -955,61 +943,34 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel): def draw(self, context): layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False sculpt = context.tool_settings.sculpt - split = layout.split() - - col = split.column() - col.alignment = 'RIGHT' - col.label(text="Mirror") - - col = split.column() - - row = col.row(align=True) + row = layout.row(align=True, heading="Mirror") row.prop(sculpt, "use_symmetry_x", text="X", toggle=True) row.prop(sculpt, "use_symmetry_y", text="Y", toggle=True) row.prop(sculpt, "use_symmetry_z", text="Z", toggle=True) - split = layout.split() - - col = split.column() - col.alignment = 'RIGHT' - col.label(text="Lock") - - col = split.column() - - row = col.row(align=True) + row = layout.row(align=True, heading="Lock") row.prop(sculpt, "lock_x", text="X", toggle=True) row.prop(sculpt, "lock_y", text="Y", toggle=True) row.prop(sculpt, "lock_z", text="Z", toggle=True) - split = layout.split() - - col = split.column() - col.alignment = 'RIGHT' - col.label(text="Tiling") - - col = split.column() - - row = col.row(align=True) + row = layout.row(align=True, heading="Tiling") row.prop(sculpt, "tile_x", text="X", toggle=True) row.prop(sculpt, "tile_y", text="Y", toggle=True) row.prop(sculpt, "tile_z", text="Z", toggle=True) - layout.use_property_split = True - layout.use_property_decorate = False - layout.prop(sculpt, "use_symmetry_feather", text="Feather") - layout.column().prop(sculpt, "radial_symmetry", text="Radial") - layout.column().prop(sculpt, "tile_offset", text="Tile Offset") + layout.prop(sculpt, "radial_symmetry", text="Radial") + layout.prop(sculpt, "tile_offset", text="Tile Offset") layout.separator() - col = layout.column() - - col.prop(sculpt, "symmetrize_direction") - col.operator("sculpt.symmetrize") + layout.prop(sculpt, "symmetrize_direction") + layout.operator("sculpt.symmetrize") class VIEW3D_PT_sculpt_symmetry_for_topbar(Panel): @@ -1212,12 +1173,8 @@ class VIEW3D_PT_tools_imagepaint_options(View3DPaintPanel, Panel): layout.prop(ipaint, "seam_bleed") layout.prop(ipaint, "dither", slider=True) - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - - col = flow.column() + col = layout.column() col.prop(ipaint, "use_occlude") - - col = flow.column() col.prop(ipaint, "use_backface_culling", text="Backface Culling") -- cgit v1.2.3 From 398d0bf57e7cf790c56884b980117b3d6c8beba6 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 17 Apr 2020 17:08:07 +0200 Subject: Fix python registration error in previous commit --- release/scripts/startup/bl_ui/space_userpref.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 7d01dfe7cec..e1b4e98e09a 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2186,7 +2186,6 @@ classes = ( USERPREF_PT_animation_timeline, USERPREF_PT_animation_keyframes, - USERPREF_PT_animation_autokey, USERPREF_PT_animation_fcurves, USERPREF_PT_system_cycles_devices, -- cgit v1.2.3 From e4915730605568816033a141af28bd27124e3abf Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 17 Apr 2020 17:56:54 +0200 Subject: Fix poor video sequencer preferences UI layout Sequencer related properties were not grouped together, and it wasn't clear that the disk cache settings were about the sequencer. Now moved sequencer settings into own panel. --- release/scripts/startup/bl_ui/space_userpref.py | 42 ++++++++++++++++--------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 179b3612a62..3d579053a97 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -559,6 +559,7 @@ class SystemPanel: class USERPREF_PT_system_sound(SystemPanel, CenterAlignMixIn, Panel): bl_label = "Sound" + bl_options = {'DEFAULT_CLOSED'} def draw_centered(self, context, layout): prefs = context.preferences @@ -604,33 +605,43 @@ class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel): system = prefs.system edit = prefs.edit - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) - - flow.prop(edit, "undo_steps", text="Undo Steps") - flow.prop(edit, "undo_memory_limit", text="Undo Memory Limit") - flow.prop(edit, "use_global_undo") + layout.prop(edit, "undo_steps", text="Undo Steps") + layout.prop(edit, "undo_memory_limit", text="Undo Memory Limit") + layout.prop(edit, "use_global_undo") layout.separator() - flow.prop(system, "texture_time_out", text="Texture Time Out") - flow.prop(system, "texture_collection_rate", text="Garbage Collection Rate") + layout.prop(system, "texture_time_out", text="Texture Time Out") + layout.prop(system, "texture_collection_rate", text="Garbage Collection Rate") layout.separator() - flow.prop(system, "vbo_time_out", text="Vbo Time Out") - flow.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") + layout.prop(system, "vbo_time_out", text="Vbo Time Out") + layout.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") layout.separator() - flow.prop(system, "scrollback", text="Console Scrollback Lines") + layout.prop(system, "scrollback", text="Console Scrollback Lines") + + +class USERPREF_PT_system_video_sequencer(SystemPanel, CenterAlignMixIn, Panel): + bl_label = "Video Sequencer" + + def draw_centered(self, context, layout): + prefs = context.preferences + system = prefs.system + edit = prefs.edit + + layout.prop(system, "memory_cache_limit") layout.separator() - flow.prop(system, "memory_cache_limit", text="Sequencer Cache Limit") - flow.prop(system, "use_sequencer_disk_cache") - flow.prop(system, "sequencer_disk_cache_dir") - flow.prop(system, "sequencer_disk_cache_size_limit") - flow.prop(system, "sequencer_disk_cache_compression") + layout.prop(system, "use_sequencer_disk_cache") + col = layout.column() + col.active = system.use_sequencer_disk_cache + col.prop(system, "sequencer_disk_cache_dir", text="Directory") + col.prop(system, "sequencer_disk_cache_size_limit", text="Cache Limit") + col.prop(system, "sequencer_disk_cache_compression", text="Compression") # ----------------------------------------------------------------------------- @@ -2217,6 +2228,7 @@ classes = ( USERPREF_PT_system_cycles_devices, USERPREF_PT_system_memory, + USERPREF_PT_system_video_sequencer, USERPREF_PT_system_sound, USERPREF_MT_interface_theme_presets, -- cgit v1.2.3 From f2acfb460f991924917113ca085e0dd9b0babed7 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Fri, 17 Apr 2020 20:43:12 +0200 Subject: UI: Add separator after Local Camera row --- release/scripts/startup/bl_ui/space_view3d.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b3cf06b77b3..9a46d7a6e82 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5407,9 +5407,7 @@ class VIEW3D_PT_view3d_properties(Panel): subcol.prop(view, "clip_start", text="Clip Start") subcol.prop(view, "clip_end", text="End") - subcol.separator() - - col = layout.column() + layout.separator() col = layout.column(align=False, heading="Local Camera") col.use_property_decorate = False @@ -5420,9 +5418,11 @@ class VIEW3D_PT_view3d_properties(Panel): sub.enabled = view.use_local_camera sub.prop(view, "camera", text="") - subcol = col.column(align=True) - subcol.prop(view, "use_render_border") - subcol.active = view.region_3d.view_perspective != 'CAMERA' + layout.separator() + + col = layout.column(align=True) + col.prop(view, "use_render_border") + col.active = view.region_3d.view_perspective != 'CAMERA' class VIEW3D_PT_view3d_lock(Panel): -- cgit v1.2.3 From 0fe8239470ac2bda7c09078160e11d10ee13dc69 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Fri, 17 Apr 2020 22:05:22 +0200 Subject: UI: Make headings fit within regular Properties width Before recent changes, we used Min/Max here too. --- release/scripts/startup/bl_ui/properties_physics_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 2f4a60f622e..0cd99efcca9 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -342,7 +342,7 @@ def basic_force_field_falloff_ui(self, field): col.prop(field, "z_direction") col.prop(field, "falloff_power", text="Power") - col = layout.column(align=False, heading="Minimum Distance") + col = layout.column(align=False, heading="Min Distance") col.use_property_decorate = False row = col.row(align=True) sub = row.row(align=True) @@ -352,7 +352,7 @@ def basic_force_field_falloff_ui(self, field): sub.prop(field, "distance_min", text="") row.prop_decorator(field, "distance_min") - col = layout.column(align=False, heading="Maximum Distance") + col = layout.column(align=False, heading="Max Distance") col.use_property_decorate = False row = col.row(align=True) sub = row.row(align=True) -- cgit v1.2.3 From fda754145ae5a63c95942ded70e9713f06a48818 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 18 Apr 2020 10:47:25 +0200 Subject: Annotations: Add Onion Skin support in VSE This was removed in previous versions, but can be useful in some situations. --- .../bl_ui/properties_grease_pencil_common.py | 2 +- release/scripts/startup/bl_ui/space_sequencer.py | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 5647f35383a..0f6a51ad2d0 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -520,7 +520,7 @@ class AnnotationOnionSkin: if gpl is None: return False - return True + return True def draw_header(self, context): gpl = context.active_annotation_layer diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index f0190e9ee13..0e2af8f8f2f 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -29,6 +29,7 @@ from bpy.app.translations import ( ) from bl_ui.properties_grease_pencil_common import ( AnnotationDataPanel, + AnnotationOnionSkin, ) from bl_ui.space_toolsystem_common import ( ToolActivePanelHelper, @@ -2157,6 +2158,33 @@ class SEQUENCER_PT_annotation(AnnotationDataPanel, SequencerButtonsPanel_Output, # But, it should only show up when there are images in the preview region +class SEQUENCER_PT_annotation_onion(AnnotationOnionSkin, SequencerButtonsPanel_Output, Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'UI' + bl_category = "View" + + @staticmethod + def has_preview(context): + st = context.space_data + return st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} + + @classmethod + def poll(cls, context): + if context.annotation_data_owner is None: + return False + elif type(context.annotation_data_owner) is bpy.types.Object: + return False + else: + gpl = context.active_annotation_layer + if gpl is None: + return False + + return cls.has_preview(context) + + # NOTE: this is just a wrapper around the generic GP Panel + # But, it should only show up when there are images in the preview region + + class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} _context_path = "scene.sequence_editor.active_strip" @@ -2230,6 +2258,7 @@ classes = ( SEQUENCER_PT_view_safe_areas_center_cut, SEQUENCER_PT_annotation, + SEQUENCER_PT_annotation_onion, ) if __name__ == "__main__": # only for live edit. -- cgit v1.2.3 From bfdcb6bed65b3d16aca7147b95a4b109dd6b8987 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 18 Apr 2020 16:18:17 +0200 Subject: GPencil: Add header to Use Lights This use the new header column --- release/scripts/startup/bl_ui/properties_object.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 4beef62608d..8ce53ed30eb 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -369,6 +369,7 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): col.prop(ob, "hide_render", text="Renders", toggle=False, invert_checkbox=True) if context.object.type == 'GPENCIL': + col = layout.column(heading="Grease Pencil") col.prop(ob, "use_grease_pencil_lights", toggle=False) -- cgit v1.2.3 From a0a59972e7e526ce3c49878f4607acbae8508e7a Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sun, 19 Apr 2020 15:03:44 +0200 Subject: Fix T75878: Modifiers disappearing from UI Typo in 4f9a56cbc4e8. --- release/scripts/startup/bl_ui/properties_data_modifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 571811e49d6..b9fc7431a9a 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1387,7 +1387,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if md.mask_tex_mapping == 'OBJECT': layout.prop(md, "mask_tex_map_object", text="Object") - obj = md.mask_text_map_object + obj = md.mask_tex_map_object if obj and obj.type == 'ARMATURE': layout.prop_search(md, "mask_tex_map_bone", obj.data, "bones", text="Bone") elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': -- cgit v1.2.3 From a39a6517af6603fcb16728daed88b642c88aa6eb Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Sun, 19 Apr 2020 17:25:36 +0200 Subject: GPencil: Add Texture modifier This patch aims to add a new modifier for grease pencil objects that gives more control over the strokes texture UVs. There are 3 modes. 1 Control the stroke texture UVs alone 2 Control the fill texture UVs alone 3 Control both the fill and stroke texture UVs For the stroke texture UVs there are 2 options for fitting the texture to the stroke. 1 The texture uvs are kept a consistent length how it currently is set by default. 2 The uvs are normalized to fit the length of the stroke regardless of how long or short it gets allowing the texture to fit the length of the stroke. There are then 2 controls to scale up and down the uvs and an offset value that allows moving the texture along the stroke. For the fill texture UVs it includes all of the transformational controls. Location offset, scale, and rotation. Reviewed By: antoniov, mendio Differential Revision: https://developer.blender.org/D7439 --- .../startup/bl_ui/properties_data_modifier.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index b9fc7431a9a..03debee4384 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1976,6 +1976,27 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): self.gpencil_masking(layout, ob, md, True, True) + def GP_TEXTURE(self, layout, ob, md): + col = layout.column() + + col.prop(md, "mode") + if md.mode in {'STROKE', 'STROKE_AND_FILL'}: + col.label(text="Stroke Texture Control:") + col.prop(md, "fit_method") + col.prop(md, "uv_offset") + col.prop(md, "uv_scale") + + if md.mode == 'STROKE_AND_FILL': + col.separator() + + if md.mode in {'FILL', 'STROKE_AND_FILL'}: + col.label(text="Fill Texture Control:") + col.prop(md, "fill_rotation", text="Rotation") + col.prop(md, "fill_offset", text="Location") + col.prop(md, "fill_scale", text="Scale") + + self.gpencil_masking(layout, ob, md, True) + def GP_TINT(self, layout, ob, md): layout.row().prop(md, "tint_type", expand=True) -- cgit v1.2.3 From 1760b8c59fa76a5c0cd0ef5d386d876cdf767de2 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sun, 19 Apr 2020 15:03:44 +0200 Subject: Fix T75878: Modifiers disappearing from UI Typo in 4f9a56cbc4e8. --- release/scripts/startup/bl_ui/properties_data_modifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 571811e49d6..b9fc7431a9a 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1387,7 +1387,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if md.mask_tex_mapping == 'OBJECT': layout.prop(md, "mask_tex_map_object", text="Object") - obj = md.mask_text_map_object + obj = md.mask_tex_map_object if obj and obj.type == 'ARMATURE': layout.prop_search(md, "mask_tex_map_bone", obj.data, "bones", text="Bone") elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': -- cgit v1.2.3 From 6c4a7e0ac341b05d8fc8e15ed8e645a4936da9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Sun, 19 Apr 2020 19:43:05 +0200 Subject: Fluid: Added missing outflow object type to enable / disable flow flag There is no reason to not include outflow objects here too. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 960d2dff101..d6d2526384a 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -236,8 +236,8 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col = grid.column() col.prop(flow, "flow_behavior", expand=False) - if flow.flow_behavior in {'INFLOW'}: - col.prop(flow, "use_inflow", text="Use Inflow") + if flow.flow_behavior in {'INFLOW', 'OUTFLOW'}: + col.prop(flow, "use_inflow", text="Use Flow") col.prop(flow, "subframes", text="Sampling Substeps") -- cgit v1.2.3 From 2b2d3c14fe1a29da0ec01198cec2c0593c38391a Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 20 Apr 2020 12:56:16 +0200 Subject: Simulations: Embed simulation node tree in simulation data block This adds an embedded node tree to the simulation data block dna. The UI in the `Simulation Editor` has been updated to show a list of simulation data blocks, instead of individual node trees. The new `SpaceNodeEditor.simulation` property wraps the existing `SpaceNodeEditor.id` property. It allows scripts to get and set the simulation data block that is being edited. Reviewers: brecht, mont29 Differential Revision: https://developer.blender.org/D7301 --- release/scripts/startup/bl_ui/space_node.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index bdda0ebbe9a..b5926692324 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -151,6 +151,14 @@ class NODE_HT_header(Header): if snode_id: layout.prop(snode_id, "use_nodes") + elif snode.tree_type == 'SimulationNodeTree': + row = layout.row(align=True) + row.prop(snode, "simulation", text="") + row.operator("simulation.new", text="", icon='ADD') + simulation = snode.simulation + if simulation: + row.prop(snode.simulation, "use_fake_user", text="") + else: # Custom node tree is edited as independent ID block NODE_MT_editor_menus.draw_collapsible(context, layout) -- cgit v1.2.3 From ad23b1e91d097fb70fff293fb3ead60e9f0ab536 Mon Sep 17 00:00:00 2001 From: Miguel Porces Date: Tue, 21 Apr 2020 14:18:58 +0200 Subject: UV: add Reset operator to menu in uv editor Differential Revision: https://developer.blender.org/D7482 --- release/scripts/startup/bl_ui/space_image.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 05924600db7..324c1238db3 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -384,6 +384,10 @@ class IMAGE_MT_uvs(Menu): layout.separator() + layout.operator("uv.reset") + + layout.separator() + class IMAGE_MT_uvs_select_mode(Menu): bl_label = "UV Select Mode" -- cgit v1.2.3 From 6505dd198503eda512d286640e881452cbaeeb41 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Tue, 21 Apr 2020 15:13:58 +0200 Subject: UI: Use heading for File Browser column toggles in popover --- release/scripts/startup/bl_ui/space_filebrowser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 3bf5bbf7b46..53fc812a619 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -66,8 +66,9 @@ class FILEBROWSER_PT_display(Panel): if params.display_type == 'THUMBNAIL': layout.prop(params, "display_size", text="Size") else: - layout.prop(params, "show_details_size", text="Size") - layout.prop(params, "show_details_datetime", text="Date") + col = layout.column(heading="Columns", align=True) + col.prop(params, "show_details_size", text="Size") + col.prop(params, "show_details_datetime", text="Date") layout.prop(params, "recursion_level", text="Recursions") -- cgit v1.2.3 From 5cae44ef6d49253c9019fdaa84c9b76ecf98f141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Wed, 15 Apr 2020 13:49:41 +0200 Subject: Fluid: Minor UI fix for diffusion panel Was missing active option. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 390b5de7d37..960d2dff101 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -988,6 +988,7 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): layout.use_property_split = True domain = context.fluid.domain_settings + layout.active = domain.use_diffusion is_baking_any = domain.is_cache_baking_any has_baked_any = domain.has_cache_baked_any -- cgit v1.2.3 From d19277c72f1a5acc08eefde9c6c05e2cd4358205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Sun, 19 Apr 2020 19:43:05 +0200 Subject: Fluid: Added missing outflow object type to enable / disable flow flag There is no reason to not include outflow objects here too. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 960d2dff101..d6d2526384a 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -236,8 +236,8 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): col = grid.column() col.prop(flow, "flow_behavior", expand=False) - if flow.flow_behavior in {'INFLOW'}: - col.prop(flow, "use_inflow", text="Use Inflow") + if flow.flow_behavior in {'INFLOW', 'OUTFLOW'}: + col.prop(flow, "use_inflow", text="Use Flow") col.prop(flow, "subframes", text="Sampling Substeps") -- cgit v1.2.3 From 138b0c970efbfb732ddee0530e073537582b6df8 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 22 Apr 2020 16:39:44 +0200 Subject: GPencil: Change Thickness Profile icon --- release/scripts/startup/bl_ui/properties_paint_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index a13f39da4a9..6be1aa40bf2 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1089,7 +1089,7 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) settings = context.tool_settings.gpencil_sculpt if compact: row = layout.row(align=True) - row.prop(settings, "use_thickness_curve", text="", icon='CURVE_DATA') + row.prop(settings, "use_thickness_curve", text="", icon='SPHERECURVE') sub = row.row(align=True) sub.active = settings.use_thickness_curve sub.popover( -- cgit v1.2.3 From 9b56b2b2b977621b01f0aa2432f110742f3fb645 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 24 Apr 2020 17:06:37 +1000 Subject: UI: add mesh skin-resize to menu Resolves T75925 --- release/scripts/startup/bl_ui/space_view3d.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index f38bbb46f85..5d47566d880 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -993,6 +993,7 @@ class VIEW3D_MT_transform(VIEW3D_MT_transform_base): layout = self.layout if context.mode == 'EDIT_MESH': layout.operator("transform.shrink_fatten", text="Shrink Fatten") + layout.operator("transform.skin_resize") elif context.mode == 'EDIT_CURVE': layout.operator("transform.transform", text="Radius").mode = 'CURVE_SHRINKFATTEN' -- cgit v1.2.3 From fd10ac9acaa0788ef5e73677a97e5cff27978d0c Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 24 Apr 2020 11:05:40 -0700 Subject: UI: Move Scene Statistics to the 3D Viewport Removes statistics from footer and to an (optional) overlay in 3DView. Differential Revision: https://developer.blender.org/D7410 Reviewed by Campbell Barton --- release/scripts/startup/bl_ui/space_view3d.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 903f0e4fcc6..d7a063d09d1 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6049,16 +6049,17 @@ class VIEW3D_PT_overlay_guides(Panel): split = col.split() sub = split.column() sub.prop(overlay, "show_text", text="Text Info") + sub.prop(overlay, "show_stats", text="Statistics") + sub = split.column() sub.prop(overlay, "show_cursor", text="3D Cursor") + sub.prop(overlay, "show_annotation", text="Annotations") if shading.type == 'MATERIAL': row = col.row() row.active = shading.render_pass == 'COMBINED' row.prop(overlay, "show_look_dev") - col.prop(overlay, "show_annotation", text="Annotations") - class VIEW3D_PT_overlay_object(Panel): bl_space_type = 'VIEW_3D' -- cgit v1.2.3 From 8a94903c090e6541c5d11d60c6cf23b8964f1dd4 Mon Sep 17 00:00:00 2001 From: Peter Fog Date: Mon, 27 Apr 2020 00:12:35 +0200 Subject: VSE: Remove decorate from Expand and Mute in Modifiers Remove decorate from Expand and Mute in VSE Modifiers, since these elements aren't using decorate elsewhere. Reviewed By: billreynish Differential Revision: https://developer.blender.org/D7420 --- release/scripts/startup/bl_ui/space_sequencer.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 0e2af8f8f2f..e4539ec7ca7 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -2083,10 +2083,12 @@ class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel): box = layout.box() row = box.row() + row.use_property_decorate = False row.prop(mod, "show_expanded", text="", emboss=False) row.prop(mod, "name", text="") row.prop(mod, "mute", text="") + row.use_property_decorate = True sub = row.row(align=True) props = sub.operator("sequencer.strip_modifier_move", text="", icon='TRIA_UP') -- cgit v1.2.3 From 536055e1ee0b238d11a774625b0639e05730cd53 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 27 Apr 2020 12:42:16 +0200 Subject: remove "Select Linked" from the posemode select menu The operator in its current state is based on mouse position and doesnt make sense to be called from a menu. (In fact it should be called 'select_linked_pick' internally and a separate 'select_linked' should be implemented similar to how "Select Linked" works for meshes, curves etc -- see D7542 for this) Note: We had the same thing for particles recently: rBdd9dfadaac9b: remove "Select Linked" from the particle select and context menu rB5ca7c85e105d: Particle editmode: add mouse independent "Select Linked" operator Fixes T76071 Maniphest Tasks: T76071 Differential Revision: https://developer.blender.org/D7543 --- release/scripts/startup/bl_ui/space_view3d.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 5d47566d880..c0a786d9658 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1469,7 +1469,6 @@ class VIEW3D_MT_select_pose(Menu): layout.separator() layout.operator("pose.select_constraint_target", text="Constraint Target") - layout.operator("pose.select_linked", text="Linked") layout.separator() -- cgit v1.2.3 From a66162e1f64e297663b8f652af9b056dd41e83b7 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 28 Apr 2020 11:11:35 +0200 Subject: Cleanup: trailing whitespace --- release/scripts/startup/bl_ui/properties_data_modifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 03debee4384..b95f81e1090 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1341,7 +1341,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if md.mode == 'VOXEL': layout.prop(md, "voxel_size") layout.prop(md, "adaptivity") - else: + else: row.prop(md, "octree_depth") row.prop(md, "scale") -- cgit v1.2.3 From d366658d2d753844bcb65fdab3febe5407133f83 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Tue, 28 Apr 2020 18:35:38 +0200 Subject: GPencil: Remove redundant Control word from UI --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index b95f81e1090..4b9f500cdba 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1981,7 +1981,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "mode") if md.mode in {'STROKE', 'STROKE_AND_FILL'}: - col.label(text="Stroke Texture Control:") + col.label(text="Stroke Texture:") col.prop(md, "fit_method") col.prop(md, "uv_offset") col.prop(md, "uv_scale") @@ -1990,7 +1990,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): col.separator() if md.mode in {'FILL', 'STROKE_AND_FILL'}: - col.label(text="Fill Texture Control:") + col.label(text="Fill Texture:") col.prop(md, "fill_rotation", text="Rotation") col.prop(md, "fill_offset", text="Location") col.prop(md, "fill_scale", text="Scale") -- cgit v1.2.3 From e07b245fe1f41cab13d772c3e26adc2521126324 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 27 Apr 2020 15:41:22 +0200 Subject: Armature posemode: add mouse independent "Select Linked" operator The current "Select Linked" operator works based on mouse position and makes no sense to call from the menus and was removed in rB536055e1ee0b. This patch adds an operator independent from mouse position that just selects all bones in relation to selected bones (and adds back menu entries, adds keymap entry CTRL+L). The original operator is renamed to 'select_linked_pick' internally (this is now more in line to how "Select Linked" works for meshes, curves etc) ref T76071 Maniphest Tasks: T76071 Differential Revision: https://developer.blender.org/D7542 --- release/scripts/startup/bl_ui/space_view3d.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index c0a786d9658..5d47566d880 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1469,6 +1469,7 @@ class VIEW3D_MT_select_pose(Menu): layout.separator() layout.operator("pose.select_constraint_target", text="Constraint Target") + layout.operator("pose.select_linked", text="Linked") layout.separator() -- cgit v1.2.3 From b7bcd0a87c9df2f11d7249c64768e9526b2048bd Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 20 Apr 2020 17:33:03 +0200 Subject: Tracking: Implement Nuke/Natron distortion model Neither Nuke nor Natron support OpenCV's radial distortion model which makes it impossible to have any kind of interoperability. The new model is available under the distortion model menu in Lens settings. Differential Revision: https://developer.blender.org/D7484 --- release/scripts/startup/bl_ui/space_clip.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index f93629a4f03..5b6cc6609e0 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -918,6 +918,10 @@ class CLIP_PT_tracking_lens(Panel): col = layout.column(align=True) col.prop(camera, "division_k1") col.prop(camera, "division_k2") + elif camera.distortion_model == 'NUKE': + col = layout.column(align=True) + col.prop(camera, "nuke_k1") + col.prop(camera, "nuke_k2") class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel): -- cgit v1.2.3 From ae98a033c85607d324e9690654b0c27d4b64a122 Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Thu, 30 Apr 2020 19:51:14 +1000 Subject: Outliner: Add new delete operator In the industry standard keymap, both deleting objects and collections were mapped to the same keys causing confusion when only collections could be deleted through the keymap. This adds a new delete operator to delete all selected objects and collections, accessible from both the keymap and context menu. Now any selected objects and collections are deleted when Delete is chosen from the keymap. This also updates the tooltip description which was previously undocumented. Resolves T67462 --- release/scripts/startup/bl_ui/space_outliner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index a74d9cc9547..ee8015df273 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -212,8 +212,8 @@ class OUTLINER_MT_collection(Menu): layout.separator() - layout.operator("outliner.collection_delete", text="Delete", icon='X').hierarchy = False - layout.operator("outliner.collection_delete", text="Delete Hierarchy").hierarchy = True + layout.operator("outliner.delete", text="Delete", icon='X') + layout.operator("outliner.collection_hierarchy_delete") layout.separator() @@ -278,7 +278,7 @@ class OUTLINER_MT_object(Menu): layout.separator() - layout.operator("outliner.object_operation", text="Delete", icon='X').type = 'DELETE' + layout.operator("outliner.delete", text="Delete", icon='X') if space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection: layout.operator("outliner.object_operation", text="Delete Hierarchy").type = 'DELETE_HIERARCHY' -- cgit v1.2.3 From 9ee7fc15afdaf2649ecae1478fe6ad3ad89af325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Thu, 30 Apr 2020 15:40:47 +0200 Subject: Fluid: Removed domain size option from diffusion panel Domain size parameter no longer needed (unsed right now). Domain size is directly taken from object. --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 1 - 1 file changed, 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index d6d2526384a..de526506f68 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -1002,7 +1002,6 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): col.prop(domain, "viscosity_exponent", text="Exponent", slider=True) col = flow.column() - col.prop(domain, "domain_size", text="Real World Size") col.prop(domain, "surface_tension", text="Surface Tension") -- cgit v1.2.3 From 6a7e9f2b7647fb1883fc77f72c3d411c0a692cf7 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 30 Apr 2020 16:12:34 +0200 Subject: GPencil: Add material selector to context menus Now it's possible to select the material in context menu and new menu to select material. The patch and workflow has been tested in greasepencil-object branch. * New Material selector in Draw mode Context menu: {F8499259} * Pressing `U`key in Draw mode display material menu. {F8503224} Reviewed By: mendio, pepeland Differential Revision: https://developer.blender.org/D7554 --- .../bl_ui/properties_grease_pencil_common.py | 34 ++++++++++++++++++++-- release/scripts/startup/bl_ui/space_view3d.py | 15 ++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 0f6a51ad2d0..fea4406cb8c 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -361,6 +361,35 @@ class GPENCIL_MT_layer_active(Menu): layout.operator("gpencil.layer_add", text="New Layer", icon='ADD') +class GPENCIL_MT_material_active(Menu): + bl_label = "Change Active Material" + + @classmethod + def poll(cls, context): + ob = context.active_object + tool_settings = context.scene.tool_settings + mode = tool_settings.gpencil_paint.color_mode + if mode != 'MATERIAL': + return False + + if ob is None or len(ob.material_slots) == 0: + return False + + return True + + def draw(self, context): + layout = self.layout + layout.operator_context = 'INVOKE_REGION_WIN' + ob = context.active_object + mat_active = ob.active_material + + for slot in ob.material_slots: + mat = slot.material + if mat: + icon = mat.id_data.preview.icon_id + layout.operator("gpencil.material_set", text=mat.name, icon_value=icon).slot = mat.name + + class GPENCIL_MT_gpencil_draw_delete(Menu): bl_label = "Delete" @@ -632,8 +661,8 @@ class GreasePencilMaterialsPanel: if ob.data.use_stroke_edit_mode: row = layout.row(align=True) row.operator("gpencil.stroke_change_color", text="Assign") - row.operator("gpencil.select_material", text="Select").deselect = False - row.operator("gpencil.select_material", text="Deselect").deselect = True + row.operator("gpencil.material_select", text="Select").deselect = False + row.operator("gpencil.material_select", text="Deselect").deselect = True # stroke color ma = None if is_view3d and brush is not None: @@ -931,6 +960,7 @@ classes = ( GPENCIL_MT_cleanup, GPENCIL_MT_move_to_layer, GPENCIL_MT_layer_active, + GPENCIL_MT_material_active, GPENCIL_MT_gpencil_draw_delete, GPENCIL_MT_layer_mask_menu, diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index d7a063d09d1..3e4a3f5de4c 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -7060,6 +7060,18 @@ def draw_gpencil_layer_active(context, layout): row.operator("gpencil.layer_remove", text="", icon='X') +def draw_gpencil_material_active(context, layout): + ob = context.active_object + if ob and len(ob.material_slots) > 0 and ob.active_material_index >= 0: + ma = ob.material_slots[ob.active_material_index].material + if ma: + layout.label(text="Active Material") + row = layout.row(align=True) + row.operator_context = 'EXEC_REGION_WIN' + row.operator_menu_enum("gpencil.material_set", "slot", text="", icon='MATERIAL') + row.prop(ma, "name", text="") + + class VIEW3D_PT_gpencil_sculpt_context_menu(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'WINDOW' @@ -7133,6 +7145,9 @@ class VIEW3D_PT_gpencil_draw_context_menu(Panel): # Layers draw_gpencil_layer_active(context, layout) + # Material + if not is_vertex: + draw_gpencil_material_active(context, layout) class VIEW3D_PT_gpencil_vertex_context_menu(Panel): -- cgit v1.2.3 From d4c547b7bd89ca1da710a437f164fe3ca84bb1a6 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 30 Apr 2020 15:41:45 +0200 Subject: Multires: Enable sculpting in all subdivision levels Return the correct sculpt level in BKE_multires_sculpt_level_get and enable the property in the UI Reviewed By: sergey Differential Revision: https://developer.blender.org/D7575 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 4b9f500cdba..2d2eeb65164 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -686,8 +686,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): split = layout.split() col = split.column() col.prop(md, "levels", text="Preview") - # TODO(sergey): Expose it again after T58473 is solved. - # col.prop(md, "sculpt_levels", text="Sculpt") + col.prop(md, "sculpt_levels", text="Sculpt") col.prop(md, "render_levels", text="Render") row = col.row() -- cgit v1.2.3 From f28875a998d47d4ce49b852598c14f687fa63a55 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 30 Apr 2020 16:47:23 +0200 Subject: Multires: Unsubdivide and Rebuild Subdivisions This implements the main unsubdivide algorithm which rebuilds a base mesh and extracts the grid's data from a high resolution mesh. It includes the Rebuild Subdivisions operator, which generates all subdivision levels down to the level 0 base mesh. It supports: - Rebuilding an arbitrary number of levels (Unsubdivide) or as many levels as possible down to level 0 in a single step (Rebuild Subdivisions). - Rebuilding with already existing grids. - Meshes with n-gons and triangles - Meshes with more than 2 faces per edge - Base mesh made completely out of triangles - Meshes without poles - Meshes with multiple disconnected elements at the same subdivision level Reviewed By: sergey Differential Revision: https://developer.blender.org/D7372 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 2d2eeb65164..9a034dfe378 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -698,8 +698,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.enabled = ob.mode != 'EDIT' col.operator("object.multires_subdivide", text="Subdivide") col.operator("object.multires_higher_levels_delete", text="Delete Higher") + col.operator("object.multires_unsubdivide", text="Unsubdivide") col.operator("object.multires_reshape", text="Reshape") col.operator("object.multires_base_apply", text="Apply Base") + col.operator("object.multires_rebuild_subdiv", text="Rebuild Subdivisions") col.prop(md, "uv_smooth", text="") col.prop(md, "show_only_control_edges") col.prop(md, "use_creases") -- cgit v1.2.3 From 134619fabbc550afb275260b17c9c7910e7a1c53 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 30 Apr 2020 15:15:19 +0200 Subject: Multires: Subdivide Simple and Subdivide Linear This introduces two alternative subdivision modes that generates displacement on the grids that look as Simple subdivisions but while using the Catmull-Clark subdivision type in the modifier. This way, Simple and Catmull-Clark subdivision can be combined when creating new levels if needed, for example, to sculpt hard surface objects. Subdivide simple smooths the sculpted data when creating a new subdivision level. Subdivide linear also preserves the sharpness in the sculpted data. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7415 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 9a034dfe378..6e6bcd81cdc 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -696,7 +696,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.enabled = ob.mode != 'EDIT' - col.operator("object.multires_subdivide", text="Subdivide") + op = col.operator("object.multires_subdivide", text="Subdivide") + op.mode = 'CATMULL_CLARK' + + op = col.operator("object.multires_subdivide", text="Subdivide Simple") + op.mode = 'SIMPLE' + + op = col.operator("object.multires_subdivide", text="Subdivide Linear") + op.mode = 'LINEAR' + col.operator("object.multires_higher_levels_delete", text="Delete Higher") col.operator("object.multires_unsubdivide", text="Unsubdivide") col.operator("object.multires_reshape", text="Reshape") -- cgit v1.2.3 From 99cb6dbe652511eda388763c8b147a979efbd3ff Mon Sep 17 00:00:00 2001 From: Israel Medina Date: Thu, 30 Apr 2020 20:45:41 +0200 Subject: VSE: Add frame interpolation option to speed effect Do cross transition from current to next frame instead of displaying one image for n frames. Reviewed By: ISS, sergey, campbellbarton Differential Revision: https://developer.blender.org/D7417 --- release/scripts/startup/bl_ui/space_sequencer.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index e4539ec7ca7..e1f675871ef 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1139,6 +1139,8 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): col = layout.column(align=True) if strip_type == 'SPEED': col.prop(strip, "multiply_speed") + col.prop(strip, "frame_interpolation_mode") + elif strip_type in {'CROSS', 'GAMMA_CROSS', 'WIPE', 'ALPHA_OVER', 'ALPHA_UNDER', 'OVER_DROP'}: col.prop(strip, "use_default_fade", text="Default fade") if not strip.use_default_fade: -- cgit v1.2.3 From 4cc8123377b1502e028a8f9e6132b78e46e0520f Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 1 May 2020 15:21:41 +0200 Subject: UI: Use property split layout and decorators for material properties Use the automatic property split layout (hence, change to the new 40/60% split ratio) and add decorator buttons for animatable properties. This actually applies to all node input buttons in the properties, e.g. world shading, light shading, texture nodes. Doing this makes the layout more consistent with other layouts in the properties. But the decorators are also a useful hint for users that these options can be animated. Previously using decorators and the automatic split layout wasn't possible, I've done a number of changes now to have it supported. Before I moved the socket icons to the left side, the decorators also looked weird (two circle icons next to each other). {F8497704} With nested items: {F8497708} Reviewed By: William Reynish, Pablo Vazquez Differential Revision: https://developer.blender.org/D7544 --- release/scripts/startup/bl_ui/properties_material.py | 5 ++++- release/scripts/startup/bl_ui/properties_texture.py | 2 ++ release/scripts/startup/bl_ui/properties_world.py | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index ab70c4c25c0..6aaec9940e8 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -172,10 +172,11 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel): layout.prop(mat, "use_nodes", icon='NODETREE') layout.separator() + layout.use_property_split = True + if mat.use_nodes: panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', "Surface") else: - layout.use_property_split = True layout.prop(mat, "diffuse_color", text="Base Color") layout.prop(mat, "metallic") layout.prop(mat, "specular_intensity", text="Specular") @@ -197,6 +198,8 @@ class EEVEE_MATERIAL_PT_volume(MaterialButtonsPanel, Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True + mat = context.material panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', "Volume") diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 40a630ff834..5af8bc2aaa7 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -163,6 +163,8 @@ class TEXTURE_PT_node(TextureButtonsPanel, Panel): def draw(self, context): layout = self.layout + layout.use_property_split = True + node = context.texture_node ntree = node.id_data layout.template_node_view(ntree, node, None) diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index 705be66ecc1..6f00e521e58 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -105,6 +105,8 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel): layout.prop(world, "use_nodes", icon='NODETREE') layout.separator() + layout.use_property_split = True + if world.use_nodes: ntree = world.node_tree node = ntree.get_output_node('EEVEE') @@ -139,6 +141,8 @@ class EEVEE_WORLD_PT_volume(WorldButtonsPanel, Panel): ntree = world.node_tree node = ntree.get_output_node('EEVEE') + layout.use_property_split = True + if node: input = find_node_input(node, 'Volume') if input: -- cgit v1.2.3 From 668dd146f6475f97339aff3d80d019af4d816ee1 Mon Sep 17 00:00:00 2001 From: Juanfran Matheu Date: Wed, 6 May 2020 11:38:32 +0200 Subject: Annotations: Add different arrow styles for line tool This patch adds different kind of shapes/styles for the line extremes while using the annotation line tool. Current Styles: (following @mendio mockup) - Arrow (closed arrow) - Open Arrow - Segment - Square For future it would be great to have icons, it would be more intuitive (and less space) with previews of what each end / start of line does, like the google slides one as reference: {F8511116} Reviewed By: #grease_pencil, antoniov, HooglyBoogly Differential Revision: https://developer.blender.org/D7608 --- .../startup/bl_ui/space_toolsystem_toolbar.py | 42 +++++++++++++++++----- 1 file changed, 33 insertions(+), 9 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 8638f1a2a27..b10b451c7f8 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -148,6 +148,8 @@ class _defs_annotate: def draw_settings_common(context, layout, tool): gpd = context.annotation_data + region_type = context.region.type + if gpd is not None: if gpd.layers.active_note is not None: text = gpd.layers.active_note @@ -160,17 +162,24 @@ class _defs_annotate: gpl = context.active_annotation_layer if gpl is not None: layout.label(text="Annotation:") - sub = layout.row(align=True) - sub.ui_units_x = 8 - - sub.prop(gpl, "color", text="") - sub.popover( - panel="TOPBAR_PT_annotation_layers", - text=text, - ) + if context.space_data.type == 'VIEW_3D': + if region_type == 'TOOL_HEADER': + sub = layout.split(align=True, factor=0.5) + sub.ui_units_x = 6.5 + sub.prop(gpl, "color", text="") + else: + sub = layout.row(align=True) + sub.prop(gpl, "color", text="") + sub.popover( + panel="TOPBAR_PT_annotation_layers", + text=text, + ) + else: + layout.prop(gpl, "color", text="") - tool_settings = context.tool_settings space_type = tool.space_type + tool_settings = context.tool_settings + if space_type == 'VIEW_3D': layout.separator() @@ -181,6 +190,21 @@ class _defs_annotate: elif tool_settings.gpencil_stroke_placement_view3d in {'SURFACE', 'STROKE'}: row.prop(tool_settings, "use_gpencil_stroke_endpoints") + if tool.idname == "builtin.annotate_line": + layout.separator() + + props = tool.operator_properties("gpencil.annotate") + if region_type == 'TOOL_HEADER': + row = layout.row() + row.ui_units_x = 15 + row.prop(props, "arrowstyle_start", text="Start") + row.separator() + row.prop(props, "arrowstyle_end", text="End") + else: + col = layout.row().column(align=True) + col.prop(props, "arrowstyle_start", text="Style Start") + col.prop(props, "arrowstyle_end", text="End") + @ToolDef.from_fn.with_args(draw_settings=draw_settings_common) def scribble(*, draw_settings): return dict( -- cgit v1.2.3 From 9605c26166962ef1410003eb9704a7d0c3038c62 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 6 May 2020 18:10:42 +0200 Subject: Fix Python error in scene without sequencer --- release/scripts/startup/bl_ui/space_sequencer.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index c0a2b8a1230..4784d0cb08b 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1975,7 +1975,9 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel): col.prop(st, "show_separate_color") col.prop(st, "proxy_render_size") - col.prop(ed, "use_prefetch") + + if ed: + col.prop(ed, "use_prefetch") class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel): @@ -1983,6 +1985,12 @@ class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel): bl_category = "View" bl_options = {'DEFAULT_CLOSED'} + @classmethod + def poll(cls, context): + if not context.scene.sequence_editor: + return False + return SequencerButtonsPanel_Output.poll(context) + def draw_header(self, context): scene = context.scene ed = scene.sequence_editor -- cgit v1.2.3 From b1374a8ce99bcc307e47bc9a96032a464bbf385f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 7 May 2020 12:27:10 +1000 Subject: Fix menu search expanding file browser menus --- release/scripts/startup/bl_ui/space_filebrowser.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 53fc812a619..9a39d840149 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -20,6 +20,7 @@ from bpy.types import Header, Panel, Menu, UIList + class FILEBROWSER_HT_header(Header): bl_space_type = 'FILE_BROWSER' @@ -31,8 +32,7 @@ class FILEBROWSER_HT_header(Header): if st.active_operator is None: layout.template_header() - layout.menu("FILEBROWSER_MT_view") - layout.menu("FILEBROWSER_MT_select") + FILEBROWSER_MT_editor_menus.draw_collapsible(context, layout) # can be None when save/reload with a file selector open @@ -411,6 +411,17 @@ class FILEBROWSER_PT_directory_path(Panel): ).region_type = 'TOOL_PROPS' +class FILEBROWSER_MT_editor_menus(Menu): + bl_idname = "FILEBROWSER_MT_editor_menus" + bl_label = "" + + def draw(self, _context): + layout = self.layout + + layout.menu("FILEBROWSER_MT_view") + layout.menu("FILEBROWSER_MT_select") + + class FILEBROWSER_MT_view(Menu): bl_label = "View" @@ -502,6 +513,7 @@ classes = ( FILEBROWSER_PT_bookmarks_recents, FILEBROWSER_PT_advanced_filter, FILEBROWSER_PT_directory_path, + FILEBROWSER_MT_editor_menus, FILEBROWSER_MT_view, FILEBROWSER_MT_select, FILEBROWSER_MT_context_menu, -- cgit v1.2.3 From 3fed85f9d2cfcd120c58599e55b4518e62281ee1 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 7 May 2020 12:16:33 +0200 Subject: Fix T76500: Annotation Tooltip in Movie Clip Editor is using old grease pencil text --- release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 5647f35383a..8b02f858b65 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -116,9 +116,9 @@ class AnnotationDrawingToolsPanel: col.label(text="Data Source:") row = col.row(align=True) if is_3d_view: - row.prop(context.tool_settings, "grease_pencil_source", expand=True) + row.prop(context.tool_settings, "annotation_source", expand=True) elif is_clip_editor: - row.prop(context.space_data, "grease_pencil_source", expand=True) + row.prop(context.space_data, "annotation_source", expand=True) gpencil_stroke_placement_settings(context, col) @@ -448,7 +448,7 @@ class AnnotationDataPanel: # Owner selector. if context.space_data.type == 'CLIP_EDITOR': - layout.row().prop(context.space_data, "grease_pencil_source", expand=True) + layout.row().prop(context.space_data, "annotation_source", expand=True) layout.template_ID(gpd_owner, "grease_pencil", new="gpencil.annotation_add", unlink="gpencil.data_unlink") -- cgit v1.2.3 From 2a2aa6abd0ae45133b083368be4bee77a1a420c4 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 7 May 2020 12:34:13 +0200 Subject: Fix T75793: Mirror modifier UV flip only works on first UDIM Tile Was flipping around the 0-1 range, now (optionally) flip around each tile. Also added this option for BMesh bmo_mirror. Reviewed By: campbellbarton Maniphest Tasks: T75793 Differential Revision: https://developer.blender.org/D7460 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index b9fc7431a9a..8f1337b156d 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -655,6 +655,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row = layout.row() row.prop(md, "use_mirror_u", text="Flip U") row.prop(md, "use_mirror_v", text="Flip V") + row = layout.row() + row.prop(md, "use_mirror_udim", text="Flip UDIM") col = layout.column(align=True) -- cgit v1.2.3 From b571516237a94e944b9182d233b9ba64819d92c4 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 7 May 2020 15:02:21 +0200 Subject: GPencil: Include new Brush random curves Now the brushes have several new random settings and use curves to define the effect. The curves have been moved below the parameter to keep UI standards and extra curve panels have been removed. {F8505387} The new curves are: * Hue. * Saturation. * Value. New option to random at stroke level instead to random at point level for the following values: * Thickness. * Strength. * UV. * Hue. * Saturation. * Value. Curves have been moved below the corresponding parameter and only are displayed in properties panel. Display the curves in the popover made it unusable. {F8505392} Also, the Pressure random has been renamed to Radius because the old name was not clear enough. Reviewed By: mendio, pablovazquez Differential Revision: https://developer.blender.org/D7577 --- .../bl_ui/properties_grease_pencil_common.py | 56 --------- .../startup/bl_ui/properties_paint_common.py | 12 ++ release/scripts/startup/bl_ui/space_view3d.py | 1 - .../scripts/startup/bl_ui/space_view3d_toolbar.py | 133 +++++++++------------ 4 files changed, 71 insertions(+), 131 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 5bb2fe1a7e4..64eda42c87a 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -44,38 +44,6 @@ def gpencil_stroke_placement_settings(context, layout): row.prop_enum(tool_settings, propname, 'CURSOR', text="Cursor") -def gpencil_active_brush_settings_simple(context, layout): - tool_settings = context.tool_settings - brush = tool_settings.gpencil_paint.brush - if brush is None: - layout.label(text="No Active Brush") - return - - col = layout.column() - col.label(text="Active Brush: ") - - row = col.row(align=True) - row.operator_context = 'EXEC_REGION_WIN' - row.operator_menu_enum("gpencil.brush_change", "brush", text="", icon='BRUSH_DATA') - row.prop(brush, "name", text="") - - col.prop(brush, "size", slider=True) - row = col.row(align=True) - row.prop(brush, "use_random_pressure", text="", icon='RNDCURVE') - row.prop(brush, "pen_sensitivity_factor", slider=True) - row.prop(brush, "use_pressure", text="", icon='STYLUS_PRESSURE') - row = col.row(align=True) - row.prop(brush, "use_random_strength", text="", icon='RNDCURVE') - row.prop(brush, "strength", slider=True) - row.prop(brush, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') - row = col.row(align=True) - row.prop(brush, "jitter", slider=True) - row.prop(brush, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE') - row = col.row() - row.prop(brush, "angle", slider=True) - row.prop(brush, "angle_factor", text="Factor", slider=True) - - # XXX: To be replaced with active tools class AnnotationDrawingToolsPanel: # subclass must set @@ -577,30 +545,6 @@ class AnnotationOnionSkin: sub.prop(gpl, "annotation_onion_after_range", text="After") -class GreasePencilToolsPanel: - # For use in "2D" Editors without their own toolbar - # subclass must set - # bl_space_type = 'IMAGE_EDITOR' - bl_label = "Grease Pencil Settings" - bl_region_type = 'UI' - bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, _context): - # XXX - disabled in 2.8 branch. - # return (context.gpencil_data is not None) - return False - - def draw(self, context): - layout = self.layout - - gpencil_active_brush_settings_simple(context, layout) - - layout.separator() - - gpencil_stroke_placement_settings(context, layout) - - class GreasePencilMaterialsPanel: # Mix-in, use for properties editor and top-bar. def draw(self, context): diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 6de1b38a615..dfaf574f1d0 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1076,9 +1076,21 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) row = layout.row(align=True) row.prop(brush, "size", text="Radius") row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE') + + if gp_settings.use_pressure and context.area.type == 'PROPERTIES': + col = layout.column() + col.template_curve_mapping(gp_settings, "curve_sensitivity", brush=True, + use_negative_slope=True) + row = layout.row(align=True) row.prop(gp_settings, "pen_strength", slider=True) row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') + + if gp_settings.use_strength_pressure and context.area.type == 'PROPERTIES': + col = layout.column() + col.template_curve_mapping(gp_settings, "curve_strength", brush=True, + use_negative_slope=True) + if brush.gpencil_tool == 'TINT': row = layout.row(align=True) row.prop(gp_settings, "vertex_mode", text="Mode") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 3e4a3f5de4c..926219ed207 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -125,7 +125,6 @@ class VIEW3D_HT_tool_header(Header): if brush.gpencil_tool not in {'FILL', 'TINT'}: layout.popover("VIEW3D_PT_tools_grease_pencil_brush_stroke") - layout.popover("VIEW3D_PT_tools_grease_pencil_brushcurves") layout.popover("VIEW3D_PT_tools_grease_pencil_paint_appearance") elif tool_mode == 'SCULPT_GPENCIL': diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 04a3e6f62ea..fa49aa7e6a5 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1606,7 +1606,9 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel): layout.use_property_split = True layout.use_property_decorate = False - brush = context.tool_settings.gpencil_paint.brush + tool_settings = context.tool_settings + brush = tool_settings.gpencil_paint.brush + mode = tool_settings.gpencil_paint.color_mode gp_settings = brush.gpencil_settings if self.is_popover: @@ -1615,83 +1617,68 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel): row.label(text=self.bl_label) col = layout.column() - col.active = gp_settings.use_settings_random - - col.prop(gp_settings, "random_pressure", text="Pressure", slider=True) - col.prop(gp_settings, "random_strength", text="Strength", slider=True) - col.prop(gp_settings, "uv_random", text="UV", slider=True) + col.enabled = gp_settings.use_settings_random row = col.row(align=True) - row.prop(gp_settings, "pen_jitter", slider=True) - row.prop(gp_settings, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE') - - -# Grease Pencil drawingcurves -class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel): - bl_context = ".greasepencil_paint" - bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_settings' - bl_label = "Curves" - bl_category = "Tool" - bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, context): - brush = context.tool_settings.gpencil_paint.brush - return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'} - - def draw(self, context): - pass - - -class VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity(View3DPanel, Panel): - bl_context = ".greasepencil_paint" - bl_label = "Sensitivity" - bl_category = "Tool" - bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves" - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - - brush = context.tool_settings.gpencil_paint.brush - gp_settings = brush.gpencil_settings - - layout.template_curve_mapping(gp_settings, "curve_sensitivity", brush=True, - use_negative_slope=True) - - -class VIEW3D_PT_tools_grease_pencil_brushcurves_strength(View3DPanel, Panel): - bl_context = ".greasepencil_paint" - bl_label = "Strength" - bl_category = "Tool" - bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves" - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - - brush = context.tool_settings.gpencil_paint.brush - gp_settings = brush.gpencil_settings + row.prop(gp_settings, "random_pressure", text="Radius", slider=True) + row.prop(gp_settings, "use_stroke_random_radius", text="", icon='GP_SELECT_STROKES') + row.prop(gp_settings, "use_random_press_radius", text="", icon='STYLUS_PRESSURE') + if gp_settings.use_random_press_radius and self.is_popover is False: + col.template_curve_mapping(gp_settings, "curve_random_pressure", brush=True, + use_negative_slope=True) - layout.template_curve_mapping(gp_settings, "curve_strength", brush=True, - use_negative_slope=True) + row = col.row(align=True) + row.prop(gp_settings, "random_strength", text="Strength", slider=True) + row.prop(gp_settings, "use_stroke_random_strength", text="", icon='GP_SELECT_STROKES') + row.prop(gp_settings, "use_random_press_strength", text="", icon='STYLUS_PRESSURE') + if gp_settings.use_random_press_strength and self.is_popover is False: + col.template_curve_mapping(gp_settings, "curve_random_strength", brush=True, + use_negative_slope=True) + row = col.row(align=True) + row.prop(gp_settings, "uv_random", text="UV", slider=True) + row.prop(gp_settings, "use_stroke_random_uv", text="", icon='GP_SELECT_STROKES') + row.prop(gp_settings, "use_random_press_uv", text="", icon='STYLUS_PRESSURE') + if gp_settings.use_random_press_uv and self.is_popover is False: + col.template_curve_mapping(gp_settings, "curve_random_uv", brush=True, + use_negative_slope=True) -class VIEW3D_PT_tools_grease_pencil_brushcurves_jitter(View3DPanel, Panel): - bl_context = ".greasepencil_paint" - bl_label = "Jitter" - bl_category = "Tool" - bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves" + col.separator() - def draw(self, context): - layout = self.layout - layout.use_property_split = True + col1 = col.column(align=True) + col1.enabled = mode == 'VERTEXCOLOR' and gp_settings.use_settings_random + row = col1.row(align=True) + row.prop(gp_settings, "random_hue_factor", slider=True) + row.prop(gp_settings, "use_stroke_random_hue", text="", icon='GP_SELECT_STROKES') + row.prop(gp_settings, "use_random_press_hue", text="", icon='STYLUS_PRESSURE') + if gp_settings.use_random_press_hue and self.is_popover is False: + col1.template_curve_mapping(gp_settings, "curve_random_hue", brush=True, + use_negative_slope=True) + + row = col1.row(align=True) + row.prop(gp_settings, "random_saturation_factor", slider=True) + row.prop(gp_settings, "use_stroke_random_sat", text="", icon='GP_SELECT_STROKES') + row.prop(gp_settings, "use_random_press_sat", text="", icon='STYLUS_PRESSURE') + if gp_settings.use_random_press_sat and self.is_popover is False: + col1.template_curve_mapping(gp_settings, "curve_random_saturation", brush=True, + use_negative_slope=True) + + row = col1.row(align=True) + row.prop(gp_settings, "random_value_factor", slider=True) + row.prop(gp_settings, "use_stroke_random_val", text="", icon='GP_SELECT_STROKES') + row.prop(gp_settings, "use_random_press_val", text="", icon='STYLUS_PRESSURE') + if gp_settings.use_random_press_val and self.is_popover is False: + col1.template_curve_mapping(gp_settings, "curve_random_value", brush=True, + use_negative_slope=True) - brush = context.tool_settings.gpencil_paint.brush - gp_settings = brush.gpencil_settings + col.separator() - layout.template_curve_mapping(gp_settings, "curve_jitter", brush=True, - use_negative_slope=True) + row = col.row(align=True) + row.prop(gp_settings, "pen_jitter", slider=True) + row.prop(gp_settings, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE') + if gp_settings.use_jitter_pressure and self.is_popover is False: + col.template_curve_mapping(gp_settings, "curve_jitter", brush=True, + use_negative_slope=True) class VIEW3D_PT_tools_grease_pencil_brush_paint_falloff(GreasePencilBrushFalloff, Panel, View3DPaintPanel): @@ -2187,12 +2174,14 @@ class VIEW3D_PT_tools_grease_pencil_weight_appearance(GreasePencilDisplayPanel, bl_category = "Tool" bl_label = "Cursor" + class VIEW3D_PT_tools_grease_pencil_vertex_appearance(GreasePencilDisplayPanel, Panel, View3DPanel): bl_context = ".greasepencil_vertex" bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_vertex_paint_settings' bl_category = "Tool" bl_label = "Cursor" + class VIEW3D_PT_gpencil_brush_presets(Panel, PresetPanel): """Brush settings""" bl_label = "Brush Presets" @@ -2269,10 +2258,6 @@ classes = ( VIEW3D_PT_tools_grease_pencil_brush_post_processing, VIEW3D_PT_tools_grease_pencil_brush_random, VIEW3D_PT_tools_grease_pencil_brush_stabilizer, - VIEW3D_PT_tools_grease_pencil_brushcurves, - VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity, - VIEW3D_PT_tools_grease_pencil_brushcurves_strength, - VIEW3D_PT_tools_grease_pencil_brushcurves_jitter, VIEW3D_PT_tools_grease_pencil_paint_appearance, VIEW3D_PT_tools_grease_pencil_sculpt_select, VIEW3D_PT_tools_grease_pencil_sculpt_settings, -- cgit v1.2.3 From 9a7c4e2d444f2cbd48cd724a775ea057dad1a88b Mon Sep 17 00:00:00 2001 From: Juanfran Matheu Date: Fri, 8 May 2020 20:18:12 +0200 Subject: Annotations: Add Stabilization for draw tool This patch adds the stabilizer feature of GP to the annotations. It has a toggle to activate it "Use Stabilizer", and two properties to control the behaviour of the smooth effect (factor and radius). You can also use shift at start or in the air to temporaly use this feature. {F8518283} Differential Revision: https://developer.blender.org/D7648 --- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index b10b451c7f8..baff94b067f 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -204,6 +204,14 @@ class _defs_annotate: col = layout.row().column(align=True) col.prop(props, "arrowstyle_start", text="Style Start") col.prop(props, "arrowstyle_end", text="End") + elif tool.idname == "builtin.annotate" and region_type != 'TOOL_HEADER': + layout.separator() + props = tool.operator_properties("gpencil.annotate") + layout.prop(props, "use_stabilizer", text="Stabilize Stroke") + col = layout.column(align=False) + col.active = props.use_stabilizer + col.prop(props, "stabilizer_radius", text="Radius", slider=True) + col.prop(props, "stabilizer_factor", text="Factor", slider=True) @ToolDef.from_fn.with_args(draw_settings=draw_settings_common) def scribble(*, draw_settings): -- cgit v1.2.3 From a1593fa05baf72653b3f086e795b47c79b2af7fd Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 11 May 2020 12:57:22 +0200 Subject: GPencil: New Percentage parameter in Build modifier Add a factor to determine the percentage affected. This parameter is used to hide part of the stroke and to have a full control of how the points are displayed and not linked to current scene frame. {F8526502} {F8526511} Reviewed By: mendio, pepeland Differential Revision: https://developer.blender.org/D7682 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 1552e10cdf7..29fcb06ac67 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -2182,6 +2182,11 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): sub.prop(md, "frame_start", text="Start") sub.prop(md, "frame_end", text="End") + col.prop(md, "use_percentage") + sub = col.column(align=True) + sub.active = md.use_percentage + sub.prop(md, "percentage_factor") + layout.label(text="Influence Filters:") split = layout.split(factor=0.25) -- cgit v1.2.3 From ced4dfa3491e31273f40670b04c636a9cb646b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 11 May 2020 13:02:11 +0200 Subject: Cleanup: Toggle X-Ray button, removed nested ternary operators Replaced two nested ternary operators combined with dynamic attribute access, with a simple `if`/`elif`/`else` construct. No functional changes. --- release/scripts/startup/bl_ui/space_view3d.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 926219ed207..c5311b67496 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -829,18 +829,17 @@ class VIEW3D_HT_header(Header): # While exposing 'shading.show_xray(_wireframe)' is correct. # this hides the key shortcut from users: T70433. + if has_pose_mode: + draw_depressed = overlay.show_xray_bone + elif shading.type == 'WIREFRAME': + draw_depressed = shading.show_xray_wireframe + else: + draw_depressed = shading.show_xray row.operator( "view3d.toggle_xray", text="", icon='XRAY', - depress=( - overlay.show_xray_bone if has_pose_mode else - getattr( - shading, - "show_xray_wireframe" if shading.type == 'WIREFRAME' else - "show_xray" - ) - ), + depress=draw_depressed, ) row = layout.row(align=True) -- cgit v1.2.3 From 870e081bcda7f8fd99f73366d22bdf372c09f054 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 11 May 2020 10:16:52 -0400 Subject: UI: Curve Edit Stroke Panel Layout Also removes the 'Curve Stroke' panel that showed globally for curve edit mode. This means the settings will not be available without the draw tool selected. Reviewed By: billreynish, campbellbarton Differential Revision: https://developer.blender.org/D7652 --- .../startup/bl_ui/space_toolsystem_toolbar.py | 56 +++++++++++++++++---- .../scripts/startup/bl_ui/space_view3d_toolbar.py | 57 ---------------------- 2 files changed, 47 insertions(+), 66 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index baff94b067f..e64a7c9731b 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -891,23 +891,61 @@ class _defs_edit_curve: @ToolDef.from_fn def draw(): - def draw_settings(context, layout, _tool): + def draw_settings(context, layout, tool, *, extra=False): # Tool settings initialize operator options. tool_settings = context.tool_settings cps = tool_settings.curve_paint_settings + region_type = context.region.type - col = layout.column() + if region_type == 'TOOL_HEADER': + if not extra: + layout.prop(cps, "curve_type", text="") + layout.prop(cps, "depth_mode", expand=True) + layout.popover("TOPBAR_PT_tool_settings_extra", text="...") + return - col.prop(cps, "curve_type") + layout.use_property_split = True + layout.use_property_decorate = False + if region_type != 'TOOL_HEADER': + layout.prop(cps, "curve_type") + layout.separator() if cps.curve_type == 'BEZIER': - col.prop(cps, "error_threshold") - col.prop(cps, "fit_method") - col.prop(cps, "use_corners_detect") + layout.prop(cps, "fit_method") + layout.prop(cps, "error_threshold") + if region_type != 'TOOL_HEADER': + row = layout.row(heading="Detect Corners", align=True) + else: + row = layout.row(heading="Corners", align=True) + row.prop(cps, "use_corners_detect", text="") + sub = row.row(align=True) + sub.active = cps.use_corners_detect + sub.prop(cps, "corner_angle", text="") + layout.separator() + + + col = layout.column(align=True) + col.prop(cps, "radius_taper_start", text="Taper Start", slider=True) + col.prop(cps, "radius_taper_end", text="End", slider=True) + col = layout.column(align=True) + col.prop(cps, "radius_min", text="Radius Min") + col.prop(cps, "radius_max", text="Max") + col.prop(cps, "use_pressure_radius") + + layout.separator() + + if region_type != 'TOOL_HEADER': + row = layout.row() + row.prop(cps, "depth_mode", expand=True) + if cps.depth_mode == 'SURFACE': + col = layout.column() + col.prop(cps, "surface_offset") + col.prop(cps, "use_offset_absolute") + col.prop(cps, "use_stroke_endpoints") + if cps.use_stroke_endpoints: + colsub = layout.column(align=True) + colsub.prop(cps, "surface_plane") - col = layout.row() - col.active = cps.use_corners_detect - col.prop(cps, "corner_angle") return dict( idname="builtin.draw", diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index fa49aa7e6a5..b81f48bec5e 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -243,62 +243,6 @@ class VIEW3D_PT_tools_meshedit_options_automerge(View3DPanel, Panel): col.prop(tool_settings, "use_mesh_automerge_and_split", toggle=False) col.prop(tool_settings, "double_threshold", text="Threshold") -# ********** default tools for editmode_curve **************** - - -class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel): - bl_category = "Tool" - bl_context = ".curve_edit" # dot on purpose (access from topbar) - bl_label = "Curve Stroke" - - def draw(self, context): - layout = self.layout - - tool_settings = context.tool_settings - cps = tool_settings.curve_paint_settings - - col = layout.column() - - col.prop(cps, "curve_type") - - if cps.curve_type == 'BEZIER': - col.label(text="Bezier Options:") - col.prop(cps, "error_threshold") - col.prop(cps, "fit_method") - col.prop(cps, "use_corners_detect") - - col = layout.column() - col.active = cps.use_corners_detect - col.prop(cps, "corner_angle") - - col.label(text="Pressure Radius:") - row = layout.row(align=True) - rowsub = row.row(align=True) - rowsub.prop(cps, "radius_min", text="Min") - rowsub.prop(cps, "radius_max", text="Max") - - row.prop(cps, "use_pressure_radius", text="", icon_only=True) - - col = layout.column() - col.label(text="Taper Radius:") - row = layout.row(align=True) - row.prop(cps, "radius_taper_start", text="Start") - row.prop(cps, "radius_taper_end", text="End") - - col = layout.column() - col.label(text="Projection Depth:") - row = layout.row(align=True) - row.prop(cps, "depth_mode", expand=True) - - col = layout.column() - if cps.depth_mode == 'SURFACE': - col.prop(cps, "surface_offset") - col.prop(cps, "use_offset_absolute") - col.prop(cps, "use_stroke_endpoints") - if cps.use_stroke_endpoints: - colsub = layout.column(align=True) - colsub.prop(cps, "surface_plane", expand=True) - # ********** default tools for editmode_armature **************** @@ -2198,7 +2142,6 @@ classes = ( VIEW3D_PT_tools_object_options_transform, VIEW3D_PT_tools_meshedit_options, VIEW3D_PT_tools_meshedit_options_automerge, - VIEW3D_PT_tools_curveedit_options_stroke, VIEW3D_PT_tools_armatureedit_options, VIEW3D_PT_tools_posemode_options, -- cgit v1.2.3 From d63956d0e51c1b5a65941b918d0e055b1c14fa4b Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 11 May 2020 16:18:08 +0200 Subject: GPencil: Replace material name with material pointer for Modifiers filter Before, the material name was used to filter the effect of the stroke, but after the last changes in the ID code, now it's not working. After talking with @severin, we agreed to replace the material name with a pointer. Also, this fix a design issue when the materials were linked. Related to T76594 Differential Revision: https://developer.blender.org/D7681 with some minor changes --- release/scripts/startup/bl_ui/properties_data_modifier.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 29fcb06ac67..b5f087fd5ee 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1855,7 +1855,6 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): # the mt.type enum is (ab)used for a lookup on function names # ...to avoid lengthy if statements # so each type must have a function here. - def gpencil_masking(self, layout, ob, md, use_vertex, use_curve=False): gpd = ob.data layout.separator() @@ -1884,7 +1883,15 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): split = col2.split(factor=0.6) row = split.row(align=True) - row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') + + valid = md.material in (slot.material for slot in ob.material_slots) or md.material is None + if valid: + icon = 'SHADING_TEXTURE' + else: + icon = 'ERROR' + + row.alert = not valid + row.prop_search(md, "material", gpd, "materials", text="", icon=icon) row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') row = split.row(align=True) -- cgit v1.2.3 From e407fdd9c4ad23b237304c2868834c9aeb8e4d61 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 11 May 2020 16:19:53 +0200 Subject: Cleanup: Add space line removed by error --- release/scripts/startup/bl_ui/properties_data_modifier.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index b5f087fd5ee..a2c477bd6f1 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1855,6 +1855,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): # the mt.type enum is (ab)used for a lookup on function names # ...to avoid lengthy if statements # so each type must have a function here. + def gpencil_masking(self, layout, ob, md, use_vertex, use_curve=False): gpd = ob.data layout.separator() -- cgit v1.2.3 From bff679f8f9c5b70840818e3628b1141a8c89e605 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 May 2020 13:53:46 +1000 Subject: UI: add offset edge slide to edge menu This was only available in the context menu which only shows when the selection was set to edge-mode, even though this works in other modes. --- release/scripts/startup/bl_ui/space_view3d.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 5d47566d880..fca4cb4c321 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4005,6 +4005,7 @@ class VIEW3D_MT_edit_mesh_edges(Menu): layout.separator() layout.operator("transform.edge_slide") + layout.operator("mesh.offset_edge_loops_slide") layout.separator() -- cgit v1.2.3 From e0b5a202311eb08d67725670325697ee0afeed96 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 12 May 2020 10:59:41 +0200 Subject: Preferences: Customize default empty size for collection instances The old value (1.0) was often too large in practice. When many collection instances are created, the large empties create a mess in the viewport. This adds a new preference setting in `Editing -> Objects -> New Objects` called `Instance Empty Size`. The value will be used as display size for new empties containing a collection instance. Reviewers: Severin Differential Revision: https://developer.blender.org/D7650 --- release/scripts/startup/bl_ui/space_userpref.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index bb68eeb4447..153533dbde6 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -360,6 +360,7 @@ class USERPREF_PT_edit_objects_new(EditingPanel, CenterAlignMixIn, Panel): flow.prop(edit, "material_link", text="Link Materials to") flow.prop(edit, "object_align", text="Align to") flow.prop(edit, "use_enter_edit_mode", text="Enter Edit Mode") + flow.prop(edit, "collection_instance_empty_size", text="Instance Empty Size") class USERPREF_PT_edit_objects_duplicate_data(EditingPanel, CenterAlignMixIn, Panel): -- cgit v1.2.3 From 82e8df01ac13609c5bbdb438f0033d076d844668 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Tue, 12 May 2020 15:44:59 +0200 Subject: UI: Rename 'View All' operator to 'Frame All' This change was done time ago but it was still missing in some operators. --- release/scripts/startup/bl_ui/space_image.py | 2 +- release/scripts/startup/bl_ui/space_sequencer.py | 2 +- release/scripts/startup/bl_ui/space_view3d.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 324c1238db3..bc4665209aa 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -116,7 +116,7 @@ class IMAGE_MT_view(Menu): if show_uvedit: layout.operator("image.view_selected", text="Frame Selected") - layout.operator("image.view_all", text="Frame All") + layout.operator("image.view_all") layout.operator("image.view_all", text="Frame All Fit").fit_view = True layout.operator("image.view_center_cursor", text="Center View to Cursor") diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 272e67752f2..b908e61b9e1 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -276,7 +276,7 @@ class SEQUENCER_MT_view(Menu): if is_sequencer_view: layout.operator_context = 'INVOKE_REGION_WIN' layout.operator("sequencer.view_selected", text="Frame Selected") - layout.operator("sequencer.view_all", text="Frame All") + layout.operator("sequencer.view_all") layout.operator("view2d.zoom_border", text="Zoom") if is_preview: diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index a671782e008..5c70956bcc2 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1163,7 +1163,7 @@ class VIEW3D_MT_view(Menu): if view.region_quadviews: layout.operator("view3d.view_selected", text="Frame Selected (Quad View)").use_all_regions = True - layout.operator("view3d.view_all", text="Frame All").center = False + layout.operator("view3d.view_all").center = False layout.operator("view3d.view_persportho", text="Perspective/Orthographic") layout.menu("VIEW3D_MT_view_local") @@ -1294,7 +1294,7 @@ class VIEW3D_MT_view_align(Menu): layout.separator() - layout.operator("view3d.view_all", text="Center Cursor and View All").center = True + layout.operator("view3d.view_all", text="Center Cursor and Frame All").center = True layout.operator("view3d.view_center_cursor") layout.separator() -- cgit v1.2.3 From f24e9bb0380936bcaf6c194b54342a2977784cff Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Tue, 12 May 2020 17:47:48 +0200 Subject: GPencil: Add new parameter for SMAA threshold This parameter allows to define the threshold for SMAA algorithm. Differential Revision: https://developer.blender.org/D7708 --- release/scripts/startup/bl_ui/properties_render.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index fd4859f3620..30094da20c8 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -543,6 +543,27 @@ class RENDER_PT_eevee_performance(RenderButtonsPanel, Panel): layout.prop(rd, "use_high_quality_normals") +class RENDER_PT_gpencil(RenderButtonsPanel, Panel): + bl_label = "Grease Pencil" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + return True + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + scene = context.scene + props = scene.grease_pencil_settings + + col = layout.column() + col.prop(props, "antialias_threshold") + + + class RENDER_PT_opengl_sampling(RenderButtonsPanel, Panel): bl_label = "Sampling" COMPAT_ENGINES = {'BLENDER_WORKBENCH'} @@ -697,6 +718,7 @@ classes = ( RENDER_PT_eevee_indirect_lighting_display, RENDER_PT_eevee_film, RENDER_PT_eevee_film_overscan, + RENDER_PT_gpencil, RENDER_PT_opengl_sampling, RENDER_PT_opengl_lighting, RENDER_PT_opengl_color, -- cgit v1.2.3 From fc62a3366c3264466b57e0d19b8d2970a1ad1a60 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Tue, 12 May 2020 19:06:58 +0200 Subject: UI: Remove duplicate Mark/Clear Seam entries from Edge menus These already exist in the UV menu (both in the 3D Viewport and UV Editor) which makes it more clear that this feature is related to UV Unwrapping. --- release/scripts/startup/bl_ui/space_view3d.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 5c70956bcc2..ebc3263f9cc 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3762,11 +3762,6 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu): col.separator() - col.operator("mesh.mark_seam").clear = False - col.operator("mesh.mark_seam", text="Clear Seam").clear = True - - col.separator() - col.operator("mesh.mark_sharp") col.operator("mesh.mark_sharp", text="Clear Sharp").clear = True @@ -4012,11 +4007,6 @@ class VIEW3D_MT_edit_mesh_edges(Menu): layout.separator() - layout.operator("mesh.mark_seam").clear = False - layout.operator("mesh.mark_seam", text="Clear Seam").clear = True - - layout.separator() - layout.operator("mesh.mark_sharp") layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True -- cgit v1.2.3 From 4930eb15f72cff2be0591ac473fa6560430a296b Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 12 May 2020 16:39:10 +0200 Subject: Fix T74012: missing fluid simulation domain panels in workbench Maniphest Tasks: T74012 Differential Revision: https://developer.blender.org/D7706 --- release/scripts/startup/bl_ui/properties_physics_fluid.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index de526506f68..4b0791a63e6 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -439,7 +439,7 @@ class PHYSICS_PT_fire(PhysicButtonsPanel, Panel): class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): bl_label = "Liquid" bl_parent_id = 'PHYSICS_PT_fluid' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @classmethod def poll(cls, context): @@ -540,7 +540,7 @@ class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): class PHYSICS_PT_flow_initial_velocity(PhysicButtonsPanel, Panel): bl_label = "Initial Velocity" bl_parent_id = 'PHYSICS_PT_settings' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @classmethod def poll(cls, context): @@ -633,7 +633,7 @@ class PHYSICS_PT_adaptive_domain(PhysicButtonsPanel, Panel): bl_label = "Adaptive Domain" bl_parent_id = 'PHYSICS_PT_settings' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @classmethod def poll(cls, context): @@ -842,7 +842,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): bl_label = "Particles" bl_parent_id = 'PHYSICS_PT_liquid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @classmethod def poll(cls, context): @@ -1009,7 +1009,7 @@ class PHYSICS_PT_guide(PhysicButtonsPanel, Panel): bl_label = "Guides" bl_parent_id = 'PHYSICS_PT_fluid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @classmethod def poll(cls, context): -- cgit v1.2.3 From 5b86fe6f33505bcea7c81021506eb538908c245d Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Tue, 12 May 2020 14:28:32 -0700 Subject: UI: About Blender Dialog Adds an 'About Blender' dialog to the 'App' menu to display information like branch and hash. Differential Revision: https://developer.blender.org/D7146 Reviewed by Campbell Barton --- release/scripts/startup/bl_ui/space_topbar.py | 50 +-------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 7a23eb9282c..9aedd7ef0b3 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -229,14 +229,7 @@ class TOPBAR_MT_app(Menu): layout = self.layout layout.operator("wm.splash") - - layout.separator() - - layout.menu("TOPBAR_MT_app_support") - - layout.separator() - - layout.menu("TOPBAR_MT_app_about") + layout.operator("wm.splash_about") layout.separator() @@ -407,45 +400,6 @@ class TOPBAR_MT_file_defaults(Menu): props.app_template = app_template -class TOPBAR_MT_app_about(Menu): - bl_label = "About" - - def draw(self, _context): - layout = self.layout - - layout.operator("wm.url_open_preset", text="Release Notes", - icon='URL').type = 'RELEASE_NOTES' - - layout.separator() - - layout.operator("wm.url_open_preset", - text="Blender Website", icon='URL').type = 'BLENDER' - layout.operator("wm.url_open_preset", text="Credits", - icon='URL').type = 'CREDITS' - - layout.separator() - - layout.operator( - "wm.url_open", text="License", icon='URL', - ).url = "https://www.blender.org/about/license/" - - -class TOPBAR_MT_app_support(Menu): - bl_label = "Support Blender" - - def draw(self, _context): - layout = self.layout - - layout.operator("wm.url_open_preset", - text="Development Fund", icon='FUND').type = 'FUND' - - layout.separator() - - layout.operator( - "wm.url_open", text="Blender Store", icon='URL', - ).url = "https://store.blender.org" - - # Include technical operators here which would otherwise have no way for users to access. class TOPBAR_MT_app_system(Menu): bl_label = "System" @@ -854,9 +808,7 @@ classes = ( TOPBAR_MT_workspace_menu, TOPBAR_MT_editor_menus, TOPBAR_MT_app, - TOPBAR_MT_app_about, TOPBAR_MT_app_system, - TOPBAR_MT_app_support, TOPBAR_MT_file, TOPBAR_MT_file_new, TOPBAR_MT_file_recover, -- cgit v1.2.3 From ce35cfd208ac8020f592a2c379e86b5b0f49a35f Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 12 May 2020 03:46:51 +0200 Subject: Fix T76306: Disable use creases when there is displacement data Use creases changes the limit surface, so the displacemente data is won't be correct if this option is modified without updating the displacement. Reviewed By: sergey Maniphest Tasks: T76306 Differential Revision: https://developer.blender.org/D7700 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 8f1337b156d..0a5d5ef3d8a 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -705,7 +705,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.operator("object.multires_base_apply", text="Apply Base") col.prop(md, "uv_smooth", text="") col.prop(md, "show_only_control_edges") - col.prop(md, "use_creases") + + row = col.row() + row.enabled = not have_displacement + row.prop(md, "use_creases") layout.separator() -- cgit v1.2.3 From b55c78a289c600696282f97191d6e800a1c1ac34 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 13 May 2020 12:39:17 +0200 Subject: Simulation: Add modifier to access simulation data For now the "Simulation" modifier only exists for point cloud objects, because we need this for the particle system. Right now, the modifier is doing nothing. There is a new `DEG_add_simulation_relation` function that is used by the modifier to make sure that the simulation is evaluated before the modifier is executed. Reviewers: brecht, sergey Differential Revision: https://developer.blender.org/D7549 --- release/scripts/startup/bl_ui/properties_data_modifier.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 6f3dae9e01c..75e9a320130 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1826,6 +1826,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "thresh", text="Threshold") col.prop(md, "face_influence") + def SIMULATION(self, layout, ob, md): + layout.prop(md, "simulation") + layout.prop(md, "data_path") + class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): bl_label = "Modifiers" -- cgit v1.2.3 From 54453530951b83d123d24028950e1ed67b8971b9 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Wed, 13 May 2020 04:11:10 +0200 Subject: Fix T76654: Wrong text in Face Set boundary automasking brush property Reviewed By: Blendify Maniphest Tasks: T76654 Differential Revision: https://developer.blender.org/D7697 --- release/scripts/startup/bl_ui/properties_paint_common.py | 2 +- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index dfaf574f1d0..92d421f63a8 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -820,7 +820,7 @@ def brush_settings_advanced(layout, context, brush, popover=False): # boundary edges/face sets automasking col.prop(brush, "use_automasking_boundary_edges", text="Mesh Boundary") - col.prop(brush, "use_automasking_boundary_face_sets", text="Face Sets") + col.prop(brush, "use_automasking_boundary_face_sets", text="Face Sets Boundary") col.prop(brush, "automasking_boundary_edges_propagation_steps") layout.separator() diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index b81f48bec5e..c6f6c7e007d 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -843,8 +843,8 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): 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="Boundary Edges") - col.prop(sculpt, "use_automasking_boundary_face_sets", text="Boundary Face Sets") + col.prop(sculpt, "use_automasking_boundary_edges", text="Mesh Boundary") + col.prop(sculpt, "use_automasking_boundary_face_sets", text="Face Sets Boundary") class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel): -- cgit v1.2.3 From fd025b0b7a46c5e56f348b73cf989c6bbddec707 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 13 May 2020 17:07:32 +0200 Subject: GPencil: Add new X-Ray option for Canvas Grid In some situations is good to have a grid visible anot beeing occulde by meshes. By default is OFF. Differential Revision: https://developer.blender.org/D7721 --- release/scripts/startup/bl_ui/space_view3d.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index fca4cb4c321..643776fc612 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6733,9 +6733,10 @@ class VIEW3D_PT_overlay_gpencil_options(Panel): col = layout.column() row = col.row() row.prop(overlay, "use_gpencil_grid", text="") - sub = row.row() + sub = row.row(align=True) sub.active = overlay.use_gpencil_grid sub.prop(overlay, "gpencil_grid_opacity", text="Canvas", slider=True) + sub.prop(overlay, "use_gpencil_canvas_xray", text="", icon='XRAY') row = col.row() row.prop(overlay, "use_gpencil_fade_layers", text="") -- cgit v1.2.3 From 71298a1da9718871b3ac063f814d10e6df98d406 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 13 May 2020 17:07:32 +0200 Subject: Revert "GPencil: Add new X-Ray option for Canvas Grid" This reverts commit fd025b0b7a46c5e56f348b73cf989c6bbddec707. --- release/scripts/startup/bl_ui/space_view3d.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 643776fc612..fca4cb4c321 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6733,10 +6733,9 @@ class VIEW3D_PT_overlay_gpencil_options(Panel): col = layout.column() row = col.row() row.prop(overlay, "use_gpencil_grid", text="") - sub = row.row(align=True) + sub = row.row() sub.active = overlay.use_gpencil_grid sub.prop(overlay, "gpencil_grid_opacity", text="Canvas", slider=True) - sub.prop(overlay, "use_gpencil_canvas_xray", text="", icon='XRAY') row = col.row() row.prop(overlay, "use_gpencil_fade_layers", text="") -- cgit v1.2.3 From b369d46eb775b32df6c68924703c9a7bb67a2b61 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 13 May 2020 17:07:32 +0200 Subject: GPencil: Add new X-Ray option for Canvas Grid In some situations is good to have a grid visible anot beeing occulde by meshes. By default is OFF. Differential Revision: https://developer.blender.org/D7721 --- release/scripts/startup/bl_ui/space_view3d.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index ebc3263f9cc..664c40f2ec7 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -6726,9 +6726,10 @@ class VIEW3D_PT_overlay_gpencil_options(Panel): col = layout.column() row = col.row() row.prop(overlay, "use_gpencil_grid", text="") - sub = row.row() + sub = row.row(align=True) sub.active = overlay.use_gpencil_grid sub.prop(overlay, "gpencil_grid_opacity", text="Canvas", slider=True) + sub.prop(overlay, "use_gpencil_canvas_xray", text="", icon='XRAY') row = col.row() row.prop(overlay, "use_gpencil_fade_layers", text="") -- cgit v1.2.3 From 879032d2ab95fb6124eb95b131a0bbc315a05dfe Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Thu, 14 May 2020 02:53:10 +0200 Subject: Cleanup: Correct order of proxy resolutions Wrong order introduced by rB7fc60bff14a6: UI: Layout changes for new checkbox layout possibilities --- release/scripts/startup/bl_ui/space_sequencer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index b908e61b9e1..ca25c29960c 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1881,8 +1881,8 @@ class SEQUENCER_PT_strip_proxy(SequencerButtonsPanel, Panel): row = layout.row(heading="Resolutions", align=True) row.prop(strip.proxy, "build_25", toggle=True) - row.prop(strip.proxy, "build_75", toggle=True) row.prop(strip.proxy, "build_50", toggle=True) + row.prop(strip.proxy, "build_75", toggle=True) row.prop(strip.proxy, "build_100", toggle=True) layout.use_property_split = True -- cgit v1.2.3 From 13769bcbe5ccce70736ff73107d9284396043379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Thu, 14 May 2020 10:30:11 +0200 Subject: Fluid: Rename smoke flow forces to fluid flow forces Better to use more general term since in theory these forces can be used for smoke and liquid. --- release/scripts/startup/bl_ui/properties_physics_field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py index 00dc068a51a..d1ff1dc9f5e 100644 --- a/release/scripts/startup/bl_ui/properties_physics_field.py +++ b/release/scripts/startup/bl_ui/properties_physics_field.py @@ -123,7 +123,7 @@ class PHYSICS_PT_field_settings(PhysicButtonsPanel, Panel): col.prop(field, "use_object_coords") col.prop(field, "use_2d_force") - elif field.type == 'SMOKE_FLOW': + elif field.type == 'FLUID_FLOW': col = flow.column() col.prop(field, "strength") col.prop(field, "flow") -- cgit v1.2.3 From e58525706328f902baaa0252cb28b4a33534259c Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 14 May 2020 16:31:15 +0200 Subject: GPencil: Changes in 2D template Differential Revision: https://developer.blender.org/D7619 --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 6aaeec3f3cf..688d47d2093 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1423,6 +1423,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_select(Panel, View3DPanel, GreasePenci class VIEW3D_PT_tools_grease_pencil_brush_settings(Panel, View3DPanel, GreasePencilPaintPanel): bl_label = "Brush Settings" + bl_options = {'DEFAULT_CLOSED'} # What is the point of brush presets? Seems to serve the exact same purpose as brushes themselves?? def draw_header_preset(self, _context): @@ -2105,7 +2106,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_mixcolor(View3DPanel, Panel): bl_context = ".greasepencil_paint" bl_label = "Color" bl_category = "Tool" - bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): @@ -2165,7 +2165,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_mix_palette(View3DPanel, Panel): bl_label = "Palette" bl_category = "Tool" bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_mixcolor' - bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): -- cgit v1.2.3 From 7049d2dc584d1aada54848fbaa7be6d599972fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 15 May 2020 11:54:17 +0200 Subject: Fix T76778: Dopesheet "Show Errors" affects timeline Since the timeline is a variation of the dopesheet, it also respects some of the dopesheet settings. The "Selected Only" setting is overridden from a scene property (since rB4904eadc0f38) and the "Display Hidden" dopesheet setting seems to be ignored. This commit adds the remaining "Show Errors" setting to the menu, allowing it to be updated from the timeline. --- release/scripts/startup/bl_ui/space_time.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index 629958a783e..257e0c26a5d 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -142,6 +142,7 @@ class TIME_MT_view(Menu): layout.separator() layout.prop(scene, "show_keys_from_selected_only") + layout.prop(st.dopesheet, "show_only_errors") layout.separator() -- cgit v1.2.3