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 bgl |
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
wm = bpy.context.window_manager | |
kc = wm.keyconfigs.addon | |
# 登録するショートカットキーのリストを作成 | |
# (キーが押されたときに実行する bpy.types.Operator のbl_idname, キー, イベント, Ctrlキー, Altキー, Shiftキー) | |
key_assign_list = [ | |
(ObjectScaleUp.bl_idname, "U", "PRESS", True, True, False), | |
(ObjectScaleDown.bl_idname, "D", "PRESS", True, True, False), | |
] | |
if kc: | |
km = kc.keymaps.new(name="3D View", space_type="VIEW_3D") # 「View3D」のショートカットキーとして登録 |
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
$ cd D:\workspace\blender_dev | |
$ git clone git://git.blender.org/blender.git | |
$ cd blender | |
$ git submodule update --init --recursive | |
$ git submodule foreach git checkout master | |
$ git submodule foreach git pull --rebase origin master | |
$ cd D:\workspace\blender_dev | |
$ svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc12 lib/win64_vc12 |
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 blf |
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
# プログラミング言語の指定 | |
# BlenderのアドオンはPythonで記述するためpythonを指定 | |
language: python | |
# 使用するPythonのバージョン | |
# ★BlenderのPythonコンソールから利用されているPythonのバージョンを特定可能 | |
python: | |
- "3.4" | |
# install前に実行する処理 |
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 | |
import bmesh | |
from mathutils import Vector | |
from math import fabs | |
from collections import defaultdict | |
bpy.ops.mesh.select_all(action='SELECT') | |
bpy.context.scene.tool_settings.uv_select_mode = 'ISLAND' | |
obj = bpy.context.active_object |
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 | |
def rename_uv_as_objgrp(): | |
for o in bpy.data.objects: | |
for uv in o.data.uv_layers: | |
uv.name = o.name + "_" + uv.name | |
if __name__ == "__main__": | |
rename_uv_as_objgrp() |
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
{ | |
"plugins": ["styles-less"], | |
"styles": { | |
"website": "my_website.less", | |
"pdf": "my_pdf.less" | |
} | |
} |
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 MyClassCopy(bpy.types.Operator): | |
bl_idname = "my.own_class_copy" | |
bl_label = "own class copy" | |
def execute(self, context): | |
bpy.ops.uv.muv_cpuv_copy_uv() # CopyUV | |
return {'FINISHED'} |