Cleanup: use relative imports in bl_ui
This commit is contained in:
@@ -64,9 +64,9 @@ def register():
|
||||
# In this example, we need to see the main render image button and
|
||||
# the material preview panel.
|
||||
from bl_ui import (
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render.RENDER_PT_render.COMPAT_ENGINES.add(CustomRenderEngine.bl_idname)
|
||||
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add(CustomRenderEngine.bl_idname)
|
||||
|
||||
@@ -75,9 +75,9 @@ def unregister():
|
||||
bpy.utils.unregister_class(CustomRenderEngine)
|
||||
|
||||
from bl_ui import (
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render.RENDER_PT_render.COMPAT_ENGINES.remove(CustomRenderEngine.bl_idname)
|
||||
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.remove(CustomRenderEngine.bl_idname)
|
||||
|
||||
|
||||
@@ -285,10 +285,10 @@ 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 bl_ui.properties_animviz import (
|
||||
MotionPathButtonsPanel,
|
||||
OnionSkinButtonsPanel,
|
||||
)
|
||||
from .properties_animviz import (
|
||||
MotionPathButtonsPanel,
|
||||
OnionSkinButtonsPanel,
|
||||
)
|
||||
|
||||
|
||||
class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
|
||||
@@ -323,10 +323,10 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
|
||||
layout.prop(ob, "dupli_group", text="Group")
|
||||
|
||||
|
||||
from bl_ui.properties_animviz import (
|
||||
MotionPathButtonsPanel,
|
||||
OnionSkinButtonsPanel,
|
||||
)
|
||||
from .properties_animviz import (
|
||||
MotionPathButtonsPanel,
|
||||
OnionSkinButtonsPanel,
|
||||
)
|
||||
|
||||
|
||||
class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
|
||||
@@ -22,7 +22,7 @@ from bpy.types import Panel, Menu
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
|
||||
from bl_ui.properties_physics_common import (
|
||||
from .properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
basic_force_field_settings_ui,
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
import bpy
|
||||
from bpy.types import Menu, Panel
|
||||
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
|
||||
def cloth_panel_enabled(md):
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
import bpy
|
||||
from bpy.types import Panel, UIList
|
||||
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
|
||||
class PHYSICS_UL_dynapaint_surfaces(UIList):
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
|
||||
from bl_ui.properties_physics_common import (
|
||||
basic_force_field_settings_ui,
|
||||
basic_force_field_falloff_ui,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
basic_force_field_settings_ui,
|
||||
basic_force_field_falloff_ui,
|
||||
)
|
||||
|
||||
|
||||
class PhysicButtonsPanel:
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
|
||||
from bl_ui.properties_physics_common import (
|
||||
from .properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
|
||||
COMPAT_OB_TYPES = {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'}
|
||||
|
||||
@@ -26,10 +26,10 @@ from bpy.types import (
|
||||
|
||||
from rna_prop_ui import PropertyPanel
|
||||
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
|
||||
class SCENE_MT_units_length_presets(Menu):
|
||||
|
||||
@@ -33,7 +33,7 @@ from bpy.types import (
|
||||
|
||||
from rna_prop_ui import PropertyPanel
|
||||
|
||||
from bl_ui.properties_paint_common import brush_texture_settings
|
||||
from .properties_paint_common import brush_texture_settings
|
||||
|
||||
|
||||
class TEXTURE_MT_specials(Menu):
|
||||
@@ -78,7 +78,7 @@ class TEXTURE_UL_texslots(UIList):
|
||||
layout.label(text="", icon_value=icon)
|
||||
|
||||
|
||||
from bl_ui.properties_material import active_node_mat
|
||||
from .properties_material import active_node_mat
|
||||
|
||||
|
||||
def context_tex_datablock(context):
|
||||
|
||||
@@ -21,14 +21,15 @@
|
||||
import bpy
|
||||
from bpy.types import Panel, Header, Menu, UIList
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
GreasePencilDrawingToolsPanel,
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilBrushPanel,
|
||||
GreasePencilBrushCurvesPanel,
|
||||
GreasePencilDataPanel,
|
||||
GreasePencilPaletteColorPanel)
|
||||
from .properties_grease_pencil_common import (
|
||||
GreasePencilDrawingToolsPanel,
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilBrushPanel,
|
||||
GreasePencilBrushCurvesPanel,
|
||||
GreasePencilDataPanel,
|
||||
GreasePencilPaletteColorPanel,
|
||||
)
|
||||
|
||||
|
||||
class CLIP_UL_tracking_objects(UIList):
|
||||
@@ -1045,16 +1046,16 @@ class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
|
||||
# -----------------------------------------------------------------------------
|
||||
# Mask (similar code in space_image.py, keep in sync)
|
||||
|
||||
from bl_ui.properties_mask_common import (
|
||||
MASK_PT_mask,
|
||||
MASK_PT_layers,
|
||||
MASK_PT_spline,
|
||||
MASK_PT_point,
|
||||
MASK_PT_display,
|
||||
MASK_PT_tools,
|
||||
MASK_PT_transforms,
|
||||
MASK_PT_add,
|
||||
)
|
||||
from .properties_mask_common import (
|
||||
MASK_PT_mask,
|
||||
MASK_PT_layers,
|
||||
MASK_PT_spline,
|
||||
MASK_PT_point,
|
||||
MASK_PT_display,
|
||||
MASK_PT_tools,
|
||||
MASK_PT_transforms,
|
||||
MASK_PT_add,
|
||||
)
|
||||
|
||||
|
||||
class CLIP_PT_mask_layers(MASK_PT_layers, Panel):
|
||||
|
||||
@@ -285,7 +285,7 @@ class DOPESHEET_MT_marker(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
from bl_ui.space_time import marker_menu_generic
|
||||
from .space_time import marker_menu_generic
|
||||
marker_menu_generic(layout)
|
||||
|
||||
st = context.space_data
|
||||
|
||||
@@ -26,7 +26,7 @@ class GRAPH_HT_header(Header):
|
||||
bl_space_type = 'GRAPH_EDITOR'
|
||||
|
||||
def draw(self, context):
|
||||
from bl_ui.space_dopesheet import dopesheet_filter
|
||||
from .space_dopesheet import dopesheet_filter
|
||||
|
||||
layout = self.layout
|
||||
toolsettings = context.tool_settings
|
||||
@@ -186,7 +186,7 @@ class GRAPH_MT_marker(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
from bl_ui.space_time import marker_menu_generic
|
||||
from .space_time import marker_menu_generic
|
||||
marker_menu_generic(layout)
|
||||
|
||||
# TODO: pose markers for action edit mode only?
|
||||
|
||||
@@ -20,21 +20,21 @@
|
||||
import bpy
|
||||
import math
|
||||
from bpy.types import Header, Menu, Panel
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_texture_settings,
|
||||
brush_texpaint_common,
|
||||
brush_mask_texture_settings,
|
||||
)
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
GreasePencilDrawingToolsPanel,
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilBrushPanel,
|
||||
GreasePencilBrushCurvesPanel,
|
||||
GreasePencilDataPanel,
|
||||
GreasePencilPaletteColorPanel
|
||||
)
|
||||
from .properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_texture_settings,
|
||||
brush_texpaint_common,
|
||||
brush_mask_texture_settings,
|
||||
)
|
||||
from .properties_grease_pencil_common import (
|
||||
GreasePencilDrawingToolsPanel,
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilBrushPanel,
|
||||
GreasePencilBrushCurvesPanel,
|
||||
GreasePencilDataPanel,
|
||||
GreasePencilPaletteColorPanel,
|
||||
)
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
|
||||
|
||||
@@ -545,14 +545,14 @@ class MASK_MT_editor_menus(Menu):
|
||||
# Mask (similar code in space_clip.py, keep in sync)
|
||||
# note! - panel placement does _not_ fit well with image panels... need to fix
|
||||
|
||||
from bl_ui.properties_mask_common import (
|
||||
MASK_PT_mask,
|
||||
MASK_PT_layers,
|
||||
MASK_PT_spline,
|
||||
MASK_PT_point,
|
||||
MASK_PT_display,
|
||||
MASK_PT_tools,
|
||||
)
|
||||
from .properties_mask_common import (
|
||||
MASK_PT_mask,
|
||||
MASK_PT_layers,
|
||||
MASK_PT_spline,
|
||||
MASK_PT_point,
|
||||
MASK_PT_display,
|
||||
MASK_PT_tools,
|
||||
)
|
||||
|
||||
|
||||
class IMAGE_PT_mask(MASK_PT_mask, Panel):
|
||||
|
||||
@@ -26,7 +26,7 @@ class NLA_HT_header(Header):
|
||||
bl_space_type = 'NLA_EDITOR'
|
||||
|
||||
def draw(self, context):
|
||||
from bl_ui.space_dopesheet import dopesheet_filter
|
||||
from .space_dopesheet import dopesheet_filter
|
||||
|
||||
layout = self.layout
|
||||
|
||||
@@ -124,7 +124,7 @@ class NLA_MT_marker(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
from bl_ui.space_time import marker_menu_generic
|
||||
from .space_time import marker_menu_generic
|
||||
marker_menu_generic(layout)
|
||||
|
||||
|
||||
|
||||
@@ -21,16 +21,16 @@ import bpy
|
||||
import nodeitems_utils
|
||||
from bpy.types import Header, Menu, Panel
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
GreasePencilDrawingToolsPanel,
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilBrushPanel,
|
||||
GreasePencilBrushCurvesPanel,
|
||||
GreasePencilDataPanel,
|
||||
GreasePencilPaletteColorPanel,
|
||||
GreasePencilToolsPanel
|
||||
)
|
||||
from .properties_grease_pencil_common import (
|
||||
GreasePencilDrawingToolsPanel,
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilBrushPanel,
|
||||
GreasePencilBrushCurvesPanel,
|
||||
GreasePencilDataPanel,
|
||||
GreasePencilPaletteColorPanel,
|
||||
GreasePencilToolsPanel
|
||||
)
|
||||
|
||||
|
||||
class NODE_HT_header(Header):
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import bpy
|
||||
from bpy.types import Header, Menu, Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
from .properties_grease_pencil_common import (
|
||||
GreasePencilDataPanel,
|
||||
GreasePencilPaletteColorPanel,
|
||||
GreasePencilToolsPanel,
|
||||
@@ -276,7 +276,7 @@ class SEQUENCER_MT_marker(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
from bl_ui.space_time import marker_menu_generic
|
||||
from .space_time import marker_menu_generic
|
||||
marker_menu_generic(layout)
|
||||
|
||||
|
||||
@@ -1166,7 +1166,7 @@ class SEQUENCER_PT_view_safe_areas(SequencerButtonsPanel_Output, Panel):
|
||||
self.layout.prop(st, "show_safe_areas", text="")
|
||||
|
||||
def draw(self, context):
|
||||
from bl_ui.properties_data_camera import draw_display_safe_settings
|
||||
from .properties_data_camera import draw_display_safe_settings
|
||||
|
||||
layout = self.layout
|
||||
st = context.space_data
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
from bpy.types import Header, Menu, Panel
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
from .properties_grease_pencil_common import (
|
||||
GreasePencilDataPanel,
|
||||
GreasePencilPaletteColorPanel,
|
||||
)
|
||||
from bl_ui.properties_paint_common import UnifiedPaintPanel
|
||||
from .properties_paint_common import UnifiedPaintPanel
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
|
||||
|
||||
|
||||
@@ -19,20 +19,20 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
from bpy.types import Menu, Panel, UIList
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
GreasePencilDrawingToolsPanel,
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilInterpolatePanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilBrushPanel,
|
||||
GreasePencilBrushCurvesPanel
|
||||
)
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_texture_settings,
|
||||
brush_texpaint_common,
|
||||
brush_mask_texture_settings,
|
||||
)
|
||||
from .properties_grease_pencil_common import (
|
||||
GreasePencilDrawingToolsPanel,
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilInterpolatePanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilBrushPanel,
|
||||
GreasePencilBrushCurvesPanel
|
||||
)
|
||||
from .properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_texture_settings,
|
||||
brush_texpaint_common,
|
||||
brush_mask_texture_settings,
|
||||
)
|
||||
|
||||
|
||||
class View3DPanel:
|
||||
|
||||
Reference in New Issue
Block a user