diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-05 17:35:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-05 17:36:13 +0300 |
commit | 7436fb2ef1d8bb0af0589f8ec4b45c8800aed983 (patch) | |
tree | e99050b05bf97b20cc0f5c05ea549aa31d8fba09 /release/scripts/startup | |
parent | d94df18550702a9df7b56feb5d58fb20effb7536 (diff) | |
parent | c68429bc038635a6c2a3f29a5b057c077be3a4b0 (diff) |
Merge branch 'master' into 28
Diffstat (limited to 'release/scripts/startup')
28 files changed, 143 insertions, 124 deletions
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index dd99195f12a..da9054fb681 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -88,7 +88,7 @@ _modules = [ "space_userpref", "space_view3d", "space_view3d_toolbar", - ] +] import bpy @@ -167,6 +167,8 @@ def unregister(): # Define a default UIList, when a list does not need any custom drawing... # Keep in sync with its #defined name in UI_interface.h + + class UI_UL_list(bpy.types.UIList): # These are common filtering or ordering operations (same as the default C ones!). @staticmethod diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index 9b61101778f..b7880e605b3 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -941,6 +941,7 @@ class BONE_PT_constraints(ConstraintButtonsPanel, Panel): for con in context.pose_bone.constraints: self.draw_constraint(context, con) + classes = ( OBJECT_PT_constraints, BONE_PT_constraints, diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 057a7233206..47c53d6ffb5 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -180,6 +180,7 @@ class DATA_PT_geometry_curve(CurveButtonsPanelCurve, Panel): sub.active = curve.taper_object is not None sub.prop(curve, "use_map_taper") + class DATA_PT_geometry_curve_bevel(CurveButtonsPanelCurve, Panel): bl_label = "Bevel" bl_parent_id = "DATA_PT_geometry_curve" @@ -348,6 +349,7 @@ class DATA_PT_font(CurveButtonsPanelText, Panel): row.prop(char, "use_underline", toggle=True) row.prop(char, "use_small_caps", toggle=True) + class DATA_PT_font_transform(CurveButtonsPanelText, Panel): bl_label = "Transform" bl_parent_id = "DATA_PT_font" @@ -404,7 +406,6 @@ class DATA_PT_paragraph_alignment(CurveButtonsPanelText, Panel): layout.row().prop(text, "align_y", expand=True) - class DATA_PT_paragraph_spacing(CurveButtonsPanelText, Panel): bl_parent_id = "DATA_PT_paragraph" bl_label = "Spacing" diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py index e5dd1bbd771..2727c84e820 100644 --- a/release/scripts/startup/bl_ui/properties_data_lamp.py +++ b/release/scripts/startup/bl_ui/properties_data_lamp.py @@ -182,7 +182,6 @@ class DATA_PT_EEVEE_shadow(DataButtonsPanel, Panel): col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias") - class DATA_PT_EEVEE_shadow_cascaded_shadow_map(DataButtonsPanel, Panel): bl_label = "Cascaded Shadow Map" bl_parent_id = "DATA_PT_EEVEE_shadow" diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index a9c9d512335..12ecbeb3e6b 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -629,7 +629,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan row = layout.row(align=True) row.prop(linestyle, "panel", expand=True) if linestyle.panel == 'STROKES': - ## Chaining + # Chaining layout.prop(linestyle, "use_chaining", text="Chaining:") split = layout.split(align=True) split.active = linestyle.use_chaining @@ -643,7 +643,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan col = split.column() col.prop(linestyle, "use_same_object") - ## Splitting + # Splitting layout.label(text="Splitting:") split = layout.split(align=True) # First column @@ -679,7 +679,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan sub.prop(linestyle, "split_dash3", text="D3") sub.prop(linestyle, "split_gap3", text="G3") - ## Sorting + # Sorting layout.prop(linestyle, "use_sorting", text="Sorting:") col = layout.column() col.active = linestyle.use_sorting @@ -693,7 +693,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan row = col.row(align=True) row.prop(linestyle, "sort_order", expand=True) - ## Selection + # Selection layout.label(text="Selection:") split = layout.split(align=True) # First column @@ -716,12 +716,12 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan sub.active = linestyle.use_chain_count sub.prop(linestyle, "chain_count") - ## Caps + # Caps layout.label(text="Caps:") row = layout.row(align=True) row.prop(linestyle, "caps", expand=True) - ## Dashed lines + # Dashed lines layout.prop(linestyle, "use_dashed_line", text="Dashed Line:") row = layout.row(align=True) row.active = linestyle.use_dashed_line @@ -786,9 +786,10 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan row = layout.row() props = row.operator( - "wm.properties_context_change", - text="Go to Linestyle Textures Properties", - icon='TEXTURE') + "wm.properties_context_change", + text="Go to Linestyle Textures Properties", + icon='TEXTURE', + ) props.context = 'TEXTURE' elif linestyle.panel == 'MISC': 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 decbbff5d60..a2ccfb4f1b8 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -242,7 +242,6 @@ class GreasePencilStrokeEditPanel: if is_3d_view: layout.separator() - layout.separator() col = layout.column(align=True) col.operator("gpencil.stroke_subdivide", text="Subdivide") @@ -1100,11 +1099,11 @@ class GreasePencilPaletteColorPanel: row = layout.row() sub = row.row(align=True) - sub.label(text="Isolate:") # based on active color only + sub.label(text="Isolate:") # based on active color only sub.operator("gpencil.palettecolor_isolate", icon='LOCKED', text="").affect_visibility = False sub.operator("gpencil.palettecolor_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True sub = row.row(align=True) - sub.label(text="Lock:") # based on other stuff... + sub.label(text="Lock:") # based on other stuff... sub.operator("gpencil.stroke_lock_color", icon='BORDER_RECT', text="") sub.operator("gpencil.palette_lock_layer", icon='COLOR', text="") diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index a7a67130f2f..450ca80bbc2 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -43,8 +43,8 @@ class MASK_UL_layers(UIList): class MASK_PT_mask: # subclasses must define... - #~ bl_space_type = 'CLIP_EDITOR' - #~ bl_region_type = 'UI' + # ~ bl_space_type = 'CLIP_EDITOR' + # ~ bl_region_type = 'UI' bl_label = "Mask Settings" bl_options = {'DEFAULT_CLOSED'} @@ -66,8 +66,8 @@ class MASK_PT_mask: class MASK_PT_layers: # subclasses must define... - #~ bl_space_type = 'CLIP_EDITOR' - #~ bl_region_type = 'UI' + # ~ bl_space_type = 'CLIP_EDITOR' + # ~ bl_region_type = 'UI' bl_label = "Mask Layers" @classmethod @@ -114,8 +114,8 @@ class MASK_PT_layers: class MASK_PT_spline: # subclasses must define... - #~ bl_space_type = 'CLIP_EDITOR' - #~ bl_region_type = 'UI' + # ~ bl_space_type = 'CLIP_EDITOR' + # ~ bl_region_type = 'UI' bl_label = "Active Spline" @classmethod @@ -148,8 +148,8 @@ class MASK_PT_spline: class MASK_PT_point: # subclasses must define... - #~ bl_space_type = 'CLIP_EDITOR' - #~ bl_region_type = 'UI' + # ~ bl_space_type = 'CLIP_EDITOR' + # ~ bl_region_type = 'UI' bl_label = "Active Point" @classmethod @@ -203,8 +203,8 @@ class MASK_PT_point: class MASK_PT_display: # subclasses must define... - #~ bl_space_type = 'CLIP_EDITOR' - #~ bl_region_type = 'UI' + # ~ bl_space_type = 'CLIP_EDITOR' + # ~ bl_region_type = 'UI' bl_label = "Mask Display" bl_options = {'DEFAULT_CLOSED'} @@ -229,8 +229,8 @@ class MASK_PT_display: class MASK_PT_transforms: # subclasses must define... - #~ bl_space_type = 'CLIP_EDITOR' - #~ bl_region_type = 'TOOLS' + # ~ bl_space_type = 'CLIP_EDITOR' + # ~ bl_region_type = 'TOOLS' bl_label = "Transforms" bl_category = "Mask" bl_options = {'DEFAULT_CLOSED'} @@ -253,8 +253,8 @@ class MASK_PT_transforms: class MASK_PT_tools: # subclasses must define... - #~ bl_space_type = 'CLIP_EDITOR' - #~ bl_region_type = 'TOOLS' + # ~ bl_space_type = 'CLIP_EDITOR' + # ~ bl_region_type = 'TOOLS' bl_label = "Mask Tools" bl_category = "Mask" @@ -291,8 +291,8 @@ class MASK_PT_tools: class MASK_PT_add: # subclasses must define... - #~ bl_space_type = 'CLIP_EDITOR' - #~ bl_region_type = 'TOOLS' + # ~ bl_space_type = 'CLIP_EDITOR' + # ~ bl_region_type = 'TOOLS' bl_label = "Add" bl_category = "Mask" diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index bc8bc523e12..f1e5102f061 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -126,7 +126,7 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal col.prop(brush, "gradient_stroke_mode", text="Mode") if brush.gradient_stroke_mode in {'SPACING_REPEAT', 'SPACING_CLAMP'}: col.prop(brush, "grad_spacing") - else: # if brush.image_tool == 'FILL': + else: # if brush.image_tool == 'FILL': col.prop(brush, "gradient_fill_mode") else: row = col.row(align=True) diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 9ffc9e983bb..00eb13dd222 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -404,7 +404,7 @@ class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel): @classmethod def poll(cls, context): - return context.particle_system.cloth != None + return context.particle_system.cloth is not None def draw(self, context): layout = self.layout @@ -436,7 +436,7 @@ class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel): @classmethod def poll(cls, context): - return context.particle_system.cloth != None + return context.particle_system.cloth is not None def draw(self, context): layout = self.layout @@ -591,6 +591,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel): if part.type != 'HAIR': col.prop(part, "use_dynamic_rotation") + class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel): bl_label = "Angular Velocity" bl_parent_id = "PARTICLE_PT_rotation" @@ -812,6 +813,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): sub.prop(key, "object", text="") sub.prop(key, "system", text="System") + class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): bl_label = "Deflection" bl_parent_id = "PARTICLE_PT_physics" @@ -820,8 +822,8 @@ class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): @classmethod def poll(cls, context): - part = particle_get_settings(context) - return part.physics_type in {'NEWTON', 'FLUID'} + part = particle_get_settings(context) + return part.physics_type in {'NEWTON', 'FLUID'} def draw(self, context): layout = self.layout @@ -846,8 +848,8 @@ class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel): @classmethod def poll(cls, context): - part = particle_get_settings(context) - return part.physics_type == 'NEWTON' + part = particle_get_settings(context) + return part.physics_type == 'NEWTON' def draw(self, context): layout = self.layout @@ -873,8 +875,8 @@ class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel): @classmethod def poll(cls, context): - part = particle_get_settings(context) - return part.physics_type == 'NEWTON' + part = particle_get_settings(context) + return part.physics_type == 'NEWTON' def draw(self, context): layout = self.layout @@ -924,7 +926,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel): # Currently boids can only use the first state so these are commented out for now. #row = layout.row() - #row.template_list("UI_UL_list", "particle_boids", boids, "states", + # row.template_list("UI_UL_list", "particle_boids", boids, "states", # boids, "active_boid_state_index", compact="True") #col = row.row() #sub = col.row(align=True) @@ -1039,6 +1041,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel): col.prop(part, "material_slot", text="Material") col.prop(psys, "parent", text="Coordinate System") + class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): bl_label = "Extra" bl_parent_id = "PARTICLE_PT_render" @@ -1058,7 +1061,7 @@ class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() col = layout.column() col.prop(part, "use_parent_particles", text="Parent Particles") @@ -1066,7 +1069,6 @@ class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): col.prop(part, "use_dead", text="Dead") - class PARTICLE_PT_render_line(ParticleButtonsPanel, Panel): bl_label = "Line" bl_parent_id = "PARTICLE_PT_render" @@ -1086,7 +1088,7 @@ class PARTICLE_PT_render_line(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() col.separator() sub = col.column(align=True) @@ -1094,6 +1096,7 @@ class PARTICLE_PT_render_line(ParticleButtonsPanel, Panel): sub.prop(part, "line_length_head", text="Head") col.prop(part, "use_velocity_length", text="Velocity Length") + class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel): bl_label = "Path" bl_parent_id = "PARTICLE_PT_render" @@ -1113,7 +1116,7 @@ class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() col.prop(part, "use_strand_primitive") sub = col.column() @@ -1148,7 +1151,7 @@ class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() col.prop(part, "use_absolute_path_time") @@ -1160,6 +1163,7 @@ class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel): col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time) col.prop(part, "length_random", text="Random", slider=True) + class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel): bl_label = "Object" bl_parent_id = "PARTICLE_PT_render" @@ -1179,7 +1183,7 @@ class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() col.prop(part, "dupli_object", text="Instance Object") sub = col.column() @@ -1207,7 +1211,7 @@ class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() col.prop(part, "dupli_group") @@ -1219,6 +1223,7 @@ class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): sub.prop(part, "use_rotation_dupli", text="Object Rotation") sub.prop(part, "use_scale_dupli", text="Object Scale") + class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): bl_label = "Use Count" bl_parent_id = "PARTICLE_PT_render_collection" @@ -1246,13 +1251,13 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() layout.active = part.use_group_count and not part.use_whole_group row = layout.row() row.template_list("UI_UL_list", "particle_dupli_weights", part, "dupli_weights", - part, "active_dupliweight_index") + part, "active_dupliweight_index") col = row.column() sub = col.row() @@ -1267,6 +1272,7 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): row = layout.row() row.prop(weight, "count") + class PARTICLE_PT_render_billboards_alignment(ParticleButtonsPanel, Panel): bl_label = "Billboard Alignment" bl_parent_id = "PARTICLE_PT_render" @@ -1286,12 +1292,13 @@ class PARTICLE_PT_render_billboards_alignment(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() col.prop(part, "billboard_align", text="Align To") col.prop(part, "lock_billboard", text="Lock Axis") col.prop(part, "billboard_object") + class PARTICLE_PT_render_billboards_tilt(ParticleButtonsPanel, Panel): bl_label = "Billboard Tilt" bl_parent_id = "PARTICLE_PT_render" @@ -1311,7 +1318,7 @@ class PARTICLE_PT_render_billboards_tilt(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() sub = col.column(align=True) sub.prop(part, "billboard_tilt", text="Angle", slider=True) @@ -1325,6 +1332,7 @@ class PARTICLE_PT_render_billboards_tilt(ParticleButtonsPanel, Panel): col.prop(part, "billboard_velocity_head", text="Velocity ScaleHead") col.prop(part, "billboard_velocity_tail", text="Tail") + class PARTICLE_PT_render_billboards_uv(ParticleButtonsPanel, Panel): bl_label = "Billboard UVs" bl_parent_id = "PARTICLE_PT_render" @@ -1344,7 +1352,7 @@ class PARTICLE_PT_render_billboards_uv(ParticleButtonsPanel, Panel): ob = context.object part = particle_get_settings(context) - col=layout.column() + col = layout.column() if psys: col.prop_search(psys, "billboard_normal_uv", ob.data, "uv_layers") @@ -1361,7 +1369,6 @@ class PARTICLE_PT_render_billboards_uv(ParticleButtonsPanel, Panel): sub.prop(part, "billboard_offset_split") - class PARTICLE_PT_render_trails(ParticleButtonsPanel, Panel): bl_label = "Trails" bl_parent_id = "PARTICLE_PT_render" @@ -1380,7 +1387,7 @@ class PARTICLE_PT_render_trails(ParticleButtonsPanel, Panel): psys = context.particle_system part = particle_get_settings(context) - col=layout.column() + col = layout.column() col.prop(part, "trail_count") @@ -1532,6 +1539,7 @@ class PARTICLE_PT_children_parting(ParticleButtonsPanel, Panel): col.prop(part, "child_parting_min", text="Min") col.prop(part, "child_parting_max", text="Max") + class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel): bl_label = "Clumping" bl_parent_id = "PARTICLE_PT_children" @@ -1573,6 +1581,7 @@ class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel): if part.use_twist_curve: sub.template_curve_mapping(part, "twist_curve") + class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel): bl_label = "Roughness" bl_parent_id = "PARTICLE_PT_children" diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index e0d0327324b..f450bc61635 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -257,6 +257,7 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel): cloth = context.cloth.settings effector_weights_ui(self, context, cloth.effector_weights, 'CLOTH') + classes = ( CLOTH_MT_presets, PHYSICS_PT_cloth, diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 3615f8be48c..05c72bf47ee 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -274,7 +274,7 @@ def basic_force_field_settings_ui(self, context, field): elif field.type == 'HARMONIC': col.prop(field, "use_multiple_springs") if field.type == 'FORCE': - col.prop(field, "use_gravity_falloff", text="Gravitation") + col.prop(field, "use_gravity_falloff", text="Gravitation") split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py index 817b0ab76ed..3cb9026fd02 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py @@ -117,7 +117,7 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel): rbo = ob.rigid_body #col = layout.column(align=1) - #col.label(text="Activation:") + # col.label(text="Activation:") # XXX: settings such as activate on collison/etc. split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index d75d3b61f1e..0e38b0ef535 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -222,6 +222,7 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel): sub.active = rd.use_stamp_note sub.prop(rd, "stamp_note_text", text="") + class RENDER_PT_stamp_burn(RenderButtonsPanel, Panel): bl_label = "Burn Into Image" bl_parent_id = "RENDER_PT_stamp" diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 380ee57962c..1b9c7b5eacb 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -296,9 +296,7 @@ class SCENE_PT_color_management_curves(SceneButtonsPanel, Panel): layout.use_property_split = False layout.enabled = view.use_curve_mapping - layout.template_curve_mapping(view, "curve_mapping", levels = True) - - + layout.template_curve_mapping(view, "curve_mapping", levels=True) class SCENE_PT_audio(SceneButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index aa3227e0b72..e5bf2c910a0 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -59,6 +59,7 @@ class TEXTURE_UL_texslots(UIList): layout.alignment = 'CENTER' layout.label(text="", icon_value=icon) + def context_tex_datablock(context): idblock = context.brush if idblock: @@ -106,6 +107,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, Panel): if isinstance(idblock, Brush): layout.prop(tex, "use_preview_alpha") + class TEXTURE_PT_context(TextureButtonsPanel, Panel): bl_label = "" bl_context = "texture" diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 3c8552c3407..013fac3c099 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -43,7 +43,7 @@ class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel): rd = scene.render layer = bpy.context.view_layer - layout.prop(layer, "use", text="Use for Rendering"); + layout.prop(layer, "use", text="Use for Rendering") layout.prop(rd, "use_single_layer", text="Render Single Layer") diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index a3dc401b484..40009090231 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -1018,9 +1018,11 @@ class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel): if clip.use_proxy_custom_directory: col.prop(clip.proxy, "directory") - col.operator("clip.rebuild_proxy", - text="Build Proxy / Timecode" if clip.source == 'MOVIE' - else "Build Proxy") + col.operator( + "clip.rebuild_proxy", + text="Build Proxy / Timecode" if clip.source == 'MOVIE' + else "Build Proxy" + ) if clip.source == 'MOVIE': col2 = col.column() @@ -1189,6 +1191,7 @@ class CLIP_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): class CLIP_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): bl_space_type = 'CLIP_EDITOR' + class CLIP_MT_view(Menu): bl_label = "View" diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 136cb03a3fb..0dbb3f53332 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -425,11 +425,11 @@ class DOPESHEET_MT_gpencil_channel(Menu): layout.operator("anim.channels_editable_toggle") # XXX: to be enabled when these are ready for use! - #layout.separator() - #layout.operator("anim.channels_expand") - #layout.operator("anim.channels_collapse") + # layout.separator() + # layout.operator("anim.channels_expand") + # layout.operator("anim.channels_collapse") - #layout.separator() + # layout.separator() #layout.operator_menu_enum("anim.channels_move", "direction", text="Move...") @@ -450,9 +450,9 @@ class DOPESHEET_MT_gpencil_frame(Menu): layout.separator() layout.operator("action.keyframe_type") - #layout.separator() - #layout.operator("action.copy") - #layout.operator("action.paste") + # layout.separator() + # layout.operator("action.copy") + # layout.operator("action.paste") class DOPESHEET_MT_delete(Menu): @@ -496,18 +496,18 @@ class DOPESHEET_MT_specials(Menu): layout.operator_menu_enum("action.mirror", "type", text="Mirror") layout.operator_menu_enum("action.snap", "type", text="Snap") + class DOPESHEET_MT_channel_specials(Menu): bl_label = "Dope Sheet Channel Context Menu" def draw(self, context): layout = self.layout - - layout.operator("anim.channels_setting_enable", text="Mute Channels").type='MUTE' - layout.operator("anim.channels_setting_disable", text="Unmute Channels").type='MUTE' + layout.operator("anim.channels_setting_enable", text="Mute Channels").type = 'MUTE' + layout.operator("anim.channels_setting_disable", text="Unmute Channels").type = 'MUTE' layout.separator() - layout.operator("anim.channels_setting_enable", text="Protect Channels").type='PROTECT' - layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type='PROTECT' + layout.operator("anim.channels_setting_enable", text="Protect Channels").type = 'PROTECT' + layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type = 'PROTECT' layout.separator() layout.operator("anim.channels_group") diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 1eb25700868..6e809c4e86a 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -336,11 +336,11 @@ class GRAPH_MT_channel_specials(Menu): st = context.space_data layout.separator() - layout.operator("anim.channels_setting_enable", text="Mute Channels").type='MUTE' - layout.operator("anim.channels_setting_disable", text="Unmute Channels").type='MUTE' + layout.operator("anim.channels_setting_enable", text="Mute Channels").type = 'MUTE' + layout.operator("anim.channels_setting_disable", text="Unmute Channels").type = 'MUTE' layout.separator() - layout.operator("anim.channels_setting_enable", text="Protect Channels").type='PROTECT' - layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type='PROTECT' + layout.operator("anim.channels_setting_enable", text="Protect Channels").type = 'PROTECT' + layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type = 'PROTECT' layout.separator() layout.operator("anim.channels_group") diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 457c64c5fed..4b533d2f045 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -621,6 +621,7 @@ class IMAGE_PT_tools_mask(MASK_PT_tools, Panel): bl_region_type = 'TOOLS' bl_category = 'Mask' + class IMAGE_PT_tools_mask_add(MASK_PT_add, Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'TOOLS' @@ -1164,8 +1165,6 @@ class IMAGE_PT_uv_sculpt(Panel, ImagePaintPanel): col.prop(uvsculpt, "show_brush") - - class IMAGE_PT_options_uvs(Panel, UVToolsPanel): bl_label = "UV Options" bl_category = "Options" diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index fce031f987b..bf3fa64a852 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -542,11 +542,15 @@ class NODE_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel): bl_region_type = 'TOOLS' # Grease Pencil drawing brushes + + class NODE_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'TOOLS' # Grease Pencil drawing curves + + class NODE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'TOOLS' @@ -557,6 +561,7 @@ class NODE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Pane def node_draw_tree_view(layout, context): pass + classes = ( NODE_HT_header, NODE_MT_editor_menus, diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 8b8526cf9f2..12cff72b61a 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -179,7 +179,7 @@ class OUTLINER_MT_collection(Menu): layout.operator("outliner.collection_instance", text="Instance to Scene") if space.display_mode != 'VIEW_LAYER': layout.operator("outliner.collection_link", text="Link to Scene") - layout.operator("outliner.id_operation", text="Unlink").type='UNLINK' + layout.operator("outliner.id_operation", text="Unlink").type = 'UNLINK' if space.display_mode == 'VIEW_LAYER': layout.separator() @@ -206,20 +206,20 @@ class OUTLINER_MT_object(Menu): space = context.space_data - layout.operator("outliner.object_operation", text="Delete").type='DELETE' + layout.operator("outliner.object_operation", text="Delete").type = 'DELETE' if space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection: - layout.operator("outliner.object_operation", text="Delete Hierarchy").type='DELETE_HIERARCHY' + layout.operator("outliner.object_operation", text="Delete Hierarchy").type = 'DELETE_HIERARCHY' layout.separator() - layout.operator("outliner.object_operation", text="Select").type='SELECT' - layout.operator("outliner.object_operation", text="Select Hierarchy").type='SELECT_HIERARCHY' - layout.operator("outliner.object_operation", text="Deselect").type='DESELECT' + layout.operator("outliner.object_operation", text="Select").type = 'SELECT' + layout.operator("outliner.object_operation", text="Select Hierarchy").type = 'SELECT_HIERARCHY' + layout.operator("outliner.object_operation", text="Deselect").type = 'DESELECT' 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.operator("outliner.id_operation", text="Unlink").type = 'UNLINK' layout.separator() layout.operator_menu_enum("outliner.id_operation", 'type', text="ID Data") diff --git a/release/scripts/startup/bl_ui/space_statusbar.py b/release/scripts/startup/bl_ui/space_statusbar.py index 983b474d18b..3a6fc4925d8 100644 --- a/release/scripts/startup/bl_ui/space_statusbar.py +++ b/release/scripts/startup/bl_ui/space_statusbar.py @@ -73,7 +73,6 @@ class STATUSBAR_HT_header(Header): return - classes = ( STATUSBAR_HT_header, ) diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index d5609e219e3..7c584b3177b 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -117,6 +117,7 @@ class TIME_MT_editor_menus(Menu): panel_type="TIME_PT_keyframing_settings", text="Keying") + class TIME_MT_marker(Menu): bl_label = "Marker" @@ -217,6 +218,7 @@ def marker_menu_generic(layout): ################################### + class TimelinePanelButtons: bl_space_type = 'DOPESHEET_EDITOR' bl_region_type = 'UI' diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index cb6d3851d02..a909dad1ff3 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -427,7 +427,6 @@ class ToolSelectPanelHelper: return ui_gen, show_text - @classmethod def draw_cls(cls, layout, context, detect_layout=True): # Use a classmethod so it can be called outside of a panel context. @@ -676,6 +675,7 @@ def keymap_from_context(context, space_type): wm.keyconfigs.update() return keymap + classes = ( WM_MT_toolsystem_submenu, ) diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 42fac9e03a4..da86c1c03bc 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -91,7 +91,7 @@ class _defs_view3d_generic: ("transform.translate", dict(release_confirm=True, cursor_transform=True), dict(type='EVT_TWEAK_A', value='ANY'), - ), + ), ), ) @@ -292,7 +292,6 @@ class _defs_edit_armature: class _defs_edit_mesh: - @ToolDef.from_fn def cube_add(): return dict( diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 1e090884fd1..d9cbc6416a3 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -141,7 +141,6 @@ class USERPREF_MT_app_templates(Menu): layout.operator_context = 'INVOKE_DEFAULT' props = layout.operator("wm.app_template_install") - def draw(self, context): self.draw_ex(context, use_splash=False, use_default=True, use_install=True) @@ -282,14 +281,14 @@ class USERPREF_PT_interface(Panel): row.separator() col = row.column() - #Toolbox doesn't exist yet - #col.label(text="Toolbox:") + # Toolbox doesn't exist yet + # col.label(text="Toolbox:") #col.prop(view, "show_column_layout") #col.label(text="Open Toolbox Delay:") #col.prop(view, "open_left_mouse_delay", text="Hold LMB") #col.prop(view, "open_right_mouse_delay", text="Hold RMB") col.prop(view, "show_manipulator") - ## Currently not working + # Currently not working # col.prop(view, "show_manipulator_shaded") sub = col.column() sub.active = view.show_manipulator @@ -328,7 +327,6 @@ class USERPREF_PT_interface(Panel): col.prop(view, "show_view3d_cursor") - class USERPREF_PT_edit(Panel): bl_space_type = 'USER_PREFERENCES' bl_label = "Edit" @@ -412,7 +410,7 @@ class USERPREF_PT_edit(Panel): sub = col.column() - #~ sub.active = edit.use_keyframe_insert_auto # incorrect, time-line can enable + # ~ sub.active = edit.use_keyframe_insert_auto # incorrect, time-line can enable sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available") col.separator() @@ -1217,7 +1215,7 @@ class USERPREF_PT_input(Panel): #sub.prop(inputs, "use_mouse_mmb_paste") - #col.separator() + # col.separator() sub = col.column() sub.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction") @@ -1332,7 +1330,7 @@ class USERPREF_PT_addons(Panel): 'OFFICIAL': 'FILE_BLEND', 'COMMUNITY': 'POSE_DATA', 'TESTING': 'MOD_EXPLODE', - } + } @classmethod def poll(cls, context): @@ -1410,7 +1408,6 @@ class USERPREF_PT_addons(Panel): sub_col.label(" " + addon_file) sub_col.label(" " + addon_path) - if addon_utils.error_encoding: self.draw_error( col, @@ -1435,11 +1432,11 @@ class USERPREF_PT_addons(Panel): # check if addon should be visible with current filters if ((filter == "All") or - (filter == info["category"]) or - (filter == "Enabled" and is_enabled) or - (filter == "Disabled" and not is_enabled) or - (filter == "User" and (mod.__file__.startswith((scripts_addons_folder, userpref_addons_folder)))) - ): + (filter == info["category"]) or + (filter == "Enabled" and is_enabled) or + (filter == "Disabled" and not is_enabled) or + (filter == "User" and (mod.__file__.startswith((scripts_addons_folder, userpref_addons_folder)))) + ): if search and search not in info["name"].lower(): if info["author"]: if search not in info["author"].lower(): diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index f6dc64c7df7..cb9ddd470ce 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -70,7 +70,7 @@ def draw_vpaint_symmetry(layout, vpaint): class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): bl_category = "Options" - bl_context = ".mesh_edit" # dot on purpose (access from topbar) + bl_context = ".mesh_edit" # dot on purpose (access from topbar) bl_label = "Mesh Options" @classmethod @@ -101,9 +101,10 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): # ********** default tools for editmode_curve **************** + class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel): bl_category = "Options" - bl_context = ".curve_edit" # dot on purpose (access from topbar) + bl_context = ".curve_edit" # dot on purpose (access from topbar) bl_label = "Curve Stroke" def draw(self, context): @@ -155,8 +156,6 @@ class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel): colsub.prop(cps, "surface_plane", expand=True) - - # ********** default tools for editmode_armature **************** @@ -175,7 +174,7 @@ class VIEW3D_PT_tools_armatureedit_options(View3DPanel, Panel): class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel): bl_category = "Options" - bl_context = ".posemode" # dot on purpose (access from topbar) + bl_context = ".posemode" # dot on purpose (access from topbar) bl_label = "Pose Options" def draw(self, context): @@ -194,7 +193,7 @@ class View3DPaintPanel(UnifiedPaintPanel): class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel): bl_category = "Tools" - bl_context = ".imagepaint" # dot on purpose (access from topbar) + bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "Missing Data" @classmethod @@ -528,7 +527,7 @@ class VIEW3D_MT_tools_projectpaint_uvlayer(Menu): class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): - bl_context = ".imagepaint" # dot on purpose (access from topbar) + bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "Slots" bl_category = "Slots" @@ -589,7 +588,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel): - bl_context = ".imagepaint" # dot on purpose (access from topbar) + bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "Mask" bl_category = "Slots" @@ -723,7 +722,7 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel): class VIEW3D_PT_tools_mask_texture(Panel, View3DPaintPanel): bl_category = "Tools" - bl_context = ".imagepaint" # dot on purpose (access from topbar) + bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "Texture Mask" bl_options = {'DEFAULT_CLOSED'} @@ -886,11 +885,11 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): def draw_header(self, context): layout = self.layout layout.operator( - "sculpt.dynamic_topology_toggle", - icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT', - text="", - emboss=False, - ) + "sculpt.dynamic_topology_toggle", + icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT', + text="", + emboss=False, + ) def draw(self, context): layout = self.layout @@ -1124,7 +1123,7 @@ class VIEW3D_PT_tools_vertexpaint_symmetry(Panel, View3DPaintPanel): class VIEW3D_PT_tools_imagepaint_external(Panel, View3DPaintPanel): bl_category = "Tools" - bl_context = ".imagepaint" # dot on purpose (access from topbar) + bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "External" bl_options = {'DEFAULT_CLOSED'} @@ -1146,7 +1145,7 @@ class VIEW3D_PT_tools_imagepaint_external(Panel, View3DPaintPanel): class VIEW3D_PT_tools_imagepaint_symmetry(Panel, View3DPaintPanel): bl_category = "Tools" - bl_context = ".imagepaint" # dot on purpose (access from topbar) + bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "Symmetry" bl_options = {'DEFAULT_CLOSED'} @@ -1165,7 +1164,7 @@ class VIEW3D_PT_tools_imagepaint_symmetry(Panel, View3DPaintPanel): class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel): bl_category = "Options" - bl_context = ".imagepaint" # dot on purpose (access from topbar) + bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "Project Paint" @classmethod @@ -1323,6 +1322,8 @@ class VIEW3D_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): bl_space_type = 'VIEW_3D' # Grease Pencil drawingcurves + + class VIEW3D_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): bl_space_type = 'VIEW_3D' |