Skip to content

Instantly share code, notes, and snippets.

@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 / titles_sequencer_plus.py
Last active July 8, 2019 21:41
Ergonomic new titles functions for video editing in Blender VSE
# ##### 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
# -*- coding: utf-8 -*-
# ##### 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,
@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 / intellisense.py
Last active September 19, 2019 14:36
Intellisense for Blender Text Editor
# ***** 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 / draw_keyframes.py
Last active September 29, 2019 20:36
Draws keyframes in Graph Editor for ex. editing volume levels on VSE strips(only poc).
#Start Draw Volume Keyframes operator from the Graph Editor using F3
import bpy
import bgl
import blf
import gpu
from gpu_extras.batch import batch_for_shader
def draw_callback_px(self, context):
#print("mouse points", len(self.mouse_path))
@tin2tin
tin2tin / SortStrips.py
Created October 3, 2019 09:49
Sort Strips by frame number.
import bpy
strips = bpy.context.selected_editable_sequences
strips = sorted(strips, key=lambda strip: strip.frame_final_start)
cleanup = []
for i in range(1, len(strips)):
st0 = strips[i-1]
st1 = strips[i]
cleanup.append( [ st1, st1.channel ])
@tin2tin
tin2tin / text_markers.py
Last active October 26, 2019 20:03
Text Markers by Tonton updated to 2.80(wip)
# ##### 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; version 3
# of the License.
#
# 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
@tin2tin
tin2tin / Dark_Text_Editor_Consistency_Theme.xml
Created November 6, 2019 10:42
Dark Blender Text Editor UI Consistency Theme
<bpy>
<Theme>
<user_interface>
<ThemeUserInterface
menu_shadow_fac="0.3"
menu_shadow_width="4"
icon_alpha="1"
icon_saturation="0.5"
widget_emboss="#00000005"
editor_outline="#1f1f1f"
@tin2tin
tin2tin / Fountain_in_Text_Editor.py
Last active November 9, 2019 01:19
Fountain_in_Text_Editor - work in progress
import bpy
import textwrap
import os
import sys
import fountain
from bpy.props import BoolProperty, PointerProperty, StringProperty
from pathlib import Path
class FOUNTAIN_PT_panel(bpy.types.Panel):
"""Preview fountain script as formatted screenplay"""