Skip to content

Instantly share code, notes, and snippets.

@p2or
p2or / loom_post-render-rename.py
Last active September 13, 2024 08:16
Loom Extension to remove the frame number from non-sequencial images within a given folder #BlenderAddon
# ##### 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
# 2.8+ Update for https://gist.github.com/sambler/6d1fdee82878811c75ac
import bpy
class CustomMenu(bpy.types.Menu):
"""Demo custom menu"""
# example menu from Templates->Python->ui_menu.py
bl_label = "Custom Menu"
bl_idname = "OBJECT_MT_custom_menu"
@p2or
p2or / __init__.py
Last active January 24, 2024 16:48
#Blender - Prototype to capture the output of a C++ program supplied by an add-on
# ##### 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
@p2or
p2or / Modal-Draw-2d-3d.md
Last active May 22, 2023 16:18
Modal-Draw 2d & 3d (gpu, blf) #Blender

Basic gpu examples for Blender 3.5+

@p2or
p2or / CornerPinOffset
Created June 12, 2022 18:58 — forked from jedypod/CornerPinOffset
CornerPin node with offset controls for each corner. Useful for tweaking cornerpin after all keyframes are baked (e.g. , from a tracker), in case you need to cheat the perspective or something else #Nuke
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name CornerPinOffset
tile_color 0x9073adff
addUserKnob {20 PinControl}
addUserKnob {26 CornerPinControls l "" +STARTLINE T "<font size=5><b>Corner Pin Data</b></font>"}
addUserKnob {20 CornerPinData l "" +STARTLINE n 1}
addUserKnob {41 to1 T cpMaster.to1}
addUserKnob {41 enable1 -STARTLINE T cpMaster.enable1}
# ##### 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
@p2or
p2or / io_batch_import_objs.py
Last active May 21, 2023 18:02
Blender 2.92+ - Batch import obj files based on my answer here: https://blender.stackexchange.com/a/31825/31447 #Blender #BSE
# ##### 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
@p2or
p2or / metabox-multiple.php
Created March 26, 2021 13:40 — forked from cferdinandi/metabox-multiple.php
Create a metabox with multiple fields #WP
<?php
/**
* Create a metabox with multiple fields.
* Replace `_namespace` with some namespace for your project to avoid conflicts with other items
*/
//
// Create Metabox
//
@p2or
p2or / MobileARShadow.shader
Created January 2, 2021 16:24 — forked from DanMillerDev/MobileARShadow.shader
Shadows on transparent geometry shader #Unity
//This is based on a shader from https://alastaira.wordpress.com/2014/12/30/adding-shadows-to-a-unity-vertexfragment-shader-in-7-easy-steps/
Shader "Custom/MobileARShadow"
{
SubShader {
Pass {
// 1.) This will be the base forward rendering pass in which ambient, vertex, and
// main directional light will be applied. Additional lights will need additional passes
// using the "ForwardAdd" lightmode.