video_editing.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Blender-power-sequencer 作者: GDquest 项目源码 文件源码
def execute(self, context):
        selection = bpy.context.selected_sequences
        if not selection:
            return {'CANCELLED'}

        selection = sorted(selection,
                           key=attrgetter('channel', 'frame_final_start'))

        if self.direction == 'up':
            for s in reversed(selection):
                s.channel += 1
        elif self.direction == 'down':
            for s in selection:
                if (s.channel > 1):
                    s.channel -= 1
        return {'FINISHED'}


# TODO: find a way to get the selection bounding box and place it
# where there is space for it?
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号