Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/properties_animviz.py68
-rw-r--r--release/scripts/startup/bl_ui/properties_data_curves.py12
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py2
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py4
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py3
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_common.py3
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py16
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py10
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py104
10 files changed, 163 insertions, 60 deletions
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py
index 548ce72c429..629399084ba 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -24,55 +24,55 @@ class MotionPathButtonsPanel:
layout.use_property_split = True
layout.use_property_decorate = False
- row = layout.row(align=True)
- row.prop(mps, "type")
- if mps.type == 'RANGE':
- if bones:
- row.operator("pose.paths_range_update", text="", icon='TIME')
- else:
- row.operator("object.paths_range_update", text="", icon='TIME')
-
+ # Display Range
+ col = layout.column(align=True)
+ col.prop(mps, "type")
+ col = layout.column(align=True)
if mps.type == 'CURRENT_FRAME':
- col = layout.column(align=True)
col.prop(mps, "frame_before", text="Frame Range Before")
col.prop(mps, "frame_after", text="After")
- col.prop(mps, "frame_step", text="Step")
- elif mps.type == 'RANGE':
- col = layout.column(align=True)
- col.prop(mps, "frame_start", text="Frame Range Start")
- col.prop(mps, "frame_end", text="End")
- col.prop(mps, "frame_step", text="Step")
+ col.prop(mps, "frame_step", text="Step")
+
+ # Calculation Range
+ col = layout.column(align=True)
+ row = col.row(align=True)
+ row.prop(mps, "range", text="Calculation Range")
if mpath:
col = layout.column(align=True)
- col.enabled = False
- if bones:
- col.prop(mpath, "frame_start", text="Bone Cache From")
- else:
- col.prop(mpath, "frame_start", text="Cache From")
- col.prop(mpath, "frame_end", text="To")
+ row = col.row(align=True)
+ row.enabled = False
+ row.prop(mpath, "frame_start", text="Cached Range")
+ row.prop(mpath, "frame_end", text="")
col = layout.column(align=True)
-
+ row = col.row(align=True)
if bones:
- col.operator("pose.paths_update", text="Update Paths", icon='BONE_DATA')
+ row.operator("pose.paths_update", text="Update Paths", icon='BONE_DATA')
+ row.operator("pose.paths_clear", text="", icon='X').only_selected = True
+ row = col.row(align=True)
+ row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
+ row.operator("pose.paths_clear", text="", icon='X').only_selected = False
else:
- col.operator("object.paths_update", text="Update Paths", icon='OBJECT_DATA')
+ row.operator("object.paths_update", text="Update Paths", icon='OBJECT_DATA')
+ row.operator("object.paths_clear", text="", icon='X').only_selected = True
+ row = col.row(align=True)
+ row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
+ row.operator("object.paths_clear", text="", icon='X').only_selected = False
else:
col = layout.column(align=True)
- col.label(text="Nothing to show yet...", icon='ERROR')
+ col.label(text="No Motion Path generated yet", icon='ERROR')
+ # Don't invoke settings popup because settings are right above
+ col.operator_context = 'EXEC_REGION_WIN'
if bones:
- col.operator("pose.paths_calculate", text="Calculate...", icon='BONE_DATA')
+ col.operator(
+ "pose.paths_calculate", text="Generate for selected bones", icon='BONE_DATA')
else:
- col.operator("object.paths_calculate", text="Calculate...", icon='OBJECT_DATA')
-
- row = col.row(align=True)
- row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
- if bones:
- row.operator("pose.paths_clear", text="", icon='X')
- else:
- row.operator("object.paths_clear", text="", icon='X')
+ col.operator("object.paths_calculate", text="Generate", icon='OBJECT_DATA')
+ row = col.row(align=True)
+ row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
+ row.operator("object.paths_clear", text="", icon='X').only_selected = False
class MotionPathButtonsPanel_display:
diff --git a/release/scripts/startup/bl_ui/properties_data_curves.py b/release/scripts/startup/bl_ui/properties_data_curves.py
index 3e350575bc8..1bb5fc9afbe 100644
--- a/release/scripts/startup/bl_ui/properties_data_curves.py
+++ b/release/scripts/startup/bl_ui/properties_data_curves.py
@@ -35,6 +35,17 @@ class DATA_PT_context_curves(DataButtonsPanel, Panel):
layout.template_ID(space, "pin_id")
+class DATA_PT_curves_surface(DataButtonsPanel, Panel):
+ bl_label = "Surface"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+
+ layout.prop(ob.data, "surface")
+
+
class CURVES_MT_add_attribute(Menu):
bl_label = "Add Attribute"
@@ -115,6 +126,7 @@ class DATA_PT_custom_props_curves(DataButtonsPanel, PropertyPanel, Panel):
classes = (
DATA_PT_context_curves,
DATA_PT_CURVES_attributes,
+ DATA_PT_curves_surface,
DATA_PT_custom_props_curves,
CURVES_MT_add_attribute,
CURVES_UL_attributes,
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index ca623797c49..9e40a8d364a 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -79,6 +79,8 @@ class UnifiedPaintPanel:
return tool_settings.gpencil_weight_paint
elif mode == 'VERTEX_GPENCIL':
return tool_settings.gpencil_vertex_paint
+ elif mode == 'SCULPT_CURVES':
+ return tool_settings.curves_sculpt
return None
@staticmethod
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 8e328e7cf2b..7b7fc9dcf77 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -663,6 +663,10 @@ class DOPESHEET_MT_context_menu(Menu):
layout.operator_menu_enum("action.mirror", "type", text="Mirror")
layout.operator_menu_enum("action.snap", "type", text="Snap")
+ if st.mode == 'DOPESHEET':
+ layout.separator()
+ layout.menu("VIEW3D_MT_motion_path")
+
class DOPESHEET_MT_channel_context_menu(Menu):
bl_label = "Dope Sheet Channel Context Menu"
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index 6f9ef12c3b7..6bc11d51ca0 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -390,6 +390,9 @@ class GRAPH_MT_context_menu(Menu):
layout.operator_menu_enum("graph.mirror", "type", text="Mirror")
layout.operator_menu_enum("graph.snap", "type", text="Snap")
+ layout.separator()
+ layout.menu("VIEW3D_MT_motion_path")
+
class GRAPH_MT_pivot_pie(Menu):
bl_label = "Pivot Point"
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 411db8781e1..3e4f7f6fbcb 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -1038,9 +1038,6 @@ def _activate_by_item(context, space_type, item, index, *, as_fallback=False):
if props is None:
print("Error:", gizmo_group, "could not access properties!")
else:
- for key in props.bl_rna.properties.keys():
- props.property_unset(key)
-
gizmo_properties = item.widget_properties
if gizmo_properties is not None:
if not isinstance(gizmo_properties, list):
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 338bf5a9d5d..f4aa4c50d76 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -2306,6 +2306,19 @@ class _defs_gpencil_weight:
)
+class _defs_curves_sculpt:
+
+ @staticmethod
+ def generate_from_brushes(context):
+ return generate_from_enum_ex(
+ context,
+ idname_prefix="builtin_brush.",
+ icon_prefix="ops.curves.sculpt_",
+ type= bpy.types.Brush,
+ attr="curves_sculpt_tool",
+ )
+
+
class _defs_gpencil_vertex:
@staticmethod
@@ -3065,6 +3078,9 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
else ()
),
],
+ 'SCULPT_CURVES': [
+ _defs_curves_sculpt.generate_from_brushes,
+ ],
}
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 493cad6d2db..3b6bdd01efa 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -448,8 +448,7 @@ class TOPBAR_MT_file_import(Menu):
def draw(self, _context):
if bpy.app.build_options.collada:
- self.layout.operator("wm.collada_import",
- text="Collada (Default) (.dae)")
+ self.layout.operator("wm.collada_import", text="Collada (.dae)")
if bpy.app.build_options.alembic:
self.layout.operator("wm.alembic_import", text="Alembic (.abc)")
if bpy.app.build_options.usd:
@@ -467,8 +466,7 @@ class TOPBAR_MT_file_export(Menu):
def draw(self, _context):
self.layout.operator("wm.obj_export", text="Wavefront OBJ (.obj)")
if bpy.app.build_options.collada:
- self.layout.operator("wm.collada_export",
- text="Collada (Default) (.dae)")
+ self.layout.operator("wm.collada_export", text="Collada (.dae)")
if bpy.app.build_options.alembic:
self.layout.operator("wm.alembic_export", text="Alembic (.abc)")
if bpy.app.build_options.usd:
@@ -690,8 +688,8 @@ class TOPBAR_MT_help(Menu):
layout.separator()
layout.operator(
- "wm.url_open", text="Python API Reference", icon='URL',
- ).url = bpy.types.WM_OT_doc_view._prefix
+ "wm.url_open_preset", text="Python API Reference", icon='URL',
+ ).type = 'API'
if show_developer:
layout.operator(
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index fc1911910c4..f80ad378b3c 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1718,6 +1718,7 @@ class USERPREF_PT_ndof_settings(Panel):
if show_3dview_settings:
col.prop(props, "ndof_show_guide")
col.prop(props, "ndof_zoom_invert")
+ col.prop(props, "ndof_lock_camera_pan_zoom")
row = col.row(heading="Pan")
row.prop(props, "ndof_pan_yz_swap_axis", text="Swap Y and Z Axes")
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 61ba6189be4..cd0306d31fd 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -468,6 +468,38 @@ class _draw_tool_settings_context_mode:
return True
+ @staticmethod
+ def SCULPT_CURVES(context, layout, tool):
+ if (tool is None) or (not tool.has_datablock):
+ return False
+
+ paint = context.tool_settings.curves_sculpt
+ layout.template_ID_preview(paint, "brush", rows=3, cols=8, hide_buttons=True)
+
+ brush = paint.brush
+ if brush is None:
+ return False
+
+ UnifiedPaintPanel.prop_unified(
+ layout,
+ context,
+ brush,
+ "size",
+ unified_name="use_unified_size",
+ text="Radius",
+ slider=True,
+ header=True
+ )
+
+ UnifiedPaintPanel.prop_unified(
+ layout,
+ context,
+ brush,
+ "strength",
+ unified_name="use_unified_strength",
+ header=True
+ )
+
class VIEW3D_HT_header(Header):
bl_space_type = 'VIEW_3D'
@@ -1165,23 +1197,24 @@ class VIEW3D_MT_view_viewpoint(Menu):
def draw(self, _context):
layout = self.layout
+ i18n_text_ctxt = bpy.app.translations.contexts_C_to_py['BLT_I18NCONTEXT_EDITOR_VIEW3D']
- layout.operator("view3d.view_camera", text="Camera")
+ layout.operator("view3d.view_camera", text="Camera", text_ctxt=i18n_text_ctxt)
layout.separator()
- layout.operator("view3d.view_axis", text="Top").type = 'TOP'
- layout.operator("view3d.view_axis", text="Bottom").type = 'BOTTOM'
+ layout.operator("view3d.view_axis", text="Top", text_ctxt=i18n_text_ctxt).type = 'TOP'
+ layout.operator("view3d.view_axis", text="Bottom", text_ctxt=i18n_text_ctxt).type = 'BOTTOM'
layout.separator()
- layout.operator("view3d.view_axis", text="Front").type = 'FRONT'
- layout.operator("view3d.view_axis", text="Back").type = 'BACK'
+ layout.operator("view3d.view_axis", text="Front", text_ctxt=i18n_text_ctxt).type = 'FRONT'
+ layout.operator("view3d.view_axis", text="Back", text_ctxt=i18n_text_ctxt).type = 'BACK'
layout.separator()
- layout.operator("view3d.view_axis", text="Right").type = 'RIGHT'
- layout.operator("view3d.view_axis", text="Left").type = 'LEFT'
+ layout.operator("view3d.view_axis", text="Right", text_ctxt=i18n_text_ctxt).type = 'RIGHT'
+ layout.operator("view3d.view_axis", text="Left", text_ctxt=i18n_text_ctxt).type = 'LEFT'
class VIEW3D_MT_view_navigation(Menu):
@@ -1248,31 +1281,31 @@ class VIEW3D_MT_view_align_selected(Menu):
def draw(self, _context):
layout = self.layout
- props = layout.operator("view3d.view_axis", text="Top")
+ props = layout.operator("view3d.view_axis", text="Top", text_ctxt=i18n_text_ctxt)
props.align_active = True
props.type = 'TOP'
- props = layout.operator("view3d.view_axis", text="Bottom")
+ props = layout.operator("view3d.view_axis", text="Bottom", text_ctxt=i18n_text_ctxt)
props.align_active = True
props.type = 'BOTTOM'
layout.separator()
- props = layout.operator("view3d.view_axis", text="Front")
+ props = layout.operator("view3d.view_axis", text="Front", text_ctxt=i18n_text_ctxt)
props.align_active = True
props.type = 'FRONT'
- props = layout.operator("view3d.view_axis", text="Back")
+ props = layout.operator("view3d.view_axis", text="Back", text_ctxt=i18n_text_ctxt)
props.align_active = True
props.type = 'BACK'
layout.separator()
- props = layout.operator("view3d.view_axis", text="Right")
+ props = layout.operator("view3d.view_axis", text="Right", text_ctxt=i18n_text_ctxt)
props.align_active = True
props.type = 'RIGHT'
- props = layout.operator("view3d.view_axis", text="Left")
+ props = layout.operator("view3d.view_axis", text="Left", text_ctxt=i18n_text_ctxt)
props.align_active = True
props.type = 'LEFT'
@@ -1899,6 +1932,13 @@ class VIEW3D_MT_select_paint_mask_vertex(Menu):
layout.operator("paint.vert_select_ungrouped", text="Ungrouped Vertices")
+class VIEW3D_MT_select_edit_curves(Menu):
+ bl_label = "Select"
+
+ def draw(self, _context):
+ pass
+
+
class VIEW3D_MT_angle_control(Menu):
bl_label = "Angle Control"
@@ -2344,6 +2384,25 @@ class VIEW3D_MT_object_clear(Menu):
layout.operator("object.origin_clear", text="Origin")
+class VIEW3D_MT_motion_path(Menu):
+ bl_label = "Motion Paths"
+
+ def draw(self, _context):
+ layout = self.layout
+ ob = _context.object
+ if ob.mode == 'OBJECT':
+ layout.operator("object.paths_calculate")
+ layout.operator("object.paths_update")
+ layout.operator("object.paths_update_visible")
+ layout.operator("object.paths_clear", text="Clear all").only_selected = False
+ layout.operator("object.paths_clear", text="Clear selected").only_selected = True
+ elif ob.mode == 'POSE':
+ layout.operator("pose.paths_calculate")
+ layout.operator("pose.paths_update")
+ layout.operator("pose.paths_clear", text="Clear all").only_selected = False
+ layout.operator("pose.paths_clear", text="Clear selected").only_selected = True
+
+
class VIEW3D_MT_object_context_menu(Menu):
bl_label = "Object Context Menu"
@@ -2545,6 +2604,7 @@ class VIEW3D_MT_object_context_menu(Menu):
layout.menu("VIEW3D_MT_mirror")
layout.menu("VIEW3D_MT_snap")
layout.menu("VIEW3D_MT_object_parent")
+ layout.menu("VIEW3D_MT_motion_path")
layout.operator_context = 'INVOKE_REGION_WIN'
if view and view.local_view:
@@ -3592,10 +3652,10 @@ class VIEW3D_MT_pose_context_menu(Menu):
layout.separator()
- layout.operator("pose.paths_calculate", text="Calculate Motion Paths")
- layout.operator("pose.paths_clear", text="Clear Motion Paths")
- layout.operator("pose.paths_update", text="Update Armature Motion Paths")
- layout.operator("object.paths_update_visible", text="Update All Motion Paths")
+ layout.operator("pose.paths_calculate")
+ layout.operator("pose.paths_update")
+ layout.operator("pose.paths_clear", text="Clear all").only_selected = False
+ layout.operator("pose.paths_clear", text="Clear selected").only_selected = True
layout.separator()
@@ -5123,6 +5183,13 @@ class VIEW3D_MT_edit_gpencil_showhide(Menu):
layout.operator("gpencil.hide", text="Hide Inactive Layers").unselected = True
+class VIEW3D_MT_edit_curves(Menu):
+ bl_label = "Curves"
+
+ def draw(self, _context):
+ pass
+
+
class VIEW3D_MT_object_mode_pie(Menu):
bl_label = "Mode"
@@ -7544,6 +7611,7 @@ classes = (
VIEW3D_MT_select_gpencil,
VIEW3D_MT_select_paint_mask,
VIEW3D_MT_select_paint_mask_vertex,
+ VIEW3D_MT_select_edit_curves,
VIEW3D_MT_angle_control,
VIEW3D_MT_mesh_add,
VIEW3D_MT_curve_add,
@@ -7576,6 +7644,7 @@ classes = (
VIEW3D_MT_object_quick_effects,
VIEW3D_MT_object_showhide,
VIEW3D_MT_object_cleanup,
+ VIEW3D_MT_motion_path,
VIEW3D_MT_make_single_user,
VIEW3D_MT_make_links,
VIEW3D_MT_brush_paint_modes,
@@ -7666,6 +7735,7 @@ classes = (
VIEW3D_MT_edit_armature_names,
VIEW3D_MT_edit_armature_delete,
VIEW3D_MT_edit_gpencil_transform,
+ VIEW3D_MT_edit_curves,
VIEW3D_MT_object_mode_pie,
VIEW3D_MT_view_pie,
VIEW3D_MT_transform_gizmo_pie,