mirror of
https://github.com/MapMakersAndProgrammers/io_scene_a3d.git
synced 2025-10-26 01:49:13 -07:00
Correct material importing, legacy maps actually have correct materials now
This commit is contained in:
@@ -75,10 +75,10 @@ class Prop:
|
|||||||
# Create a plane we can use for the sprite
|
# Create a plane we can use for the sprite
|
||||||
me = bpy.data.meshes.new(propInfo["name"])
|
me = bpy.data.meshes.new(propInfo["name"])
|
||||||
|
|
||||||
bm = bmesh.new()
|
# bm = bmesh.new()
|
||||||
bmesh.ops.create_grid(bm, x_segments=1, y_segments=1, size=spriteInfo["scale"]*100)
|
# bmesh.ops.create_grid(bm, x_segments=1, y_segments=1, size=spriteInfo["scale"]*100)
|
||||||
bm.to_mesh(me)
|
# bm.to_mesh(me)
|
||||||
bm.free()
|
# bm.free()
|
||||||
|
|
||||||
ob = bpy.data.objects.new(me.name, me)
|
ob = bpy.data.objects.new(me.name, me)
|
||||||
|
|
||||||
@@ -290,7 +290,9 @@ class BattleMapBlenderImporter:
|
|||||||
# Material
|
# Material
|
||||||
ma = self.materials[propData.materialID]
|
ma = self.materials[propData.materialID]
|
||||||
if len(propOB.data.materials) != 0:
|
if len(propOB.data.materials) != 0:
|
||||||
propOB.data.materials[0] = ma
|
if propOB.data.materials[0] != ma:
|
||||||
|
propOB.data = propOB.data.copy()
|
||||||
|
propOB.data.materials[0] = ma
|
||||||
|
|
||||||
return propOB
|
return propOB
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user