I3D-Blender-Addon icon indicating copy to clipboard operation
I3D-Blender-Addon copied to clipboard

Optimize DependencyGraph usage

Open StjerneIdioten opened this issue 3 years ago • 2 comments

Describe the bug Back when the code for exporting meshes was first implemented, blender 2.8 was still very new and the documentation for their new usage of dp's(dependencygraphs) was very sparse.

Their current documentation is much more thorough and presents a few possibilities for optimizing the usage of the dp's during export. Especially how the dp is currently created from scratch for each shape object exported and the way that the addon doesn't pull from the dependency graph when selecting export objects.

Relates a bit to #56

StjerneIdioten avatar Aug 22 '20 00:08 StjerneIdioten

ec90c35d8e3f360f38bda00ddf4a2b48c579b7a0 Touches upon this a bit, but I would like even further optimizations to take place. Especially in regards to refering blender objects directly instead of going through the dependency graph or object list everytime.

StjerneIdioten avatar Aug 22 '20 15:08 StjerneIdioten

After some further bugs have arisen and some testing. I have concluded that something is wrong with blenders dependency graph, or at least the option preserve_all_data_layers=True of the obj.to_mesh() function. I did some searching and came across this active bug on the blender issue tracker.

I have implemented a workaround in 208d80fb7a025be561f5b73993331c0e6140f490 untill blender fixes this bug.

StjerneIdioten avatar Aug 23 '20 23:08 StjerneIdioten