Skip to content

Instantly share code, notes, and snippets.

@p2or
p2or / blender-frame-hold.py
Last active February 8, 2024 14:42
FrameHold #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
@p2or
p2or / colorTempToRGB.js
Created December 18, 2015 15:51 — forked from paulkaplan/colorTempToRGB.js
Color Temperature to RGB #Color
// From http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
// Start with a temperature, in Kelvin, somewhere between 1000 and 40000. (Other values may work,
// but I can't make any promises about the quality of the algorithm's estimates above 40000 K.)
function colorTemperatureToRGB(kelvin){
var temp = kelvin / 100;
@p2or
p2or / playPausePanel.py
Created January 15, 2016 17:18 — forked from sambler/playPausePanel.py
PlayPause panel #Blender
# made in response to
# http://blender.stackexchange.com/q/44983/935
bl_info = {
"version": (1, 0),
"blender": (2, 75, 0),
"name": "testing play pause",
"description": """testing addon""" ,
"category": "test",
@p2or
p2or / blender-edit-hue-curves.py
Last active May 22, 2023 14:09
Edit HueCurveModifier #Blender #BSE
# for http://blender.stackexchange.com/questions/46784/can-python-access-control-points-of-hue-modifier
import bpy
# get the scene
scn = bpy.context.scene
# get the clip
act_strip = scn.sequence_editor.active_strip
@p2or
p2or / blender-toggle-simplify.py
Last active May 21, 2023 18:01
Blender - Toggle Simplify using Shift+Q, for http://blender.stackexchange.com/a/46864/3710 #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
@p2or
p2or / customPropertiesSearch.py
Last active May 21, 2023 18:21
UI - PropSearch #Blender
# for http://blender.stackexchange.com/questions/44886/search-enum-list
bl_info = {
"name": "Search Popup",
"version": (0, 0, 1),
"blender": (2, 75, 0),
"category": "Test"
}
import bpy
# ##### 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 / custom-material-ui.py
Created March 27, 2016 14:41
UI - Custom Material #Blender
bl_info = {
"name": "",
"description": "",
"author": "",
"version": (0, 0, 1),
"blender": (2, 70, 0),
"location": "",
"warning": "",
"wiki_url": "",
"tracker_url": "",
@p2or
p2or / blender-save-and-reopen.py
Last active May 21, 2023 18:36
Save and reopen #Blender
bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)
bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)
@p2or
p2or / blender-suppressOperatorOutput.py
Last active May 21, 2023 18:19
Supress operator output #Blender
# for http://blender.stackexchange.com/questions/56087/check-if-an-operation-can-be-applied-without-runtime-errors
import bpy
import io
from contextlib import redirect_stdout
if bpy.ops.mesh.fill_grid.poll():
print("correct context")
else: