[Durian-svn] [7177] update for changes in blenders api
campbell
institute at blender.org
Fri Jul 16 14:50:45 CEST 2010
Revision: 7177
https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=7177
Author: campbell
Date: 2010-07-16 14:50:45 +0200 (Fri, 16 Jul 2010)
Log Message:
-----------
update for changes in blenders api
Modified Paths:
--------------
pro/scripts/op/add_mesh_random_block.py
pro/scripts/op/marker_render.py
pro/scripts/op/mesh_skin.py
pro/scripts/op/mesh_weight_smooth.py
pro/scripts/op/object_library_load.py
pro/scripts/ui/add_tripod_camera.py
pro/scripts/ui/find_no_materials.py
pro/scripts/ui/grease_scatter.py
pro/scripts/ui/replace_by_active.py
pro/scripts/ui/sequencer_slide.py
pro/scripts/utilities/sequencer_movie_marker_gen.py
pro/scripts/utilities/sequencer_switch_finals.py
Modified: pro/scripts/op/add_mesh_random_block.py
===================================================================
--- pro/scripts/op/add_mesh_random_block.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/op/add_mesh_random_block.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -207,20 +207,20 @@
# ugh
for ob in scene.objects:
- ob.selected = False
+ ob.select = False
mesh.update()
ob_new = bpy.data.objects.new("epic.mesh", mesh)
ob_new.data = mesh
scene.objects.link(ob_new)
- ob_new.selected = True
+ ob_new.select = True
ob_new.location = scene.cursor_location
obj_act = scene.objects.active
if obj_act and obj_act.mode == 'EDIT':
bpy.ops.object.mode_set(mode='OBJECT')
- obj_act.selected = True
+ obj_act.select = True
scene.update() # apply location
bpy.ops.object.join() # join into the active.
Modified: pro/scripts/op/marker_render.py
===================================================================
--- pro/scripts/op/marker_render.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/op/marker_render.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -20,7 +20,7 @@
msg = ['Dont worry colin, not actually a warning... phew']
for i, (frame, marker, camera) in enumerate(switch):
- if not marker.selected:
+ if not marker.select:
continue
scene.frame_start = max(frame, frame_start)
@@ -100,7 +100,7 @@
def main(self, context, pad=10):
scene = context.scene
- seqs = [seq for seq in scene.sequence_editor.sequences if seq.selected]
+ seqs = [seq for seq in scene.sequence_editor.sequences if seq.select]
seqs.sort(key=lambda seq: seq.frame_start_final)
tot = 0
for seq in seqs:
Modified: pro/scripts/op/mesh_skin.py
===================================================================
--- pro/scripts/op/mesh_skin.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/op/mesh_skin.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -252,7 +252,7 @@
context.tool_settings.mesh_selection_mode = False, True, False
if not MESH_MODE[2]:
- edges= [ ed for ed in me.edges if ed.selected ]
+ edges= [ed for ed in me.edges if ed.select]
# print len(edges), len(me.edges)
context.scene.tool_settings.mesh_selection_mode = MESH_MODE
return edges
@@ -262,7 +262,7 @@
edge_dict= dict((ed.key, [ed, 0]) for ed in me.edges)
for f in me.faces:
- if f.selected:
+ if f.select:
for edkey in f.edge_keys:
edge_dict[edkey][1] += 1
Modified: pro/scripts/op/mesh_weight_smooth.py
===================================================================
--- pro/scripts/op/mesh_weight_smooth.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/op/mesh_weight_smooth.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -24,7 +24,7 @@
me = context.object.data
me_verts = me.verts
- edge_loops = me.edge_loops_from_edges(edges=[ed for ed in me.edges if ed.selected])
+ edge_loops = me.edge_loops_from_edges(edges=[ed for ed in me.edges if ed.select])
# deselect all
bpy.ops.object.mode_set(mode='EDIT', toggle=True) # enter
@@ -45,7 +45,7 @@
# setup selected verts
for i in range(1, len(loop) - 1):
- me_verts[loop[i]].selected = True
+ me_verts[loop[i]].select = True
bpy.ops.object.mode_set(mode='EDIT', toggle=True) # enter
@@ -74,7 +74,7 @@
# re-select all
for loop in edge_loops:
for i in loop:
- me_verts[i].selected = True
+ me_verts[i].select = True
if is_editmode:
bpy.ops.object.mode_set(mode='EDIT', toggle=True)
Modified: pro/scripts/op/object_library_load.py
===================================================================
--- pro/scripts/op/object_library_load.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/op/object_library_load.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -25,7 +25,7 @@
scene_obs = {}
for base in scene.bases:
- base.selected = False
+ base.select = False
scene_obs[base.object.name] = base
from mathutils import Vector
@@ -40,7 +40,7 @@
if base:
v += obj.matrix.translation_part()
i += 1
- base.selected = True
+ base.select = True
for j, k in enumerate(obj.layers):
layers[j] |= k
Modified: pro/scripts/ui/add_tripod_camera.py
===================================================================
--- pro/scripts/ui/add_tripod_camera.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/ui/add_tripod_camera.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -38,7 +38,7 @@
# Deselect objects
for obj in context.scene.objects:
- obj.selected = False
+ obj.select = False
# Create camera object
viewer = bpy.data.objects.new(name="viewer", object_data=bpy.data.cameras.new(name="viewer"))
@@ -54,7 +54,7 @@
tripod = bpy.data.objects.new(name="tripod", object_data=None)
context.scene.objects.link(tripod)
tripod.layers = layers
- tripod.selected = True
+ tripod.select = True
context.scene.objects.active = tripod
Modified: pro/scripts/ui/find_no_materials.py
===================================================================
--- pro/scripts/ui/find_no_materials.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/ui/find_no_materials.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -22,7 +22,7 @@
def execute(self, context):
for obj in bpy.context.scene.objects:
if obj.type=='MESH' and has_mat(obj)==0:
- obj.selected = True
+ obj.select = True
return {'FINISHED'}
class hasnouv(bpy.types.Operator):
@@ -34,7 +34,7 @@
def execute(self, context):
for obj in bpy.context.scene.objects:
if obj.type=='MESH' and has_uv(obj)==0:
- obj.selected = True
+ obj.select = True
return {'FINISHED'}
class OBJECT_MT_find(bpy.types.Menu):
Modified: pro/scripts/ui/grease_scatter.py
===================================================================
--- pro/scripts/ui/grease_scatter.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/ui/grease_scatter.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -274,7 +274,7 @@
inst_ob.game.use_collision_bounds = True
inst_ob.game.collision_bounds = 'TRIANGLE_MESH'
inst_ob.game.collision_margin = 0.1
- obj_new.selected = True
+ obj_new.select = True
'''
Modified: pro/scripts/ui/replace_by_active.py
===================================================================
--- pro/scripts/ui/replace_by_active.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/ui/replace_by_active.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -43,7 +43,7 @@
if ob != actOb:
doObs.append(ob)
- ob.selected = False
+ ob.select = False
for ob in doObs:
Modified: pro/scripts/ui/sequencer_slide.py
===================================================================
--- pro/scripts/ui/sequencer_slide.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/ui/sequencer_slide.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -28,7 +28,7 @@
return {'RUNNING_MODAL'}
def invoke(self, context, event):
- self.strip_info = [(strip, strip.channel, strip.frame_start, strip.frame_final_start, strip.frame_final_end) for strip in context.scene.sequence_editor.sequences if strip.selected]
+ self.strip_info = [(strip, strip.channel, strip.frame_start, strip.frame_final_start, strip.frame_final_end) for strip in context.scene.sequence_editor.sequences if strip.select]
if context.scene:
context.manager.add_modal_handler(self)
Modified: pro/scripts/utilities/sequencer_movie_marker_gen.py
===================================================================
--- pro/scripts/utilities/sequencer_movie_marker_gen.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/utilities/sequencer_movie_marker_gen.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -44,9 +44,9 @@
for marker in bpy.context.scene.timeline_markers:
- marker.selected = marker.name.startswith(" ")
+ marker.select = marker.name.startswith(" ")
for frame, info in frames_info:
marker = bpy.context.scene.timeline_markers.add(name=" " + info)
marker.frame = frame
- marker.selected = True
+ marker.select = True
Modified: pro/scripts/utilities/sequencer_switch_finals.py
===================================================================
--- pro/scripts/utilities/sequencer_switch_finals.py 2010-07-16 12:49:58 UTC (rev 7176)
+++ pro/scripts/utilities/sequencer_switch_finals.py 2010-07-16 12:50:45 UTC (rev 7177)
@@ -153,7 +153,7 @@
MISSING_EXRS.append(filepath)
else:
if len(image_files) == seq.frame_length:
- seq.selected = True
+ seq.select = True
print("swapping:", filepath, len(image_files), seq.frame_length)
seq_new = add_strip(image_dir, image_files)
@@ -171,8 +171,8 @@
# XXX, context only
for s in bpy.context.sequences:
- s.selected = False
- seq_new.selected = True
+ s.select = False
+ seq_new.select = True
bpy.ops.sequencer.delete()
else:
BAD_AVI_LENGTHS.append((filepath, "images:", str(len(image_files)), "movie:", str(seq.frame_length), str((frame_start, frame_end))))
More information about the Durian-svn
mailing list