~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to release/scripts/addons/modules/selection_utils.py

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
 
29
29
class SelectionOrder(bpy.types.Operator):
30
 
    '''Store the object names in the order they are selected.
31
 
    Use RETURN key to confirm selection, ESCAPE key to cancel'''
 
30
    """Store the object names in the order they are selected, """ \
 
31
    """use RETURN key to confirm selection, ESCAPE key to cancel"""
32
32
    bl_idname = "object.select_order"
33
33
    bl_label = "Select with Order"
34
34
    bl_options = {'UNDO'}
46
46
 
47
47
        if num == 0:
48
48
            # Reset the list
49
 
            selected[:] = []
 
49
            del selected[:]
50
50
        elif num > self.num_selected:
51
51
            # Get all the newly selected objects and add
52
52
            new = [ob.name for ob in sel if ob.name not in selected]
72
72
        return {'PASS_THROUGH'}
73
73
 
74
74
    def invoke(self, context, event):
 
75
        self.update(context)
 
76
 
75
77
        context.window_manager.modal_handler_add(self)
76
 
        self.update(context)
77
78
        return {'RUNNING_MODAL'}
78
79
 
79
80