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_data_hair.py68
-rw-r--r--release/scripts/startup/bl_ui/properties_data_pointcloud.py67
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py10
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py51
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py9
-rw-r--r--release/scripts/startup/bl_ui/space_image.py29
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py15
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
8 files changed, 203 insertions, 47 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_hair.py b/release/scripts/startup/bl_ui/properties_data_hair.py
index 6017765b83d..58491f16c6e 100644
--- a/release/scripts/startup/bl_ui/properties_data_hair.py
+++ b/release/scripts/startup/bl_ui/properties_data_hair.py
@@ -18,7 +18,7 @@
# <pep8 compliant>
import bpy
-from bpy.types import Panel, UIList
+from bpy.types import Menu, Panel, UIList
from rna_prop_ui import PropertyPanel
@@ -51,14 +51,68 @@ class DATA_PT_context_hair(DataButtonsPanel, Panel):
layout.template_ID(space, "pin_id")
-class DATA_PT_hair(DataButtonsPanel, Panel):
- bl_label = "Hair"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+class HAIR_MT_add_attribute(Menu):
+ bl_label = "Add Attribute"
+
+ @staticmethod
+ def add_standard_attribute(layout, hair, name, data_type, domain):
+ exists = hair.attributes.get(name) != None
+
+ col = layout.column()
+ col.enabled = not exists
+ col.operator_context = 'EXEC_DEFAULT'
+
+ props = col.operator("geometry.attribute_add", text=name)
+ props.name = name
+ props.data_type = data_type
+ props.domain = domain
def draw(self, context):
layout = self.layout
hair = context.hair
- pass
+
+ self.add_standard_attribute(layout, hair, 'Radius', 'FLOAT', 'POINT')
+ self.add_standard_attribute(layout, hair, 'Color', 'FLOAT_COLOR', 'POINT')
+
+ layout.separator()
+
+ layout.operator_context = 'INVOKE_DEFAULT'
+ layout.operator("geometry.attribute_add", text="Custom...")
+
+
+class HAIR_UL_attributes(UIList):
+ def draw_item(self, context, layout, data, attribute, icon, active_data, active_propname, index):
+ data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
+ domain = attribute.bl_rna.properties['domain'].enum_items[attribute.domain]
+
+ split = layout.split(factor=0.5)
+ row = split.row()
+ row.prop(attribute, "name", text="", emboss=False)
+ sub = split.split()
+ sub.alignment = 'RIGHT'
+ sub.active = False
+ sub.label(text=domain.name)
+ sub.label(text=data_type.name)
+
+
+class DATA_PT_hair_attributes(DataButtonsPanel, Panel):
+ bl_label = "Attributes"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+
+ def draw(self, context):
+ hair = context.hair
+
+ layout = self.layout
+ row = layout.row()
+
+ col = row.column()
+ col.template_list("HAIR_UL_attributes", "attributes", hair, "attributes", hair.attributes, "active_index", rows=3)
+
+ col = row.column(align=True)
+ col.menu("HAIR_MT_add_attribute", icon='ADD', text="")
+ col.operator("geometry.attribute_remove", icon='REMOVE', text="")
+
+
class DATA_PT_custom_props_hair(DataButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@@ -68,8 +122,10 @@ class DATA_PT_custom_props_hair(DataButtonsPanel, PropertyPanel, Panel):
classes = (
DATA_PT_context_hair,
- DATA_PT_hair,
+ DATA_PT_hair_attributes,
DATA_PT_custom_props_hair,
+ HAIR_MT_add_attribute,
+ HAIR_UL_attributes,
)
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/properties_data_pointcloud.py b/release/scripts/startup/bl_ui/properties_data_pointcloud.py
index 10ebdea3155..d7ff7389fc3 100644
--- a/release/scripts/startup/bl_ui/properties_data_pointcloud.py
+++ b/release/scripts/startup/bl_ui/properties_data_pointcloud.py
@@ -18,7 +18,7 @@
# <pep8 compliant>
import bpy
-from bpy.types import Panel, UIList
+from bpy.types import Menu, Panel, UIList
from rna_prop_ui import PropertyPanel
@@ -51,14 +51,67 @@ class DATA_PT_context_pointcloud(DataButtonsPanel, Panel):
layout.template_ID(space, "pin_id")
-class DATA_PT_pointcloud(DataButtonsPanel, Panel):
- bl_label = "Point Cloud"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+class POINTCLOUD_MT_add_attribute(Menu):
+ bl_label = "Add Attribute"
+
+ @staticmethod
+ def add_standard_attribute(layout, pointcloud, name, data_type, domain):
+ exists = pointcloud.attributes.get(name) != None
+
+ col = layout.column()
+ col.enabled = not exists
+ col.operator_context = 'EXEC_DEFAULT'
+
+ props = col.operator("geometry.attribute_add", text=name)
+ props.name = name
+ props.data_type = data_type
+ props.domain = domain
def draw(self, context):
layout = self.layout
pointcloud = context.pointcloud
- pass
+
+ self.add_standard_attribute(layout, pointcloud, 'Radius', 'FLOAT', 'POINT')
+ self.add_standard_attribute(layout, pointcloud, 'Color', 'FLOAT_COLOR', 'POINT')
+ self.add_standard_attribute(layout, pointcloud, 'Particle ID', 'INT', 'POINT')
+ self.add_standard_attribute(layout, pointcloud, 'Velocity', 'FLOAT_VECTOR', 'POINT')
+
+ layout.separator()
+
+ layout.operator_context = 'INVOKE_DEFAULT'
+ layout.operator("geometry.attribute_add", text="Custom...")
+
+
+class POINTCLOUD_UL_attributes(UIList):
+ def draw_item(self, context, layout, data, attribute, icon, active_data, active_propname, index):
+ data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
+
+ split = layout.split(factor=0.75)
+ split.prop(attribute, "name", text="", emboss=False)
+ sub = split.row()
+ sub.alignment = 'RIGHT'
+ sub.active = False
+ sub.label(text=data_type.name)
+
+
+class DATA_PT_pointcloud_attributes(DataButtonsPanel, Panel):
+ bl_label = "Attributes"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+
+ def draw(self, context):
+ pointcloud = context.pointcloud
+
+ layout = self.layout
+ row = layout.row()
+
+ col = row.column()
+ col.template_list("POINTCLOUD_UL_attributes", "attributes", pointcloud, "attributes", pointcloud.attributes, "active_index", rows=3)
+
+ col = row.column(align=True)
+ col.menu("POINTCLOUD_MT_add_attribute", icon='ADD', text="")
+ col.operator("geometry.attribute_remove", icon='REMOVE', text="")
+
+
class DATA_PT_custom_props_pointcloud(DataButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@@ -68,8 +121,10 @@ class DATA_PT_custom_props_pointcloud(DataButtonsPanel, PropertyPanel, Panel):
classes = (
DATA_PT_context_pointcloud,
- DATA_PT_pointcloud,
+ DATA_PT_pointcloud_attributes,
DATA_PT_custom_props_pointcloud,
+ POINTCLOUD_MT_add_attribute,
+ POINTCLOUD_UL_attributes,
)
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index a20de3e29db..d5f48876491 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -677,14 +677,16 @@ def brush_settings(layout, context, brush, popover=False):
layout.separator()
elif sculpt_tool == 'SCRAPE':
- row = layout.row()
- row.prop(brush, "area_radius_factor", slider=True)
+ row = layout.row(align=True)
+ row.prop(brush, "area_radius_factor")
+ row.prop(brush, "use_pressure_area_radius", text="")
row = layout.row()
row.prop(brush, "invert_to_scrape_fill", text="Invert to Fill")
elif sculpt_tool == 'FILL':
- row = layout.row()
- row.prop(brush, "area_radius_factor", slider=True)
+ row = layout.row(align=True)
+ row.prop(brush, "area_radius_factor")
+ row.prop(brush, "use_pressure_area_radius", text="")
row = layout.row()
row.prop(brush, "invert_to_scrape_fill", text="Invert to Scrape")
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 8dd5b935922..427f8c2c85f 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -731,11 +731,18 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel):
# 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")
+ if domain.use_noise and domain.cache_type == 'MODULAR':
+ label = ""
+ if not domain.has_cache_baked_data:
+ label = "Unbaked Data: Bake Data first"
+ if not domain.cache_resumable:
+ label = "Non Resumable Cache: Enable resumable option first"
+
+ if label:
+ note = layout.split()
+ note_flag = False
+ note.enabled = note_flag
+ note.label(icon='INFO', text=label)
split = layout.split()
split.enabled = domain.has_cache_baked_data and note_flag and ob.mode == 'OBJECT'
@@ -817,11 +824,18 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel):
# 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")
+ if domain.use_mesh and domain.cache_type == 'MODULAR':
+ label = ""
+ if not domain.has_cache_baked_data:
+ label = "Unbaked Data: Bake Data first"
+ if not domain.cache_resumable:
+ label = "Non Resumable Cache: Enable resumable option first"
+
+ if label:
+ note = layout.split()
+ note_flag = False
+ note.enabled = note_flag
+ note.label(icon='INFO', text=label)
split = layout.split()
split.enabled = domain.has_cache_baked_data and note_flag and ob.mode == 'OBJECT'
@@ -931,11 +945,18 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel):
# 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")
+ if using_particles and domain.cache_type == 'MODULAR':
+ label = ""
+ if not domain.has_cache_baked_data:
+ label = "Unbaked Data: Bake Data first"
+ if not domain.cache_resumable:
+ label = "Non Resumable Cache: Enable resumable option first"
+
+ if label:
+ note = layout.split()
+ note_flag = False
+ note.enabled = note_flag
+ note.label(icon='INFO', text=label)
split = layout.split()
split.enabled = (
diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index 6f00e521e58..9b61311c2d3 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -77,9 +77,12 @@ class EEVEE_WORLD_PT_mist(WorldButtonsPanel, Panel):
world = context.world
- layout.prop(world.mist_settings, "start")
- layout.prop(world.mist_settings, "depth")
- layout.prop(world.mist_settings, "falloff")
+ col = layout.column(align=True)
+ col.prop(world.mist_settings, "start")
+ col.prop(world.mist_settings, "depth")
+
+ col = layout.column()
+ col.prop(world.mist_settings, "falloff")
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index c63b0768957..0fde128a906 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -364,6 +364,29 @@ class IMAGE_MT_uvs_split(Menu):
layout.operator("uv.select_split", text="Selection")
+class IMAGE_MT_uvs_unwrap(Menu):
+ bl_label = "Unwrap"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("uv.unwrap")
+
+ layout.separator()
+
+ layout.operator_context = 'INVOKE_DEFAULT'
+ layout.operator("uv.smart_project")
+ layout.operator("uv.lightmap_pack")
+ layout.operator("uv.follow_active_quads")
+
+ layout.separator()
+
+ layout.operator_context = 'EXEC_REGION_WIN'
+ layout.operator("uv.cube_project")
+ layout.operator("uv.cylinder_project")
+ layout.operator("uv.sphere_project")
+
+
class IMAGE_MT_uvs(Menu):
bl_label = "UV"
@@ -388,7 +411,7 @@ class IMAGE_MT_uvs(Menu):
layout.separator()
layout.prop(uv, "use_live_unwrap")
- layout.operator("uv.unwrap")
+ layout.menu("IMAGE_MT_uvs_unwrap")
layout.separator()
@@ -996,7 +1019,8 @@ class IMAGE_PT_view_display_uv_edit_overlays(Panel):
col.prop(uvedit, "show_faces", text="Faces")
col = layout.column()
- col.prop(uvedit, "show_smooth_edges", text="Smooth")
+ if context.preferences.experimental.use_image_editor_legacy_drawing:
+ col.prop(uvedit, "show_smooth_edges", text="Smooth")
col.prop(uvedit, "show_modified_edges", text="Modified")
col.prop(uvedit, "uv_opacity")
@@ -1508,6 +1532,7 @@ classes = (
IMAGE_MT_uvs_align,
IMAGE_MT_uvs_merge,
IMAGE_MT_uvs_split,
+ IMAGE_MT_uvs_unwrap,
IMAGE_MT_uvs_select_mode,
IMAGE_MT_uvs_context_menu,
IMAGE_MT_mask_context_menu,
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index 5a54d4ca2d8..4497f37cfd2 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -275,7 +275,6 @@ class OUTLINER_MT_object(Menu):
space = context.space_data
obj = context.active_object
- object_mode = 'OBJECT' if obj is None else obj.mode
layout.operator("outliner.id_copy", text="Copy", icon='COPYDOWN')
layout.operator("outliner.id_paste", text="Paste", icon='PASTEDOWN')
@@ -293,16 +292,6 @@ class OUTLINER_MT_object(Menu):
layout.separator()
- 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=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()
-
if not (space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection):
layout.operator("outliner.id_operation", text="Unlink").type = 'UNLINK'
layout.separator()
@@ -358,6 +347,10 @@ class OUTLINER_PT_filter(Panel):
row.prop(space, "use_sync_select", text="Sync Selection")
layout.separator()
+ row = layout.row(align=True)
+ row.prop(space, "show_mode_column", text="Show Mode Column")
+ layout.separator()
+
col = layout.column(align=True)
col.label(text="Search:")
col.prop(space, "use_filter_complete", text="Exact Match")
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 506849fbee5..faea806c6cb 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2194,6 +2194,7 @@ class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel):
context, (
({"property": "use_undo_legacy"}, "T60695"),
({"property": "use_cycles_debug"}, None),
+ ({"property": "use_image_editor_legacy_drawing"}, "T67530"),
),
)