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
# for http://blender.stackexchange.com/questions/56087/check-if-an-operation-can-be-applied-without-runtime-errors | |
import bpy | |
if bpy.ops.mesh.fill_grid.poll(): | |
print("correct context") | |
try: | |
bpy.ops.mesh.fill_grid() | |
except RuntimeError as exception: |
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
# for https://blenderartists.org/forum/showthread.php?312819-Snippet-System-for-Text-Editor | |
bl_info = { | |
"name": "Snippet System for Text Editor", | |
"author": "CoDEmanX, poor", | |
"version": (1, 0, 1), | |
"blender": (2, 75, 0), | |
"location": "Text Editor (> Templates) > Snippets", | |
"description": "Create snippets from text selection easily", | |
"warning": "", |
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
# for http://blender.stackexchange.com/questions/58171/how-to-create-a-boolean-vector-property-that-is-single-selection | |
bl_info = { | |
"name": "Add-on Template", | |
"description": "", | |
"author": "", | |
"version": (0, 0, 1), | |
"blender": (2, 70, 0), | |
"location": "3D View > Tools", | |
"warning": "", # used for warning icon and text in addons panel |
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
Show hidden characters
{ | |
"cmd": ["g++", "-std=c++0x", "${file}", "-o", "${file_path}/${file_base_name}"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c, source.c++", | |
"variants": | |
[ | |
{ | |
"name": "Run", | |
"cmd":["bash", "-c", "g++ -std=c++0x '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"] |
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
bl_info = { | |
"name": "Duplicate Scene", | |
"description": "", | |
"author": "poor", | |
"version": (0, 0, 1), | |
"blender": (2, 70, 0), | |
"location": "3D View > Spacebar > Duplicate Scene", | |
"category": "3D View" | |
} |
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
# for http://blender.stackexchange.com/questions/58486/add-toggle-hotkey-to-custom-checkbox | |
bl_info = { | |
"name": "Add-on Template", | |
"description": "", | |
"author": "poor", | |
"version": (0, 0, 2), | |
"blender": (2, 70, 0), | |
"location": "3D View > Tools", | |
"warning": "", # used for warning icon and text in addons panel |
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
# http://blender.stackexchange.com/q/63347/3710 | |
import bpy | |
class CustomDissolveEdgeOperator(bpy.types.Operator): | |
bl_idname = 'custom.dissolve_edges' | |
bl_label = 'Custom Edge Dissolve' | |
bl_options = {'REGISTER', 'UNDO'} | |
''' |
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
# http://blender.stackexchange.com/q/63561 and http://blender.stackexchange.com/q/3527 | |
import bpy | |
import os | |
# format integer with leading zeros | |
def format_numbers(number, length): | |
return '_%0*d' % (length, number) | |
def create_image_and_save_as_jpg(pixels, clp_name, clp_size, clp_frame): |