Skip to content

Commit

Permalink
Fixed duplicate material override display lists. Fixed LowPolySkinned…
Browse files Browse the repository at this point in the history
…Mario.blend.
  • Loading branch information
kurethedead committed Dec 14, 2019
1 parent 4e22608 commit 500492b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
Binary file modified LowPolySkinnedMario.blend
Binary file not shown.
14 changes: 2 additions & 12 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,7 @@ def execute(self, context):
bpy.context.scene.geoSeparateTextureDef,
levelCamera)
self.report({'INFO'}, 'Success! Geolayout at ' + \
context.scene.geoExportPath + ', DL at ' + \
context.scene.geoExportPathDL)
context.scene.geoExportPath)
elif context.scene.geoExportType == 'Insertable Binary':
exportGeolayoutObjectInsertableBinary(obj,
finalTransform, context.scene.f3d_type,
Expand Down Expand Up @@ -526,8 +525,7 @@ def execute(self, context):
bpy.context.scene.geoSeparateTextureDef,
levelCamera)
self.report({'INFO'}, 'Success! Geolayout at ' + \
context.scene.geoExportPath + ', DL at ' + \
context.scene.geoExportPathDL)
context.scene.geoExportPath)
elif context.scene.geoExportType == 'Insertable Binary':
exportGeolayoutArmatureInsertableBinary(armatureObj, obj,
finalTransform, context.scene.f3d_type,
Expand Down Expand Up @@ -648,8 +646,6 @@ def draw(self, context):
if context.scene.geoSaveTextures:
col.prop(context.scene, 'geoTexDir')
col.prop(context.scene, 'geoSeparateTextureDef')
#col.prop(context.scene, 'geoExportPathDL')
#col.prop(context.scene, 'geoDefinePath')
elif context.scene.geoExportType == 'Insertable Binary':
col.prop(context.scene, 'geoInsertableBinaryPath')
else:
Expand Down Expand Up @@ -1616,10 +1612,6 @@ def register():
items = enumExportType, name = 'Export', default = 'Binary')
bpy.types.Scene.geoExportPath = bpy.props.StringProperty(
name = 'Directory', subtype = 'FILE_PATH')
bpy.types.Scene.geoExportPathDL = bpy.props.StringProperty(
name = 'DL Filepath', subtype = 'FILE_PATH')
bpy.types.Scene.geoDefinePath = bpy.props.StringProperty(
name = 'Definitions Filepath', subtype = 'FILE_PATH')
bpy.types.Scene.geoUseBank0 = bpy.props.BoolProperty(name = 'Use Bank 0')
bpy.types.Scene.geoRAMAddr = bpy.props.StringProperty(name = 'RAM Address',
default = '80000000')
Expand Down Expand Up @@ -1741,8 +1733,6 @@ def unregister():
del bpy.types.Scene.textDumpGeoPath
del bpy.types.Scene.geoExportType
del bpy.types.Scene.geoExportPath
del bpy.types.Scene.geoExportPathDL
del bpy.types.Scene.geoDefinePath
del bpy.types.Scene.geoUseBank0
del bpy.types.Scene.geoRAMAddr
del bpy.types.Scene.geoTexDir
Expand Down
7 changes: 6 additions & 1 deletion fast64_internal/sm64_geolayout_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,8 +1207,13 @@ def saveModelGivenVertexGroup(fModel, obj, vertexGroup,
def saveOverrideDraw(obj, fModel, material, specificMat, overrideType, fMesh):
fOverrideMat, texDimensions = \
saveOrGetF3DMaterial(material, fModel, obj)
overrideIndex = str(len(fMesh.drawMatOverrides))
if (material, specificMat, overrideType) in fMesh.drawMatOverrides:
overrideIndex = fMesh.drawMatOverrides[(material, specificMat, overrideType)].name[-1]
meshMatOverride = GfxList(
fMesh.name + '_mat_override_' + toAlnum(material.name))
fMesh.name + '_mat_override_' + toAlnum(material.name) + \
'_' + overrideIndex)
print(fMesh.drawMatOverrides)
#print('fdddddddddddddddd ' + str(fMesh.name) + " " + str(material) + " " + str(specificMat) + " " + str(overrideType))
fMesh.drawMatOverrides[(material, specificMat, overrideType)] = meshMatOverride
removeReverts = []
Expand Down

0 comments on commit 500492b

Please sign in to comment.