Skip to content

Commit

Permalink
Changed the zbias and zoffset properties
Browse files Browse the repository at this point in the history
The now affect the PrimMesh header and not the PrimSubMesh header. This will make them affect the in-game appearance of the model.
  • Loading branch information
dafitius authored and Notexe committed Nov 27, 2022
1 parent 9b21b20 commit a67ab6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions file_prim/bl_export_prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def save_prim(collection, filepath: str):
prim_obj.sub_mesh.prim_object.properties.setColor1()

prim_obj.sub_mesh.prim_object.variant_id = ob.data.prim_properties.variant_id
prim_obj.sub_mesh.prim_object.zbias = ob.data.prim_properties.z_bias
prim_obj.sub_mesh.prim_object.zoffset = ob.data.prim_properties.z_offset
prim_obj.prim_object.zbias = ob.data.prim_properties.z_bias
prim_obj.prim_object.zoffset = ob.data.prim_properties.z_offset
if ob.data.prim_properties.use_mesh_color:
print("Set color to: ", [round(ob.data.prim_properties.mesh_color[0] * 255), round(ob.data.prim_properties.mesh_color[1] * 255), round(ob.data.prim_properties.mesh_color[2] * 255), round(ob.data.prim_properties.mesh_color[3] * 255)])
prim_obj.sub_mesh.prim_object.color1[0] = round(ob.data.prim_properties.mesh_color[0] * 255)
Expand Down
4 changes: 2 additions & 2 deletions file_prim/bl_import_prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def load_prim_mesh(prim, borg, prim_name: str, mesh_index: int):
mesh.prim_properties.no_physics = prim_mesh_obj.properties.hasNoPhysicsProp()

mesh.prim_properties.variant_id = prim_sub_mesh_obj.variant_id
mesh.prim_properties.z_bias = prim_sub_mesh_obj.zbias
mesh.prim_properties.z_offset = prim_sub_mesh_obj.zoffset
mesh.prim_properties.z_bias = prim_mesh_obj.zbias
mesh.prim_properties.z_offset = prim_mesh_obj.zoffset
mesh.prim_properties.use_mesh_color = prim_sub_mesh_obj.properties.useColor1()
mesh.prim_properties.mesh_color = [prim_sub_mesh_obj.color1[0]/255,
prim_sub_mesh_obj.color1[1]/255,
Expand Down

0 comments on commit a67ab6f

Please sign in to comment.