-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Baking revamp, Texel Density revision
BAKING: - Restructured code and implemented a Try -> Finally structure to prevent data loss in case of error during the bake process. - Avoided Circular Dependency when the image-to-bake-on is present in the blend file and used in the node tree of the materials that take part in the bake process. Two methods were used: A - If the existing image origin is a file: "making unique" the image nodes in the materials during the bake will do the trick, while preserving the path of the image in stock, because the bake is done on it. Delete the image created by "making unique" the nodes afterwards. B - If the existing image origin is generated and only exist internally in the blend file: a new image have to be created to bake onto. After the bake, assign it to the image nodes of the baked materials that use the original image, and rename it after the original. Delete the previous image. Fixes #84 - Removed use of "temp_sets", duplicate baked objects materials to avoid restorations after relinks, discards. - Optimization when baking custom modes (modes using a "material_loaded") - Added option in preferences: "Device for baking" (CPU, GPU or Default) - Added option in preferences: global "Bake Color Space". - Selection mode is now restored. - Baking can be now performed on the active object while in edit mode whether it is actually selected or not. - Reverted Poll changes of last commit. - Certain bake modes can now be performed without a material in the baked object. - Faster and cleaner poll messages. - Remove and unlink material_empty and material_loaded when the bake of all sets is finished for no more hanging materials in the blend file after a bake. As a downside, they have to be created/imported every single time in certain scenarios (custom bake modes like material_id, cavity, etc, and lowpoly meshes in high-to-low bakes that wouldn't have a material). It's fast, though. - Bake mode "Element ID" no longer delivers repeated colors when baking multiple objects. - Added samples property to "Combined". TEXEL DENSITY: - Added enum to select the Texture Dimensions to consider when getting or setting the Texel Density value: from an image present in a material for each object (default), a specified baking resolution (TexTools tab > Size), or from a list of common sizes.
- Loading branch information
Showing
10 changed files
with
702 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.