Skip to content

Instantly share code, notes, and snippets.

@iCyP
Last active August 29, 2015 13:55
Show Gist options
  • Save iCyP/8788174 to your computer and use it in GitHub Desktop.
Save iCyP/8788174 to your computer and use it in GitHub Desktop.
いんすとーる:
1.←のDownload gistをクリック
2.解凍して出来たフォルダの内のよくわからない文字列のフォルダの中にある"ShapeKey_ShortCut.py"を見つけておく
3.blenderを起動して、blenderの設定を開いて、addonsー>install from Fileをクリック。
4.先の2.で見つけたフォルダにいって、ShapeKey_ShortCut.pyをダブルクリック
5.Shape Key Short Cut を有効化すればもう動くはず。
2で解凍出来ない場合は、このページ内のShapeKey_ShortCut.pyをコピペして保存して以下同じようにやれば良いです?・ワ・)
つかいかた:
ObjectModeでArmature(ボーン)を選択して、poseMode(ctrl+tab)にします。
propertiesを開き(N) TargetにshapeKeyを弄りたいオブジェクトを入力します。
showNumで一度に表示するShapeKeyの数を設定し、pageの値で移動します。
filterText:入力された名前を含むShapeKeyのみを表示します。
      シェイプキーの名前に"表情"とか"口"とか入れておくと捗るかも。
Target右の矢印:Targetのオブジェクトの選択可/不可のトグルボタン。
        ボーンを選択しようとしてメッシュをが選択されてイライラ・・・なんてことが減るかも。
The MIT License (MIT)
Copyright (c) 2014 iCy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
#licence : MIT
#Copyright (c) 2014 iCy
# -*- coding: utf-8 -*-
bl_info = {
"name": "Shape Key Short Cut",
"author": "iCy",
"version": (0, 5),
"blender": (2, 69, 0),
"location": "View3D > PoseMode > Propaties > ShapeKey Short Cut",
"description": "short cut for shapeKey",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "3D View"}
import bpy,math
class shapeKeyShortcut_property(bpy.types.PropertyGroup):
targetObjectName = bpy.props.StringProperty()
class ShapeKey_ShortCut_UIPanel(bpy.types.Panel):
bl_label = "ShapeKey Short Cut"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
@classmethod
def poll(cls,context):
return (context.mode=="POSE")
def draw(self, context):
column=self.layout.column()
active_armature_prop = context.active_object.data.shapeKeyShortcut_property
row=column.row()
row.prop_search( data=active_armature_prop, property = 'targetObjectName',
search_data = bpy.data, search_property = "objects", text = "Target")
targetObjectName = active_armature_prop.targetObjectName
objs = bpy.data.objects
if targetObjectName in objs and objs[targetObjectName].type == 'MESH':
row.prop(data = objs[targetObjectName], property = "hide_select", text = "")
meshName = objs[targetObjectName].data.name
if bpy.data.meshes[meshName].shape_keys:
column.template_list(
listtype_name = "MESH_UL_shape_keys", dataptr = bpy.data.meshes[meshName].shape_keys, propname = "key_blocks",
active_dataptr = objs[targetObjectName], active_propname = "active_shape_key_index", rows = 4
)
column.prop(data=objs[targetObjectName].active_shape_key, property="value", text = objs[targetObjectName].active_shape_key.name)
else:
column.label("This mesh doesn't have a shape key")
else:
column.label("This object doesn't have a MESH",icon = 'ERROR')
def register():
bpy.utils.register_class(shapeKeyShortcut_property)
bpy.types.Armature.shapeKeyShortcut_property = bpy.props.PointerProperty(type = shapeKeyShortcut_property)
bpy.utils.register_class(ShapeKey_ShortCut_UIPanel)
def unregister():
bpy.utils.unregister_class(ShapeKey_ShortCut_UIPanel)
bpy.utils.unregister_class(shapeKeyShortcut_property)
if __name__ == "__main__":
register()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment