forked from LeenkxTeam/LNXSDK
merge upstream
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -151,7 +151,7 @@ class LeenkxExporter:
|
||||
self.default_part_material_objects = []
|
||||
self.material_to_lnx_object_dict = {}
|
||||
# Stores the link between a blender object and its
|
||||
# corresponding export data (arm object)
|
||||
# corresponding export data (lnx object)
|
||||
self.object_to_lnx_object_dict: Dict[bpy.types.Object, Dict] = {}
|
||||
|
||||
self.bone_tracks = []
|
||||
@ -540,9 +540,15 @@ class LeenkxExporter:
|
||||
o['material_refs'].append(lnx.utils.asset_name(material))
|
||||
|
||||
def export_particle_system_ref(self, psys: bpy.types.ParticleSystem, out_object):
|
||||
if psys.settings.instance_object is None or psys.settings.render_type != 'OBJECT' or not psys.settings.instance_object.lnx_export or not bpy.data.objects[out_object['name']].modifiers[psys.name].show_render:
|
||||
if psys.settings.instance_object is None or psys.settings.render_type != 'OBJECT' or not psys.settings.instance_object.lnx_export:
|
||||
return
|
||||
|
||||
for mod in bpy.data.objects[out_object['name']].modifiers:
|
||||
if mod.type == 'PARTICLE_SYSTEM':
|
||||
if mod.particle_system.name == psys.name:
|
||||
if not mod.show_render:
|
||||
return
|
||||
|
||||
self.particle_system_array[psys.settings] = {"structName": psys.settings.name}
|
||||
pref = {
|
||||
'name': psys.name,
|
||||
@ -917,8 +923,12 @@ class LeenkxExporter:
|
||||
out_object['particle_refs'] = []
|
||||
out_object['render_emitter'] = bobject.show_instancer_for_render
|
||||
for i in range(num_psys):
|
||||
if bobject.modifiers[bobject.particle_systems[i].name].show_render:
|
||||
self.export_particle_system_ref(bobject.particle_systems[i], out_object)
|
||||
for obj in bpy.data.objects:
|
||||
for mod in obj.modifiers:
|
||||
if mod.type == 'PARTICLE_SYSTEM':
|
||||
if mod.particle_system.name == bobject.particle_systems[i].name:
|
||||
if mod.show_render:
|
||||
self.export_particle_system_ref(bobject.particle_systems[i], out_object)
|
||||
|
||||
aabb = bobject.data.lnx_aabb
|
||||
if aabb[0] == 0 and aabb[1] == 0 and aabb[2] == 0:
|
||||
@ -2289,12 +2299,12 @@ class LeenkxExporter:
|
||||
self.output['particle_datas'] = []
|
||||
for particleRef in self.particle_system_array.items():
|
||||
padd = False;
|
||||
for obj in self.output['objects']:
|
||||
if 'particle_refs' in obj:
|
||||
for pref in obj['particle_refs']:
|
||||
if pref['particle'] == particleRef[1]["structName"]:
|
||||
if bpy.data.objects[obj['name']].modifiers[pref['name']].show_render == True:
|
||||
padd = True;
|
||||
for obj in bpy.data.objects:
|
||||
for mod in obj.modifiers:
|
||||
if mod.type == 'PARTICLE_SYSTEM':
|
||||
if mod.particle_system.settings.name == particleRef[1]["structName"]:
|
||||
if mod.show_render:
|
||||
padd = True
|
||||
if not padd:
|
||||
continue;
|
||||
psettings = particleRef[0]
|
||||
@ -2988,7 +2998,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_export(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
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user