You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that attempting to export scenes which contains objects that have hide_viewport == True yields some strange looking artifacts when re-imported
(see screenshots below).
I'm currently working around this by having a small export script that
essentially does this:
for obj in bpy.data.objects:
if obj.hide_viewport:
obj.hide_viewport = False
bpy.ops.export_scene.gltf(filepath=f'{output}.gltf',
export_cameras=True,
export_lights=True,
export_format='GLTF_SEPARATE')
This works, but for large scenes (e.g., San Miguel from issue #2101) this can take
a full day to complete.
To Reproduce
Steps to reproduce the behavior:
Open included "arcsphere-50.blend" file.
Export the scene to glb or glTF.
Open a new instance of Blender
Import the previously exported scene.
Expected behavior
The exported scene should match the "arsphere_expected.glb" file.
(i.e., all objects, including the ones marked with hide_viewport = True,
should be included, and at their correct position).
Screenshots
Scene with the artifact, presumably from the "hidden" instances:
Scene exported with no objects with hide_viewport == True.
.blend file/ .gltf (mandatory)
The zipped file includes a .blend file with half of all objects/instances "hidden" with hide_viewport = True,
as well as a zip with the expected export result and the received result. arcsphere-50.zip
Version
OS: Linux
Blender Versions 3.6, 4.0
The text was updated successfully, but these errors were encountered:
Ah yes sorry, I should really have done that from the beginning. Here's a much simpler .blend + .glb file that still exhibits this issue: instances.zip
Hello,
Problem comes from object that are hidden in viewport have not the real world matrix stored. Because they are hidden in viewport, matrix is not set.
I will push a PR in a few minutes, where I do the following: For these objects, I un-hide them, update the depsgraph, get the matrix, and hide again. Not sure about impact on performance, but this is the only way to get the right matrices
Describe the bug
Hello!
I've noticed that attempting to export scenes which contains objects that have
hide_viewport == True
yields some strange looking artifacts when re-imported(see screenshots below).
I'm currently working around this by having a small export script that
essentially does this:
This works, but for large scenes (e.g., San Miguel from issue #2101) this can take
a full day to complete.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The exported scene should match the "arsphere_expected.glb" file.
(i.e., all objects, including the ones marked with
hide_viewport = True
,should be included, and at their correct position).
Screenshots
Scene with the artifact, presumably from the "hidden" instances:
Scene exported with no objects with
hide_viewport == True
..blend file/ .gltf (mandatory)
The zipped file includes a .blend file with half of all objects/instances "hidden" with
hide_viewport = True
,as well as a zip with the expected export result and the received result.
arcsphere-50.zip
Version
The text was updated successfully, but these errors were encountered: