Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings/Include/Limit To/Active Scene is ignored by Multi-Export but not by glTF 2.0 Exporter alone #253

Closed
PhysicsTeacher1 opened this issue Jul 9, 2023 · 6 comments · Fixed by #254
Labels
bug Something isn't working

Comments

@PhysicsTeacher1
Copy link

Current Behavior

Limit To Active Scene setting in Settings is ignored. All scenes' objects are exported regardless of setting.

Expected Behavior

Limit To Active Scene will ignore all content in other scenes.

Steps To Reproduce

Create 3 scenes: "Assembly", "Cube Makeup" and "Cylinder Makeup" for example
In Cube Makeup create three cubes of different sizes and put them into a collection Cubes_LOD0
In Cylinder Makeup create three cylinders of different sizes and put them into a collection Cylinders_LOD0
Copy CubeLarge and CubeSmall from Cube Makeup to Assembly.
Copy CylinderRegular from Cylinder Makeup to Assembly.
In Assembly, arrange cubes in any way desired.

Exporting with Multi-Export glTF 2.0 (1.3.1 downloaded 5 July 2023):
Assure active scene is Assembly
Point export to some folder, say "Output"
In Settings/Include/Limit To/Active Scene tick Active Scene (No other choices ticked - including Custom Properties
Under Objects tick both Grouped by collections and Assembly
Export

Exporting with Khronos add-on glTF 2.0 only:
Assure active scene is Assembly
Point export to some folder, say "Output"
In Settings/Include/Limit To/Active Scene tick Active Scene (No other choices ticked - including Custom Properties
Using File Menu, Export to a file of some other name, say AssemblyKhronosOnly

Examine side-by-side the first 40 lines or so of both files.
Clearly, the Multi-Export file lists three scenes with three nodes in each.
The KhronosOnly file lists only one scene with three nodes.

Environment

Windows 10 Home - up to date
Blender 3.3.6
Multi-Export 1.3.1 Release downloaded 5 July 2023
Hardware: Dell G7 laptop with nvidia graphics

Anything else?

I'll stop here, but the other "Limit To" choices behave similarly.
I intentionally left off the Custom Properties to keep the files simple, but the error is still there regardless.
I believe you will find that the corresponding .bin files are quite different in size also.
(Historical Note: I saw this in 1.3.0 which did not have the Active Scene tick box, but I was able to avoid the problem by making sure all objects in the other scenes were "turned off". That did not work in 1.3.1)

I and many others use scenes in Blender to organize work, develop procedural textures for baking and numerous other tasks.
We also use scenes to store backups of objects at various stages of development.
There are quite a few more problems related to this lack of Active Scene Only control, but I will see whether they go away if you are able to fix this inconsistency.
Thank you in advance for your attention to this problem with a really useful and well-designed tool.
I have worked with Presets, and I find them much more related to 3DSMax than to Blender's Outliner.
I will attach two .gltf files and the .blend file I used and described above. Its name is misleading, though.
Test Presets Multiexporter.zip
Issue LimitTo Problem.zip

@PhysicsTeacher1
Copy link
Author

Never mind; I found the problem and fixed it subject to further tests.
In the file msfs_multi_export.py after line 109 I added the line in the call:

                use_active_scene=settings.use_active_scene,

This line was either misplaced in the pre-3.3.0 conditional call or merely left out of the post-3.3.0 export call to the Khronos exporter.

There were other effects from this omission, but I will continue testing and report my findings if necessary.

Again, thank you for this tool.

@PhysicsTeacher1
Copy link
Author

One more comment before I close this issue: Without the Limit To Active Scene active and with other objects in other scenes, the bounding box shown in the Scenery Editor expands to encompass all the other objects. By restricting the export to the active scene, that bounding box is properly sized as you would expect. Here are two exports of my sample cubes (above):
With Limit To Active Scene
Without Limit To Active Scene
This may have implications for others' issues related to excessive .bin file size.

@ronh991
Copy link
Contributor

ronh991 commented Jul 10, 2023

@PhysicsTeacher1 Could you please Re-open to remind that a bug fix is required.

@PhysicsTeacher1
Copy link
Author

Yes. I think I was clear enough where the bug needs to be squashed. If not, let me know. Thanks. I'm back on a roll now.

@y-khodja y-khodja added the bug Something isn't working label Jul 12, 2023
@y-khodja
Copy link
Collaborator

Fixed !

Thank you for your report !

@PhysicsTeacher1
Copy link
Author

PhysicsTeacher1 commented Jul 12, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants