This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assumes the values of the first indices add up to 100. | |
import bpy | |
import random | |
mats = bpy.data.materials | |
nodes = mats['Material'].node_tree.nodes | |
elements = nodes['ColorRamp'].color_ramp.elements | |
RAN = random.random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import random | |
from mathutils import Vector | |
''' | |
text should be something like this (int or float, should add up to 100) | |
- either provide three color components (rgb) | |
- provide one, automatic greyscale is made | |
- provide none, random color is returned. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ##### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Will unpremultiply the currently selected Photoshop layer | |
*/ | |
var doc = app.activeDocument; | |
// Duplicate this layer | |
var premultLayer = app.activeDocument.activeLayer.duplicate(); | |
premultLayer.blendMode = BlendMode.NORMAL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: UTF-8 | |
import socket | |
import struct | |
DEBUG = True | |
DEBUG2 = False | |
PTP_OC_GetDeviceInfo = 0x1001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:void%20function(){(function(e,o,i,a,n,r,t,d){(!(n=e.jQuery)||i%3En.fn.jquery||a(n))%26%26(r=o.createElement(%22script%22),r.type=%22text/javascript%22,r.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+i+%22/jquery.min.js%22,r.onload=r.onreadystatechange=function(){t||(d=this.readyState)%26%26%22loaded%22!=d%26%26%22complete%22!=d||(a((n=e.jQuery).noConflict(1),t=1),n(r).remove())},o.documentElement.childNodes[0].appendChild(r))})(window,document,%221.3.2%22,function(e,o){e(%22%23header,%20.header,.gh-header-actions,.repo-nav,.site-footer,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%23wiki-rightbar%22).remove(),e(%22%23files,%20.file%22).css({background:%22none%22,border:%22none%22}),e(%22.aui-group,.aui-sidebar,.aui-header,%23wiki%20header,footer,.revision-date%22).css({display:%22none%22}),e(%22%23wiki%20.wiki-content%22).css({border:%22none%22,overflow:%22hidden%22}),e(%22.aui-page-panel%22).css({%22padding-left%22:0}),e(%22link%22).removeAttr(%22media%22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import mathutils | |
class Converter: | |
def __init__(self, ob, logging=False): | |
self.ob = ob | |
self.action = ob.animation_data.action | |
self.rot_mode = ob.rotation_mode | |
self.logging = logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Reportlab sandbox. | |
""" | |
from reportlab.lib.enums import TA_JUSTIFY | |
from reportlab.lib.pagesizes import letter, landscape | |
from reportlab.lib.enums import TA_JUSTIFY | |
from reportlab.lib.pagesizes import letter | |
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image | |
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ##### 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 |
OlderNewer