コード例 #1
0
    def draw(self):
        if self.hide: return

        operators = get_text_operators(get_active_text_block())
        self.correct_index(len(operators))
        if len(operators) == 0: return
        active_operator = self.get_active_operator(operators)

        editor_info = TextEditorInfo()
        scale = editor_info.scale

        box_position_info = self.get_operator_box_position_info(editor_info)
        operator_box_rectangle = self.draw_operator_box(
            box_position_info, operators, scale)

        attribute_info_position = (operator_box_rectangle.right + 10 * scale,
                                   operator_box_rectangle.top)
        self.draw_attribute_info_box(
            attribute_info_position,
            getattr(active_operator, "additional_data", None), scale)

        restore_opengl_defaults()
コード例 #2
0
 def selected_operator(self):
     operators = get_text_operators(get_active_text_block())
     return self.get_active_operator(operators)