Page Menu
Home
Search
Configure Global Search
Log In
Files
F2449
testik.py
Public
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Kenney Phillis Jr. (dandel1984)
Nov 13 2013, 1:04 PM
Size
1 KB
Subscribers
None
testik.py
View Options
#!BPY
import
Blender
import
sys
,
os
,
os.path
,
struct
,
math
from
Blender
import
Types
,
Object
,
Mathutils
from
Blender.Mathutils
import
*
def
BoneDataOut
():
for
obj
in
Blender
.
Object
.
GetSelected
():
Armat
=
obj
.
getData
()
print
"Object type:"
,
type
(
Armat
)
print
"armature type is:"
,
Blender
.
Types
.
ArmatureType
if
type
(
Armat
)
is
Blender
.
Types
.
ArmatureType
:
print
"armature name:"
,
Armat
.
name
for
bo
in
Armat
.
getBones
():
print
'Bone Name'
,
bo
.
name
print
'head b4 change'
,
bo
.
head
if
(
bo
.
parent
!=
None
):
if
bo
.
ik
==
1
:
print
"
\t
test1 has IK"
bo
.
setIK
(
0
)
# removes IK.
else
:
print
"
\t
test1 lacks IK"
bo
.
setIK
(
1
)
# sets IK.
else
:
print
"
\t
bone has no parent."
print
"Testing output....
\n\n\n
"
BoneDataOut
()
Blender
.
Window
.
RedrawAll
()
for
obj
in
Blender
.
Object
.
GetSelected
():
Armat
=
obj
.
getData
()
if
type
(
Armat
)
is
Blender
.
Types
.
ArmatureType
:
for
bo
in
Armat
.
bones
:
print
'Bone Name'
,
bo
.
name
print
'head b4 change'
,
bo
.
head
if
(
bo
.
parent
!=
None
):
if
bo
.
ik
==
1
:
print
"
\t
Test 2 has ik"
else
:
print
"
\t
Test 2 lacks ik"
File Metadata
Details
Mime Type
text/x-python
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
22/0d/a7cfad43d064df2ba29c392aee64
Event Timeline
Log In to Comment