From 6fee105943c8b1fc87a02441df180b9e34b9540f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 Jun 2018 19:09:52 +0200 Subject: [PATCH 1/4] Cleanup: correct menu name --- source/blender/makesrna/intern/rna_ui.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index f2527a8a5e9..f0b6f8d5423 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -275,8 +275,8 @@ static StructRNA *rna_Panel_register( static StructRNA *rna_Panel_refine(PointerRNA *ptr) { - Panel *hdr = (Panel *)ptr->data; - return (hdr->type && hdr->type->ext.srna) ? hdr->type->ext.srna : &RNA_Panel; + Panel *menu = (Panel *)ptr->data; + return (menu->type && menu->type->ext.srna) ? menu->type->ext.srna : &RNA_Panel; } /* UIList */ @@ -668,7 +668,7 @@ static int menu_poll(const bContext *C, MenuType *pt) return visible; } -static void menu_draw(const bContext *C, Menu *hdr) +static void menu_draw(const bContext *C, Menu *menu) { extern FunctionRNA rna_Menu_draw_func; @@ -676,12 +676,12 @@ static void menu_draw(const bContext *C, Menu *hdr) ParameterList list; FunctionRNA *func; - RNA_pointer_create(&CTX_wm_screen(C)->id, hdr->type->ext.srna, hdr, &mtr); + RNA_pointer_create(&CTX_wm_screen(C)->id, menu->type->ext.srna, menu, &mtr); func = &rna_Menu_draw_func; /* RNA_struct_find_function(&mtr, "draw"); */ RNA_parameter_list_create(&list, &mtr, func); RNA_parameter_set_lookup(&list, "context", &C); - hdr->type->ext.call((bContext *)C, &mtr, func, &list); + menu->type->ext.call((bContext *)C, &mtr, func, &list); RNA_parameter_list_free(&list); } @@ -783,8 +783,8 @@ static StructRNA *rna_Menu_register( static StructRNA *rna_Menu_refine(PointerRNA *mtr) { - Menu *hdr = (Menu *)mtr->data; - return (hdr->type && hdr->type->ext.srna) ? hdr->type->ext.srna : &RNA_Menu; + Menu *menu = (Menu *)mtr->data; + return (menu->type && menu->type->ext.srna) ? menu->type->ext.srna : &RNA_Menu; } static void rna_Menu_bl_description_set(PointerRNA *ptr, const char *value) From 88b46a6ce9694a3d1ab3d9df27c019b70fa3ac51 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Mon, 4 Jun 2018 22:35:57 -0600 Subject: [PATCH 2/4] make.bat : Fix clang+asan msbuild project generation --- build_files/windows/configure_msbuild.cmd | 7 +++---- build_files/windows/reset_variables.cmd | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build_files/windows/configure_msbuild.cmd b/build_files/windows/configure_msbuild.cmd index eee21f568be..f8c2a87de8e 100644 --- a/build_files/windows/configure_msbuild.cmd +++ b/build_files/windows/configure_msbuild.cmd @@ -1,5 +1,3 @@ -set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% - if "%BUILD_ARCH%"=="x64" ( set MSBUILD_PLATFORM=x64 ) else if "%BUILD_ARCH%"=="x86" ( @@ -11,9 +9,9 @@ if "%BUILD_ARCH%"=="x64" ( ) if "%WITH_CLANG%"=="1" ( - set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -T"LLVM-vs2017" + set CLANG_CMAKE_ARGS=-T"LLVM-vs2017" if "%WITH_ASAN%"=="1" ( - set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_COMPILER_ASAN=On + set ASAN_CMAKE_ARGS=-DWITH_COMPILER_ASAN=On ) ) else ( if "%WITH_ASAN%"=="1" ( @@ -21,6 +19,7 @@ if "%WITH_CLANG%"=="1" ( exit /b 1 ) ) +set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS% if NOT EXIST %BUILD_DIR%\nul ( mkdir %BUILD_DIR% diff --git a/build_files/windows/reset_variables.cmd b/build_files/windows/reset_variables.cmd index f933729b91c..a522ed7407f 100644 --- a/build_files/windows/reset_variables.cmd +++ b/build_files/windows/reset_variables.cmd @@ -22,4 +22,6 @@ set BUILD_SHOW_HASHES= set SHOW_HELP= set BUILD_WITH_NINJA= set WITH_CLANG= -set WITH_ASAN= \ No newline at end of file +set WITH_ASAN= +set CLANG_CMAKE_ARGS= +set ASAN_CMAKE_ARGS= From d860d23e1a9c41ded126e54cae3c05ed9b869805 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Tue, 5 Jun 2018 07:25:37 -0600 Subject: [PATCH 3/4] make.bat: cache the vcredist directory. When run from make.bat the environment is setup correctly and the VCToolsRedistDir environment variable exists, on later invocations of cmake this may no longer be the case and a warning was emitted about the missing runtime. we can't rely on InstallRequiredSystemLibraries.cmake here since it uses the compiler version to figure out the correct location and it doesn't know how to deal with clang. --- build_files/cmake/platform/platform_win32.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 6e049c0048f..ec70f11ea22 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -31,7 +31,8 @@ endif() if(CMAKE_C_COMPILER_ID MATCHES "Clang") set(MSVC_CLANG On) - set(MSVC_REDIST_DIR $ENV{VCToolsRedistDir}) + set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables") + set(MSVC_REDIST_DIR ${VC_TOOLS_DIR}) if (DEFINED MSVC_REDIST_DIR) file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR) else() From c68429bc038635a6c2a3f29a5b057c077be3a4b0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 5 Jun 2018 16:32:11 +0200 Subject: [PATCH 4/4] Cleanup: pep8 Use 'autopep8 --ignore E721,E722' on our UI code, only minor changes. --- release/scripts/startup/bl_ui/__init__.py | 4 ++- .../startup/bl_ui/properties_constraint.py | 1 + .../startup/bl_ui/properties_data_armature.py | 1 + .../startup/bl_ui/properties_data_bone.py | 2 +- .../startup/bl_ui/properties_data_curve.py | 7 ++-- .../startup/bl_ui/properties_data_modifier.py | 3 +- .../startup/bl_ui/properties_freestyle.py | 19 +++++------ .../scripts/startup/bl_ui/properties_game.py | 4 +-- .../bl_ui/properties_grease_pencil_common.py | 5 ++- .../startup/bl_ui/properties_mask_common.py | 32 +++++++++---------- .../startup/bl_ui/properties_object.py | 4 +-- .../startup/bl_ui/properties_paint_common.py | 2 +- .../startup/bl_ui/properties_particle.py | 4 +-- .../startup/bl_ui/properties_physics_cloth.py | 1 + .../bl_ui/properties_physics_common.py | 2 +- .../bl_ui/properties_physics_rigidbody.py | 2 +- .../scripts/startup/bl_ui/properties_scene.py | 29 +++++++++-------- .../startup/bl_ui/properties_texture.py | 4 +-- release/scripts/startup/bl_ui/space_clip.py | 9 ++++-- .../scripts/startup/bl_ui/space_dopesheet.py | 14 ++++---- release/scripts/startup/bl_ui/space_graph.py | 1 + release/scripts/startup/bl_ui/space_image.py | 3 +- release/scripts/startup/bl_ui/space_info.py | 32 +++++++++---------- release/scripts/startup/bl_ui/space_node.py | 5 +++ .../scripts/startup/bl_ui/space_userpref.py | 23 ++++++------- release/scripts/startup/bl_ui/space_view3d.py | 1 + .../startup/bl_ui/space_view3d_toolbar.py | 12 ++++--- 27 files changed, 120 insertions(+), 106 deletions(-) diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index 0a7b2cd2e8b..f98074cdf0b 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -79,7 +79,7 @@ _modules = [ "space_userpref", "space_view3d", "space_view3d_toolbar", - ] +] import bpy @@ -158,6 +158,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_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index 411d64e2b94..c0fa82946e1 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -285,6 +285,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel): row.prop(itasc, "damping_max", text="Damp", slider=True) row.prop(itasc, "damping_epsilon", text="Eps", slider=True) + from .properties_animviz import ( MotionPathButtonsPanel, OnionSkinButtonsPanel, diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index 9fbb28c0f31..63b5d4f96fc 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -78,7 +78,7 @@ class BONE_PT_transform(BoneButtonsPanel, Panel): if pchan.rotation_mode == 'QUATERNION': col.prop(pchan, "rotation_quaternion", text="Rotation") elif pchan.rotation_mode == 'AXIS_ANGLE': - #col.label(text="Rotation") + # col.label(text="Rotation") #col.prop(pchan, "rotation_angle", text="Angle") #col.prop(pchan, "rotation_axis", text="Axis") col.prop(pchan, "rotation_axis_angle", text="Rotation") diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 3a3ad31a8ef..f57156c1bae 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -189,9 +189,10 @@ class DATA_PT_geometry_curve(CurveButtonsPanelCurve, Panel): col = layout.column() col.active = ( - (curve.bevel_depth > 0.0) or - (curve.extrude > 0.0) or - (curve.bevel_object is not None)) + (curve.bevel_depth > 0.0) or + (curve.extrude > 0.0) or + (curve.bevel_object is not None) + ) row = col.row(align=True) row.prop(curve, "bevel_factor_mapping_start", text="") row.prop(curve, "bevel_factor_start", text="Start") diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 5bcf188c683..f1f7091e83b 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -168,7 +168,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): if bpy.app.debug: layout.prop(md, "debug_options") - def BUILD(self, layout, ob, md): split = layout.split() @@ -329,7 +328,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout_info = layout layout_info.label(text=iface_("Face Count: {:,}".format(md.face_count)), - translate=False) + translate=False) def DISPLACE(self, layout, ob, md): has_texture = (md.texture is not None) diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index 3d105934bf8..7b656f9be81 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -627,7 +627,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, 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 @@ -641,7 +641,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, col = split.column() col.prop(linestyle, "use_same_object") - ## Splitting + # Splitting layout.label(text="Splitting:") split = layout.split(align=True) # First column @@ -677,7 +677,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, 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 @@ -691,7 +691,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, 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 @@ -714,12 +714,12 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, 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 @@ -787,9 +787,10 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel, 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_game.py b/release/scripts/startup/bl_ui/properties_game.py index 277b0842b3d..ac51b97e87d 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -207,7 +207,7 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel): game = context.object.game rd = context.scene.render return (rd.engine in cls.COMPAT_ENGINES) \ - and (game.physics_type in {'SENSOR', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'CHARACTER', 'SOFT_BODY'}) + and (game.physics_type in {'SENSOR', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'CHARACTER', 'SOFT_BODY'}) def draw_header(self, context): game = context.active_object.game @@ -248,7 +248,7 @@ class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel): game = context.object.game rd = context.scene.render return (rd.engine in cls.COMPAT_ENGINES) \ - and (game.physics_type in {'SENSOR', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'SOFT_BODY', 'CHARACTER', 'NO_COLLISION'}) + and (game.physics_type in {'SENSOR', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'SOFT_BODY', 'CHARACTER', 'NO_COLLISION'}) def draw_header(self, context): game = context.active_object.game 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 2aa978a51d8..72d8a53dd69 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -234,7 +234,6 @@ class GreasePencilStrokeEditPanel: if is_3d_view: layout.separator() - layout.separator() col = layout.column(align=True) col.operator("gpencil.stroke_subdivide", text="Subdivide") @@ -1075,11 +1074,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_object.py b/release/scripts/startup/bl_ui/properties_object.py index 5e7f1b068e2..50cef9124ab 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -57,7 +57,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel): if ob.rotation_mode == 'QUATERNION': row.column().prop(ob, "rotation_quaternion", text="Rotation") elif ob.rotation_mode == 'AXIS_ANGLE': - #row.column().label(text="Rotation") + # row.column().label(text="Rotation") #row.column().prop(pchan, "rotation_angle", text="Angle") #row.column().prop(pchan, "rotation_axis", text="Axis") row.column().prop(ob, "rotation_axis_angle", text="Rotation") @@ -84,7 +84,7 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel): if ob.rotation_mode == 'QUATERNION': row.column().prop(ob, "delta_rotation_quaternion", text="Rotation") elif ob.rotation_mode == 'AXIS_ANGLE': - #row.column().label(text="Rotation") + # row.column().label(text="Rotation") #row.column().prop(pchan, "delta_rotation_angle", text="Angle") #row.column().prop(pchan, "delta_rotation_axis", text="Axis") #row.column().prop(ob, "delta_rotation_axis_angle", text="Rotation") diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index b79f8263e39..b4049bf7b68 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 27a19d5636e..14ca6f700f4 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -485,7 +485,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel): row.prop(part, "object_factor", slider=True) row.prop(part, "factor_random") - #if part.type=='REACTOR': + # if part.type=='REACTOR': # sub.prop(part, "reactor_factor") # sub.prop(part, "reaction_shape", slider=True) @@ -815,7 +815,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) diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index bcbb44b2cb3..45cddd3d6b9 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -256,6 +256,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 73d3d5fc755..b821b20a1ae 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -275,7 +275,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 6afdd800b88..847df2e1fd7 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_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index db7fd998d4e..9b1f98ec1a4 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -19,10 +19,10 @@ # import bpy from bpy.types import ( - Menu, - Panel, - UIList, - ) + Menu, + Panel, + UIList, +) from rna_prop_ui import PropertyPanel @@ -117,18 +117,19 @@ class SceneKeyingSetsPanel: @staticmethod def draw_keyframing_settings(context, layout, ks, ksp): SceneKeyingSetsPanel._draw_keyframing_setting( - context, layout, ks, ksp, "Needed", - "use_insertkey_override_needed", "use_insertkey_needed", - userpref_fallback="use_keyframe_insert_needed") - + context, layout, ks, ksp, "Needed", + "use_insertkey_override_needed", "use_insertkey_needed", + userpref_fallback="use_keyframe_insert_needed", + ) SceneKeyingSetsPanel._draw_keyframing_setting( - context, layout, ks, ksp, "Visual", - "use_insertkey_override_visual", "use_insertkey_visual", - userpref_fallback="use_visual_keying") - + context, layout, ks, ksp, "Visual", + "use_insertkey_override_visual", "use_insertkey_visual", + userpref_fallback="use_visual_keying", + ) SceneKeyingSetsPanel._draw_keyframing_setting( - context, layout, ks, ksp, "XYZ to RGB", - "use_insertkey_override_xyz_to_rgb", "use_insertkey_xyz_to_rgb") + context, layout, ks, ksp, "XYZ to RGB", + "use_insertkey_override_xyz_to_rgb", "use_insertkey_xyz_to_rgb", + ) @staticmethod def _draw_keyframing_setting(context, layout, ks, ksp, label, toggle_prop, prop, userpref_fallback=None): diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 46b27c94419..7da34782364 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -1087,8 +1087,8 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel): factor_but(col, "use_map_warp", "warp_factor", "Warp") factor_but(col, "use_map_displacement", "displacement_factor", "Displace") - #~ sub = col.column() - #~ sub.active = tex.use_map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror + # ~ sub = col.column() + # ~ sub.active = tex.use_map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror #~ sub.prop(tex, "default_value", text="Amount", slider=True) elif idblock.type == 'HALO': layout.label(text="Halo:") diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 1cb2275a86f..f8d9ae3ef9f 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -1028,9 +1028,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() @@ -1199,6 +1201,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 371ab088190..731032bafa8 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -405,11 +405,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...") @@ -430,9 +430,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): diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index e2407f1f2b2..5ed58a57e47 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -301,6 +301,7 @@ class GRAPH_MT_delete(Menu): layout.operator("graph.clean").channels = False layout.operator("graph.clean", text="Clean Channels").channels = True + classes = ( GRAPH_HT_header, GRAPH_MT_editor_menus, diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 0f3583d2832..9cbb27bcedb 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -586,6 +586,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' @@ -1173,8 +1174,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_info.py b/release/scripts/startup/bl_ui/space_info.py index 180e48af386..c7bebf68eea 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -318,34 +318,34 @@ class INFO_MT_help(Menu): layout = self.layout layout.operator( - "wm.url_open", text="Manual", icon='HELP', - ).url = "https://docs.blender.org/manual/en/dev/" + "wm.url_open", text="Manual", icon='HELP', + ).url = "https://docs.blender.org/manual/en/dev/" layout.operator( - "wm.url_open", text="Release Log", icon='URL', - ).url = "http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/%d.%d" % bpy.app.version[:2] + "wm.url_open", text="Release Log", icon='URL', + ).url = "http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/%d.%d" % bpy.app.version[:2] layout.separator() layout.operator( - "wm.url_open", text="Blender Website", icon='URL', - ).url = "https://www.blender.org" + "wm.url_open", text="Blender Website", icon='URL', + ).url = "https://www.blender.org" layout.operator( - "wm.url_open", text="Blender Store", icon='URL', - ).url = "https://store.blender.org" + "wm.url_open", text="Blender Store", icon='URL', + ).url = "https://store.blender.org" layout.operator( - "wm.url_open", text="Developer Community", icon='URL', - ).url = "https://www.blender.org/get-involved/" + "wm.url_open", text="Developer Community", icon='URL', + ).url = "https://www.blender.org/get-involved/" layout.operator( - "wm.url_open", text="User Community", icon='URL', - ).url = "https://www.blender.org/support/user-community" + "wm.url_open", text="User Community", icon='URL', + ).url = "https://www.blender.org/support/user-community" layout.separator() layout.operator( - "wm.url_open", text="Report a Bug", icon='URL', - ).url = "https://developer.blender.org/maniphest/task/edit/form/1" + "wm.url_open", text="Report a Bug", icon='URL', + ).url = "https://developer.blender.org/maniphest/task/edit/form/1" layout.separator() layout.operator( - "wm.url_open", text="Python API Reference", icon='URL', - ).url = bpy.types.WM_OT_doc_view._prefix + "wm.url_open", text="Python API Reference", icon='URL', + ).url = bpy.types.WM_OT_doc_view._prefix layout.operator("wm.operator_cheat_sheet", icon='TEXT') layout.operator("wm.sysinfo", icon='TEXT') diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 8f7d8f7555a..c2735998d2c 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -510,11 +510,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' @@ -525,6 +529,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_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 7e7e6ccca2d..8db9d63c0aa 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -138,7 +138,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) @@ -281,8 +280,8 @@ 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") @@ -325,7 +324,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" @@ -409,7 +407,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.py b/release/scripts/startup/bl_ui/space_view3d.py index 6334a2ee87e..7d582f8536f 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2966,6 +2966,7 @@ class VIEW3D_MT_edit_curve_segments(Menu): layout.operator("curve.subdivide") layout.operator("curve.switch_direction") + class VIEW3D_MT_edit_curve_clean(Menu): bl_label = "Clean Up" diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 19cba5af4ee..41f1a64ca51 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1582,11 +1582,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 @@ -2032,6 +2032,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'