some XSLT bugfixes
parent
98ea89edfe
commit
fd02fb9924
|
@ -43,13 +43,21 @@
|
||||||
</lookAt>
|
</lookAt>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- The vertical component of OBJ texture coordinates is now
|
<xsl:template match="shape">
|
||||||
flipped, which seems to be the standard behavior. Undo
|
|
||||||
this change for consistency in old scenes. -->
|
|
||||||
<xsl:template match="shape[@type='obj']">
|
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="@*|node()"/>
|
<xsl:apply-templates select="@*|node()"/>
|
||||||
<boolean name="flipTexCoords" value="false"/>
|
|
||||||
|
<!-- The vertical component of OBJ texture coordinates is now
|
||||||
|
flipped, which seems to be the standard behavior. Undo
|
||||||
|
this change for consistency in old scenes. -->
|
||||||
|
<xsl:if test="@type='obj'">
|
||||||
|
<boolean name="flipTexCoords" value="false"/>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<!-- Apply a diffuse material to shapes that don't have any media or BSDFs -->
|
||||||
|
<xsl:if test="not(bsdf) and not(ref) and not(medium) and not(subsurface)">
|
||||||
|
<bsdf type="diffuse"/>
|
||||||
|
</xsl:if>
|
||||||
</xsl:copy>
|
</xsl:copy>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
@ -150,14 +158,6 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Apply a diffuse material to shapes that don't have any media or BSDFs -->
|
|
||||||
<xsl:template match="shape[not(bsdf) and not(ref) and not(medium)]">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates select="@*|node()"/>
|
|
||||||
<bsdf type="diffuse"/>
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- Update the parameters of the sphere plugin -->
|
<!-- Update the parameters of the sphere plugin -->
|
||||||
<xsl:template match="shape[@type='sphere']/boolean[@name='inverted']/@name">
|
<xsl:template match="shape[@type='sphere']/boolean[@name='inverted']/@name">
|
||||||
<xsl:attribute name="name">flipNormals</xsl:attribute>
|
<xsl:attribute name="name">flipNormals</xsl:attribute>
|
||||||
|
|
Loading…
Reference in New Issue