Last active
March 27, 2018 07:14
-
-
Save dskjal/7e89bf47a11db213e7da0e4631c7611a to your computer and use it in GitHub Desktop.
Revisions
-
dskjal revised this gist
Mar 27, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -29,6 +29,6 @@ for b in bpy.context.selected_pose_bones: for c in b.constraints: if c.name == 'Copy Rotation': b.constraints.remove(c) break
-
dskjal revised this gist
Mar 27, 2018 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -26,10 +26,8 @@ bone.constraints.remove(c) #選択されているボーンのみが対象 for b in bpy.context.selected_pose_bones: for c in b.constraints: if c.name == 'Copy Rotation': bone.constraints.remove(c) break -
dskjal revised this gist
Jan 8, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if c.target.name == 'Empty': bone.constraints.remove(c) break #Constraint のターゲットボーン名で削除 if c.subtarget.name == 'Bone.001': bone.constraints.remove(c) break -
dskjal revised this gist
Jan 8, 2017 . 1 changed file with 13 additions and 13 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,36 +1,36 @@ import bpy #アクティブなアーマチュアのすべてが対象 for bone in bpy.context.active_object.pose.bones: for c in bone.constraints: #Constraint の名前で削除 if c.name == 'Limit Location': bone.constraints.remove(c) break #Constraint の型で削除 if c.type == 'COPY_ROTATION': bone.constraints.remove(c) break #Constraint のターゲット名で削除 if c.target.name == 'Empty': bone.constraints.remove(c) break #Constraint のボーン名で削除 if c.subtarget.name == 'Bone.001': bone.constraints.remove(c) break #ボーンについているすべての Transfromation を削除 crs = [c for c in bone.constraints if c.type == 'TRANSFORM'] for c in crs: bone.constraints.remove(c) #選択されているボーンのみが対象 selected_bone_names = [b.name for b in bpy.context.active_object.data.bones if b.select] for name in selected_bone_names: bone = bpy.context.active_object.pose.bones[name] for c in bone.constraints: if c.name == 'Copy Rotation': bone.constraints.remove(c) break
-
dskjal created this gist
Jan 8, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ import bpy #アクティブなアーマチュアのすべてのボーンが対象 for bone in bpy.data.objects[bpy.context.active_object.name].pose.bones: #最初の一つだけを削除する for c in bone.constraints: #名前 if c.name == 'Limit Location': bone.constraints.remove(c) break #モディフィアのタイプ if c.type == 'COPY_ROTATION': bone.constraints.remove(c) break #モディフィアのターゲット if c.target.name == 'Empty': bone.constraints.remove(c) break #ターゲットボーン if c.subtarget.name == 'Bone.001': bone.constraints.remove(c) break #モディフィアについてる Transformation モディフィアをすべて削除 crs = [c for c in bone.constraints if c.type == 'TRANSFORM'] for c in crs: bone.constraints.remove(c) #アクティブなアーマチュアの選択されているボーンのみが対象 selected_bone_names = [b.name for b in bpy.data.objects[bpy.context.active_object.name].data.bones if b.select] for name in selected_bone_names: bone = bpy.data.objects[bpy.context.active_object.name].pose.bones[name] for c in bone.constraints: if c.name == 'Copy Location': bone.constraints.remove(c) break