Exemple #1
0
    def on_click(self, cursor):
        handle = cursor.over_handle()
        if handle:
            self.item.move(handle)
        else:
            self.item.move(cursor)

        return 0
Exemple #2
0
 def cursor_endmove(self, cursor):
     handle = cursor.over_handle()
     if handle:
         if isinstance(handle, VertexHandle):
             self.del_for_all()
             for vertex in self.vertices:
                 handle.add_vertex(vertex)
         else:
             self.move(handle)
Exemple #3
0
    def on_click(self, cursor):
        i = 0
        while not getattr(self.face.vertices[i], "immature", 0):
            i = i + 1

        vertex = self.face.vertices[i]
        del vertex.immature

        handle = cursor.over_handle()
        if handle:
            if isinstance(handle, VertexHandle):
                handle.add_vertex(self.face.vertices[i])
            else:
                self.face.vertices[i].parent = self.face.parent
                self.face.vertices[i].move(handle)

                self.editor.add_handles_for_vertex(vertex)
        else:
            self.face.vertices[i].parent = self.face.parent
            self.face.vertices[i].move(cursor)

            self.editor.add_handles_for_vertex(vertex)

        return i < len(self.face.vertices) - 1