Skip to content

Commit

Permalink
Merge pull request #39 from yosuke/master
Browse files Browse the repository at this point in the history
remove special handling of empy vrml link (ref #38)
  • Loading branch information
fkanehiro committed Sep 11, 2015
2 parents 735c1db + d3a1da8 commit c0065b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions simtrans/template/vrml.wrl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ Transform {
DEF {{model.name}} Humanoid {
humanoidBody [
{%- for l in model.children recursive %}
{%- if l.link and (l.link.visuals|length or l.link.collisions|length or l.children|length) %}
DEF {{l.joint.name}} Joint {
jointType "{{l.jointtype}}"
{%- if l.joint.axis.axis %}
Expand All @@ -210,6 +209,7 @@ DEF {{model.name}} Humanoid {
lvlimit {{l.joint.axis.velocitylimit[1]}}
{%- endif %}
children [
{%- if l.link %}
DEF {{l.link.name}} Segment {
mass {{l.link.mass}}
centerOfMass {{l.link.centerofmass[0]}} {{l.link.centerofmass[1]}} {{l.link.centerofmass[2]}}
Expand Down Expand Up @@ -239,10 +239,10 @@ DEF {{model.name}} Humanoid {
{%- endif %}
]
}
{%- endif %}
{{ loop(l.children)|indent(4, True) }}
]
}
{%- endif %}
{%- endfor %}
]
joints [
Expand Down
3 changes: 1 addition & 2 deletions simtrans/vrml.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,7 @@ def convertchildren(self, mdata, pjoint, joints, links):
nmodel['link'] = clink2
nmodel['children'] = cchildren
children.append(nmodel)
if clink and (clink.visuals or clink.collisions or len(cchildren) > 0):
joints.append(cjoint.name)
joints.append(cjoint.name)
links.append(cjoint.child)
return (children, joints, links)

Expand Down

0 comments on commit c0065b1

Please sign in to comment.