[Bf-extensions-cvs] [0457976a] blender2.8: Rename user_preferences -> preferences

Campbell Barton noreply at git.blender.org
Fri Dec 21 02:57:08 CET 2018


Commit: 0457976a872000993202763abe7503c76b461122
Author: Campbell Barton
Date:   Fri Dec 21 12:56:42 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBA0457976a872000993202763abe7503c76b461122

Rename user_preferences -> preferences

===================================================================

M	add_advanced_objects_menu/make_struts.py
M	add_advanced_objects_panels/__init__.py
M	add_curve_extra_objects/add_curve_aceous_galore.py
M	add_curve_extra_objects/add_curve_simple.py
M	add_curve_extra_objects/add_curve_spirofit_bouncespline.py
M	add_curve_extra_objects/add_curve_torus_knots.py
M	add_mesh_extra_objects/add_mesh_solid.py
M	animation_animall.py
M	ant_landscape/add_mesh_ant_landscape.py
M	ant_landscape/ant_functions.py
M	ant_landscape/mesh_ant_displace.py
M	archimesh/__init__.py
M	archipack/__init__.py
M	archipack/archipack_gl.py
M	archipack/archipack_manipulator.py
M	archipack/archipack_material.py
M	archipack/archipack_preset.py
M	archipack/archipack_rendering.py
M	archipack/archipack_thumbs.py
M	archipack/archipack_wall2.py
M	blender_id/__init__.py
M	btrace/bTrace_props.py
M	camera_turnaround.py
M	curve_simplify.py
M	development_icon_get.py
M	io_export_unreal_psk_psa.py
M	io_import_images_as_planes.py
M	io_online_sketchfab/__init__.py
M	io_scene_ms3d/ms3d_export.py
M	io_scene_ms3d/ms3d_utils.py
M	io_scene_obj/__init__.py
M	light_field_tools/__init__.py
M	lighting_dynamic_sky.py
M	materials_library_vx/__init__.py
M	materials_utils/__init__.py
M	materials_utils/warning_messages_utils.py
M	measureit/__init__.py
M	measureit/measureit_geometry.py
M	mesh_bsurfaces.py
M	mesh_carver.py
M	mesh_extra_tools/mesh_pen_tool.py
M	mesh_f2.py
M	mesh_inset/__init__.py
M	mesh_looptools.py
M	mesh_snap_utilities_line/__init__.py
M	mesh_snap_utilities_line/common_classes.py
M	mesh_snap_utilities_line/ops_line.py
M	modules/rna_manual_reference.py
M	node_wrangler.py
M	object_boolean_tools.py
M	object_fracture_crack/operator.py
M	oscurart_tools/__init__.py
M	pie_menus_official/__init__.py
M	render_auto_tile_size.py
M	render_povray/render.py
M	render_povray/ui.py
M	rigify/__init__.py
M	rigify/generate.py
M	rigify/legacy/rig_ui_pitchipoy_template.py
M	rigify/legacy/rig_ui_template.py
M	rigify/legacy/ui.py
M	rigify/rig_ui_template.py
M	rigify/ui.py
M	sequencer_kinoraw_tools/audio_tools.py
M	sequencer_kinoraw_tools/datamosh.py
M	sequencer_kinoraw_tools/eco.py
M	sequencer_kinoraw_tools/proxy_tools.py
M	sequencer_kinoraw_tools/random_editor.py
M	sequencer_kinoraw_tools/recursive_loader.py
M	sequencer_kinoraw_tools/ui.py
M	space_view3d_3d_navigation.py
M	space_view3d_brush_menus/utils_core.py
M	space_view3d_display_tools/__init__.py
M	space_view3d_pie_menus/__init__.py
M	space_view3d_spacebar_menu.py
M	space_view3d_stored_views/core.py
M	space_view3d_stored_views/ui.py
M	ui_layer_manager.py
M	ui_translate/__init__.py
M	uv_magic_uv/addon_updater_ops.py
M	uv_magic_uv/impl/move_uv_impl.py
M	uv_magic_uv/legacy/op/texture_projection.py
M	uv_magic_uv/legacy/op/uv_bounding_box.py
M	uv_magic_uv/legacy/op/uv_inspection.py
M	uv_magic_uv/legacy/op/uv_sculpt.py

===================================================================

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

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list