Skip to content

Instantly share code, notes, and snippets.

@tin2tin
tin2tin / SequencerSpecialsMenu.py
Created January 2, 2018 23:53
Add a 'Specials Menu' to Blender Video Editing Sequencer. Shortcut key: 'w'.
import bpy
class SequencerEditMenu(bpy.types.Menu):
bl_label = "Specials"
bl_idname = "SEQUENCER_OT_sequencer_edit_menu"
def draw(self, context):
print("space_date.type: "+context.space_data.type)
if context.space_data.type == 'SEQUENCE_EDITOR':
@tin2tin
tin2tin / EditExternally.py
Created September 22, 2018 11:12
Edit Blender VSE Source in External App.
import bpy
import os
import subprocess
bl_info = {
"name": "Edit Source Externally",
"description": "Open VSE audio/video source with an external program.",
"author": "Joe Button",
"version": (1, 0),
"blender": (2, 73, 0),
@tin2tin
tin2tin / fcpx_markers_import.py
Last active August 27, 2020 17:09
Import Final Cut Pro X markers from fcpxml files and insert them as markers and subtitles in Blender
import bpy
'''
Project Purpose:
Extract markers and time codes from Final Cut Pro X's FCPXML 1.3 formatted files
Pass an XML element into Marker.scanForMarker(). If markers are found, they are inserted as markers and subtitles in Blender.
'''
import bpy, sys, datetime
from xml.etree.ElementTree import parse
# Converts the '64bit/32bits' timecode format into seconds
@tin2tin
tin2tin / sample.fcpxml
Created October 10, 2018 22:00
sample.fcpxml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fcpxml>
<fcpxml version="1.0">
<project>
<resources>
<format id="f1" frameDuration="1/29s" width="640.000000" height="480.000000"/>
<asset id="r1" name="1985-11-10-Berkeley_part_2.m4v" uid="O2wWMxasJdyRavHND5dJ" src="video/1985/1985-11-10-Berkeley_part_2.m4v" start="0/29s" duration="136647/29s" hasVideo="1" hasAudio="1" audioSources="1" audioChannels="2" audioRate="48000.000000"/>
</resources>
<clip name="1985-11-10-Berkeley_part_2.m4v" start="0/29s" duration="136647/29s" format="f1">
<video ref="r1" start="0/29s" duration="136647/29s" offset="0/29s">
@tin2tin
tin2tin / Add Camera to View.py
Created October 11, 2018 12:50
Add Camera to View by Dmitry aka Rockbard
bl_info = {
"name": "Add Camera to View",
"category": "3D View",
"description": """Adding camera to view with ctrl+shift+D""",
"author": "Dmitry aka Rockbard",
"version": (1, 0),
"blender": (2, 79, 0),
}
@tin2tin
tin2tin / VSE_Trim_Mode.py
Last active October 21, 2018 14:17
VSE_Trim_Mode.py
bl_info = {
"name": "Areatype Trim",
"description":"This example adds a button which toggles a split of an area with another.",
"author":"dustractor, tintwotin, Snuq, Stephen Graham",
"version":(0,2),
"blender":(2,79,0),
"location":"Button prepended to the header of the sequencer.",
"warning":"",
"wiki_url":"",
@tin2tin
tin2tin / VSE_Pie_Menu.py
Created October 22, 2018 08:09
VSE Pie Menu
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@tin2tin
tin2tin / FrameNumberAsSubtitle.py
Last active August 17, 2019 12:16
Add frame count numbers as subtitles to the sequencer within the preview range - in Blender.
# Run script to add frame count numbers as subtitles to the sequencer within the preview range
import bpy
def find_empty_channel():
"""
Finds the first empty channel above all others in the VSE
and returns it
"""
sequences = bpy.context.sequences
@tin2tin
tin2tin / WindowlessFullscreen.py
Created November 23, 2018 12:46
Windowless Fullscreen Mode
import bpy
class SEQUENCE_MT_true_fullscreen(bpy.types.Operator):
"""True fullscreen preview"""
bl_label = "True Fullscreen"
bl_idname = "sequencer.true_fullscreen"
runs = 0
original_area = None
@tin2tin
tin2tin / sequencer.py
Created May 23, 2019 09:57
2.80 Sequencer operators: SelectStripsUnderPlayhead, SelectStripsInChannel and CutHardAndHold
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the