Skip to content

Conversation

@friedererdmann
Copy link

I'm in the middle of some other refactors, but wanted to make a PR to not run too far off before pushing further.

List of edits:

  • PEP8 styling on everything
  • Moved all Blender internal strings and operator names into helper classes, so code completion and refactoring is available
    • The design for these helper classes is not ideal at the moment, but made it easier to get an overview for now
  • Created a list of all bpy.ops used as an internal TODO to remove them (I started looking into this, but might be a bit more refactoring required)
  • Removed the need to have scene property to track active/inactive state of hi and lowpoly
  • Fixed collection baking
  • Fixed edge case where new object doesn't have material

I tested all changes in Blender 2.93 with both object to object and collection to collection baking.

@Lamoot
Copy link

Lamoot commented Dec 5, 2021

Thank you for these improvements. I no longer get any of the errors I was getting before.

@Lamoot Lamoot mentioned this pull request Dec 5, 2021
@Lamoot
Copy link

Lamoot commented Dec 6, 2021

I correct myself, I get Blender to crash when trying to bake multiple highpoly objects in a collection to a single lowpoly object in another collection. I'm attaching the simplest .blend file example that crashes for me.

I use these settings
easy_bake_settings_crash

Crash log (Ubuntu Linux), Blender 2.92 and Blender 3.0
EasyBakeTest.crash.txt

Output of the console

Warning: No mesh data to join
Writing: /tmp/EasyBakeTest.crash.txt
Segmentation fault (core dumped)

Example file
EasyBakeTestCrash.zip

@friedererdmann
Copy link
Author

Hey @Lamoot - is this crash specific to this branch or is it happening in the main branch as well?

@Lamoot
Copy link

Lamoot commented Dec 6, 2021

I tested it again with the main branch and it happens as well. Looks like it's not directly related to any of the changes you made here.

@friedererdmann
Copy link
Author

from what i gathered after some testing its when the tool tries to make sure all the meshes in the collection are visible (lines 593 etc). I'm trying to figure out why that'd be causing any issues as it shouldn't do anything bad.

@Lamoot
Copy link

Lamoot commented Dec 7, 2021

Sounds great, thank you for looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants