Skip to content

Commit

Permalink
Merge pull request #168 from Simarilius-uk/main
Browse files Browse the repository at this point in the history
Fix sector import, turn off the stack splitting. reverse spinny bits.
  • Loading branch information
Simarilius-uk authored Jul 27, 2024
2 parents 9b2a63f + b9c8061 commit 200e6dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion i_scene_cp77_gltf/importers/entity_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def importEnt( filepath='', appearances=[], exclude_meshes=[], with_materials=Tr
no_rot=chunk_anim['numberOfFullRotations']
o = create_axes(ent_coll=ent_coll,name=c['name']['$value'])
o.keyframe_insert('rotation_euler', index=axis_no ,frame=1)
o.rotation_euler[axis_no] = o.rotation_euler[axis_no] +math.radians(no_rot*360)
o.rotation_euler[axis_no] = o.rotation_euler[axis_no] +math.radians(no_rot*(-1*reverse)*360)
o.keyframe_insert('rotation_euler', index=axis_no ,frame=duration*24)
if o.animation_data.action:
obj_action = bpy.data.actions.get(o.animation_data.action.name)
Expand Down
4 changes: 2 additions & 2 deletions i_scene_cp77_gltf/importers/sector_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def importSectors( filepath='', want_collisions=False, am_modding=False, with_ma
groupname = groupname[:-1]
if groupname not in Masters.children.keys() and os.path.exists(meshpath):
try:
bpy.ops.io_scene_gltf.cp77(filepath=meshpath, appearances=impapps, update_gi=False, with_materials=with_materials, remap_depot= remap_depot)
bpy.ops.io_scene_gltf.cp77(filepath=meshpath, appearances=impapps)
objs = C.selected_objects
move_coll= coll_scene.children.get( objs[0].users_collection[0].name )
coll_target.children.link(move_coll)
Expand Down Expand Up @@ -857,7 +857,7 @@ def importSectors( filepath='', want_collisions=False, am_modding=False, with_ma
meshname = data['mesh']['DepotPath']['$value'].replace('\\', os.sep)
#meshpath=os.path.join(path, meshname[:-4]+'glb')
meshpath=os.path.join(path, meshname[:-1*len(os.path.splitext(meshname)[1])]+'.glb').replace('\\', os.sep)
#print(os.path.exists(meshpath))
print(os.path.exists(meshpath))
#print('Mesh path is - ',meshpath, e['HandleId'])
if(meshname != 0):
#print('Mesh - ',meshname, ' - ',i, e['HandleId'])
Expand Down
2 changes: 1 addition & 1 deletion i_scene_cp77_gltf/material_types/multilayered.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def createLayerMaterial(self,LayerName,LayerCount,CurMat,mlmaskpath,normalimgpat


# If theres more than 10 layers, mix them in 2 stacks then mix the stacks, trying to avoid SVM errors
if LayerCount>11:
if False:
MixLayerStacks = create_node(CurMat.nodes,"ShaderNodeGroup", (-1000,-180))
MixLayerStacks.node_tree = NG
MixLayerStacks.name = "MixLayerStacks"
Expand Down

0 comments on commit 200e6dd

Please sign in to comment.