armory3d / armory

3D Engine with Blender Integration
https://armory3d.org/engine
zlib License
3.08k stars 319 forks source link

Batch Materials and spawning an unspawned object has incorrect mesh #3002

Open Bizow opened 9 months ago

Bizow commented 9 months ago

Description When using SpawnObjectByName in either haxe or LogicTree with Batch Materials checked and Spawn turned off the object mesh is not correct.

To Reproduce Armory Project > Renderer > Batch Materials = checked Object to spawn > Armory Props > Spawn = unchecked Create a new material and add it to the object to spawn and one other object.

*Note that this issue doesn't happen if the object is spawned on init. After a delay spawn in the object and it will be a cube that is the equivalent size of the bounds of the original object.

Expected behavior The object should spawn with the correct mesh and size.

System Blender: 3.6.x Armory: 2024.2.0 OS: Windows 11 Pro Graphics card: NVIDIA GeForce RTX 2080

Test File (drag & drop the zipped .blend file here) MaterialBatchingIssue.zip