﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3APy%2FScripts%2FCookbook%2FRigging%2FAdd_armature</id>
	<title>Dev:Py/Scripts/Cookbook/Rigging/Add armature - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3APy%2FScripts%2FCookbook%2FRigging%2FAdd_armature"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Py/Scripts/Cookbook/Rigging/Add_armature&amp;action=history"/>
	<updated>2026-07-04T06:34:17Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:Py/Scripts/Cookbook/Rigging/Add_armature&amp;diff=100607&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Py/Scripts/Cookbook/Rigging/Add_armature&amp;diff=100607&amp;oldid=prev"/>
		<updated>2018-06-28T19:39:36Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 19:39時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:Py/Scripts/Cookbook/Rigging/Add_armature&amp;diff=100606&amp;oldid=prev</id>
		<title>wiki&gt;Brecht: moved Dev:2.5/Py/Scripts/Cookbook/Rigging/Add armature to Dev:Py/Scripts/Cookbook/Rigging/Add armature: remove version namespace</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Py/Scripts/Cookbook/Rigging/Add_armature&amp;diff=100606&amp;oldid=prev"/>
		<updated>2015-12-27T19:24:35Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/Dev:2.5/Py/Scripts/Cookbook/Rigging/Add_armature&quot; class=&quot;mw-redirect&quot; title=&quot;Dev:2.5/Py/Scripts/Cookbook/Rigging/Add armature&quot;&gt;Dev:2.5/Py/Scripts/Cookbook/Rigging/Add armature&lt;/a&gt; to &lt;a href=&quot;/Dev:Py/Scripts/Cookbook/Rigging/Add_armature&quot; title=&quot;Dev:Py/Scripts/Cookbook/Rigging/Add armature&quot;&gt;Dev:Py/Scripts/Cookbook/Rigging/Add armature&lt;/a&gt;: remove version namespace&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Add Armature ===&lt;br /&gt;
&lt;br /&gt;
==== Script ====&lt;br /&gt;
&lt;br /&gt;
Run this from the Text editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot; &amp;gt;&lt;br /&gt;
import bpy&lt;br /&gt;
from math import pi&lt;br /&gt;
&lt;br /&gt;
bpy.ops.object.armature_add()&lt;br /&gt;
ob = bpy.context.scene.objects.active&lt;br /&gt;
#ob.name =&amp;quot;give me a good name!&amp;quot;&lt;br /&gt;
arm = ob.data&lt;br /&gt;
&lt;br /&gt;
bpy.ops.object.mode_set(mode='EDIT')&lt;br /&gt;
for i in range(3):&lt;br /&gt;
    bpy.ops.armature.extrude()&lt;br /&gt;
    bpy.ops.transform.translate(value=(0.0, 0.0, 1.0))&lt;br /&gt;
&lt;br /&gt;
for i in range(len(arm.edit_bones)):&lt;br /&gt;
    eb = arm.edit_bones[i]&lt;br /&gt;
   # eb.connected = True&lt;br /&gt;
    eb.roll = i*(20/180*pi)&lt;br /&gt;
    eb.tail[0] = eb.head[0] + 0.2*(i+1)&lt;br /&gt;
bpy.ops.object.mode_set(mode='OBJECT')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Explanation ====&lt;br /&gt;
&lt;br /&gt;
to be written&lt;br /&gt;
&lt;br /&gt;
The important steps:&lt;br /&gt;
&lt;br /&gt;
# Access to Blender data you need always: '''import bpy'''&lt;br /&gt;
# because of rotating the bones later pi = 3.14.... is needed and imported from math&lt;br /&gt;
# creation of of a new armature (look what bpy.ops.object can do too!)&lt;br /&gt;
# standard way of getting a variable pointing to a just created object &lt;br /&gt;
# remove the # before ob.name and replace the string by what you would like!&lt;br /&gt;
# to access the bones you need a link to the new created objects data&lt;br /&gt;
# extrusion needs edit-mode so set it!&lt;br /&gt;
# create by extrusion 3 more bones! bone length is adjusted too&lt;br /&gt;
# now do something with the all 4 bones! Removing the # before ''' # eb.connected = True''' gives an error in the SVN of 3 oct 2011 (TODO?? remove)&lt;br /&gt;
# but maybe you could give the bones already nicer names? e.g.: '''    eb.name = &amp;quot;test_&amp;quot; + str(i)'''&lt;br /&gt;
# finish by going back to object-mode&lt;/div&gt;</summary>
		<author><name>wiki&gt;Brecht</name></author>
		
	</entry>
</feed>