Skip to content

Commit

Permalink
improve presiceness of use joints and disable use segments seems not …
Browse files Browse the repository at this point in the history
…required
  • Loading branch information
yosuke committed Aug 28, 2015
1 parent 72d1112 commit 2c42cfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions simtrans/template/vrml.wrl
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,13 @@ DEF {{model.name}} Humanoid {
USE {{j}}{%- if loop.last == False %},{%- endif %}
{%- endfor %}
]
{#
segments [
{%- for l in links %}
USE {{l}}{%- if loop.last == False %},{%- endif %}
{%- endfor %}
]
#}
name "{{model.name}}"
version "1.0"
}
3 changes: 2 additions & 1 deletion simtrans/vrml.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ def convertchildren(self, mdata, pjoint, joints, links):
nmodel['link'] = clink2
nmodel['children'] = cchildren
children.append(nmodel)
joints.append(cjoint.name)
if clink and (clink.visuals or clink.collisions or len(cchildren) > 0):
joints.append(cjoint.name)
links.append(cjoint.child)
return (children, joints, links)

Expand Down

0 comments on commit 2c42cfa

Please sign in to comment.