OSDN Git Service
(root)
/
meshio
/
pymeshio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implement vertex attributes
[meshio/pymeshio.git]
/
blender26-meshio
/
bl.py
diff --git
a/blender26-meshio/bl.py
b/blender26-meshio/bl.py
old mode 100755
(executable)
new mode 100644
(file)
index
c7353ec
..
c668fa0
--- a/
blender26-meshio/bl.py
+++ b/
blender26-meshio/bl.py
@@
-242,6
+242,8
@@
class object:
@staticmethod
def assignVertexGroup(o, name, index, weight):
@staticmethod
def assignVertexGroup(o, name, index, weight):
+ if name not in o.vertex_groups:
+ o.vertex_groups.new(name)
o.vertex_groups[name].add([index], weight, 'ADD')
@staticmethod
o.vertex_groups[name].add([index], weight, 'ADD')
@staticmethod
@@
-255,6
+257,7
@@
class object:
g=pose.bone_groups.active
g.name=name
g.color_set=color_set
g=pose.bone_groups.active
g.name=name
g.color_set=color_set
+ return g
@staticmethod
def boneGroups(o):
@staticmethod
def boneGroups(o):
@@
-595,15
+598,17
@@
class armature:
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
@staticmethod
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
@staticmethod
- def createIkConstraint(armature_object, p_bone, effector_name, ik):
+ def createIkConstraint(armature_object, p_bone, effector_name,
+ chain, weight, iterations):
constraint = p_bone.constraints.new('IK')
constraint = p_bone.constraints.new('IK')
- constraint.chain_count=len(
ik.childre
n)
+ constraint.chain_count=len(
chai
n)
constraint.target=armature_object
constraint.subtarget=effector_name
constraint.use_tail=False
constraint.target=armature_object
constraint.subtarget=effector_name
constraint.use_tail=False
+ # ToDo
# not used. place folder when export.
# not used. place folder when export.
-
constraint.weight=ik.
weight
-
constraint.iterations=ik.
iterations * 10
+
#constraint.weight=
weight
+
#constraint.iterations=
iterations * 10
return constraint
@staticmethod
return constraint
@staticmethod