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": "tester", | |
"description": "", | |
"author": "", | |
"version": (0, 0, 3), | |
"blender": (2, 70, 0), | |
"location": "3D View > Toolbox", | |
"warning": "", # used for warning icon and text in addons panel | |
"wiki_url": "", | |
"tracker_url": "", |
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
<?php | |
/** | |
* Create a metabox with multiple fields. | |
* Replace `_namespace` with some namespace for your project to avoid conflicts with other items | |
*/ | |
// | |
// Create Metabox | |
// |
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/71453/importing-large-number-of-objs-using-python#comment124330_71453 | |
# ##### 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, |
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
# https://blender.stackexchange.com/q/110742/3710 | |
bl_info = { | |
"name": "Disable Shift+MMB in 3D Viewport", | |
"description": "Disable Shift+MMB in 3D Viewport", | |
"author": "p2or", | |
"version": (0, 0, 1), | |
"blender": (2, 79, 0), | |
"location": "3D View", | |
"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
import bpy | |
import addon_utils | |
# Set Addon Tab | |
bpy.context.user_preferences.active_section = 'ADDONS' | |
# Set Filter | |
bpy.context.window_manager.addon_search = "Addon Name" | |
# Get a module reference by 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
# for http://blender.stackexchange.com/q/73858/3710 | |
import bpy | |
import os | |
def image_sequence_resolve(operator, context): | |
filepath = context.space_data.clip.filepath | |
filepath_full = bpy.path.abspath(filepath) | |
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 | |
# --------------------------------------------------- | |
# Collection | |
# --------------------------------------------------- | |
class MyCollectionProperty(bpy.types.PropertyGroup): | |
id = bpy.props.IntProperty() | |
name = bpy.props.StringProperty(name="Test Prop", default="Unknown") |
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/q/74766/3710 | |
import bpy | |
def opengl_lamp_display(column, lamp): | |
split = column.split(percentage=0.1) | |
split.prop(lamp, "use", text="", icon='OUTLINER_OB_LAMP' if lamp.use else 'LAMP_DATA') | |
col = split.column() | |
col.active = lamp.use |
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 | |
class SimpleOperator(bpy.types.Operator): | |
"""Tooltip""" | |
bl_idname = "object.simple_operator" | |
bl_label = "Simple Object Operator" | |
def invoke(self, context, event): | |
ev = [] | |
if event.ctrl: |
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 | |
# current scene | |
scn = bpy.context.scene | |
# path to the blend | |
filepath = "/path/to/file.blend" | |
# name of object to import | |
obj_name = "Cube" |