forked from LeenkxTeam/LNXSDK
Merge pull request 'main' (#75) from Onek8/LNXSDK:main into main
Reviewed-on: LeenkxTeam/LNXSDK#75
This commit is contained in:
@ -2988,7 +2988,10 @@ class LeenkxExporter:
|
||||
# mesh = obj.data
|
||||
# for face in mesh.faces:
|
||||
# face.v.reverse()
|
||||
# bpy.ops.export_scene.obj(override, use_selection=True, filepath=nav_filepath, check_existing=False, use_normals=False, use_uvs=False, use_materials=False)
|
||||
# if bpy.app.version[0] >= 4:
|
||||
# bpy.ops.wm.obj_import(override, use_selection=True, filepath=nav_filepath, check_existing=False, use_normals=False, use_uvs=False, use_materials=False)
|
||||
# else:
|
||||
# bpy.ops.export_scene.obj(override, use_selection=True, filepath=nav_filepath, check_existing=False, use_normals=False, use_uvs=False, use_materials=False)
|
||||
# bobject.scale.y *= -1
|
||||
armature = bobject.find_armature()
|
||||
apply_modifiers = not armature
|
||||
|
@ -707,9 +707,9 @@ def make_forward_base(con_mesh, parse_opacity=False, transluc_pass=False):
|
||||
frag.add_uniform('vec3 sunDir', '_sunDirection')
|
||||
frag.write('vec3 svisibility = vec3(1.0);')
|
||||
frag.write('vec3 sh = normalize(vVec + sunDir);')
|
||||
frag.write('float sdotNL = dot(n, sunDir);')
|
||||
frag.write('float sdotNH = dot(n, sh);')
|
||||
frag.write('float sdotVH = dot(vVec, sh);')
|
||||
frag.write('float sdotNL = max(dot(n, sunDir), 0);')
|
||||
frag.write('float sdotNH = max(dot(n, sh), 0);')
|
||||
frag.write('float sdotVH = max(dot(vVec, sh), 0);')
|
||||
if is_shadows:
|
||||
frag.add_uniform('bool receiveShadow')
|
||||
frag.add_uniform(f'sampler2DShadow {shadowmap_sun}', top=True)
|
||||
|
@ -516,7 +516,10 @@ class LeenkxGenerateNavmeshButton(bpy.types.Operator):
|
||||
proc = subprocess.Popen(args, cwd=nav_full_path)
|
||||
proc.wait()
|
||||
|
||||
navmesh = bpy.ops.import_scene.obj(filepath=mesh_path)
|
||||
if bpy.app.version[0] >= 4:
|
||||
navmesh = bpy.ops.wm.obj_import(filepath=mesh_path)
|
||||
else:
|
||||
navmesh = bpy.ops.import_scene.obj(filepath=mesh_path)
|
||||
navmesh = bpy.context.selected_objects[0]
|
||||
|
||||
# NavMesh preview settings, cleanup
|
||||
|
Reference in New Issue
Block a user