Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-12-21 04:56:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-21 04:56:42 +0300
commit0457976a872000993202763abe7503c76b461122 (patch)
treea4998fbbb768c43eb00b55ba311d497fd74eadcd
parent04f6388deeddb32d53c9b6ab961ef36e45d48486 (diff)
Rename user_preferences -> preferences
-rw-r--r--add_advanced_objects_menu/make_struts.py8
-rw-r--r--add_advanced_objects_panels/__init__.py2
-rw-r--r--add_curve_extra_objects/add_curve_aceous_galore.py8
-rw-r--r--add_curve_extra_objects/add_curve_simple.py2
-rw-r--r--add_curve_extra_objects/add_curve_spirofit_bouncespline.py18
-rw-r--r--add_curve_extra_objects/add_curve_torus_knots.py8
-rw-r--r--add_mesh_extra_objects/add_mesh_solid.py4
-rw-r--r--animation_animall.py2
-rw-r--r--ant_landscape/add_mesh_ant_landscape.py6
-rw-r--r--ant_landscape/ant_functions.py12
-rw-r--r--ant_landscape/mesh_ant_displace.py6
-rw-r--r--archimesh/__init__.py2
-rw-r--r--archipack/__init__.py2
-rw-r--r--archipack/archipack_gl.py8
-rw-r--r--archipack/archipack_manipulator.py2
-rw-r--r--archipack/archipack_material.py2
-rw-r--r--archipack/archipack_preset.py2
-rw-r--r--archipack/archipack_rendering.py4
-rw-r--r--archipack/archipack_thumbs.py2
-rw-r--r--archipack/archipack_wall2.py2
-rw-r--r--blender_id/__init__.py4
-rw-r--r--btrace/bTrace_props.py2
-rw-r--r--camera_turnaround.py6
-rw-r--r--curve_simplify.py8
-rw-r--r--development_icon_get.py4
-rw-r--r--io_export_unreal_psk_psa.py2
-rw-r--r--io_import_images_as_planes.py6
-rw-r--r--io_online_sketchfab/__init__.py2
-rw-r--r--io_scene_ms3d/ms3d_export.py2
-rw-r--r--io_scene_ms3d/ms3d_utils.py6
-rw-r--r--io_scene_obj/__init__.py2
-rw-r--r--light_field_tools/__init__.py2
-rw-r--r--lighting_dynamic_sky.py2
-rw-r--r--materials_library_vx/__init__.py4
-rw-r--r--materials_utils/__init__.py2
-rw-r--r--materials_utils/warning_messages_utils.py4
-rw-r--r--measureit/__init__.py2
-rw-r--r--measureit/measureit_geometry.py2
-rw-r--r--mesh_bsurfaces.py18
-rw-r--r--mesh_carver.py4
-rw-r--r--mesh_extra_tools/mesh_pen_tool.py14
-rw-r--r--mesh_f2.py6
-rw-r--r--mesh_inset/__init__.py6
-rw-r--r--mesh_looptools.py8
-rw-r--r--mesh_snap_utilities_line/__init__.py2
-rw-r--r--mesh_snap_utilities_line/common_classes.py10
-rw-r--r--mesh_snap_utilities_line/ops_line.py8
-rw-r--r--modules/rna_manual_reference.py4
-rw-r--r--node_wrangler.py6
-rw-r--r--object_boolean_tools.py18
-rw-r--r--object_fracture_crack/operator.py2
-rw-r--r--oscurart_tools/__init__.py2
-rw-r--r--pie_menus_official/__init__.py2
-rw-r--r--render_auto_tile_size.py8
-rw-r--r--render_povray/render.py6
-rw-r--r--render_povray/ui.py8
-rw-r--r--rigify/__init__.py4
-rw-r--r--rigify/generate.py6
-rw-r--r--rigify/legacy/rig_ui_pitchipoy_template.py24
-rw-r--r--rigify/legacy/rig_ui_template.py24
-rw-r--r--rigify/legacy/ui.py12
-rw-r--r--rigify/rig_ui_template.py24
-rw-r--r--rigify/ui.py34
-rw-r--r--sequencer_kinoraw_tools/audio_tools.py12
-rw-r--r--sequencer_kinoraw_tools/datamosh.py8
-rw-r--r--sequencer_kinoraw_tools/eco.py6
-rw-r--r--sequencer_kinoraw_tools/proxy_tools.py10
-rw-r--r--sequencer_kinoraw_tools/random_editor.py6
-rw-r--r--sequencer_kinoraw_tools/recursive_loader.py2
-rw-r--r--sequencer_kinoraw_tools/ui.py6
-rw-r--r--space_view3d_3d_navigation.py2
-rw-r--r--space_view3d_brush_menus/utils_core.py2
-rw-r--r--space_view3d_display_tools/__init__.py2
-rw-r--r--space_view3d_pie_menus/__init__.py2
-rw-r--r--space_view3d_spacebar_menu.py4
-rw-r--r--space_view3d_stored_views/core.py2
-rw-r--r--space_view3d_stored_views/ui.py6
-rw-r--r--ui_layer_manager.py2
-rw-r--r--ui_translate/__init__.py4
-rw-r--r--uv_magic_uv/addon_updater_ops.py12
-rw-r--r--uv_magic_uv/impl/move_uv_impl.py2
-rw-r--r--uv_magic_uv/legacy/op/texture_projection.py2
-rw-r--r--uv_magic_uv/legacy/op/uv_bounding_box.py4
-rw-r--r--uv_magic_uv/legacy/op/uv_inspection.py2
-rw-r--r--uv_magic_uv/legacy/op/uv_sculpt.py2
85 files changed, 262 insertions, 262 deletions
diff --git a/add_advanced_objects_menu/make_struts.py b/add_advanced_objects_menu/make_struts.py
index 58e149ab..76496237 100644
--- a/add_advanced_objects_menu/make_struts.py
+++ b/add_advanced_objects_menu/make_struts.py
@@ -562,18 +562,18 @@ class Struts(Operator):
return obj is not None and obj.type == "MESH"
def execute(self, context):
- store_undo = bpy.context.user_preferences.edit.use_global_undo
- bpy.context.user_preferences.edit.use_global_undo = False
+ store_undo = bpy.context.preferences.edit.use_global_undo
+ bpy.context.preferences.edit.use_global_undo = False
keywords = self.as_keywords()
try:
create_struts(self, context, **keywords)
- bpy.context.user_preferences.edit.use_global_undo = store_undo
+ bpy.context.preferences.edit.use_global_undo = store_undo
return {"FINISHED"}
except Exception as e:
- bpy.context.user_preferences.edit.use_global_undo = store_undo
+ bpy.context.preferences.edit.use_global_undo = store_undo
self.report({"WARNING"},
"Make Struts could not be performed. Operation Cancelled")
print("\n[mesh.generate_struts]\n{}".format(e))
diff --git a/add_advanced_objects_panels/__init__.py b/add_advanced_objects_panels/__init__.py
index e2f72994..1c453226 100644
--- a/add_advanced_objects_panels/__init__.py
+++ b/add_advanced_objects_panels/__init__.py
@@ -77,7 +77,7 @@ def _get_pref_class(mod):
def get_addon_preferences(name=''):
"""Acquisition and registration"""
- addons = bpy.context.user_preferences.addons
+ addons = bpy.context.preferences.addons
if __name__ not in addons: # wm.read_factory_settings()
return None
addon_prefs = addons[__name__].preferences
diff --git a/add_curve_extra_objects/add_curve_aceous_galore.py b/add_curve_extra_objects/add_curve_aceous_galore.py
index 246e0551..3a0bdaf3 100644
--- a/add_curve_extra_objects/add_curve_aceous_galore.py
+++ b/add_curve_extra_objects/add_curve_aceous_galore.py
@@ -720,7 +720,7 @@ def NoiseCurve(type=0, number=100, length=2.0, size=0.5,
def align_matrix(context):
loc = Matrix.Translation(context.scene.cursor_location)
- obj_align = context.user_preferences.edit.object_align
+ obj_align = context.preferences.edit.object_align
if (context.space_data.type == 'VIEW_3D' and
obj_align == 'VIEW'):
@@ -1429,8 +1429,8 @@ class Curveaceous_galore(Operator):
def execute(self, context):
# turn off undo
- undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
# deal with 2D - 3D curve differences
if self.ProfileType in ['Helix', 'Cycloid', 'Noise']:
@@ -1455,7 +1455,7 @@ class Curveaceous_galore(Operator):
main(context, self, self.align_matrix or Matrix())
# restore pre operator undo state
- context.user_preferences.edit.use_global_undo = undo
+ context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
diff --git a/add_curve_extra_objects/add_curve_simple.py b/add_curve_extra_objects/add_curve_simple.py
index 0d4b9224..6cc0ab3a 100644
--- a/add_curve_extra_objects/add_curve_simple.py
+++ b/add_curve_extra_objects/add_curve_simple.py
@@ -382,7 +382,7 @@ def SimpleTrapezoid(a=2.0, b=1.0, h=1.0, center=True):
def align_matrix(context, location):
loc = Matrix.Translation(location)
- obj_align = context.user_preferences.edit.object_align
+ obj_align = context.preferences.edit.object_align
if (context.space_data.type == 'VIEW_3D' and
obj_align == 'VIEW'):
rot = context.space_data.region_3d.view_matrix.to_3x3().inverted().to_4x4()
diff --git a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
index f2dd0fb5..88c43969 100644
--- a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
+++ b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
@@ -323,8 +323,8 @@ class SpiroFitSpline(Operator):
"Active Object is not a Mesh. Operation Cancelled")
return {'CANCELLED'}
- #undo = context.user_preferences.edit.use_global_undo
- #context.user_preferences.edit.use_global_undo = False
+ #undo = context.preferences.edit.use_global_undo
+ #context.preferences.edit.use_global_undo = False
#bpy.ops.object.select_all(action='DESELECT')
@@ -364,7 +364,7 @@ class SpiroFitSpline(Operator):
if self.auto_refresh is False:
self.refresh = False
- #context.user_preferences.edit.use_global_undo = undo
+ #context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
@@ -598,8 +598,8 @@ class BounceSpline(Operator):
if obj.type != 'MESH':
return {'CANCELLED'}
- #undo = context.user_preferences.edit.use_global_undo
- #context.user_preferences.edit.use_global_undo = False
+ #undo = context.preferences.edit.use_global_undo
+ #context.preferences.edit.use_global_undo = False
#bpy.ops.object.select_all(action='DESELECT')
@@ -636,7 +636,7 @@ class BounceSpline(Operator):
if self.auto_refresh is False:
self.refresh = False
- #context.user_preferences.edit.use_global_undo = undo
+ #context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
@@ -841,8 +841,8 @@ class CatenaryCurve(Operator):
#bpy.ops.object.select_all(action='DESELECT')
- #undo = context.user_preferences.edit.use_global_undo
- #context.user_preferences.edit.use_global_undo = False
+ #undo = context.preferences.edit.use_global_undo
+ #context.preferences.edit.use_global_undo = False
r.seed(self.random_seed)
@@ -876,7 +876,7 @@ class CatenaryCurve(Operator):
if self.auto_refresh is False:
self.refresh = False
- #context.user_preferences.edit.use_global_undo = undo
+ #context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
diff --git a/add_curve_extra_objects/add_curve_torus_knots.py b/add_curve_extra_objects/add_curve_torus_knots.py
index d138508e..a3c05ff6 100644
--- a/add_curve_extra_objects/add_curve_torus_knots.py
+++ b/add_curve_extra_objects/add_curve_torus_knots.py
@@ -154,7 +154,7 @@ def align_matrix(self, context):
userLoc = Matrix.Translation(self.location)
userRot = self.rotation.to_matrix().to_4x4()
- obj_align = context.user_preferences.edit.object_align
+ obj_align = context.preferences.edit.object_align
if (context.space_data.type == 'VIEW_3D' and obj_align == 'VIEW'):
rot = context.space_data.region_3d.view_matrix.to_3x3().inverted().to_4x4()
else:
@@ -712,14 +712,14 @@ class torus_knot_plus(Operator, AddObjectHelper):
self.align_matrix = align_matrix(self, context)
# turn off undo
- #undo = bpy.context.user_preferences.edit.use_global_undo
- #bpy.context.user_preferences.edit.use_global_undo = False
+ #undo = bpy.context.preferences.edit.use_global_undo
+ #bpy.context.preferences.edit.use_global_undo = False
# create the curve
create_torus_knot(self, context)
# restore pre operator undo state
- #bpy.context.user_preferences.edit.use_global_undo = undo
+ #bpy.context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
diff --git a/add_mesh_extra_objects/add_mesh_solid.py b/add_mesh_extra_objects/add_mesh_solid.py
index 74c173e4..e8127e34 100644
--- a/add_mesh_extra_objects/add_mesh_solid.py
+++ b/add_mesh_extra_objects/add_mesh_solid.py
@@ -451,7 +451,7 @@ class Solids(bpy.types.Operator):
def execute(self, context):
# turn off undo for better performance (3-5x faster), also makes sure
# that mesh ops are undoable and entire script acts as one operator
- bpy.context.user_preferences.edit.use_global_undo = False
+ bpy.context.preferences.edit.use_global_undo = False
# piece of code to make presets remain until parameters are changed
if self.preset != "0":
@@ -513,6 +513,6 @@ class Solids(bpy.types.Operator):
# object generation done
# turn undo back on
- bpy.context.user_preferences.edit.use_global_undo = True
+ bpy.context.preferences.edit.use_global_undo = True
return {'FINISHED'}
diff --git a/animation_animall.py b/animation_animall.py
index 42760e86..d0a0374f 100644
--- a/animation_animall.py
+++ b/animation_animall.py
@@ -505,7 +505,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/ant_landscape/add_mesh_ant_landscape.py b/ant_landscape/add_mesh_ant_landscape.py
index f103a6c0..52afed75 100644
--- a/ant_landscape/add_mesh_ant_landscape.py
+++ b/ant_landscape/add_mesh_ant_landscape.py
@@ -612,8 +612,8 @@ class AntAddLandscape(bpy.types.Operator):
return {'PASS_THROUGH'}
# turn off undo
- undo = bpy.context.user_preferences.edit.use_global_undo
- bpy.context.user_preferences.edit.use_global_undo = False
+ undo = bpy.context.preferences.edit.use_global_undo
+ bpy.context.preferences.edit.use_global_undo = False
# deselect all objects when in object mode
if bpy.ops.object.select_all.poll():
@@ -796,6 +796,6 @@ class AntAddLandscape(bpy.types.Operator):
self.refresh = False
# restore pre operator undo state
- context.user_preferences.edit.use_global_undo = undo
+ context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
diff --git a/ant_landscape/ant_functions.py b/ant_landscape/ant_functions.py
index ca81ce6d..71dbde72 100644
--- a/ant_landscape/ant_functions.py
+++ b/ant_landscape/ant_functions.py
@@ -142,8 +142,8 @@ class AntLandscapeRefresh(bpy.types.Operator):
def execute(self, context):
# turn off undo
- undo = bpy.context.user_preferences.edit.use_global_undo
- bpy.context.user_preferences.edit.use_global_undo = False
+ undo = bpy.context.preferences.edit.use_global_undo
+ bpy.context.preferences.edit.use_global_undo = False
# ant object items
obj = bpy.context.active_object
@@ -178,7 +178,7 @@ class AntLandscapeRefresh(bpy.types.Operator):
pass
# restore pre operator undo state
- context.user_preferences.edit.use_global_undo = undo
+ context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
@@ -202,8 +202,8 @@ class AntLandscapeRegenerate(bpy.types.Operator):
def execute(self, context):
# turn off undo
- undo = bpy.context.user_preferences.edit.use_global_undo
- bpy.context.user_preferences.edit.use_global_undo = False
+ undo = bpy.context.preferences.edit.use_global_undo
+ bpy.context.preferences.edit.use_global_undo = False
scene = bpy.context.scene
# ant object items
@@ -329,7 +329,7 @@ class AntLandscapeRegenerate(bpy.types.Operator):
scene.objects.active = new_ob
# restore pre operator undo state
- context.user_preferences.edit.use_global_undo = undo
+ context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
diff --git a/ant_landscape/mesh_ant_displace.py b/ant_landscape/mesh_ant_displace.py
index 884c72a4..a5c57d75 100644
--- a/ant_landscape/mesh_ant_displace.py
+++ b/ant_landscape/mesh_ant_displace.py
@@ -616,8 +616,8 @@ class AntMeshDisplace(bpy.types.Operator):
return {'PASS_THROUGH'}
# turn off undo
- undo = bpy.context.user_preferences.edit.use_global_undo
- bpy.context.user_preferences.edit.use_global_undo = False
+ undo = bpy.context.preferences.edit.use_global_undo
+ bpy.context.preferences.edit.use_global_undo = False
ob = context.object
@@ -745,6 +745,6 @@ class AntMeshDisplace(bpy.types.Operator):
self.refresh = False
# restore pre operator undo state
- context.user_preferences.edit.use_global_undo = undo
+ context.preferences.edit.use_global_undo = undo
return {'FINISHED'}
diff --git a/archimesh/__init__.py b/archimesh/__init__.py
index 07049ff2..0208b944 100644
--- a/archimesh/__init__.py
+++ b/archimesh/__init__.py
@@ -157,7 +157,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/archipack/__init__.py b/archipack/__init__.py
index 6c30d218..705468b7 100644
--- a/archipack/__init__.py
+++ b/archipack/__init__.py
@@ -458,7 +458,7 @@ def menu_func(self, context):
icons = icons_collection["main"]
# either draw sub menu or right at end of this one
- if context.user_preferences.addons[__name__].preferences.create_submenu:
+ if context.preferences.addons[__name__].preferences.create_submenu:
layout.operator_context = 'INVOKE_REGION_WIN'
layout.menu("ARCHIPACK_MT_create", icon_value=icons["archipack"].icon_id)
else:
diff --git a/archipack/archipack_gl.py b/archipack/archipack_gl.py
index 578098f9..17211787 100644
--- a/archipack/archipack_gl.py
+++ b/archipack/archipack_gl.py
@@ -66,7 +66,7 @@ def get_prefs(context):
global __name__
try:
addon_name = __name__.split('.')[0]
- prefs = context.user_preferences.addons[addon_name].preferences
+ prefs = context.preferences.addons[addon_name].preferences
except:
prefs = DefaultColorScheme
pass
@@ -325,7 +325,7 @@ class GlText(Gl):
"""
overall on-screen size in pixels
"""
- dpi, font_id = context.user_preferences.system.dpi, 0
+ dpi, font_id = context.preferences.system.dpi, 0
if self.angle != 0:
blf.enable(font_id, blf.ROTATION)
blf.rotation(font_id, self.angle)
@@ -437,7 +437,7 @@ class GlText(Gl):
p = self.position_2d_from_coord(context, self.pts[0], render)
# dirty fast assignment
- dpi, font_id = context.user_preferences.system.dpi, 0
+ dpi, font_id = context.preferences.system.dpi, 0
# self.cbuff[0:4] = self.colour
@@ -1151,7 +1151,7 @@ class Screen():
def size(self, context):
- system = context.user_preferences.system
+ system = context.preferences.system
w = context.region.width
h = context.region.height
y_min = self.margin
diff --git a/archipack/archipack_manipulator.py b/archipack/archipack_manipulator.py
index be6c2ef2..2b9010d6 100644
--- a/archipack/archipack_manipulator.py
+++ b/archipack/archipack_manipulator.py
@@ -1956,7 +1956,7 @@ class archipack_manipulator(PropertyGroup):
try:
# retrieve addon name from imports
addon_name = __name__.split('.')[0]
- prefs = context.user_preferences.addons[addon_name].preferences
+ prefs = context.preferences.addons[addon_name].preferences
arrow_size = prefs.arrow_size
handle_size = prefs.handle_size
except:
diff --git a/archipack/archipack_material.py b/archipack/archipack_material.py
index cbec80cd..71e41f32 100644
--- a/archipack/archipack_material.py
+++ b/archipack/archipack_material.py
@@ -132,7 +132,7 @@ class MatlibsManager():
prefs = None
# retrieve addon name from imports
addon_name = __name__.split('.')[0]
- prefs = context.user_preferences.addons[addon_name].preferences
+ prefs = context.preferences.addons[addon_name].preferences
return prefs
@property
diff --git a/archipack/archipack_preset.py b/archipack/archipack_preset.py
index 8f1468b2..745b1826 100644
--- a/archipack/archipack_preset.py
+++ b/archipack/archipack_preset.py
@@ -539,7 +539,7 @@ class ArchipackPreset(AddPresetBase):
def background_render(self, context, cls, preset):
generator = os.path.dirname(os.path.realpath(__file__)) + os.path.sep + "archipack_thumbs.py"
addon_name = __name__.split('.')[0]
- matlib_path = context.user_preferences.addons[addon_name].preferences.matlib_path
+ matlib_path = context.preferences.addons[addon_name].preferences.matlib_path
# Run external instance of blender like the original thumbnail generator.
cmd = [
bpy.app.binary_path,
diff --git a/archipack/archipack_rendering.py b/archipack/archipack_rendering.py
index 533afffc..82ef9a18 100644
--- a/archipack/archipack_rendering.py
+++ b/archipack/archipack_rendering.py
@@ -56,7 +56,7 @@ class ARCHIPACK_OT_render_thumbs(Operator):
def background_render(self, context, cls, preset):
generator = path.dirname(path.realpath(__file__)) + path.sep + "archipack_thumbs.py"
addon_name = __name__.split('.')[0]
- matlib_path = context.user_preferences.addons[addon_name].preferences.matlib_path
+ matlib_path = context.preferences.addons[addon_name].preferences.matlib_path
# Run external instance of blender like the original thumbnail generator.
cmd = [
bpy.app.binary_path,
@@ -174,7 +174,7 @@ class ARCHIPACK_OT_render_thumbs(Operator):
def invoke(self, context, event):
addon_name = __name__.split('.')[0]
- matlib_path = context.user_preferences.addons[addon_name].preferences.matlib_path
+ matlib_path = context.preferences.addons[addon_name].preferences.matlib_path
if matlib_path == '':
self.report({'WARNING'}, "You should setup a default material library path in addon preferences")
diff --git a/archipack/archipack_thumbs.py b/archipack/archipack_thumbs.py
index 4ae4d020..c3cfea7d 100644
--- a/archipack/archipack_thumbs.py
+++ b/archipack/archipack_thumbs.py
@@ -223,7 +223,7 @@ if __name__ == "__main__":
# log("### ENABLE %s ADDON ############################" % module)
bpy.ops.wm.addon_enable(module=module)
# log("### MATLIB PATH ############################")
- bpy.context.user_preferences.addons[module].preferences.matlib_path = matlib
+ bpy.context.preferences.addons[module].preferences.matlib_path = matlib
except:
raise RuntimeError("module name not found")
# log("### GENERATE ############################")
diff --git a/archipack/archipack_wall2.py b/archipack/archipack_wall2.py
index 750cd313..20f6e505 100644
--- a/archipack/archipack_wall2.py
+++ b/archipack/archipack_wall2.py
@@ -2263,7 +2263,7 @@ class ARCHIPACK_OT_wall2_draw(ArchipackDrawTool, Operator):
def invoke(self, context, event):
if context.mode == "OBJECT":
- prefs = context.user_preferences.addons[__name__.split('.')[0]].preferences
+ prefs = context.preferences.addons[__name__.split('.')[0]].preferences
self.max_style_draw_tool = prefs.max_style_draw_tool
self.keymap = Keymaps(context)
self.wall_part1 = GlPolygon((0.5, 0, 0, 0.2))
diff --git a/blender_id/__init__.py b/blender_id/__init__.py
index e5d94715..51e91989 100644
--- a/blender_id/__init__.py
+++ b/blender_id/__init__.py
@@ -263,7 +263,7 @@ class BlenderIdPreferences(AddonPreferences):
class BlenderIdMixin:
@staticmethod
def addon_prefs(context):
- preferences = context.user_preferences.addons[__name__].preferences
+ preferences = context.preferences.addons[__name__].preferences
preferences.reset_messages()
return preferences
@@ -352,7 +352,7 @@ def register():
bpy.utils.register_class(BlenderIdPreferences)
bpy.utils.register_class(BlenderIdValidate)
- preferences = bpy.context.user_preferences.addons[__name__].preferences
+ preferences = bpy.context.preferences.addons[__name__].preferences
preferences.reset_messages()
diff --git a/btrace/bTrace_props.py b/btrace/bTrace_props.py
index 70c57532..2a56946e 100644
--- a/btrace/bTrace_props.py
+++ b/btrace/bTrace_props.py
@@ -579,7 +579,7 @@ class addTracerObjectPanel(Panel):
def draw(self, context):
layout = self.layout
Btrace = context.window_manager.curve_tracer
- addon_prefs = context.user_preferences.addons["btrace"].preferences
+ addon_prefs = context.preferences.addons["btrace"].preferences
switch_expand = addon_prefs.expand_enum
obj = context.object
diff --git a/camera_turnaround.py b/camera_turnaround.py
index 547c2834..78fdab60 100644
--- a/camera_turnaround.py
+++ b/camera_turnaround.py
@@ -91,9 +91,9 @@ class RunAction(Operator):
myempty.select = True
context.scene.objects.active = myempty
# save current configuration
- savedinterpolation = context.user_preferences.edit.keyframe_new_interpolation_type
+ savedinterpolation = context.preferences.edit.keyframe_new_interpolation_type
# change interpolation mode
- context.user_preferences.edit.keyframe_new_interpolation_type = 'LINEAR'
+ context.preferences.edit.keyframe_new_interpolation_type = 'LINEAR'
# create first frame
myempty.rotation_euler = (0, 0, 0)
myempty.empty_display_size = 0.1
@@ -165,7 +165,7 @@ class RunAction(Operator):
bpy.context.object.constraints[-1].target = bpy.data.objects[myempty.name]
# back previous configuration
- context.user_preferences.edit.keyframe_new_interpolation_type = savedinterpolation
+ context.preferences.edit.keyframe_new_interpolation_type = savedinterpolation
bpy.context.scene.cursor_location = savedcursor
# -------------------------
diff --git a/curve_simplify.py b/curve_simplify.py
index 4a390feb..1518ed5f 100644
--- a/curve_simplify.py
+++ b/curve_simplify.py
@@ -574,8 +574,8 @@ class CURVE_OT_simplify(Operator):
self.keepShort # 7
]
try:
- global_undo = bpy.context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ global_undo = bpy.context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
bpy.ops.object.mode_set(mode='OBJECT')
obj = context.active_object
@@ -583,11 +583,11 @@ class CURVE_OT_simplify(Operator):
main(context, obj, options, curve_dimension)
- context.user_preferences.edit.use_global_undo = global_undo
+ context.preferences.edit.use_global_undo = global_undo
except Exception as e:
error_handlers(self, "curve.simplify", e, "Simplify Curves")
- context.user_preferences.edit.use_global_undo = global_undo
+ context.preferences.edit.use_global_undo = global_undo
return {'CANCELLED'}
return {'FINISHED'}
diff --git a/development_icon_get.py b/development_icon_get.py
index e32c58ef..c602b365 100644
--- a/development_icon_get.py
+++ b/development_icon_get.py
@@ -48,12 +48,12 @@ HISTORY = []
def ui_scale():
- prefs = bpy.context.user_preferences.system
+ prefs = bpy.context.preferences.system
return prefs.dpi * prefs.pixel_size / DPI
def prefs():
- return bpy.context.user_preferences.addons[__name__].preferences
+ return bpy.context.preferences.addons[__name__].preferences
class Icons:
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 2f0a9fe2..987bf2a6 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -2830,7 +2830,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 88cee32a..58cb6b67 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -869,14 +869,14 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
self.relative = False
# this won't work in edit mode
- editmode = context.user_preferences.edit.use_enter_edit_mode
- context.user_preferences.edit.use_enter_edit_mode = False
+ editmode = context.preferences.edit.use_enter_edit_mode
+ context.preferences.edit.use_enter_edit_mode = False
if context.active_object and context.active_object.mode == 'EDIT':
bpy.ops.object.mode_set(mode='OBJECT')
self.import_images(context)
- context.user_preferences.edit.use_enter_edit_mode = editmode
+ context.preferences.edit.use_enter_edit_mode = editmode
return {'FINISHED'}
diff --git a/io_online_sketchfab/__init__.py b/io_online_sketchfab/__init__.py
index 2205f497..fa1cefdd 100644
--- a/io_online_sketchfab/__init__.py
+++ b/io_online_sketchfab/__init__.py
@@ -450,7 +450,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/io_scene_ms3d/ms3d_export.py b/io_scene_ms3d/ms3d_export.py
index 6b58f7e1..0494c1fb 100644
--- a/io_scene_ms3d/ms3d_export.py
+++ b/io_scene_ms3d/ms3d_export.py
@@ -165,7 +165,7 @@ class Ms3dExporter():
= blender_context.selected_objects[0]
# restore pre operator undo state
- blender_context.user_preferences.edit.use_global_undo = self.undo
+ blender_context.preferences.edit.use_global_undo = self.undo
is_valid, statistics = ms3d_model.is_valid()
if self.options_verbose in Ms3dUi.VERBOSE_NORMAL:
diff --git a/io_scene_ms3d/ms3d_utils.py b/io_scene_ms3d/ms3d_utils.py
index c6196d9a..2bcfba8a 100644
--- a/io_scene_ms3d/ms3d_utils.py
+++ b/io_scene_ms3d/ms3d_utils.py
@@ -99,8 +99,8 @@ def select_all(select):
def pre_setup_environment(porter, blender_context):
# inject undo to porter
# and turn off undo
- porter.undo = blender_context.user_preferences.edit.use_global_undo
- blender_context.user_preferences.edit.use_global_undo = False
+ porter.undo = blender_context.preferences.edit.use_global_undo
+ blender_context.preferences.edit.use_global_undo = False
# inject active_object to self
porter.active_object = blender_context.scene.objects.active
@@ -126,7 +126,7 @@ def post_setup_environment(porter, blender_context):
= blender_context.selected_objects[0]
# restore pre operator undo state
- blender_context.user_preferences.edit.use_global_undo = porter.undo
+ blender_context.preferences.edit.use_global_undo = porter.undo
###############################################################################
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index bb8c3e2c..915e0613 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -138,7 +138,7 @@ class ImportOBJ(bpy.types.Operator, ImportHelper):
).to_4x4()
keywords["global_matrix"] = global_matrix
- if bpy.data.is_saved and context.user_preferences.filepaths.use_relative_paths:
+ if bpy.data.is_saved and context.preferences.filepaths.use_relative_paths:
import os
keywords["relpath"] = os.path.dirname(bpy.data.filepath)
diff --git a/light_field_tools/__init__.py b/light_field_tools/__init__.py
index 386e767a..b749f44c 100644
--- a/light_field_tools/__init__.py
+++ b/light_field_tools/__init__.py
@@ -137,7 +137,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/lighting_dynamic_sky.py b/lighting_dynamic_sky.py
index 98d61fd6..2fd0b283 100644
--- a/lighting_dynamic_sky.py
+++ b/lighting_dynamic_sky.py
@@ -72,7 +72,7 @@ def check_world_name(name_id="Dynamic"):
def check_cycles():
- return ('cycles' in bpy.context.user_preferences.addons.keys())
+ return ('cycles' in bpy.context.preferences.addons.keys())
class dsky(Operator):
diff --git a/materials_library_vx/__init__.py b/materials_library_vx/__init__.py
index dd89127b..8aa8993f 100644
--- a/materials_library_vx/__init__.py
+++ b/materials_library_vx/__init__.py
@@ -264,7 +264,7 @@ class Library():
def get_libraries():
libs = [Library(matlib_path, f) for f in os.listdir(matlib_path) if f[-5::] == "blend"]
try:
- user_path = bpy.context.user_preferences.addons[__name__].preferences.matlib_path
+ user_path = bpy.context.preferences.addons[__name__].preferences.matlib_path
if user_path:
if os.path.exists(user_path):
libs.extend([Library(user_path, f) for f in os.listdir(user_path) if f[-5::] == "blend"])
@@ -1093,7 +1093,7 @@ def clean_materials():
bin = bpy.app.binary_path
mats = list_materials()
-bpy.context.user_preferences.filepaths.save_version = 0
+bpy.context.preferences.filepaths.save_version = 0
for mat in mats:
clean_materials()
matpath = os.path.join("{1}", mat + ".blend")
diff --git a/materials_utils/__init__.py b/materials_utils/__init__.py
index 94975e6b..32324ad8 100644
--- a/materials_utils/__init__.py
+++ b/materials_utils/__init__.py
@@ -2594,7 +2594,7 @@ def use_separator(operator, context):
# preferences utilities
def return_preferences():
- return bpy.context.user_preferences.addons[__name__].preferences
+ return bpy.context.preferences.addons[__name__].preferences
def use_remove_mat_all():
diff --git a/materials_utils/warning_messages_utils.py b/materials_utils/warning_messages_utils.py
index 00f4a719..435bcdfd 100644
--- a/materials_utils/warning_messages_utils.py
+++ b/materials_utils/warning_messages_utils.py
@@ -25,7 +25,7 @@ def warning_messages(operator=None, warn='DEFAULT', object_name="", is_mat=None,
# override - important messages that should be enabled, no matter the setting
# pass the show_warnings bool to enable/disable them
- addon = bpy.context.user_preferences.addons[MAT_SPEC_NAME]
+ addon = bpy.context.preferences.addons[MAT_SPEC_NAME]
get_warn = addon.preferences.show_warnings if addon else False
show_warn = get_warn if override is False else override
@@ -160,7 +160,7 @@ def collect_report(collection="", is_start=False, is_final=False):
def c_is_cycles_addon_enabled():
# checks if Cycles is enabled thanks to ideasman42
- return ('cycles' in bpy.context.user_preferences.addons.keys())
+ return ('cycles' in bpy.context.preferences.addons.keys())
def c_data_has_materials():
diff --git a/measureit/__init__.py b/measureit/__init__.py
index 2d248d9c..4944cd14 100644
--- a/measureit/__init__.py
+++ b/measureit/__init__.py
@@ -89,7 +89,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/measureit/measureit_geometry.py b/measureit/measureit_geometry.py
index 6340a890..1f442393 100644
--- a/measureit/measureit_geometry.py
+++ b/measureit/measureit_geometry.py
@@ -806,7 +806,7 @@ def draw_text(myobj, pos2d, display_text, rgba, fsize, align='L', text_rot=0.0):
if pos2d is None:
return
- # dpi = bpy.context.user_preferences.system.dpi
+ # dpi = bpy.context.preferences.system.dpi
gap = 12
x_pos, y_pos = pos2d
font_id = 0
diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py
index 53b88d49..c0c1e994 100644
--- a/mesh_bsurfaces.py
+++ b/mesh_bsurfaces.py
@@ -3037,7 +3037,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
def execute(self, context):
- bpy.context.user_preferences.edit.use_global_undo = False
+ bpy.context.preferences.edit.use_global_undo = False
if not self.is_fill_faces:
bpy.ops.wm.context_set_value(data_path='tool_settings.mesh_select_mode',
@@ -3108,17 +3108,17 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
- bpy.context.user_preferences.edit.use_global_undo = self.initial_global_undo_state
+ bpy.context.preferences.edit.use_global_undo = self.initial_global_undo_state
return{'FINISHED'}
def invoke(self, context, event):
- self.initial_global_undo_state = bpy.context.user_preferences.edit.use_global_undo
+ self.initial_global_undo_state = bpy.context.preferences.edit.use_global_undo
self.main_object = bpy.context.scene.objects.active
self.main_object_selected_verts_count = int(self.main_object.data.total_vert_sel)
- bpy.context.user_preferences.edit.use_global_undo = False
+ bpy.context.preferences.edit.use_global_undo = False
bpy.ops.wm.context_set_value(data_path='tool_settings.mesh_select_mode',
value='True, False, False')
@@ -3333,7 +3333,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
self.execute(context)
# Set again since "execute()" will turn it again to its initial value
- bpy.context.user_preferences.edit.use_global_undo = False
+ bpy.context.preferences.edit.use_global_undo = False
# If "Keep strokes" option is not active, delete original strokes curve object
if (not self.stopping_errors and not self.keep_strokes) or self.is_crosshatch:
@@ -3354,7 +3354,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
if self.strokes_type == "GP_STROKES" and not self.stopping_errors:
bpy.ops.gpencil.active_frame_delete('INVOKE_REGION_WIN')
- bpy.context.user_preferences.edit.use_global_undo = self.initial_global_undo_state
+ bpy.context.preferences.edit.use_global_undo = self.initial_global_undo_state
if not self.stopping_errors:
return {"FINISHED"}
@@ -3366,7 +3366,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
created_faces_count = self.fill_with_faces(self.main_object)
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
- bpy.context.user_preferences.edit.use_global_undo = self.initial_global_undo_state
+ bpy.context.preferences.edit.use_global_undo = self.initial_global_undo_state
if created_faces_count == 0:
self.report({'WARNING'}, "There aren't any strokes attached to the object")
@@ -3374,7 +3374,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
else:
return {"FINISHED"}
- bpy.context.user_preferences.edit.use_global_undo = self.initial_global_undo_state
+ bpy.context.preferences.edit.use_global_undo = self.initial_global_undo_state
if self.strokes_type == "EXTERNAL_NO_CURVE":
self.report({'WARNING'}, "The secondary object is not a Curve.")
@@ -3858,7 +3858,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/mesh_carver.py b/mesh_carver.py
index 7d453ad8..cf3b55fd 100644
--- a/mesh_carver.py
+++ b/mesh_carver.py
@@ -714,7 +714,7 @@ def draw_callback_px(self, context):
region = context.region
# Width screen
- overlap = context.user_preferences.system.use_region_overlap
+ overlap = context.preferences.system.use_region_overlap
t_panel_width = 0
if overlap:
for region in context.area.regions:
@@ -3115,7 +3115,7 @@ class Carver(bpy.types.Operator):
# Undo Variables
self.undo_index = 0
- self.undo_limit = context.user_preferences.edit.undo_steps
+ self.undo_limit = context.preferences.edit.undo_steps
self.undo_list = []
# Boolean operations type
diff --git a/mesh_extra_tools/mesh_pen_tool.py b/mesh_extra_tools/mesh_pen_tool.py
index f57e080a..cd11f582 100644
--- a/mesh_extra_tools/mesh_pen_tool.py
+++ b/mesh_extra_tools/mesh_pen_tool.py
@@ -127,7 +127,7 @@ def draw_callback_px(self, context):
pt_buf.depth_location
)
blf.position(font_id, pt_buf.x + 15, pt_buf.y - 15, 0)
- blf.size(font_id, font_size, context.user_preferences.system.dpi)
+ blf.size(font_id, font_size, context.preferences.system.dpi)
blf.draw(font_id,
'(' + str(round(mloc3d[0], 4)) + ', ' + str(round(mloc3d[1], 4)) +
', ' + str(round(mloc3d[2], 4)) + ')')
@@ -155,7 +155,7 @@ def draw_callback_px(self, context):
)
vec0 = pt_buf.list_m_loc_3d[-1] - m_loc_3d
blf.position(font_id, pt_buf.x + 15, pt_buf.y + 15, 0)
- blf.size(font_id, font_size, context.user_preferences.system.dpi)
+ blf.size(font_id, font_size, context.preferences.system.dpi)
blf.draw(font_id, str(round(vec0.length, 4)))
# angle first after mouse
@@ -180,7 +180,7 @@ def draw_callback_px(self, context):
)
bgl.glColor4f(0.0, 1.0, 0.525, alpha)
blf.position(font_id, loc_4[0] + 10, loc_4[1] + 10, 0)
- blf.size(font_id, font_size, context.user_preferences.system.dpi)
+ blf.size(font_id, font_size, context.preferences.system.dpi)
blf.draw(font_id, text_0 + '')
bgl.glLineStipple(4, 0x5555)
@@ -219,7 +219,7 @@ def draw_callback_px(self, context):
(pt_buf.list_m_loc_3d[k] + pt_buf.list_m_loc_3d[(k + 1) % n]) * 0.5
)
blf.position(font_id, loc_3[0] + 10, loc_3[1] + 10, 0)
- blf.size(font_id, font_size, context.user_preferences.system.dpi)
+ blf.size(font_id, font_size, context.preferences.system.dpi)
blf.draw(font_id,
str(round((pt_buf.list_m_loc_3d[k] - pt_buf.list_m_loc_3d[(k + 1) % n]).length, 4)))
@@ -246,12 +246,12 @@ def draw_callback_px(self, context):
)
bgl.glColor4f(0.0, 1.0, 0.525, alpha)
blf.position(font_id, loc_4[0] + 10, loc_4[1] + 10, 0)
- blf.size(font_id, font_size, context.user_preferences.system.dpi)
+ blf.size(font_id, font_size, context.preferences.system.dpi)
blf.draw(font_id, str(round(degrees(ang), 2)) + '')
# tools on / off
bgl.glColor4f(1.0, 1.0, 1.0, 1.0)
blf.position(font_id, self.text_location, 20, 0)
- blf.size(font_id, 15, context.user_preferences.system.dpi)
+ blf.size(font_id, 15, context.preferences.system.dpi)
blf.draw(font_id, "Draw On")
blf.position(font_id, self.text_location, 40, 0)
blf.draw(font_id, "Extrude On" if pt_buf.ctrl else "Extrude Off")
@@ -501,7 +501,7 @@ class pen_tool_operator(Operator):
if context.area.type == 'VIEW_3D':
# pre-compute the text location (thanks to the Carver add-on)
self.text_location = 100
- overlap = context.user_preferences.system.use_region_overlap
+ overlap = context.preferences.system.use_region_overlap
for region in context.area.regions:
if region.type == "WINDOW":
self.text_location = region.width - 100
diff --git a/mesh_f2.py b/mesh_f2.py
index 9af421f7..ac1fc85b 100644
--- a/mesh_f2.py
+++ b/mesh_f2.py
@@ -150,7 +150,7 @@ def quad_from_edge(bm, edge_sel, context, event):
# adjust uv-map
if __name__ != '__main__':
- addon_prefs = context.user_preferences.addons[__name__].preferences
+ addon_prefs = context.preferences.addons[__name__].preferences
if addon_prefs.adjustuv:
for (key, uv_layer) in bm.loops.layers.uv.items():
uv_ori = {}
@@ -249,7 +249,7 @@ def quad_from_vertex(bm, vert_sel, context, event):
# adjust uv-map
if __name__ != '__main__':
- addon_prefs = context.user_preferences.addons[__name__].preferences
+ addon_prefs = context.preferences.addons[__name__].preferences
if addon_prefs.adjustuv:
for (key, uv_layer) in bm.loops.layers.uv.items():
uv_others = {}
@@ -331,7 +331,7 @@ class MeshF2(bpy.types.Operator):
# single vertex selected -> mirror vertex and create new face
quad_from_vertex(bm, sel[0], context, event)
if __name__ != '__main__':
- addon_prefs = context.user_preferences.addons[__name__].\
+ addon_prefs = context.preferences.addons[__name__].\
preferences
if addon_prefs.autograb:
bpy.ops.transform.translate('INVOKE_DEFAULT')
diff --git a/mesh_inset/__init__.py b/mesh_inset/__init__.py
index 28fa2131..973b57c4 100644
--- a/mesh_inset/__init__.py
+++ b/mesh_inset/__init__.py
@@ -110,13 +110,13 @@ class Inset(bpy.types.Operator):
return {'FINISHED'}
def action(self, context):
- save_global_undo = bpy.context.user_preferences.edit.use_global_undo
- bpy.context.user_preferences.edit.use_global_undo = False
+ save_global_undo = bpy.context.preferences.edit.use_global_undo
+ bpy.context.preferences.edit.use_global_undo = False
obj = bpy.context.active_object
mesh = obj.data
do_inset(mesh, self.inset_amount, self.inset_height, self.region,
self.scale == 'PERCENT')
- bpy.context.user_preferences.edit.use_global_undo = save_global_undo
+ bpy.context.preferences.edit.use_global_undo = save_global_undo
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
diff --git a/mesh_looptools.py b/mesh_looptools.py
index 25c63f9e..17425de4 100644
--- a/mesh_looptools.py
+++ b/mesh_looptools.py
@@ -745,8 +745,8 @@ def get_parallel_loops(bm_mod, loops):
# gather initial data
def initialise():
- global_undo = bpy.context.user_preferences.edit.use_global_undo
- bpy.context.user_preferences.edit.use_global_undo = False
+ global_undo = bpy.context.preferences.edit.use_global_undo
+ bpy.context.preferences.edit.use_global_undo = False
object = bpy.context.active_object
if 'MIRROR' in [mod.type for mod in object.modifiers if mod.show_viewport]:
# ensure that selection is synced for the derived mesh
@@ -834,7 +834,7 @@ def terminate(global_undo):
if obj.mode == 'EDIT':
bmesh.update_edit_mesh(obj.data, loop_triangles=True, destructive=True)
- bpy.context.user_preferences.edit.use_global_undo = global_undo
+ bpy.context.preferences.edit.use_global_undo = global_undo
# ########################################
@@ -5067,7 +5067,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/mesh_snap_utilities_line/__init__.py b/mesh_snap_utilities_line/__init__.py
index 92ec2d60..39c2f801 100644
--- a/mesh_snap_utilities_line/__init__.py
+++ b/mesh_snap_utilities_line/__init__.py
@@ -45,7 +45,7 @@ from bpy.utils.toolsystem import ToolDef
def tool_make_line():
import os
def draw_settings(context, layout, tool):
- addon_prefs = context.user_preferences.addons["mesh_snap_utilities_line"].preferences
+ addon_prefs = context.preferences.addons["mesh_snap_utilities_line"].preferences
layout.prop(addon_prefs, "incremental")
layout.prop(addon_prefs, "increments_grid")
diff --git a/mesh_snap_utilities_line/common_classes.py b/mesh_snap_utilities_line/common_classes.py
index 8227f485..b3465fae 100644
--- a/mesh_snap_utilities_line/common_classes.py
+++ b/mesh_snap_utilities_line/common_classes.py
@@ -216,7 +216,7 @@ class SnapNavigation():
def __init__(self, context, use_ndof):
# TO DO:
# 'View Orbit', 'View Pan', 'NDOF Orbit View', 'NDOF Pan View'
- self.use_ndof = use_ndof and context.user_preferences.inputs.use_ndof
+ self.use_ndof = use_ndof and context.preferences.inputs.use_ndof
self._rotate = set()
self._move = set()
@@ -371,7 +371,7 @@ class MousePointWidget(bpy.types.Gizmo):
context = bpy.context
- self.preferences = preferences = context.user_preferences.addons[__package__].preferences
+ self.preferences = preferences = context.preferences.addons[__package__].preferences
#Configure the unit of measure
self.snap_to_grid = preferences.increments_grid
@@ -386,9 +386,9 @@ class MousePointWidget(bpy.types.Gizmo):
preferences.center_color,
preferences.perpendicular_color,
preferences.constrain_shift_color,
- (*context.user_preferences.themes[0].user_interface.axis_x, 1.0),
- (*context.user_preferences.themes[0].user_interface.axis_y, 1.0),
- (*context.user_preferences.themes[0].user_interface.axis_z, 1.0)
+ (*context.preferences.themes[0].user_interface.axis_x, 1.0),
+ (*context.preferences.themes[0].user_interface.axis_y, 1.0),
+ (*context.preferences.themes[0].user_interface.axis_z, 1.0)
)
#Init Snap Context
diff --git a/mesh_snap_utilities_line/ops_line.py b/mesh_snap_utilities_line/ops_line.py
index 981c99af..7b1cf157 100644
--- a/mesh_snap_utilities_line/ops_line.py
+++ b/mesh_snap_utilities_line/ops_line.py
@@ -493,7 +493,7 @@ class SnapUtilitiesLine(bpy.types.Operator):
preferences = self.snap_widget.preferences
else:
- preferences = context.user_preferences.addons[__package__].preferences
+ preferences = context.preferences.addons[__package__].preferences
#Init DrawCache
self.draw_cache = SnapDrawn(
@@ -504,9 +504,9 @@ class SnapUtilitiesLine(bpy.types.Operator):
preferences.center_color,
preferences.perpendicular_color,
preferences.constrain_shift_color,
- tuple(context.user_preferences.themes[0].user_interface.axis_x) + (1.0,),
- tuple(context.user_preferences.themes[0].user_interface.axis_y) + (1.0,),
- tuple(context.user_preferences.themes[0].user_interface.axis_z) + (1.0,)
+ tuple(context.preferences.themes[0].user_interface.axis_x) + (1.0,),
+ tuple(context.preferences.themes[0].user_interface.axis_y) + (1.0,),
+ tuple(context.preferences.themes[0].user_interface.axis_z) + (1.0,)
)
self.sctx = None
diff --git a/modules/rna_manual_reference.py b/modules/rna_manual_reference.py
index 1ba5501a..05cdd3f5 100644
--- a/modules/rna_manual_reference.py
+++ b/modules/rna_manual_reference.py
@@ -5,8 +5,8 @@ import bpy
url_manual_prefix = "https://docs.blender.org/manual/en/dev/"
language = ""
-if bpy.context.user_preferences.system.use_international_fonts:
- language = bpy.context.user_preferences.system.language
+if bpy.context.preferences.system.use_international_fonts:
+ language = bpy.context.preferences.system.language
if language == 'DEFAULT':
import os
language = os.getenv('LANG', '').split('.')[0]
diff --git a/node_wrangler.py b/node_wrangler.py
index d3fd8448..b3d04c5e 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -614,7 +614,7 @@ def force_update(context):
def dpifac():
- prefs = bpy.context.user_preferences.system
+ prefs = bpy.context.preferences.system
return prefs.dpi * prefs.pixel_size / 72
@@ -2042,7 +2042,7 @@ class NWMergeNodes(Operator, NWBase):
)
def execute(self, context):
- settings = context.user_preferences.addons[__name__].preferences
+ settings = context.preferences.addons[__name__].preferences
merge_hide = settings.merge_hide
merge_position = settings.merge_position # 'center' or 'bottom'
@@ -2717,7 +2717,7 @@ class NWAddPrincipledSetup(Operator, NWBase, ImportHelper):
# Filter textures names for texturetypes in filenames
# [Socket Name, [abbreviations and keyword list], Filename placeholder]
- tags = context.user_preferences.addons[__name__].preferences.principled_tags
+ tags = context.preferences.addons[__name__].preferences.principled_tags
normal_abbr = tags.normal.split(' ')
bump_abbr = tags.bump.split(' ')
gloss_abbr = tags.gloss.split(' ')
diff --git a/object_boolean_tools.py b/object_boolean_tools.py
index 702fbb8e..71a62ff7 100644
--- a/object_boolean_tools.py
+++ b/object_boolean_tools.py
@@ -102,8 +102,8 @@ def FindCanvas(obj):
def isFTransf():
- user_preferences = bpy.context.user_preferences
- addons = user_preferences.addons
+ preferences = bpy.context.preferences
+ addons = preferences.addons
addon_prefs = addons[__name__].preferences
if addon_prefs.fast_transform:
return True
@@ -114,16 +114,16 @@ def isFTransf():
"""
# EXPERIMENTAL FEATURES
def isMakeVertexGroup():
- user_preferences = bpy.context.user_preferences
- addon_prefs = user_preferences.addons[__name__].preferences
+ preferences = bpy.context.preferences
+ addon_prefs = preferences.addons[__name__].preferences
if addon_prefs.make_vertex_groups:
return True
else:
return False
def isMakeBoundary():
- user_preferences = bpy.context.user_preferences
- addon_prefs = user_preferences.addons[__name__].preferences
+ preferences = bpy.context.preferences
+ addon_prefs = preferences.addons[__name__].preferences
if addon_prefs.make_boundary:
return True
else:
@@ -141,7 +141,7 @@ def ConvertToMesh(obj):
# Do the Union, Difference and Intersection Operations with a Brush
def Operation(context, _operation):
- prefs = bpy.context.user_preferences.addons[__name__].preferences
+ prefs = bpy.context.preferences.addons[__name__].preferences
useWire = prefs.use_wire
for selObj in bpy.context.selected_objects:
@@ -503,7 +503,7 @@ class BTool_FastTransform(Operator):
def modal(self, context, event):
self.count += 1
actObj = bpy.context.active_object
- useWire = bpy.context.user_preferences.addons[__name__].preferences.use_wire
+ useWire = bpy.context.preferences.addons[__name__].preferences.use_wire
if self.count == 1:
if isBrush(actObj) and actObj["BoolTool_FTransform"] == "True":
@@ -1231,7 +1231,7 @@ def update_panels(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/object_fracture_crack/operator.py b/object_fracture_crack/operator.py
index d6b2da7b..67217e9a 100644
--- a/object_fracture_crack/operator.py
+++ b/object_fracture_crack/operator.py
@@ -9,7 +9,7 @@ from . import crack_it
def check_object_cell_fracture():
- if "object_fracture_cell" in bpy.context.user_preferences.addons.keys():
+ if "object_fracture_cell" in bpy.context.preferences.addons.keys():
return True
return False
diff --git a/oscurart_tools/__init__.py b/oscurart_tools/__init__.py
index 4b7b5cf7..bf8896de 100644
--- a/oscurart_tools/__init__.py
+++ b/oscurart_tools/__init__.py
@@ -414,7 +414,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/pie_menus_official/__init__.py b/pie_menus_official/__init__.py
index 52c8d346..f2fec504 100644
--- a/pie_menus_official/__init__.py
+++ b/pie_menus_official/__init__.py
@@ -67,7 +67,7 @@ def _get_pref_class(mod):
def get_addon_preferences(name=''):
"""Acquisition and registration"""
- addons = bpy.context.user_preferences.addons
+ addons = bpy.context.preferences.addons
if __name__ not in addons: # wm.read_factory_settings()
return None
addon_prefs = addons[__name__].preferences
diff --git a/render_auto_tile_size.py b/render_auto_tile_size.py
index eb1076fc..8de8e99f 100644
--- a/render_auto_tile_size.py
+++ b/render_auto_tile_size.py
@@ -227,7 +227,7 @@ def on_scene_update(scene):
if not ats_poll(context):
return
- userpref = context.user_preferences
+ userpref = context.preferences
settings = scene.ats_settings
render = scene.render
@@ -266,7 +266,7 @@ def get_actual_res(render):
def get_threads(context, device):
render = context.scene.render
engine = render.engine
- userpref = context.user_preferences
+ userpref = context.preferences
if engine_is_gpu(engine, device, userpref):
threads = userpref.addons['cycles'].preferences.get_num_gpu_devices()
@@ -324,7 +324,7 @@ def do_set_tile_size(context):
return False
scene = context.scene
- userpref = context.user_preferences
+ userpref = context.preferences
settings = scene.ats_settings
render = scene.render
@@ -406,7 +406,7 @@ class SetTileSize(Operator):
def ui_layout(engine, layout, context):
scene = context.scene
- userpref = context.user_preferences
+ userpref = context.preferences
settings = scene.ats_settings
render = scene.render
diff --git a/render_povray/render.py b/render_povray/render.py
index 1e27beab..2724b4af 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -364,7 +364,7 @@ def write_pov(filename, scene=None, info_callback=None):
global_matrix = mathutils.Matrix.Rotation(-pi / 2.0, 4, 'X')
comments = scene.pov.comments_enable and not scene.pov.tempfiles_enable
linebreaksinlists = scene.pov.list_lf_enable and not scene.pov.tempfiles_enable
- feature_set = bpy.context.user_preferences.addons[__package__].preferences.branch_feature_set_povray
+ feature_set = bpy.context.preferences.addons[__package__].preferences.branch_feature_set_povray
using_uberpov = (feature_set=='uberpov')
pov_binary = PovrayRender._locate_binary()
@@ -3666,7 +3666,7 @@ def write_pov(filename, scene=None, info_callback=None):
def write_pov_ini(scene, filename_ini, filename_log, filename_pov, filename_image):
- feature_set = bpy.context.user_preferences.addons[__package__].preferences.branch_feature_set_povray
+ feature_set = bpy.context.preferences.addons[__package__].preferences.branch_feature_set_povray
using_uberpov = (feature_set=='uberpov')
#scene = bpy.data.scenes[0]
render = scene.render
@@ -3745,7 +3745,7 @@ class PovrayRender(bpy.types.RenderEngine):
@staticmethod
def _locate_binary():
- addon_prefs = bpy.context.user_preferences.addons[__package__].preferences
+ addon_prefs = bpy.context.preferences.addons[__package__].preferences
# Use the system preference if its set.
pov_binary = addon_prefs.filepath_povray
diff --git a/render_povray/ui.py b/render_povray/ui.py
index 1d5a621f..9691630d 100644
--- a/render_povray/ui.py
+++ b/render_povray/ui.py
@@ -245,12 +245,12 @@ for member in dir(properties_particle): # add all "particle" panels from blende
del properties_particle
def check_add_mesh_extra_objects():
- if "add_mesh_extra_objects" in bpy.context.user_preferences.addons.keys():
+ if "add_mesh_extra_objects" in bpy.context.preferences.addons.keys():
return True
return False
def locate_docpath():
- addon_prefs = bpy.context.user_preferences.addons[__package__].preferences
+ addon_prefs = bpy.context.preferences.addons[__package__].preferences
# Use the system preference if its set.
pov_documents = addon_prefs.docpath_povray
if pov_documents:
@@ -784,7 +784,7 @@ class RENDER_PT_povray_antialias(RenderButtonsPanel, bpy.types.Panel):
def draw_header(self, context):
- prefs = bpy.context.user_preferences.addons[__package__].preferences
+ prefs = bpy.context.preferences.addons[__package__].preferences
scene = context.scene
if prefs.branch_feature_set_povray != 'uberpov' and scene.pov.antialias_method == '2':
self.layout.prop(scene.pov, "antialias_enable", text="", icon='ERROR')
@@ -794,7 +794,7 @@ class RENDER_PT_povray_antialias(RenderButtonsPanel, bpy.types.Panel):
self.layout.prop(scene.pov, "antialias_enable", text="", icon='ALIASED')
def draw(self, context):
- prefs = bpy.context.user_preferences.addons[__package__].preferences
+ prefs = bpy.context.preferences.addons[__package__].preferences
layout = self.layout
scene = context.scene
diff --git a/rigify/__init__.py b/rigify/__init__.py
index 302fc453..9fded5ef 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -357,8 +357,8 @@ def register():
description="Last Frame to Transfer", default=0, min= 0)
# Update legacy on restart or reload.
- if (ui and 'legacy' in str(ui)) or bpy.context.user_preferences.addons['rigify'].preferences.legacy_mode:
- bpy.context.user_preferences.addons['rigify'].preferences.legacy_mode = True
+ if (ui and 'legacy' in str(ui)) or bpy.context.preferences.addons['rigify'].preferences.legacy_mode:
+ bpy.context.preferences.addons['rigify'].preferences.legacy_mode = True
# Add rig parameters
for rig in rig_lists.rig_list:
diff --git a/rigify/generate.py b/rigify/generate.py
index c804cb69..d726f14a 100644
--- a/rigify/generate.py
+++ b/rigify/generate.py
@@ -527,8 +527,8 @@ def generate_rig(context, metarig):
def create_selection_sets(obj, metarig):
# Check if selection sets addon is installed
- if 'bone_selection_groups' not in bpy.context.user_preferences.addons \
- and 'bone_selection_sets' not in bpy.context.user_preferences.addons:
+ if 'bone_selection_groups' not in bpy.context.preferences.addons \
+ and 'bone_selection_sets' not in bpy.context.preferences.addons:
return
bpy.ops.object.mode_set(mode='POSE')
@@ -550,7 +550,7 @@ def create_selection_sets(obj, metarig):
#bpy.ops.pose.selection_set_add()
obj.selection_sets.add()
obj.selection_sets[-1].name = name
- if 'bone_selection_sets' in bpy.context.user_preferences.addons:
+ if 'bone_selection_sets' in bpy.context.preferences.addons:
act_sel_set = obj.selection_sets[-1]
# iterate only the selected bones in current pose that are not hidden
diff --git a/rigify/legacy/rig_ui_pitchipoy_template.py b/rigify/legacy/rig_ui_pitchipoy_template.py
index 45e4f83a..4f71de06 100644
--- a/rigify/legacy/rig_ui_pitchipoy_template.py
+++ b/rigify/legacy/rig_ui_pitchipoy_template.py
@@ -541,12 +541,12 @@ class Rigify_Arm_FK2IK(bpy.types.Operator):
return (context.active_object != None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
fk2ik_arm(context.active_object, fk=[self.uarm_fk, self.farm_fk, self.hand_fk], ik=[self.uarm_ik, self.farm_ik, self.hand_ik])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -571,12 +571,12 @@ class Rigify_Arm_IK2FK(bpy.types.Operator):
return (context.active_object != None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
ik2fk_arm(context.active_object, fk=[self.uarm_fk, self.farm_fk, self.hand_fk], ik=[self.uarm_ik, self.farm_ik, self.hand_ik, self.pole])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -602,12 +602,12 @@ class Rigify_Leg_FK2IK(bpy.types.Operator):
return (context.active_object != None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
fk2ik_leg(context.active_object, fk=[self.thigh_fk, self.shin_fk, self.foot_fk, self.mfoot_fk], ik=[self.thigh_ik, self.shin_ik, self.foot_ik, self.mfoot_ik])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -635,12 +635,12 @@ class Rigify_Leg_IK2FK(bpy.types.Operator):
return (context.active_object != None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
ik2fk_leg(context.active_object, fk=[self.thigh_fk, self.shin_fk, self.mfoot_fk, self.foot_fk], ik=[self.thigh_ik, self.shin_ik, self.foot_ik, self.footroll, self.pole, self.mfoot_ik])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
diff --git a/rigify/legacy/rig_ui_template.py b/rigify/legacy/rig_ui_template.py
index cab5674f..5f384006 100644
--- a/rigify/legacy/rig_ui_template.py
+++ b/rigify/legacy/rig_ui_template.py
@@ -389,12 +389,12 @@ class Rigify_Arm_FK2IK(bpy.types.Operator):
return (context.active_object is not None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
fk2ik_arm(context.active_object, fk=[self.uarm_fk, self.farm_fk, self.hand_fk], ik=[self.uarm_ik, self.farm_ik, self.hand_ik])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -419,12 +419,12 @@ class Rigify_Arm_IK2FK(bpy.types.Operator):
return (context.active_object is not None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
ik2fk_arm(context.active_object, fk=[self.uarm_fk, self.farm_fk, self.hand_fk], ik=[self.uarm_ik, self.farm_ik, self.hand_ik, self.pole])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -450,12 +450,12 @@ class Rigify_Leg_FK2IK(bpy.types.Operator):
return (context.active_object is not None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
fk2ik_leg(context.active_object, fk=[self.thigh_fk, self.shin_fk, self.foot_fk, self.mfoot_fk], ik=[self.thigh_ik, self.shin_ik, self.foot_ik, self.mfoot_ik])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -482,12 +482,12 @@ class Rigify_Leg_IK2FK(bpy.types.Operator):
return (context.active_object is not None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
ik2fk_leg(context.active_object, fk=[self.thigh_fk, self.shin_fk, self.mfoot_fk], ik=[self.thigh_ik, self.shin_ik, self.foot_ik, self.footroll, self.pole, self.mfoot_ik])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
diff --git a/rigify/legacy/ui.py b/rigify/legacy/ui.py
index f04ec335..157b451c 100644
--- a/rigify/legacy/ui.py
+++ b/rigify/legacy/ui.py
@@ -284,14 +284,14 @@ class Generate(bpy.types.Operator):
import importlib
importlib.reload(generate)
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
generate.generate_rig(context, context.object)
except MetarigError as rig_exception:
rigify_report_exception(self, rig_exception)
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -312,8 +312,8 @@ class Sample(bpy.types.Operator):
def execute(self, context):
if context.mode == 'EDIT_ARMATURE' and self.metarig_type != "":
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
rig = get_rig_type(self.metarig_type)
create_sample = rig.create_sample
@@ -322,7 +322,7 @@ class Sample(bpy.types.Operator):
else:
create_sample(context.active_object)
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
bpy.ops.object.mode_set(mode='EDIT')
return {'FINISHED'}
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index aec675e3..0a2234e1 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -614,12 +614,12 @@ class Rigify_Arm_FK2IK(bpy.types.Operator):
return (context.active_object != None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
fk2ik_arm(context.active_object, fk=[self.uarm_fk, self.farm_fk, self.hand_fk], ik=[self.uarm_ik, self.farm_ik, self.hand_ik])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -646,12 +646,12 @@ class Rigify_Arm_IK2FK(bpy.types.Operator):
return (context.active_object != None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
ik2fk_arm(context.active_object, fk=[self.uarm_fk, self.farm_fk, self.hand_fk], ik=[self.uarm_ik, self.farm_ik, self.hand_ik, self.pole, self.main_parent])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -677,12 +677,12 @@ class Rigify_Leg_FK2IK(bpy.types.Operator):
return (context.active_object != None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
fk2ik_leg(context.active_object, fk=[self.thigh_fk, self.shin_fk, self.foot_fk, self.mfoot_fk], ik=[self.thigh_ik, self.shin_ik, self.foot_ik, self.mfoot_ik])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -711,12 +711,12 @@ class Rigify_Leg_IK2FK(bpy.types.Operator):
return (context.active_object != None and context.mode == 'POSE')
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
ik2fk_leg(context.active_object, fk=[self.thigh_fk, self.shin_fk, self.mfoot_fk, self.foot_fk], ik=[self.thigh_ik, self.shin_ik, self.foot_ik, self.footroll, self.pole, self.mfoot_ik, self.main_parent])
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
###########################
diff --git a/rigify/ui.py b/rigify/ui.py
index 77398ff0..a8a25103 100644
--- a/rigify/ui.py
+++ b/rigify/ui.py
@@ -330,8 +330,8 @@ class DATA_OT_rigify_use_standard_colors(bpy.types.Operator):
if not hasattr(armature, 'rigify_colors'):
return {'FINISHED'}
- current_theme = bpy.context.user_preferences.themes.items()[0][0]
- theme = bpy.context.user_preferences.themes[current_theme]
+ current_theme = bpy.context.preferences.themes.items()[0][0]
+ theme = bpy.context.preferences.themes[current_theme]
armature.rigify_selection_colors.select = theme.view_3d.bone_pose
armature.rigify_selection_colors.active = theme.view_3d.bone_pose_active
@@ -357,8 +357,8 @@ class DATA_OT_rigify_apply_selection_colors(bpy.types.Operator):
if not hasattr(armature, 'rigify_colors'):
return {'FINISHED'}
- #current_theme = bpy.context.user_preferences.themes.items()[0][0]
- #theme = bpy.context.user_preferences.themes[current_theme]
+ #current_theme = bpy.context.preferences.themes.items()[0][0]
+ #theme = bpy.context.preferences.themes[current_theme]
for col in armature.rigify_colors:
col.select = armature.rigify_selection_colors.select
@@ -383,8 +383,8 @@ class DATA_OT_rigify_bone_group_add(bpy.types.Operator):
armature.rigify_colors.add()
armature.rigify_colors[-1].name = unique_name(armature.rigify_colors, 'Group')
- current_theme = bpy.context.user_preferences.themes.items()[0][0]
- theme = bpy.context.user_preferences.themes[current_theme]
+ current_theme = bpy.context.preferences.themes.items()[0][0]
+ theme = bpy.context.preferences.themes[current_theme]
armature.rigify_colors[-1].normal = theme.view_3d.wire
armature.rigify_colors[-1].normal.hsv = theme.view_3d.wire.hsv
@@ -442,7 +442,7 @@ class DATA_OT_rigify_bone_group_add_theme(bpy.types.Operator):
id = int(self.theme[-2:]) - 1
- theme_color_set = bpy.context.user_preferences.themes[0].bone_color_sets[id]
+ theme_color_set = bpy.context.preferences.themes[0].bone_color_sets[id]
armature.rigify_colors[-1].normal = theme_color_set.normal
armature.rigify_colors[-1].select = theme_color_set.select
@@ -757,14 +757,14 @@ class Generate(bpy.types.Operator):
import importlib
importlib.reload(generate)
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
generate.generate_rig(context, context.object)
except MetarigError as rig_exception:
rigify_report_exception(self, rig_exception)
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
@@ -796,7 +796,7 @@ class SwitchToLegacy(bpy.types.Operator):
return context.window_manager.invoke_confirm(self, event)
def execute(self, context):
- bpy.context.user_preferences.addons['rigify'].preferences.legacy_mode = True
+ bpy.context.preferences.addons['rigify'].preferences.legacy_mode = True
return {'FINISHED'}
@@ -815,8 +815,8 @@ class Sample(bpy.types.Operator):
def execute(self, context):
if context.mode == 'EDIT_ARMATURE' and self.metarig_type != "":
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
rig = get_rig_type(self.metarig_type)
create_sample = rig.create_sample
@@ -825,7 +825,7 @@ class Sample(bpy.types.Operator):
else:
create_sample(context.active_object)
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
bpy.ops.object.mode_set(mode='EDIT')
return {'FINISHED'}
@@ -1282,8 +1282,8 @@ class OBJECT_OT_ClearAnimation(bpy.types.Operator):
def execute(self, context):
- use_global_undo = context.user_preferences.edit.use_global_undo
- context.user_preferences.edit.use_global_undo = False
+ use_global_undo = context.preferences.edit.use_global_undo
+ context.preferences.edit.use_global_undo = False
try:
rig = context.object
scn = context.scene
@@ -1295,7 +1295,7 @@ class OBJECT_OT_ClearAnimation(bpy.types.Operator):
clearAnimation(act, self.anim_type, names=get_limb_generated_names(rig))
finally:
- context.user_preferences.edit.use_global_undo = use_global_undo
+ context.preferences.edit.use_global_undo = use_global_undo
return {'FINISHED'}
diff --git a/sequencer_kinoraw_tools/audio_tools.py b/sequencer_kinoraw_tools/audio_tools.py
index a2ad692f..e5784ae6 100644
--- a/sequencer_kinoraw_tools/audio_tools.py
+++ b/sequencer_kinoraw_tools/audio_tools.py
@@ -79,7 +79,7 @@ class ExtractWavOperator(Operator):
def execute(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
audio_dir = preferences.addons[__package__].preferences.audio_dir
functions.create_folder(bpy.path.abspath(audio_dir))
@@ -164,7 +164,7 @@ class ExternalAudioSetSyncOperator(Operator):
def execute(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
filename = preferences.addons[__package__].preferences.audio_external_filename
for strip in context.selected_editable_sequences:
@@ -219,7 +219,7 @@ class ExternalAudioReloadOperator(Operator):
return False
def execute(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
filename = preferences.addons[__package__].preferences.audio_external_filename
data = readsyncfile(filename)
@@ -282,7 +282,7 @@ class AudioToolPanel(Panel):
def poll(self, context):
if context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
scn = context.scene
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
if prefs.use_audio_tools:
@@ -295,7 +295,7 @@ class AudioToolPanel(Panel):
layout.label(text="", icon="PLAY_AUDIO")
def draw(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
strip = functions.act_strip(context)
@@ -348,7 +348,7 @@ class OpenMeterbridgeOperator(Operator):
return True
def execute(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
command = "meterbridge -t {} 'PulseAudio JACK Sink:front-left' " \
diff --git a/sequencer_kinoraw_tools/datamosh.py b/sequencer_kinoraw_tools/datamosh.py
index be6ea89d..81f679bd 100644
--- a/sequencer_kinoraw_tools/datamosh.py
+++ b/sequencer_kinoraw_tools/datamosh.py
@@ -19,7 +19,7 @@ proxy_qualities = [
# functions
def createdatamosh(context, strip):
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
fileinput = bpy.path.abspath(strip.filepath)
@@ -122,7 +122,7 @@ class CreateDatamosh(Operator):
return False
def execute(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
strips = functions.get_selected_strips(context)
@@ -161,7 +161,7 @@ class CreateGlitchToolPanel(Panel):
'SEQUENCER_PREVIEW'}:
strip = functions.act_strip(context)
scn = context.scene
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
if prefs.use_glitch_panel:
@@ -175,7 +175,7 @@ class CreateGlitchToolPanel(Panel):
def draw(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
layout = self.layout
diff --git a/sequencer_kinoraw_tools/eco.py b/sequencer_kinoraw_tools/eco.py
index 62382389..55810b55 100644
--- a/sequencer_kinoraw_tools/eco.py
+++ b/sequencer_kinoraw_tools/eco.py
@@ -43,7 +43,7 @@ class EcoPanel(Panel):
if context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
strip = functions.act_strip(context)
scn = context.scene
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
if prefs.use_eco_tools:
@@ -59,7 +59,7 @@ class EcoPanel(Panel):
strip = functions.act_strip(context)
seq_type = strip.type
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
if seq_type in ('MOVIE', 'IMAGE', 'META', 'MOVIECLIP', 'SCENE'):
@@ -95,7 +95,7 @@ class OBJECT_OT_EcoOperator(Operator):
def execute(self, context):
active_strip = functions.act_strip(context)
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
eco = prefs.eco_value
diff --git a/sequencer_kinoraw_tools/proxy_tools.py b/sequencer_kinoraw_tools/proxy_tools.py
index 33804241..e0863529 100644
--- a/sequencer_kinoraw_tools/proxy_tools.py
+++ b/sequencer_kinoraw_tools/proxy_tools.py
@@ -20,7 +20,7 @@ proxy_qualities = [
# Functions
def setup_proxy(context, strip, size):
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
# set up proxy settings
@@ -66,7 +66,7 @@ def create_proxy(context, strip, size, res):
div = 4 / size
newres = (int(int(res[0]) / div), int(int(res[1]) / div))
- preferences = context.user_preferences
+ preferences = context.preferences
proxy_dir = preferences.addons[__package__].preferences.proxy_dir
scripts = preferences.addons[__package__].preferences.proxy_scripts
ffmpeg_command = preferences.addons[__package__].preferences.ffmpeg_command
@@ -156,7 +156,7 @@ class CreateProxyOperator(Operator):
return False
def execute(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
proxy_scripts_path = preferences.addons[__package__].preferences.proxy_scripts_path
for strip in context.selected_editable_sequences:
@@ -255,7 +255,7 @@ class CreateProxyToolPanel(Panel):
'SEQUENCER_PREVIEW'}:
strip = functions.act_strip(context)
scn = context.scene
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
if prefs.use_proxy_tools:
@@ -269,7 +269,7 @@ class CreateProxyToolPanel(Panel):
def draw(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
layout = self.layout
diff --git a/sequencer_kinoraw_tools/random_editor.py b/sequencer_kinoraw_tools/random_editor.py
index e52f3fc4..4e739ff3 100644
--- a/sequencer_kinoraw_tools/random_editor.py
+++ b/sequencer_kinoraw_tools/random_editor.py
@@ -43,7 +43,7 @@ class RandomScratchOperator(Operator):
return False
def invoke(self, context, event):
- preferences = context.user_preferences
+ preferences = context.preferences
random_frames = preferences.addons[__package__].preferences.random_frames
sce = context.scene
@@ -114,7 +114,7 @@ class RandomEditorPanel(Panel):
'SEQUENCER_PREVIEW'}:
strip = functions.act_strip(context)
scn = context.scene
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
if prefs.use_random_editor:
@@ -128,7 +128,7 @@ class RandomEditorPanel(Panel):
def draw(self, context):
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
layout = self.layout
diff --git a/sequencer_kinoraw_tools/recursive_loader.py b/sequencer_kinoraw_tools/recursive_loader.py
index e6d8f09b..fbc708a7 100644
--- a/sequencer_kinoraw_tools/recursive_loader.py
+++ b/sequencer_kinoraw_tools/recursive_loader.py
@@ -215,7 +215,7 @@ class ExifInfoPanel(Panel):
if context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
strip = functions.act_strip(context)
scn = context.scene
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
diff --git a/sequencer_kinoraw_tools/ui.py b/sequencer_kinoraw_tools/ui.py
index 221f4f47..2729bef9 100644
--- a/sequencer_kinoraw_tools/ui.py
+++ b/sequencer_kinoraw_tools/ui.py
@@ -203,7 +203,7 @@ class JumptoCut(Panel):
def poll(self, context):
if context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
scn = context.scene
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
if scn and scn.sequence_editor:
if prefs.use_jumptocut:
@@ -219,7 +219,7 @@ class JumptoCut(Panel):
scn = context.scene
strip = functions.act_strip(context)
- preferences = context.user_preferences
+ preferences = context.preferences
prefs = preferences.addons[__package__].preferences
layout = self.layout
@@ -265,7 +265,7 @@ class JumptoCut(Panel):
# hide the play-reversed button
# since JACK transport doesn't support reversed playback
if scn.sync_mode == 'AUDIO_SYNC' and \
- context.user_preferences.system.audio_device == 'JACK':
+ context.preferences.system.audio_device == 'JACK':
sub = sub_row.row(align=True)
sub.scale_x = 2.0
sub.operator("screen.animation_play", text="", icon='PLAY')
diff --git a/space_view3d_3d_navigation.py b/space_view3d_3d_navigation.py
index 8ed4bf00..b1a85c82 100644
--- a/space_view3d_3d_navigation.py
+++ b/space_view3d_3d_navigation.py
@@ -326,7 +326,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/space_view3d_brush_menus/utils_core.py b/space_view3d_brush_menus/utils_core.py
index 81692d2a..485ffa29 100644
--- a/space_view3d_brush_menus/utils_core.py
+++ b/space_view3d_brush_menus/utils_core.py
@@ -36,7 +36,7 @@ def get_brush_link(context, types="brush"):
# Addon settings
def addon_settings(lists=True):
# separate function just for more convenience
- addon = bpy.context.user_preferences.addons[get_addon_name]
+ addon = bpy.context.preferences.addons[get_addon_name]
colum_n = addon.preferences.column_set if addon else 1
use_list = addon.preferences.use_brushes_menu_type
diff --git a/space_view3d_display_tools/__init__.py b/space_view3d_display_tools/__init__.py
index 462f417e..343f9d64 100644
--- a/space_view3d_display_tools/__init__.py
+++ b/space_view3d_display_tools/__init__.py
@@ -595,7 +595,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/space_view3d_pie_menus/__init__.py b/space_view3d_pie_menus/__init__.py
index 26ac9958..3763c4dc 100644
--- a/space_view3d_pie_menus/__init__.py
+++ b/space_view3d_pie_menus/__init__.py
@@ -81,7 +81,7 @@ def _get_pref_class(mod):
def get_addon_preferences(name=''):
"""Acquisition and registration"""
- addons = bpy.context.user_preferences.addons
+ addons = bpy.context.preferences.addons
if __name__ not in addons: # wm.read_factory_settings()
return None
addon_prefs = addons[__name__].preferences
diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py
index c6a8c93f..101955a7 100644
--- a/space_view3d_spacebar_menu.py
+++ b/space_view3d_spacebar_menu.py
@@ -2945,7 +2945,7 @@ class SnapCursSelToCenter(Operator):
# Draw Separator #
def UseSeparator(operator, context):
- useSep = bpy.context.user_preferences.addons[__name__].preferences.use_separators
+ useSep = bpy.context.preferences.addons[__name__].preferences.use_separators
if useSep:
operator.layout.separator()
@@ -2953,7 +2953,7 @@ def UseSeparator(operator, context):
# Use compact brushes menus #
def UseBrushesLists():
# separate function just for more convenience
- useLists = bpy.context.user_preferences.addons[__name__].preferences.use_brushes_lists
+ useLists = bpy.context.preferences.addons[__name__].preferences.use_brushes_lists
return bool(useLists)
diff --git a/space_view3d_stored_views/core.py b/space_view3d_stored_views/core.py
index c01838ee..d7fb72b8 100644
--- a/space_view3d_stored_views/core.py
+++ b/space_view3d_stored_views/core.py
@@ -11,7 +11,7 @@ import bpy
# Utility function get preferences setting for exporters
def get_preferences():
# replace the key if the add-on name changes
- addon = bpy.context.user_preferences.addons[__package__]
+ addon = bpy.context.preferences.addons[__package__]
show_warn = (addon.preferences.show_exporters if addon else False)
return show_warn
diff --git a/space_view3d_stored_views/ui.py b/space_view3d_stored_views/ui.py
index 5025db19..c8bfaeef 100644
--- a/space_view3d_stored_views/ui.py
+++ b/space_view3d_stored_views/ui.py
@@ -25,7 +25,7 @@ from bpy.types import (
def get_preferences_timer():
# replace the key if the add-on name changes
# TODO: expose refresh rate to ui???
- addon = bpy.context.user_preferences.addons[__package__]
+ addon = bpy.context.preferences.addons[__package__]
timer_update = (addon.preferences.view_3d_update_rate if addon else False)
return timer_update
@@ -49,12 +49,12 @@ def _draw_callback_px(self, context):
r_height = context.region.height
font_id = 0 # TODO: need to find out how best to get font_id
- blf.size(font_id, 11, context.user_preferences.system.dpi)
+ blf.size(font_id, 11, context.preferences.system.dpi)
text_size = blf.dimensions(0, self.view_name)
# compute the text location
text_location = 0
- overlap = context.user_preferences.system.use_region_overlap
+ overlap = context.preferences.system.use_region_overlap
if overlap:
for region in context.area.regions:
if region.type == "UI":
diff --git a/ui_layer_manager.py b/ui_layer_manager.py
index d3e20e69..18e28ebb 100644
--- a/ui_layer_manager.py
+++ b/ui_layer_manager.py
@@ -605,7 +605,7 @@ def update_panel(self, context):
bpy.utils.unregister_class(panel)
for panel in panels:
- panel.bl_category = context.user_preferences.addons[__name__].preferences.category
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
bpy.utils.register_class(panel)
except Exception as e:
diff --git a/ui_translate/__init__.py b/ui_translate/__init__.py
index 4029bae1..baab2afa 100644
--- a/ui_translate/__init__.py
+++ b/ui_translate/__init__.py
@@ -62,8 +62,8 @@ def register():
# Init addon's preferences (unfortunately, as we are using an external storage for the properties,
# the load/save user preferences process has no effect on them :( ).
- if __name__ in bpy.context.user_preferences.addons:
- pref = bpy.context.user_preferences.addons[__name__].preferences
+ if __name__ in bpy.context.preferences.addons:
+ pref = bpy.context.preferences.addons[__name__].preferences
import os
if os.path.isfile(pref.persistent_data_path):
pref._settings.load(pref.persistent_data_path, reset=True)
diff --git a/uv_magic_uv/addon_updater_ops.py b/uv_magic_uv/addon_updater_ops.py
index 418334ad..5f88b331 100644
--- a/uv_magic_uv/addon_updater_ops.py
+++ b/uv_magic_uv/addon_updater_ops.py
@@ -181,7 +181,7 @@ class addon_updater_check_now(bpy.types.Operator):
return {'CANCELLED'}
# apply the UI settings
- settings = context.user_preferences.addons[__package__].preferences
+ settings = context.preferences.addons[__package__].preferences
updater.set_check_interval(enable=settings.auto_check_update,
months=settings.updater_intrval_months,
days=settings.updater_intrval_days,
@@ -670,7 +670,7 @@ def check_for_update_background():
return
# apply the UI settings
- addon_prefs = bpy.context.user_preferences.addons.get(__package__, None)
+ addon_prefs = bpy.context.preferences.addons.get(__package__, None)
if not addon_prefs:
return
settings = addon_prefs.preferences
@@ -701,7 +701,7 @@ def check_for_update_nonthreaded(self, context):
# only check if it's ready, ie after the time interval specified
# should be the async wrapper call here
- settings = context.user_preferences.addons[__package__].preferences
+ settings = context.preferences.addons[__package__].preferences
updater.set_check_interval(enable=settings.auto_check_update,
months=settings.updater_intrval_months,
days=settings.updater_intrval_days,
@@ -778,7 +778,7 @@ def update_notice_box_ui(self, context):
if updater.update_ready != True: return
- settings = context.user_preferences.addons[__package__].preferences
+ settings = context.preferences.addons[__package__].preferences
layout = self.layout
box = layout.box()
col = box.column(align=True)
@@ -818,7 +818,7 @@ def update_settings_ui(self, context, element=None):
box.label(updater.error_msg)
return
- settings = context.user_preferences.addons[__package__].preferences
+ settings = context.preferences.addons[__package__].preferences
# auto-update settings
box.label("Updater Settings")
@@ -975,7 +975,7 @@ def update_settings_ui_condensed(self, context, element=None):
row.label(updater.error_msg)
return
- settings = context.user_preferences.addons[__package__].preferences
+ settings = context.preferences.addons[__package__].preferences
# special case to tell user to restart blender, if set that way
if updater.auto_reload_post_update == False:
diff --git a/uv_magic_uv/impl/move_uv_impl.py b/uv_magic_uv/impl/move_uv_impl.py
index ce507fba..4340e577 100644
--- a/uv_magic_uv/impl/move_uv_impl.py
+++ b/uv_magic_uv/impl/move_uv_impl.py
@@ -132,7 +132,7 @@ class MoveUVImpl():
bmesh.update_edit_mesh(obj.data)
# check mouse preference
- if context.user_preferences.inputs.select_mouse == 'RIGHT':
+ if context.preferences.inputs.select_mouse == 'RIGHT':
confirm_btn = 'LEFTMOUSE'
cancel_btn = 'RIGHTMOUSE'
else:
diff --git a/uv_magic_uv/legacy/op/texture_projection.py b/uv_magic_uv/legacy/op/texture_projection.py
index 58f69c9d..ffcd0baf 100644
--- a/uv_magic_uv/legacy/op/texture_projection.py
+++ b/uv_magic_uv/legacy/op/texture_projection.py
@@ -63,7 +63,7 @@ def get_canvas(context, magnitude):
Get canvas to be renderred texture
"""
sc = context.scene
- prefs = context.user_preferences.addons["uv_magic_uv"].preferences
+ prefs = context.preferences.addons["uv_magic_uv"].preferences
region_w = context.region.width
region_h = context.region.height
diff --git a/uv_magic_uv/legacy/op/uv_bounding_box.py b/uv_magic_uv/legacy/op/uv_bounding_box.py
index 47c27e41..0c283f7f 100644
--- a/uv_magic_uv/legacy/op/uv_bounding_box.py
+++ b/uv_magic_uv/legacy/op/uv_bounding_box.py
@@ -428,7 +428,7 @@ class StateNone(StateBase):
"""
Update state
"""
- prefs = context.user_preferences.addons["uv_magic_uv"].preferences
+ prefs = context.preferences.addons["uv_magic_uv"].preferences
cp_react_size = prefs.uv_bounding_box_cp_react_size
is_uscaling = context.scene.muv_uv_bounding_box_uniform_scaling
if (event.type == 'LEFTMOUSE') and (event.value == 'PRESS'):
@@ -660,7 +660,7 @@ class MUV_OT_UVBoundingBox(bpy.types.Operator):
"""
Draw control point
"""
- prefs = context.user_preferences.addons["uv_magic_uv"].preferences
+ prefs = context.preferences.addons["uv_magic_uv"].preferences
cp_size = prefs.uv_bounding_box_cp_size
offset = cp_size / 2
verts = [
diff --git a/uv_magic_uv/legacy/op/uv_inspection.py b/uv_magic_uv/legacy/op/uv_inspection.py
index 57d42468..a13c1a03 100644
--- a/uv_magic_uv/legacy/op/uv_inspection.py
+++ b/uv_magic_uv/legacy/op/uv_inspection.py
@@ -169,7 +169,7 @@ class MUV_OT_UVInspection_Render(bpy.types.Operator):
def draw(_, context):
sc = context.scene
props = sc.muv_props.uv_inspection
- prefs = context.user_preferences.addons["uv_magic_uv"].preferences
+ prefs = context.preferences.addons["uv_magic_uv"].preferences
if not MUV_OT_UVInspection_Render.is_running(context):
return
diff --git a/uv_magic_uv/legacy/op/uv_sculpt.py b/uv_magic_uv/legacy/op/uv_sculpt.py
index 3754a759..556e0a4e 100644
--- a/uv_magic_uv/legacy/op/uv_sculpt.py
+++ b/uv_magic_uv/legacy/op/uv_sculpt.py
@@ -205,7 +205,7 @@ class MUV_OT_UVSculpt(bpy.types.Operator):
@classmethod
def draw_brush(cls, obj, context):
sc = context.scene
- prefs = context.user_preferences.addons["uv_magic_uv"].preferences
+ prefs = context.preferences.addons["uv_magic_uv"].preferences
num_segment = 180
theta = 2 * pi / num_segment