Add support for multiple textures in one material (mjModel).
PiperOrigin-RevId: 648732764 Change-Id: I29b60dd62a069789a32017ff0d55e36b57e0052b
This commit is contained in:
committed by
Copybara-Service
parent
3b73dfe33b
commit
df7ea3ed33
@@ -168,7 +168,7 @@
|
||||
X( float, light_, specular, nlight, 3 )
|
||||
|
||||
#define MJMODEL_MATERIAL \
|
||||
X( int, mat_, texid, nmat, 1 ) \
|
||||
X( int, mat_, texid, nmat, mjNTEXMAT ) \
|
||||
X( mjtByte, mat_, texuniform, nmat, 1 ) \
|
||||
X( float, mat_, texrepeat, nmat, 2 ) \
|
||||
X( float, mat_, emission, nmat, 1 ) \
|
||||
|
||||
@@ -233,7 +233,7 @@ class USDExporter:
|
||||
assert geom_name not in self.geom_name2usd
|
||||
|
||||
texture_file = (
|
||||
self.texture_files[self.model.mat_texid[geom.matid]]
|
||||
self.texture_files[self.model.mat_texid[mujoco.mjNTEXMAT*geom.matid]]
|
||||
if geom.matid != -1
|
||||
else None
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user