Fix T65393: Error live editing UI scripts
Disable relative imports for UI scripts.
This commit is contained in:
@@ -21,7 +21,7 @@ import bpy
|
||||
from bpy.types import Panel, Menu
|
||||
from rna_prop_ui import PropertyPanel
|
||||
|
||||
from .properties_animviz import (
|
||||
from bl_ui.properties_animviz import (
|
||||
MotionPathButtonsPanel,
|
||||
MotionPathButtonsPanel_display,
|
||||
)
|
||||
|
||||
@@ -241,7 +241,7 @@ class GreasePencilStrokeSculptPanel:
|
||||
layout.template_icon_view(settings, "sculpt_tool", show_labels=True)
|
||||
|
||||
if not self.is_popover:
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_gpencil_sculpt_settings,
|
||||
)
|
||||
brush_basic_gpencil_sculpt_settings(layout, context, brush)
|
||||
|
||||
@@ -22,7 +22,7 @@ from bpy.types import Menu, Panel, UIList
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from bl_ui.utils import PresetPanel
|
||||
|
||||
from .properties_grease_pencil_common import (
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
GreasePencilMaterialsPanel,
|
||||
)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
from .properties_animviz import (
|
||||
from bl_ui.properties_animviz import (
|
||||
MotionPathButtonsPanel,
|
||||
MotionPathButtonsPanel_display,
|
||||
)
|
||||
|
||||
@@ -24,7 +24,7 @@ from bpy.app.translations import pgettext_iface as iface_
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
from bl_ui.utils import PresetPanel
|
||||
|
||||
from .properties_physics_common import (
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
basic_force_field_settings_ui,
|
||||
|
||||
@@ -23,7 +23,7 @@ from bpy.types import (
|
||||
)
|
||||
from bl_ui.utils import PresetPanel
|
||||
|
||||
from .properties_physics_common import (
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
@@ -22,7 +22,7 @@ from bpy.types import (
|
||||
Panel,
|
||||
UIList,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
from bpy.types import (
|
||||
Panel,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
from bl_ui.properties_physics_common import (
|
||||
basic_force_field_settings_ui,
|
||||
basic_force_field_falloff_ui,
|
||||
)
|
||||
|
||||
@@ -22,7 +22,7 @@ import bpy
|
||||
from bpy.types import (
|
||||
Panel,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
from bpy.types import (
|
||||
Panel,
|
||||
)
|
||||
from .properties_physics_common import (
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
from bpy.types import Panel
|
||||
from .space_view3d import (
|
||||
from bl_ui.space_view3d import (
|
||||
VIEW3D_PT_shading_lighting,
|
||||
VIEW3D_PT_shading_color,
|
||||
VIEW3D_PT_shading_options,
|
||||
|
||||
@@ -26,7 +26,7 @@ from bpy.types import (
|
||||
|
||||
from rna_prop_ui import PropertyPanel
|
||||
|
||||
from .properties_physics_common import (
|
||||
from bl_ui.properties_physics_common import (
|
||||
point_cache_ui,
|
||||
effector_weights_ui,
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ from bpy.types import (
|
||||
)
|
||||
|
||||
from rna_prop_ui import PropertyPanel
|
||||
from .properties_paint_common import brush_texture_settings
|
||||
from bl_ui.properties_paint_common import brush_texture_settings
|
||||
|
||||
|
||||
class TEXTURE_MT_context_menu(Menu):
|
||||
|
||||
@@ -22,7 +22,7 @@ import bpy
|
||||
from bpy.types import Panel, Header, Menu, UIList
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
from bl_ui.utils import PresetPanel
|
||||
from .properties_grease_pencil_common import (
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
AnnotationDrawingToolsPanel,
|
||||
AnnotationDataPanel,
|
||||
)
|
||||
@@ -1106,7 +1106,7 @@ class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
|
||||
# -----------------------------------------------------------------------------
|
||||
# Mask (similar code in space_image.py, keep in sync)
|
||||
|
||||
from .properties_mask_common import (
|
||||
from bl_ui.properties_mask_common import (
|
||||
MASK_PT_mask,
|
||||
MASK_PT_layers,
|
||||
MASK_PT_spline,
|
||||
|
||||
@@ -199,7 +199,7 @@ class DOPESHEET_HT_header(Header):
|
||||
layout.template_header()
|
||||
|
||||
if st.mode == 'TIMELINE':
|
||||
from .space_time import (
|
||||
from bl_ui.space_time import (
|
||||
TIME_MT_editor_menus,
|
||||
TIME_HT_editor_buttons,
|
||||
)
|
||||
@@ -394,7 +394,7 @@ class DOPESHEET_MT_marker(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
from .space_time import marker_menu_generic
|
||||
from bl_ui.space_time import marker_menu_generic
|
||||
marker_menu_generic(layout, context)
|
||||
|
||||
st = context.space_data
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# <pep8 compliant>
|
||||
|
||||
from bpy.types import Header, Menu, Panel
|
||||
from .space_dopesheet import (
|
||||
from bl_ui.space_dopesheet import (
|
||||
DopesheetFilterPopoverBase,
|
||||
dopesheet_filter,
|
||||
)
|
||||
@@ -207,7 +207,7 @@ class GRAPH_MT_marker(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
from .space_time import marker_menu_generic
|
||||
from bl_ui.space_time import marker_menu_generic
|
||||
marker_menu_generic(layout, context)
|
||||
|
||||
# TODO: pose markers for action edit mode only?
|
||||
|
||||
@@ -24,7 +24,7 @@ from bpy.types import (
|
||||
Panel,
|
||||
UIList,
|
||||
)
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_texture_settings,
|
||||
brush_texpaint_common,
|
||||
@@ -34,10 +34,10 @@ from .properties_paint_common import (
|
||||
brush_texpaint_common_options,
|
||||
brush_mask_texture_settings,
|
||||
)
|
||||
from .properties_grease_pencil_common import (
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
AnnotationDataPanel,
|
||||
)
|
||||
from .space_toolsystem_common import (
|
||||
from bl_ui.space_toolsystem_common import (
|
||||
ToolActivePanelHelper,
|
||||
)
|
||||
|
||||
@@ -548,7 +548,7 @@ class IMAGE_HT_tool_header(Header):
|
||||
|
||||
# Active Tool
|
||||
# -----------
|
||||
from .space_toolsystem_common import ToolSelectPanelHelper
|
||||
from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
|
||||
tool = ToolSelectPanelHelper.draw_active_tool_header(context, layout)
|
||||
tool_mode = context.mode if tool is None else tool.mode
|
||||
|
||||
@@ -580,7 +580,7 @@ class IMAGE_HT_tool_header(Header):
|
||||
|
||||
# Active Tool
|
||||
# -----------
|
||||
from .space_toolsystem_common import ToolSelectPanelHelper
|
||||
from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
|
||||
tool = ToolSelectPanelHelper.tool_active_from_context(context)
|
||||
tool_mode = context.mode if tool is None else tool.mode
|
||||
|
||||
@@ -597,7 +597,7 @@ class _draw_tool_settings_context_mode:
|
||||
uv_sculpt = tool_settings.uv_sculpt
|
||||
brush = uv_sculpt.brush
|
||||
if brush:
|
||||
from .properties_paint_common import UnifiedPaintPanel
|
||||
from bl_ui.properties_paint_common import UnifiedPaintPanel
|
||||
|
||||
row = layout.row(align=True)
|
||||
UnifiedPaintPanel.prop_unified_size(row, context, brush, "size", slider=True)
|
||||
@@ -619,7 +619,7 @@ class _draw_tool_settings_context_mode:
|
||||
if brush is None:
|
||||
return
|
||||
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_basic_texpaint_settings,
|
||||
)
|
||||
@@ -770,7 +770,7 @@ 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 .properties_mask_common import (
|
||||
from bl_ui.properties_mask_common import (
|
||||
MASK_PT_mask,
|
||||
MASK_PT_layers,
|
||||
MASK_PT_spline,
|
||||
@@ -1407,14 +1407,14 @@ class IMAGE_PT_uv_sculpt_brush(Panel):
|
||||
sima = context.space_data
|
||||
# TODO(campbell): nicer way to check if we're in uv sculpt mode.
|
||||
if sima and sima.show_uvedit:
|
||||
from .space_toolsystem_common import ToolSelectPanelHelper
|
||||
from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
|
||||
tool = ToolSelectPanelHelper.tool_active_from_context(context)
|
||||
if tool.has_datablock:
|
||||
return True
|
||||
return False
|
||||
|
||||
def draw(self, context):
|
||||
from .properties_paint_common import UnifiedPaintPanel
|
||||
from bl_ui.properties_paint_common import UnifiedPaintPanel
|
||||
layout = self.layout
|
||||
|
||||
tool_settings = context.tool_settings
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
from bpy.types import Header, Menu, Panel
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
from .space_dopesheet import (
|
||||
from bl_ui.space_dopesheet import (
|
||||
DopesheetFilterPopoverBase,
|
||||
dopesheet_filter,
|
||||
)
|
||||
@@ -143,7 +143,7 @@ class NLA_MT_marker(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
from .space_time import marker_menu_generic
|
||||
from bl_ui.space_time import marker_menu_generic
|
||||
marker_menu_generic(layout, context)
|
||||
|
||||
|
||||
|
||||
@@ -23,21 +23,21 @@ from bpy.types import Header, Menu, Panel
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
from bl_ui.utils import PresetPanel
|
||||
from .properties_grease_pencil_common import (
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
AnnotationDataPanel,
|
||||
GreasePencilToolsPanel,
|
||||
)
|
||||
from .space_toolsystem_common import (
|
||||
from bl_ui.space_toolsystem_common import (
|
||||
ToolActivePanelHelper,
|
||||
)
|
||||
from .properties_material import (
|
||||
from bl_ui.properties_material import (
|
||||
EEVEE_MATERIAL_PT_settings,
|
||||
MATERIAL_PT_viewport
|
||||
)
|
||||
from .properties_world import (
|
||||
from bl_ui.properties_world import (
|
||||
WORLD_PT_viewport_display
|
||||
)
|
||||
from .properties_data_light import (
|
||||
from bl_ui.properties_data_light import (
|
||||
DATA_PT_light,
|
||||
DATA_PT_EEVEE_light,
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ from bpy.app.translations import (
|
||||
contexts as i18n_contexts,
|
||||
pgettext_iface as iface_,
|
||||
)
|
||||
from .properties_grease_pencil_common import (
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
AnnotationDataPanel,
|
||||
GreasePencilToolsPanel,
|
||||
)
|
||||
@@ -362,7 +362,7 @@ class SEQUENCER_MT_marker(Menu):
|
||||
st = context.space_data
|
||||
is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
|
||||
|
||||
from .space_time import marker_menu_generic
|
||||
from bl_ui.space_time import marker_menu_generic
|
||||
marker_menu_generic(layout, context)
|
||||
|
||||
if is_sequencer_view:
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
|
||||
from .space_toolsystem_common import (
|
||||
from bl_ui.space_toolsystem_common import (
|
||||
ToolSelectPanelHelper,
|
||||
ToolDef,
|
||||
)
|
||||
@@ -1072,7 +1072,7 @@ class _defs_weight_paint:
|
||||
def draw_settings(context, layout, tool):
|
||||
brush = context.tool_settings.weight_paint.brush
|
||||
if brush is not None:
|
||||
from .properties_paint_common import UnifiedPaintPanel
|
||||
from bl_ui.properties_paint_common import UnifiedPaintPanel
|
||||
UnifiedPaintPanel.prop_unified_weight(layout, context, brush, "weight", slider=True)
|
||||
UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True)
|
||||
props = tool.operator_properties("paint.weight_gradient")
|
||||
|
||||
@@ -23,15 +23,15 @@ from bpy.types import (
|
||||
Menu,
|
||||
Panel,
|
||||
)
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
)
|
||||
from .properties_grease_pencil_common import (
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
AnnotationDataPanel,
|
||||
AnnotationOnionSkin,
|
||||
GreasePencilMaterialsPanel,
|
||||
)
|
||||
from .space_toolsystem_common import (
|
||||
from bl_ui.space_toolsystem_common import (
|
||||
ToolActivePanelHelper,
|
||||
)
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
@@ -62,7 +62,7 @@ class VIEW3D_HT_tool_header(Header):
|
||||
|
||||
# Active Tool
|
||||
# -----------
|
||||
from .space_toolsystem_common import ToolSelectPanelHelper
|
||||
from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
|
||||
tool = ToolSelectPanelHelper.draw_active_tool_header(
|
||||
context, layout,
|
||||
tool_key=('VIEW_3D', tool_mode),
|
||||
@@ -225,7 +225,7 @@ class _draw_tool_settings_context_mode:
|
||||
if brush is None:
|
||||
return
|
||||
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_sculpt_settings,
|
||||
)
|
||||
brush_basic_sculpt_settings(layout, context, brush, compact=True)
|
||||
@@ -242,7 +242,7 @@ class _draw_tool_settings_context_mode:
|
||||
if brush is None:
|
||||
return
|
||||
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_basic_texpaint_settings,
|
||||
)
|
||||
@@ -263,7 +263,7 @@ class _draw_tool_settings_context_mode:
|
||||
if brush is None:
|
||||
return
|
||||
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_basic_vpaint_settings,
|
||||
)
|
||||
@@ -283,7 +283,7 @@ class _draw_tool_settings_context_mode:
|
||||
if brush is None:
|
||||
return
|
||||
|
||||
from .properties_paint_common import brush_basic_wpaint_settings
|
||||
from bl_ui.properties_paint_common import brush_basic_wpaint_settings
|
||||
brush_basic_wpaint_settings(layout, context, brush, compact=True)
|
||||
|
||||
@staticmethod
|
||||
@@ -343,7 +343,7 @@ class _draw_tool_settings_context_mode:
|
||||
if context.object and brush.gpencil_tool in {'FILL', 'DRAW'}:
|
||||
draw_color_selector()
|
||||
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_gpencil_paint_settings,
|
||||
)
|
||||
brush_basic_gpencil_paint_settings(layout, context, brush, compact=True)
|
||||
@@ -377,7 +377,7 @@ class _draw_tool_settings_context_mode:
|
||||
settings = tool_settings.gpencil_sculpt
|
||||
brush = settings.brush
|
||||
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_gpencil_sculpt_settings,
|
||||
)
|
||||
brush_basic_gpencil_sculpt_settings(layout, context, brush, compact=True)
|
||||
@@ -390,7 +390,7 @@ class _draw_tool_settings_context_mode:
|
||||
settings = tool_settings.gpencil_sculpt
|
||||
brush = settings.brush
|
||||
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_gpencil_weight_settings,
|
||||
)
|
||||
brush_basic_gpencil_weight_settings(layout, context, brush, compact=True)
|
||||
@@ -482,7 +482,7 @@ class VIEW3D_HT_header(Header):
|
||||
show_snap = True
|
||||
else:
|
||||
|
||||
from .properties_paint_common import UnifiedPaintPanel
|
||||
from bl_ui.properties_paint_common import UnifiedPaintPanel
|
||||
paint_settings = UnifiedPaintPanel.paint_settings(context)
|
||||
|
||||
if paint_settings:
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
from bpy.types import Menu, Panel, UIList
|
||||
from .properties_grease_pencil_common import (
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
GreasePencilStrokeEditPanel,
|
||||
GreasePencilStrokeSculptPanel,
|
||||
GreasePencilSculptOptionsPanel,
|
||||
GreasePencilAppearancePanel,
|
||||
)
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
brush_mask_texture_settings,
|
||||
brush_texpaint_common,
|
||||
@@ -304,7 +304,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
||||
|
||||
# Sculpt Mode #
|
||||
if context.sculpt_object and brush:
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_sculpt_settings,
|
||||
)
|
||||
|
||||
@@ -388,7 +388,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
||||
|
||||
# Weight Paint Mode #
|
||||
elif context.weight_paint_object and brush:
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_wpaint_settings,
|
||||
)
|
||||
|
||||
@@ -399,7 +399,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
||||
|
||||
# Vertex Paint Mode #
|
||||
elif context.vertex_paint_object and brush:
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_vpaint_settings,
|
||||
)
|
||||
|
||||
@@ -1740,7 +1740,7 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
|
||||
row.prop(gp_settings, "use_material_pin", text="")
|
||||
|
||||
if not self.is_popover:
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_gpencil_paint_settings,
|
||||
)
|
||||
brush_basic_gpencil_paint_settings(layout, context, brush, compact=True)
|
||||
@@ -2051,7 +2051,7 @@ class VIEW3D_PT_tools_grease_pencil_weight_paint(View3DPanel, Panel):
|
||||
col = layout.column()
|
||||
|
||||
if not self.is_popover:
|
||||
from .properties_paint_common import (
|
||||
from bl_ui.properties_paint_common import (
|
||||
brush_basic_gpencil_weight_settings,
|
||||
)
|
||||
brush_basic_gpencil_weight_settings(col, context, brush)
|
||||
|
||||
Reference in New Issue
Block a user