Skip to content

Instantly share code, notes, and snippets.

@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.
@p2or
p2or / blender-automatic-file-output-node-connections.py
Created November 29, 2020 09:56
Auto file output node connection #Blender
# ##### 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
# Houdini Python shelf tool for comparing node networks
# Prints changes in networks followed by changes in parameters
# Original Author: @jrockstad
# https://forums.odforce.net/topic/24410-compare-difference-between-two-networks/
# Usage: Select first network, shift-select second network, launch tool
# -----------------------------------------------
# Network comparison functions
# -----------------------------------------------