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:
authorNBurn <7nburn@gmail.com>2019-01-25 06:59:16 +0300
committerNBurn <7nburn@gmail.com>2019-01-25 06:59:16 +0300
commitc686df25d98bc6a08ad02b9f4f9cff6b4aee4805 (patch)
tree2ddb8dd6ee0fc2bd546bb95691c07b906aeab1cf /mesh_tissue
parenta6189ebcbe0fcee59f72147fcc160f7b47234354 (diff)
addons: object select_set syntax update
Diffstat (limited to 'mesh_tissue')
-rw-r--r--mesh_tissue/dual_mesh.py4
-rw-r--r--mesh_tissue/lattice.py28
-rw-r--r--mesh_tissue/tessellate_numpy.py4
-rw-r--r--mesh_tissue/uv_to_mesh.py14
4 files changed, 25 insertions, 25 deletions
diff --git a/mesh_tissue/dual_mesh.py b/mesh_tissue/dual_mesh.py
index 92ee7562..d983d873 100644
--- a/mesh_tissue/dual_mesh.py
+++ b/mesh_tissue/dual_mesh.py
@@ -138,7 +138,7 @@ class dual_mesh(Operator):
bpy.ops.object.convert(target='MESH')
ob.data = ob.data.copy()
bpy.ops.object.select_all(action='DESELECT')
- ob.select = True
+ ob.select_set(True)
bpy.context.scene.objects.active = ob0
bpy.ops.object.mode_set(mode='EDIT')
@@ -274,7 +274,7 @@ class dual_mesh(Operator):
o.data = ob.data
for o in sel:
- o.select = True
+ o.select_set(True)
bpy.context.scene.objects.active = act
bpy.ops.object.mode_set(mode=mode)
diff --git a/mesh_tissue/lattice.py b/mesh_tissue/lattice.py
index e2235305..9edcd39f 100644
--- a/mesh_tissue/lattice.py
+++ b/mesh_tissue/lattice.py
@@ -316,7 +316,7 @@ class lattice_along_surface(Operator):
if o.name != grid_obj.name and o.type in \
('MESH', 'CURVE', 'SURFACE', 'FONT'):
obj = o
- o.select = False
+ o.select_set(False)
break
try:
obj_dim = obj.dimensions
@@ -339,7 +339,7 @@ class lattice_along_surface(Operator):
if len(grid_mesh.polygons) > 64 * 64:
bpy.ops.object.delete(use_global=False)
bpy.context.scene.objects.active = obj
- obj.select = True
+ obj.select_set(True)
self.report({'ERROR'}, "Maximum resolution allowed for Lattice is 64")
return {'CANCELLED'}
@@ -385,8 +385,8 @@ class lattice_along_surface(Operator):
# set as parent
if self.set_parent:
- obj.select = True
- lattice.select = True
+ obj.select_set(True)
+ lattice.select_set(True)
bpy.context.scene.objects.active = lattice
bpy.ops.object.parent_set(type='LATTICE')
@@ -432,12 +432,12 @@ class lattice_along_surface(Operator):
target_point.z / bpy.data.objects[lattice.name].scale.z
except:
bpy.ops.object.mode_set(mode='OBJECT')
- grid_obj.select = True
- lattice.select = True
- obj.select = False
+ grid_obj.select_set(True)
+ lattice.select_set(True)
+ obj.select_set(False)
bpy.ops.object.delete(use_global=False)
bpy.context.scene.objects.active = obj
- obj.select = True
+ obj.select_set(True)
bpy.ops.object.modifier_remove(modifier=obj.modifiers[-1].name)
if nu > 64 or nv > 64:
self.report({'ERROR'}, "Maximum resolution allowed for Lattice is 64")
@@ -451,12 +451,12 @@ class lattice_along_surface(Operator):
# grid_obj.matrix_world = old_grid_matrix
bpy.ops.object.mode_set(mode='OBJECT')
- grid_obj.select = True
- lattice.select = False
- obj.select = False
+ grid_obj.select_set(True)
+ lattice.select_set(False)
+ obj.select_set(False)
bpy.ops.object.delete(use_global=False)
bpy.context.scene.objects.active = lattice
- lattice.select = True
+ lattice.select_set(True)
if self.high_quality_lattice:
bpy.context.object.data.points_w = 8
@@ -467,8 +467,8 @@ class lattice_along_surface(Operator):
bpy.ops.object.hide_view_set(unselected=False)
bpy.context.scene.objects.active = obj
- obj.select = True
- lattice.select = False
+ obj.select_set(True)
+ lattice.select_set(False)
if self.flipNormals:
try:
diff --git a/mesh_tissue/tessellate_numpy.py b/mesh_tissue/tessellate_numpy.py
index f6fb97c0..f2a96d5e 100644
--- a/mesh_tissue/tessellate_numpy.py
+++ b/mesh_tissue/tessellate_numpy.py
@@ -888,7 +888,7 @@ class tessellate(Operator):
scene = bpy.context.scene
scene.objects.link(new_ob)
- new_ob.select = True
+ new_ob.select_set(True)
bpy.context.scene.objects.active = new_ob
if self.merge:
bpy.ops.object.mode_set(mode='EDIT')
@@ -1431,7 +1431,7 @@ class settings_tessellate(Operator):
# Create object in order to transfer vertex group
scene = bpy.context.scene
scene.objects.link(temp_ob)
- temp_ob.select = True
+ temp_ob.select_set(True)
bpy.context.scene.objects.active = temp_ob
try:
diff --git a/mesh_tissue/uv_to_mesh.py b/mesh_tissue/uv_to_mesh.py
index 273b3a6a..8ae59c6f 100644
--- a/mesh_tissue/uv_to_mesh.py
+++ b/mesh_tissue/uv_to_mesh.py
@@ -77,8 +77,8 @@ class uv_to_mesh(Operator):
def execute(self, context):
bpy.ops.object.mode_set(mode='OBJECT')
for o in bpy.data.objects:
- o.select = False
- bpy.context.object.select = True
+ o.select_set(False)
+ bpy.context.object.select_set(True)
if self.apply_modifiers:
bpy.ops.object.duplicate_move()
@@ -121,7 +121,7 @@ class uv_to_mesh(Operator):
scn = bpy.context.scene
scn.objects.link(ob)
scn.objects.active = ob
- ob.select = True
+ ob.select_set(True)
# Create mesh from given verts, faces.
me.from_pydata(verts, [], faces)
@@ -148,7 +148,7 @@ class uv_to_mesh(Operator):
except:
pass
- ob0.select = False
+ ob0.select_set(False)
if self.auto_scale:
scaleFactor = math.pow(area / new_area, 1 / 2)
ob.scale = Vector((scaleFactor, scaleFactor, scaleFactor))
@@ -173,10 +173,10 @@ class uv_to_mesh(Operator):
if self.apply_modifiers:
bpy.ops.object.mode_set(mode='OBJECT')
- ob.select = False
- ob0.select = True
+ ob.select_set(False)
+ ob0.select_set(True)
bpy.ops.object.delete(use_global=False)
- ob.select = True
+ ob.select_set(True)
bpy.context.scene.objects.active = ob
return {'FINISHED'}