forked from bartvdbraak/blender
use import rather then assignment for loading '_' into scripts.
This commit is contained in:
parent
b5962b7ccd
commit
3b8a0f3d67
@ -58,6 +58,7 @@ def main():
|
|||||||
# from bpy.types import Panel
|
# from bpy.types import Panel
|
||||||
sys.modules["bpy.app"] = app
|
sys.modules["bpy.app"] = app
|
||||||
sys.modules["bpy.app.handlers"] = app.handlers
|
sys.modules["bpy.app.handlers"] = app.handlers
|
||||||
|
sys.modules["bpy.app.translations"] = app.translations
|
||||||
sys.modules["bpy.types"] = types
|
sys.modules["bpy.types"] = types
|
||||||
|
|
||||||
#~ if "-d" in sys.argv: # Enable this to measure start up speed
|
#~ if "-d" in sys.argv: # Enable this to measure start up speed
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Panel
|
from bpy.types import Panel
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
class ModifierButtonsPanel():
|
class ModifierButtonsPanel():
|
||||||
|
@ -21,7 +21,7 @@ import bpy
|
|||||||
from bpy.types import Menu, Panel, UIList
|
from bpy.types import Menu, Panel, UIList
|
||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
def active_node_mat(mat):
|
def active_node_mat(mat):
|
||||||
|
@ -21,7 +21,7 @@ import bpy
|
|||||||
from bpy.types import Panel
|
from bpy.types import Panel
|
||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
from bl_ui.properties_physics_common import (point_cache_ui,
|
from bl_ui.properties_physics_common import (point_cache_ui,
|
||||||
effector_weights_ui,
|
effector_weights_ui,
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Panel, Menu
|
from bpy.types import Panel, Menu
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
class FLUID_MT_presets(Menu):
|
class FLUID_MT_presets(Menu):
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Panel, Header, Menu, UIList
|
from bpy.types import Panel, Header, Menu, UIList
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
class CLIP_UL_tracking_objects(UIList):
|
class CLIP_UL_tracking_objects(UIList):
|
||||||
|
@ -19,10 +19,9 @@
|
|||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Header, Menu, Panel
|
from bpy.types import Header, Menu, Panel
|
||||||
from bl_ui.properties_paint_common import UnifiedPaintPanel
|
from bl_ui.properties_paint_common import UnifiedPaintPanel, brush_texture_settings
|
||||||
from bl_ui.properties_paint_common import brush_texture_settings
|
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
class ImagePaintPanel(UnifiedPaintPanel):
|
class ImagePaintPanel(UnifiedPaintPanel):
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Header, Menu, Panel
|
from bpy.types import Header, Menu, Panel
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
def act_strip(context):
|
def act_strip(context):
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Header, Menu, Panel
|
from bpy.types import Header, Menu, Panel
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
class TEXT_HT_header(Header):
|
class TEXT_HT_header(Header):
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Header, Menu, Panel
|
from bpy.types import Header, Menu, Panel
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
def ui_style_items(col, context):
|
def ui_style_items(col, context):
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Menu
|
from bpy.types import Menu
|
||||||
|
|
||||||
_ = bpy.app.translations.pgettext
|
from bpy.app.translations import pgettext as _
|
||||||
|
|
||||||
|
|
||||||
class USERPREF_MT_keyconfigs(Menu):
|
class USERPREF_MT_keyconfigs(Menu):
|
||||||
|
Loading…
Reference in New Issue
Block a user