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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/modules/add_object_utils.py')
-rw-r--r--release/scripts/modules/add_object_utils.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/release/scripts/modules/add_object_utils.py b/release/scripts/modules/add_object_utils.py
index cef368c529d..eaa97512f89 100644
--- a/release/scripts/modules/add_object_utils.py
+++ b/release/scripts/modules/add_object_utils.py
@@ -25,11 +25,11 @@ import mathutils
def add_object_align_init(context, operator):
if operator and operator.properties.is_property_set("location") and operator.properties.is_property_set("rotation"):
- location = mathutils.TranslationMatrix(mathutils.Vector(operator.properties.location))
+ location = mathutils.Matrix.Translation(mathutils.Vector(operator.properties.location))
rotation = mathutils.Euler(operator.properties.rotation).to_matrix().resize4x4()
else:
# TODO, local view cursor!
- location = mathutils.TranslationMatrix(context.scene.cursor_location)
+ location = mathutils.Matrix.Translation(context.scene.cursor_location)
if context.user_preferences.edit.object_align == 'VIEW' and context.space_data.type == 'VIEW_3D':
rotation = context.space_data.region_3d.view_matrix.rotation_part().invert().resize4x4()
@@ -50,12 +50,12 @@ def add_object_data(context, obdata, operator=None):
# ugh, could be made nicer
for ob in scene.objects:
- ob.selected = False
+ ob.select = False
obj_new = bpy.data.objects.new(obdata.name, obdata)
base = scene.objects.link(obj_new)
- base.selected = True
+ base.select = True
if context.space_data and context.space_data.type == 'VIEW_3D':
base.layers_from_view(context.space_data)
@@ -68,7 +68,7 @@ def add_object_data(context, obdata, operator=None):
if obj_act and obj_act.mode == 'EDIT' and obj_act.type == obj_new.type:
bpy.ops.object.mode_set(mode='OBJECT')
- obj_act.selected = True
+ obj_act.select = True
scene.update() # apply location
#scene.objects.active = obj_new
@@ -77,7 +77,7 @@ def add_object_data(context, obdata, operator=None):
bpy.ops.object.mode_set(mode='EDIT')
else:
scene.objects.active = obj_new
- if context.user_preferences.edit.enter_edit_mode:
+ if context.user_preferences.edit.use_enter_edit_mode:
bpy.ops.object.mode_set(mode='EDIT')
return base