This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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/questions/69671/how-to-convert-this-vertex-paint-into-a-useable-material-scripted | |
import bpy | |
# context object | |
obj = bpy.context.object | |
# create the material | |
mat = bpy.data.materials.new('MaterialName') | |
mat.diffuse_color = (0.1,0.0,0.7) # viewport color |
This file contains hidden or 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
h=0;m=00;s=0;f=0; | |
f+=timeToFrames(); | |
s+=Math.floor(f*thisComp.frameDuration); | |
m+=Math.floor(s/60); | |
h+=Math.floor(m/60); | |
f=f%(1/thisComp.frameDuration); | |
s=s%60; | |
m=m%60; | |
if(f<10) {f="0"+f} | |
if(s<10) {s="0"+s} |
This file contains hidden or 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 | |
from bpy.props import IntProperty, CollectionProperty, StringProperty, EnumProperty | |
from bpy.types import Panel, UIList, PropertyGroup, Operator | |
from bpy_extras.io_utils import ImportHelper | |
import os | |
class CUSTOM_OT_actionsUIList(Operator): | |
bl_idname = "custom.list_action" | |
bl_label = "List Action" |
This file contains hidden or 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/65143/3710 | |
bl_info = { | |
"name": "Test", | |
"description": "Set Background Image Opacity in 3D View to 1 at Startup", | |
"author": "poor", | |
"version": (0, 0, 1), | |
"blender": (2, 70, 0), | |
"location": "3D View", | |
"warning": "", # used for warning icon and text in addons panel |
This file contains hidden or 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 hidden or 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" |
This file contains hidden or 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 |