diff --git a/simtrans/template/vrml.wrl b/simtrans/template/vrml.wrl index 38ae246..781d316 100644 --- a/simtrans/template/vrml.wrl +++ b/simtrans/template/vrml.wrl @@ -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" } diff --git a/simtrans/vrml.py b/simtrans/vrml.py index cfdf7e8..23ad5c5 100644 --- a/simtrans/vrml.py +++ b/simtrans/vrml.py @@ -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)