diff options
Diffstat (limited to 'release')
17 files changed, 182 insertions, 179 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py index 86185b96e9d..f73d23c150b 100644 --- a/release/scripts/modules/addon_utils.py +++ b/release/scripts/modules/addon_utils.py @@ -367,14 +367,14 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non # Silent default, we know these need updating. if module_name in { - "io_anim_bvh", - "io_mesh_ply", - "io_mesh_stl", - "io_mesh_uv_layout", - "io_scene_3ds", - "io_scene_fbx", - "io_scene_obj", - "io_scene_x3d", + "io_anim_bvh", + "io_mesh_ply", + "io_mesh_stl", + "io_mesh_uv_layout", + "io_scene_3ds", + "io_scene_fbx", + "io_scene_obj", + "io_scene_x3d", }: return None diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py index 14407afa8f2..d46431afef4 100644 --- a/release/scripts/startup/bl_ui/properties_data_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py @@ -21,13 +21,14 @@ import bpy from bpy.types import Menu, Panel, UIList from rna_prop_ui import PropertyPanel from .properties_grease_pencil_common import ( - GreasePencilDataPanel, - GreasePencilOnionPanel, - ) + GreasePencilDataPanel, + GreasePencilOnionPanel, +) ############################### # Base-Classes (for shared stuff - e.g. poll, attributes, etc.) + class DataButtonsPanel: bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' @@ -379,6 +380,7 @@ class DATA_PT_custom_props_gpencil(DataButtonsPanel, PropertyPanel, Panel): ############################### + classes = ( DATA_PT_gpencil, DATA_PT_gpencil_datapanel, diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 2328925bbad..7eeb45cc52e 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -28,6 +28,7 @@ class ModifierButtonsPanel: bl_context = "modifier" bl_options = {'HIDE_HEADER'} + class DATA_PT_modifiers(ModifierButtonsPanel, Panel): bl_label = "Modifiers" @@ -1857,7 +1858,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): if md.mode == 'CONCURRENT': col.prop(md, "concurrent_time_alignment") else: - col.separator() # For spacing + col.separator() # For spacing col.separator() col.separator() @@ -1929,7 +1930,6 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): layout.label(text="Object:") layout.prop(md, "object", text="") - def GP_HOOK(self, layout, ob, md): gpd = ob.data split = layout.split() @@ -1977,7 +1977,6 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.prop(md, "use_falloff_uniform") - def GP_OFFSET(self, layout, ob, md): gpd = ob.data split = layout.split() @@ -1989,7 +1988,6 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.prop(md, "rotation") - col.label("Layer:") row = col.row(align=True) row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL') diff --git a/release/scripts/startup/bl_ui/properties_data_shaderfx.py b/release/scripts/startup/bl_ui/properties_data_shaderfx.py index 5010f56d234..3798a273e09 100644 --- a/release/scripts/startup/bl_ui/properties_data_shaderfx.py +++ b/release/scripts/startup/bl_ui/properties_data_shaderfx.py @@ -28,6 +28,7 @@ class ShaderFxButtonsPanel: bl_context = "shaderfx" bl_options = {'HIDE_HEADER'} + class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): bl_label = "Effects" @@ -79,7 +80,7 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel): if fx.mode in {'BITONE', 'CUSTOM', 'TRANSPARENT'}: layout.prop(fx, "factor") - def FX_WAVE(self, layout,fx): + def FX_WAVE(self, layout, fx): layout.prop(fx, "orientation", expand=True) layout.separator() 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 65e7abe24a4..7426d2d463f 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -128,8 +128,8 @@ class GreasePencilDrawingToolsPanel: elif is_clip_editor: row.prop(context.space_data, "grease_pencil_source", expand=True) - #col.separator() - #col.separator() + # col.separator() + # col.separator() gpencil_stroke_placement_settings(context, col) @@ -404,7 +404,7 @@ class GPENCIL_MT_pie_settings_palette(Menu): pie = layout.menu_pie() gpd = context.gpencil_data gpl = context.active_gpencil_layer - palcolor = None #context.active_gpencil_palettecolor + palcolor = None # context.active_gpencil_palettecolor brush = context.active_gpencil_brush is_editmode = bool(gpd and gpd.use_stroke_edit_mode and context.editable_gpencil_strokes) @@ -812,7 +812,7 @@ class GreasePencilOnionPanel: row = layout.row() row.active = gp.use_onion_skinning row.prop(gp, "use_onion_fade", text="Fade") - if hasattr(gp, "use_onion_loop"): # XXX + if hasattr(gp, "use_onion_loop"): # XXX subrow = layout.row() subrow.active = gp.onion_mode in ('RELATIVE', 'SELECTED') subrow.prop(gp, "use_onion_loop", text="Loop") diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index 2d823594547..d83639a361c 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -84,7 +84,6 @@ class GPMaterialButtonsPanel: ob.active_material.grease_pencil) - class MATERIAL_PT_gpencil_slots(Panel): bl_label = "Grease Pencil Material Slots" bl_space_type = 'PROPERTIES' diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 75b2d76d9c4..393c9784be8 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -845,13 +845,13 @@ class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel): part = particle_get_settings(context) boids = part.boids - col=layout.column() + col = layout.column() col.prop(boids, "use_flight") col.prop(boids, "use_land") col.prop(boids, "use_climb") - col=layout.column() + col = layout.column() col.active = boids.use_flight sub = col.column() @@ -866,7 +866,7 @@ class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel): layout.separator() - col=layout.column() + col = layout.column() col.active = boids.use_land or boids.use_climb col.prop(boids, "land_speed_max") col.prop(boids, "land_jump_speed") @@ -879,6 +879,7 @@ class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel): layout.prop(part, "collision_group") + class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel): bl_label = "Battle" bl_parent_id = "PARTICLE_PT_physics" @@ -898,7 +899,7 @@ class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel): part = particle_get_settings(context) boids = part.boids - col=layout.column() + col = layout.column() col.prop(boids, "health") col.prop(boids, "strength") @@ -906,6 +907,7 @@ class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel): col.prop(boids, "accuracy") col.prop(boids, "range") + class PARTICLE_PT_physics_boids_misc(ParticleButtonsPanel, Panel): bl_label = "Misc" bl_parent_id = "PARTICLE_PT_physics" @@ -925,7 +927,7 @@ class PARTICLE_PT_physics_boids_misc(ParticleButtonsPanel, Panel): part = particle_get_settings(context) boids = part.boids - col=layout.column() + col = layout.column() col.prop(boids, "bank", slider=True) col.prop(boids, "pitch", slider=True) @@ -950,7 +952,6 @@ class PARTICLE_PT_physics_relations(ParticleButtonsPanel, Panel): psys = context.particle_system part = particle_get_settings(context) - row = layout.row() row.template_list("UI_UL_list", "particle_targets", psys, "targets", psys, "active_particle_target_index", rows=4) @@ -993,7 +994,6 @@ class PARTICLE_PT_physics_relations(ParticleButtonsPanel, Panel): sub.prop(key, "system", text="System") - class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): bl_label = "Deflection" bl_parent_id = "PARTICLE_PT_physics" diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index 44d07ff53e6..3a475c82f5c 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -97,7 +97,6 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): col.prop(surface, "image_resolution") col.prop(surface, "use_antialiasing") - sub = col.column(align=True) sub.prop(surface, "frame_start", text="Frame Start") sub.prop(surface, "frame_end", text="End") @@ -228,7 +227,6 @@ class PHYSICS_PT_dp_advanced_canvas_paint_dissolve(PhysicButtonsPanel, Panel): surface = canvas.canvas_surfaces.active self.layout.prop(surface, "use_dissolve", text="") - def draw(self, context): layout = self.layout @@ -398,7 +396,6 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): layout = self.layout - class PHYSICS_PT_dp_effects_spread(PhysicButtonsPanel, Panel): bl_label = "Spread" bl_parent_id = "PHYSICS_PT_dp_effects" @@ -455,6 +452,7 @@ class PHYSICS_PT_dp_effects_drip(PhysicButtonsPanel, Panel): effector_weights_ui(self, context, surface.effector_weights, 'DYNAMIC_PAINT') + class PHYSICS_PT_dp_effects_shrink(PhysicButtonsPanel, Panel): bl_label = "Shrink" bl_parent_id = "PHYSICS_PT_dp_effects" diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py index 00733e2fb12..d121b6a389d 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py @@ -39,7 +39,7 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel): def draw(self, context): layout = self.layout - layout.use_property_split = True
+ layout.use_property_split = True ob = context.object rbo = ob.rigid_body @@ -50,12 +50,11 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel): if rbo.type == 'ACTIVE': layout.prop(rbo, "mass") - col = layout.column()
- if rbo.type == 'ACTIVE':
- col.prop(rbo, "enabled", text="Dynamic")
- col.prop(rbo, "kinematic", text="Animated")
-
-
+ col = layout.column() + if rbo.type == 'ACTIVE': + col.prop(rbo, "enabled", text="Dynamic") + col.prop(rbo, "kinematic", text="Animated") + class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): bl_label = "Collisions" @@ -73,7 +72,7 @@ class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): ob = context.object rbo = ob.rigid_body - layout.use_property_split = True
+ layout.use_property_split = True layout.prop(rbo, "collision_shape", text="Shape") @@ -84,50 +83,51 @@ class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): layout.prop(rbo, "use_deform", text="Deforming") -class PHYSICS_PT_rigid_body_collisions_surface(PHYSICS_PT_rigidbody_panel, Panel):
- bl_label = "Surface Response"
- bl_parent_id = 'PHYSICS_PT_rigid_body_collisions'
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
-
- @classmethod
- def poll(cls, context):
- obj = context.object
- return (obj and obj.rigid_body and
- (context.engine in cls.COMPAT_ENGINES))
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- rbo = ob.rigid_body
- layout.use_property_split = True
-
- col = layout.column()
+class PHYSICS_PT_rigid_body_collisions_surface(PHYSICS_PT_rigidbody_panel, Panel): + bl_label = "Surface Response" + bl_parent_id = 'PHYSICS_PT_rigid_body_collisions' + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + + @classmethod + def poll(cls, context): + obj = context.object + return (obj and obj.rigid_body and + (context.engine in cls.COMPAT_ENGINES)) + + def draw(self, context): + layout = self.layout + + ob = context.object + rbo = ob.rigid_body + layout.use_property_split = True + + col = layout.column() col.prop(rbo, "friction") col.prop(rbo, "restitution", text="Bounciness") -class PHYSICS_PT_rigid_body_collisions_sensitivity(PHYSICS_PT_rigidbody_panel, Panel):
- bl_label = "Sensitivity"
- bl_parent_id = 'PHYSICS_PT_rigid_body_collisions'
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
-
- @classmethod
- def poll(cls, context):
- obj = context.object
- return (obj and obj.rigid_body and
- (context.engine in cls.COMPAT_ENGINES))
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- rbo = ob.rigid_body
- layout.use_property_split = True
-
- col = layout.column()
-
+ +class PHYSICS_PT_rigid_body_collisions_sensitivity(PHYSICS_PT_rigidbody_panel, Panel): + bl_label = "Sensitivity" + bl_parent_id = 'PHYSICS_PT_rigid_body_collisions' + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + + @classmethod + def poll(cls, context): + obj = context.object + return (obj and obj.rigid_body and + (context.engine in cls.COMPAT_ENGINES)) + + def draw(self, context): + layout = self.layout + + ob = context.object + rbo = ob.rigid_body + layout.use_property_split = True + + col = layout.column() + if rbo.collision_shape in {'MESH', 'CONE'}: col.prop(rbo, "collision_margin", text="Margin") else: @@ -136,25 +136,26 @@ class PHYSICS_PT_rigid_body_collisions_sensitivity(PHYSICS_PT_rigidbody_panel, P sub.active = rbo.use_margin sub.prop(rbo, "collision_margin", text="Margin") -class PHYSICS_PT_rigid_body_collisions_collections(PHYSICS_PT_rigidbody_panel, Panel):
- bl_label = "Collision Collections"
- bl_parent_id = 'PHYSICS_PT_rigid_body_collisions'
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
-
- @classmethod
- def poll(cls, context):
- obj = context.object
- return (obj and obj.rigid_body and
- (context.engine in cls.COMPAT_ENGINES))
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- rbo = ob.rigid_body
-
- layout.prop(rbo, "collision_groups", text="")
+ +class PHYSICS_PT_rigid_body_collisions_collections(PHYSICS_PT_rigidbody_panel, Panel): + bl_label = "Collision Collections" + bl_parent_id = 'PHYSICS_PT_rigid_body_collisions' + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + + @classmethod + def poll(cls, context): + obj = context.object + return (obj and obj.rigid_body and + (context.engine in cls.COMPAT_ENGINES)) + + def draw(self, context): + layout = self.layout + + ob = context.object + rbo = ob.rigid_body + + layout.prop(rbo, "collision_groups", text="") class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel): @@ -172,7 +173,7 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel): def draw(self, context): layout = self.layout - layout.use_property_split = True
+ layout.use_property_split = True ob = context.object rbo = ob.rigid_body @@ -181,53 +182,53 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel): # col.label(text="Activation:") # XXX: settings such as activate on collison/etc. - col = layout.column()
- col.prop(rbo, "linear_damping", text="Translation Damping")
- col.prop(rbo, "angular_damping", text="Rotation Damping")
- - -class PHYSICS_PT_rigid_body_dynamics_deactivation(PHYSICS_PT_rigidbody_panel, Panel):
- bl_label = "Deactivation"
- bl_parent_id = 'PHYSICS_PT_rigid_body_dynamics'
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
-
- @classmethod
- def poll(cls, context):
- obj = context.object
- return (obj and obj.rigid_body and
- obj.rigid_body.type == 'ACTIVE' and
- (context.engine in cls.COMPAT_ENGINES))
-
- def draw_header(self, context):
- ob = context.object
- rbo = ob.rigid_body
- self.layout.prop(rbo, "use_deactivation", text="")
-
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
-
- ob = context.object
- rbo = ob.rigid_body
-
- layout.active = rbo.use_deactivation
-
- col = layout.column()
- col.prop(rbo, "use_start_deactivated")
- col.prop(rbo, "deactivate_linear_velocity", text="Linear Velocity")
- col.prop(rbo, "deactivate_angular_velocity", text="Angular Velocity")
- # TODO: other params such as time?
+ col = layout.column() + col.prop(rbo, "linear_damping", text="Translation Damping") + col.prop(rbo, "angular_damping", text="Rotation Damping") + + +class PHYSICS_PT_rigid_body_dynamics_deactivation(PHYSICS_PT_rigidbody_panel, Panel): + bl_label = "Deactivation" + bl_parent_id = 'PHYSICS_PT_rigid_body_dynamics' + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'} + + @classmethod + def poll(cls, context): + obj = context.object + return (obj and obj.rigid_body and + obj.rigid_body.type == 'ACTIVE' and + (context.engine in cls.COMPAT_ENGINES)) + + def draw_header(self, context): + ob = context.object + rbo = ob.rigid_body + self.layout.prop(rbo, "use_deactivation", text="") + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + ob = context.object + rbo = ob.rigid_body + + layout.active = rbo.use_deactivation + + col = layout.column() + col.prop(rbo, "use_start_deactivated") + col.prop(rbo, "deactivate_linear_velocity", text="Linear Velocity") + col.prop(rbo, "deactivate_angular_velocity", text="Angular Velocity") + # TODO: other params such as time? classes = ( PHYSICS_PT_rigid_body, PHYSICS_PT_rigid_body_collisions, - PHYSICS_PT_rigid_body_collisions_surface,
- PHYSICS_PT_rigid_body_collisions_sensitivity,
- PHYSICS_PT_rigid_body_collisions_collections,
+ PHYSICS_PT_rigid_body_collisions_surface, + PHYSICS_PT_rigid_body_collisions_sensitivity, + PHYSICS_PT_rigid_body_collisions_collections, PHYSICS_PT_rigid_body_dynamics, - PHYSICS_PT_rigid_body_dynamics_deactivation,
+ PHYSICS_PT_rigid_body_dynamics_deactivation, ) if __name__ == "__main__": # only for live edit. diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 91be9bb5d0a..7832a5027d4 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -28,9 +28,9 @@ from rna_prop_ui import PropertyPanel from bl_operators.presets import PresetMenu from .properties_physics_common import ( - point_cache_ui, - effector_weights_ui, - ) + point_cache_ui, + effector_weights_ui, +) class SCENE_PT_units_length_presets(PresetMenu): @@ -104,6 +104,7 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel): col.prop(unit, "scale_length") col.prop(unit, "use_separate") + class SceneKeyingSetsPanel: @staticmethod diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 8e32d98529b..1564204c613 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -23,8 +23,9 @@ from bpy.types import Panel, Header, Menu, UIList from bpy.app.translations import pgettext_iface as iface_ from bl_operators.presets import PresetMenu from .properties_grease_pencil_common import ( - GreasePencilDrawingToolsPanel, - GreasePencilDataPanel) + GreasePencilDrawingToolsPanel, + GreasePencilDataPanel, +) class CLIP_UL_tracking_objects(UIList): @@ -1154,7 +1155,6 @@ class CLIP_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): bl_region_type = 'TOOLS' - class CLIP_MT_view(Menu): bl_label = "View" diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 501f58e9901..7a1d4117451 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -21,15 +21,15 @@ import bpy import math from bpy.types import Header, Menu, Panel, UIList from .properties_paint_common import ( - UnifiedPaintPanel, - brush_texture_settings, - brush_texpaint_common, - brush_mask_texture_settings, - ) + UnifiedPaintPanel, + brush_texture_settings, + brush_texpaint_common, + brush_mask_texture_settings, +) from .properties_grease_pencil_common import ( - GreasePencilDrawingToolsPanel, - GreasePencilDataPanel - ) + GreasePencilDrawingToolsPanel, + GreasePencilDataPanel, +) from bpy.app.translations import pgettext_iface as iface_ @@ -1342,12 +1342,13 @@ class IMAGE_PT_grease_pencil(GreasePencilDataPanel, Panel): # NOTE: this is just a wrapper around the generic GP Panel # Grease Pencil drawing tools + + class IMAGE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'TOOLS' - classes = ( IMAGE_MT_view, IMAGE_MT_select, diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index affbf70b1a0..43a124cd48f 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -23,10 +23,10 @@ from bpy.types import Header, Menu, Panel from bpy.app.translations import pgettext_iface as iface_ from bl_operators.presets import PresetMenu from .properties_grease_pencil_common import ( - GreasePencilDrawingToolsPanel, - GreasePencilDataPanel, - GreasePencilToolsPanel - ) + GreasePencilDrawingToolsPanel, + GreasePencilDataPanel, + GreasePencilToolsPanel, +) class NODE_HT_header(Header): diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 1bb5a93f7f8..7eaf4762216 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -280,7 +280,7 @@ class _defs_annotate: return dict( text="Eraser", icon="ops.gpencil.draw.eraser", - cursor='CROSSHAIR', # XXX: Always show brush circle when enabled + cursor='CROSSHAIR', # XXX: Always show brush circle when enabled keymap=( ("gpencil.annotate", dict(mode='ERASER', wait_for_input=False), @@ -1030,6 +1030,7 @@ class _defs_uv_select: ), ) + class _defs_gpencil_paint: @classmethod def draw_color_selector(cls, context, layout): @@ -1049,7 +1050,7 @@ class _defs_gpencil_paint: if ob and ob.mode == 'GPENCIL_PAINT': brush = context.active_gpencil_brush gp_settings = brush.gpencil_settings - tool_settings= context.tool_settings + tool_settings = context.tool_settings if gp_settings.gpencil_brush_type == 'ERASE': row = layout.row() @@ -1076,7 +1077,6 @@ class _defs_gpencil_paint: _defs_gpencil_paint.draw_color_selector(context, layout) - @staticmethod def generate_from_brushes(context): return generate_from_brushes_ex( diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 0d837ae413a..6712e495498 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -512,7 +512,6 @@ class INFO_MT_help(Menu): "wm.url_open", text="Manual", icon='HELP', ).url = "https://docs.blender.org/manual/en/dev/" - layout.operator( "wm.url_open", text="Report a Bug", icon='URL', ).url = "https://developer.blender.org/maniphest/task/edit/form/1" diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index eb595e9f12d..fca37499da0 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3840,7 +3840,7 @@ class VIEW3D_PT_object_type_visibility(Panel): "armature", "lattice", "empty", - "grease_pencil", + "grease_pencil", "camera", "light", "light_probe", @@ -3902,7 +3902,7 @@ class VIEW3D_PT_shading_lighting(Panel): split = layout.split(0.9) col = split.column() sub = col.row() - sub.scale_y = 0.6 # smaller matcap/hdri preview + sub.scale_y = 0.6 # smaller matcap/hdri preview if shading.light == 'STUDIO': sub.template_icon_view(shading, "studio_light", scale=3) @@ -3941,7 +3941,7 @@ class VIEW3D_PT_shading_lighting(Panel): col = split.column() col.prop(shading, "studiolight_rotate_z", text="Rotation") col.prop(shading, "studiolight_background_alpha") - col = split.column() # to align properly with above + col = split.column() # to align properly with above class VIEW3D_PT_shading_color(Panel): @@ -4889,7 +4889,6 @@ class VIEW3D_PT_gpencil_multi_frame(Panel): layout.template_curve_mapping(settings, "multiframe_falloff_curve", brush=True) - classes = ( VIEW3D_HT_header, VIEW3D_MT_editor_menus, diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 70d8c4089d3..ceb0f244bac 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -20,16 +20,16 @@ import bpy from bpy.types import Menu, Panel, UIList from .properties_grease_pencil_common import ( - GreasePencilStrokeEditPanel, - GreasePencilStrokeSculptPanel, - GreasePencilAppearancePanel, - ) + GreasePencilStrokeEditPanel, + GreasePencilStrokeSculptPanel, + GreasePencilAppearancePanel, +) from .properties_paint_common import ( - UnifiedPaintPanel, - brush_texture_settings, - brush_texpaint_common, - brush_mask_texture_settings, - ) + UnifiedPaintPanel, + brush_texture_settings, + brush_texpaint_common, + brush_mask_texture_settings, +) from bl_operators.presets import PresetMenu @@ -69,9 +69,13 @@ def draw_vpaint_symmetry(layout, vpaint): col.prop(vpaint, "radial_symmetry", text="Radial") # Most of these panels should not be visible in GP edit modes + + def is_not_gpencil_edit_mode(context): - is_gpmode = context.active_object and \ - context.active_object.mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'} + is_gpmode = ( + context.active_object and + context.active_object.mode in {'GPENCIL_EDIT', 'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'} + ) return not is_gpmode |