Skip to content

Commit

Permalink
.geo and .mtl
Browse files Browse the repository at this point in the history
  • Loading branch information
sharktacos committed Oct 17, 2023
1 parent 9058158 commit 0c89f34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Maya/scripts/df_USD_geoExport.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- Reference geometry (.usdc) into payload file (.usda) which is payloaded into Asset file
- Custom metadata with originating Maya file “exported_from”
- variant switch to display high res mesh in viewport
- switch to "_geo" naming convention for mesh file in crate binary.
- switch to ".geo" naming convention for mesh file in crate binary.
v4 Add variant switch to display high res mesh in viewport.
(c) Derek Flood, 2023
Expand Down Expand Up @@ -70,7 +70,7 @@ def add_ext_reference(prim: Usd.Prim, ref_asset_path: str, ref_target_path: Sdf.
def geom_stage(fileName, root_asset, render_value, proxy_value):

stripExtension = os.path.splitext(fileName)[0]
geom_name = stripExtension + '_geo'
geom_name = stripExtension + '.geo'

# Export the geo file
mc.file(geom_name, options=";exportDisplayColor=1;exportColorSets=0;mergeTransformAndShape=1;exportComponentTags=0;defaultUSDFormat=usdc;jobContext=[Arnold];materialsScopeName=mtl", typ="USD Export", pr=True, ch=True, chn=True, exportSelected=True, f=True)
Expand Down Expand Up @@ -141,7 +141,7 @@ def asset_stage(fileName, render_value, proxy_value, root_asset):
asset_name = os.path.splitext(asset_baseName)[0]

payName = stripExtension + '_payload.usda'
#payName = stripExtension + '_geo.usd'
#payName = stripExtension + '.geo.usd'
payfile_root = "./" + os.path.basename(payName)

# Create USD "asset" stage, then create and define default prim
Expand Down
4 changes: 2 additions & 2 deletions Maya/scripts/df_USD_mtlExport.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#--------------------------------------------------------------------------------
'''
Export Material to USD - materials and bindings sans geometry
v4 - add "_mtl" tag to file name
v4 - add ".mtl" tag to file name
call with:
import df_USD_mtlExport
Expand Down Expand Up @@ -129,7 +129,7 @@ def main():

USDlayer = filepath[0]
stripExtension = os.path.splitext(USDlayer)[0]
mtl_file = stripExtension + '_mtl.usda'
mtl_file = stripExtension + '.mtl.usda'
dag_root = sel[0].replace("|", "")
root_asset = "/" + dag_root

Expand Down

0 comments on commit 0c89f34

Please sign in to comment.