Skip to content

Commit

Permalink
build: getting things ready for the demo 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KirilStrezikozin committed Dec 29, 2022
1 parent d02eea2 commit 80c44ae
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 852 deletions.
710 changes: 0 additions & 710 deletions README.html

This file was deleted.

31 changes: 2 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,6 @@ BakeMaster is an add-on specified for baking various texture maps <br/>and creat

---

> This is a dev branch for BakeMaster v2.0 development
>
> ✨ BakeMaster 2.0 Milestones: ✨ <br>
> <br>
> 🎯 - More Map Previews - 🎯 <br>
> 🎯 - Presets for settings panels - 🎯 <br>
> 🎯 - New map: ColorID - 🎯 <br>
> 🎯 - New map: Vector Displacement - 🎯 <br>
> 🎯 - New map: Mask map - 🎯 <br>
> 🎯 - New map: Edge Mask - 🎯 <br>
> 🎯 - New maps: PBR-Specular maps - 🎯 <br>
> 🎯 - New map: Wireframe Mask map - 🎯 <br>
> 🎯 - Normal map: choose OpenGL/DirectX/Custom or preset for common soft - 🎯 <br>
> 🎯 - All maps: naming prefixes - 🎯 <br>
> 🎯 - All maps: Bake samples - 🎯 <br>
> 🎯 - All maps: SuperSampling AA - 🎯 <br>
> 🎯 - Texture Sets - 🎯 <br>
> 🎯 - Channel Packing - 🎯 <br>
> 🎯 - Name Matching - 🎯 <br>
> 🎯 - Bake multiple Highpolies onto single Lowpoly - 🎯 <br>
> <br>
> Currently in progress: Documentation <br>
> All code is finished! 🤩 <br>
> Get it in our discord: <br>
> <br>
> Join new features disscussion & testing in our [Discord](https://discord.gg/2ePzzzMBf4) Stay tuned for [Announcements](https://github.com/KirilStrezikozin/BakeMaster-Blender-Addon/discussions/5) ✅</span> <br>
Check out BakeMaster's product page on [Blender Market](https://blendermarket.com/products/bakemaster) or [Gumroad](https://kemplerart.gumroad.com/l/bakemaster)

---

Readme is being reworked for v2.0 Update.<br>Stay tuned for announcements.
> Join our [Discord](https://discord.gg/2ePzzzMBf4) Stay tuned for [Announcements](https://github.com/KirilStrezikozin/BakeMaster-Blender-Addon/discussions/5) ✅</span> <br>
8 changes: 8 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This file is included with the addon to note the user about the usage guide
===========================================================================

The installation guide can be read on the addon's Blender Market page (https://blendermarket.com/products/bakemaster) or Gumroad (https://kemplerart.gumroad.com/l/bakemaster).

You can also get all the information in BakeMaster's online documentation (https://bakemaster-blender-addon.readthedocs.io/en/latest/), where all tutorials and usage explanations sit too.

Join our Discord and ask any kind of question you've got raised (https://discord.gg/2ePzzzMBf4), or email the author ([email protected]) directly.
14 changes: 1 addition & 13 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,7 @@
BM_PT_Item_Output,
BM_PT_TextureSets,
BM_PT_Bake,

#BM_PT_Item_STT,
#BM_PT_Item_UVMap,
#BM_PT_Item_Output,

#BM_PT_Item_MapList,
#BM_PT_Item_Map,

#BM_PT_Item_MainBake,
#BM_PT_Item_Bake,
#BM_PT_Item_MainBakeSettings,

#BM_PT_Main_Help,
BM_PT_Help,

BM_OT_ExecutePreset,

Expand Down
Binary file added install/bakemaster-blender-addon-2.0-demo.zip
Binary file not shown.
Binary file removed install/bakemaster-blender-addon-demo.zip
Binary file not shown.
18 changes: 12 additions & 6 deletions labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
# ##### END GPL LICENSE BLOCK #####

class BM_Labels:
#INFO Messages:
# INFO Messages:
INFO_MAP_PREVIEWNOTCYCLES = ERROR_BAKE_NOTINCYLES = "Swith to Cycles Render Engine"
ERROR_BAKE_MAPQUEUEEMPTY = "No maps to bake"
ERROR_BAKE_ITEMQUEUEEMPTY = "No items to bake"

#Operators Descriptions:
# Operators Descriptions:
OPERATOR_ITEM_BAKE_DESCRIPTION = "Bake image textures.\nBake This: bake maps only for the current object.\nBake All: bake maps for all objects added"
OPERATOR_ITEM_BAKE_FULL_DESCRIPTION = "Press `BACKSPACE` to cancel baking all next maps.\nPress `ESC` key to cancel baking current map.\nPress `BACKSPACE`, then `ESC` to cancel baking.\nIf you want to undo the bake, press `Ctrl + Z` (`Cmd + Z` on Mac) just after it finished or canceled.\n\nOpen Blender Console to, if you face an unexpected Blender freeze, press `Ctrl + C` (`Cmd + C` on Mac) to abort the bake.\nNote that there are expectable Blender freezes when preparing maps for meshes with huge amount of geometry, baking map result to modifiers, Denoising baked result, or UV unwrapping and packing. Please be patient, BakeMaster will notify if any error occured"
OPERATOR_ITEM_BAKE_FULL_DESCRIPTION = "Press `BACKSPACE` to cancel baking all next maps.\nPress `ESC` key to cancel baking current map.\nPress `BACKSPACE`, then `ESC` to cancel baking.\nIf you want to undo the bake, press `Ctrl + Z` (`Cmd + Z` on Mac) just after it finished or canceled.\n\nOpen Blender Console to see more baking process information and, if you face an unexpected Blender freeze, be able to press `Ctrl + C` (`Cmd + C` on Mac) to abort the bake.\nNote that there are expectable Blender freezes when preparing maps for meshes with huge amount of geometry, baking map result to modifiers, Denoising baked result, or UV unwrapping and packing. Please be patient, BakeMaster will notify if any error occured"
OPERATOR_HELP_DESCRIPTION = "BakeMaster online documentation for help. Press to open in your default browser"

#Property Labels:
# Property Labels:
PROP_AOL_ACTIVEINDEX_NAME = "Object of type 'MESH' to be included in the bake"
PROP_ITEM_USEBAKE_NAME = "Include/exclude item in the bake"
PROP_ITEM_USETARGET_NAME = "Set this item as bake target object"
Expand All @@ -55,5 +55,11 @@ class BM_Labels:

PROP_ITEM_bake_batchname_custom_Description = "Write keywords starting with $, any additional text can be added:\n\n$objectindex - Object index\n$objectname - Object name\n$containername - Container name if Object is in it\n$packname - Channel Pack name if map is in Channel Pack\n$texsetname - Texture Set chosen name type if Object is in it\n$mapindex - Map index\n$mapname - Map prefix\n$mapres - Map Resolution\n$mapbit - _32bit_ if map uses 32bit Float, else _8bit_\n$maptrans - _trans_ if map uses transparent bg\n$mapssaa - SSAA value used for the map\n$mapsamples - Number of map bake samples, max samples if Adaptive is used\n$mapdenoise - _denoised_ if map was denoised\n$mapnormal - For Normal map, write preset type\n$mapuv - Write UV Layer name used for baking map\n$engine - Write Bake Engine used for baking\n$autouv - _autouv_ if object was auto uv unwrapped\n\ntestbake1$objectname_$mapname_$mapdenoise_Final -> testbake1monsterhead_NM_denoised_Final"

#URls
URL_HELP_BASE = "https://bakemaster-blender-addon.readthedocs.io/en/latest/"
# URLs
# different documentation versions may have different pages setup
__addon_version__ = "dev-2.0.0"
URL_HELP_MAIN = "https://bakemaster-blender-addon.readthedocs.io/en/%s/" % __addon_version__
URL_HELP_OBJS = "https://bakemaster-blender-addon.readthedocs.io/en/%s/pages/start/objects.html" % __addon_version__
URL_HELP_MAPS = "https://bakemaster-blender-addon.readthedocs.io/en/%s/pages/start/maps.html" % __addon_version__
URL_HELP_BAKE = "https://bakemaster-blender-addon.readthedocs.io/en/%s/pages/start/bake.html" % __addon_version__
URL_HELP_SUPPORT = "https://bakemaster-blender-addon.readthedocs.io/en/%s/pages/more/connect.html" % __addon_version__
20 changes: 16 additions & 4 deletions operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,9 +1731,9 @@ def execute(self, context):
return {'FINISHED'}

class BM_OT_CreateArtificialUniContainer(bpy.types.Operator):
bl_label = "Artificial Container"
bl_label = "Create Artificial Container"
bl_idname = "bakemaster.artificial_container"
bl_description = "Group detached objects into one Container, where all settings can be set at once along other Container pros"
bl_description = "Group objects into a Bake Job Container, where all settings can be set at once for all"
bl_options = {'UNDO'}

def execute(self, context):
Expand Down Expand Up @@ -2033,10 +2033,22 @@ def invoke(self, context, event):
return wm.invoke_props_dialog(self, width=300)

class BM_OT_Help(bpy.types.Operator):
bl_label = "BakeMaster Help"
bl_label = "BakeMaster Help Source"
bl_idname = "bakemaster.help"
bl_description = BM_Labels.OPERATOR_HELP_DESCRIPTION

url_base_type: bpy.props.StringProperty(
default="Main Page",
options={'SKIP_SAVE'},
)

def execute(self, context):
webbrowser.open(BM_Labels.URL_HELP_BASE)
url_base_data = {
"Main Page" : BM_Labels.URL_HELP_MAIN,
"How to Setup Objects" : BM_Labels.URL_HELP_OBJS,
"How to Setup Maps" : BM_Labels.URL_HELP_MAPS,
"How to Bake" : BM_Labels.URL_HELP_BAKE,
"Support" : BM_Labels.URL_HELP_SUPPORT,
}
webbrowser.open(url_base_data[self.url_base_type])
return {'FINISHED'}
12 changes: 6 additions & 6 deletions presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,12 +606,12 @@ class BM_OT_FULL_OBJECT_Preset_Add(BM_AddPresetBase, bpy.types.Operator):
"bm_item.uv_use_unique_per_map",

"bm_item.csh_use_triangulate_lowpoly",
"bm_item.csh_use_lowpoly_reset_normals",
"bm_item.csh_use_lowpoly_recalc_normals",
"bm_item.csh_lowpoly_use_smooth",
"bm_item.csh_lowpoly_smoothing_groups_enum",
"bm_item.csh_lowpoly_smoothing_groups_angle",
"bm_item.csh_lowpoly_smoothing_groups_name_contains",
"bm_item.csh_use_highpoly_reset_normals",
"bm_item.csh_use_highpoly_recalc_normals",
"bm_item.csh_highpoly_use_smooth",
"bm_item.csh_highpoly_smoothing_groups_enum",
"bm_item.csh_highpoly_smoothing_groups_angle",
Expand Down Expand Up @@ -693,12 +693,12 @@ class BM_OT_OBJECT_Preset_Add(BM_AddPresetBase, bpy.types.Operator):
"bm_item.uv_use_unique_per_map",

"bm_item.csh_use_triangulate_lowpoly",
"bm_item.csh_use_lowpoly_reset_normals",
"bm_item.csh_use_lowpoly_recalc_normals",
"bm_item.csh_lowpoly_use_smooth",
"bm_item.csh_lowpoly_smoothing_groups_enum",
"bm_item.csh_lowpoly_smoothing_groups_angle",
"bm_item.csh_lowpoly_smoothing_groups_name_contains",
"bm_item.csh_use_highpoly_reset_normals",
"bm_item.csh_use_highpoly_recalc_normals",
"bm_item.csh_highpoly_use_smooth",
"bm_item.csh_highpoly_smoothing_groups_enum",
"bm_item.csh_highpoly_smoothing_groups_angle",
Expand Down Expand Up @@ -792,12 +792,12 @@ class BM_OT_CSH_Preset_Add(BM_AddPresetBase, bpy.types.Operator):

preset_values = [
"bm_item.csh_use_triangulate_lowpoly",
"bm_item.csh_use_lowpoly_reset_normals",
"bm_item.csh_use_lowpoly_recalc_normals",
"bm_item.csh_lowpoly_use_smooth",
"bm_item.csh_lowpoly_smoothing_groups_enum",
"bm_item.csh_lowpoly_smoothing_groups_angle",
"bm_item.csh_lowpoly_smoothing_groups_name_contains",
"bm_item.csh_use_highpoly_reset_normals",
"bm_item.csh_use_highpoly_recalc_normals",
"bm_item.csh_highpoly_use_smooth",
"bm_item.csh_highpoly_smoothing_groups_enum",
"bm_item.csh_highpoly_smoothing_groups_angle",
Expand Down
39 changes: 22 additions & 17 deletions properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class BM_SceneProps_TextureSet(bpy.types.PropertyGroup):

uvp_use_uv_repack : bpy.props.BoolProperty(
name="UV Repack",
description="Enable UV Repacking for Texture Set Objects",
description="Enable UV Repacking for Texture Set Objects.\nWarning: if Objects have materials that depend on UV Layout, enabling this option might change the result of these materials",
default=False)

uvp_use_islands_rotate : bpy.props.BoolProperty(
Expand Down Expand Up @@ -255,14 +255,19 @@ class BM_SceneProps(bpy.types.PropertyGroup):
description="Save log of time used to bake each map and a short summary of all baked maps for all baked objects into a .txt file",
default=False)

global_use_bake_overwrite : bpy.props.BoolProperty(
name="Overwrite",
description="If checked, old bake files in the output directory will be overwritten by the new ones if they have the same name",
default=False)

global_use_bakemaster_reset : bpy.props.BoolProperty(
name="Reset BakeMaster",
description="Remove baked objects from BakeMaster Table of Objects after the bake",
default=True)
default=False)

global_bake_instruction : bpy.props.StringProperty(
name="Bake Operator Instruction",
default="Bake Instruction",
default="Short Bake Instruction",
description=BM_Labels.OPERATOR_ITEM_BAKE_FULL_DESCRIPTION)

global_bake_available : bpy.props.BoolProperty(
Expand Down Expand Up @@ -431,7 +436,7 @@ class BM_Map(bpy.types.PropertyGroup):

uv_type : bpy.props.EnumProperty(
name = "UV Map Type",
description = "UVMap type is set automatically when changing Active UV Map. Change if it's not correct",
description = "Set the chosen Active UV Map type",
items = BM_ITEM_PROPS_uv_type_Items,
update=BM_MAP_PROPS_uv_type_Update)

Expand Down Expand Up @@ -2223,7 +2228,7 @@ class BM_Object(bpy.types.PropertyGroup):

uv_type : bpy.props.EnumProperty(
name="UV Map Type",
description="UVMap type is set automatically when changing Active UV Map. Change if it's not correct",
description="Set the chosen Active UV Map type",
items=BM_ITEM_PROPS_uv_type_Items,
update=BM_ITEM_PROPS_uv_type_Update)

Expand All @@ -2234,7 +2239,7 @@ class BM_Object(bpy.types.PropertyGroup):

uv_use_auto_unwrap : bpy.props.BoolProperty(
name="Auto Unwrap",
description="Auto UV Unwrap object using smart project. If UV Type is UDIMs, enabling Auto Unwrap will ignore it",
description="Auto UV Unwrap object using smart project. If UV Type is UDIMs, enabling Auto Unwrap will ignore it.\nWarning: if Object has materials that depend on UV Layout, enabling this option might change the result of these materials",
update=BM_ITEM_PROPS_uv_use_auto_unwrap_Update)

uv_auto_unwrap_angle_limit : bpy.props.IntProperty(
Expand Down Expand Up @@ -2463,11 +2468,11 @@ class BM_Object(bpy.types.PropertyGroup):
default=False,
update=BM_ITEM_PROPS_csh_use_triangulate_lowpoly_Update)

csh_use_lowpoly_reset_normals : bpy.props.BoolProperty(
name="Reset Lowpoly Normals",
description="Reset all lowpoly mesh normals direction and recalculate them outside",
csh_use_lowpoly_recalc_normals : bpy.props.BoolProperty(
name="Recalculate Lowpoly Normals Outside",
description="Recalculate Lowpoly Vertex and Face Normals Outside",
default=False,
update=BM_ITEM_PROPS_csh_use_lowpoly_reset_normals_Update)
update=BM_ITEM_PROPS_csh_use_lowpoly_recalc_normals_Update)

csh_lowpoly_use_smooth : bpy.props.BoolProperty(
name="Smooth Lowpoly",
Expand Down Expand Up @@ -2499,11 +2504,11 @@ class BM_Object(bpy.types.PropertyGroup):
default="_smooth",
update=BM_ITEM_PROPS_csh_lowpoly_smoothing_groups_name_contains_Update)

csh_use_highpoly_reset_normals : bpy.props.BoolProperty(
name="Reset Highpoly Normals",
description="Reset all highpoly mesh normals direction and recalculate them outside",
csh_use_highpoly_recalc_normals : bpy.props.BoolProperty(
name="Recalculate Highpoly Normals Outside",
description="Recalculate Highpoly Vertex and Face Normals Outside",
default=False,
update=BM_ITEM_PROPS_csh_use_highpoly_reset_normals_Update)
update=BM_ITEM_PROPS_csh_use_highpoly_recalc_normals_Update)

csh_highpoly_use_smooth : bpy.props.BoolProperty(
name="Smooth Highpoly",
Expand Down Expand Up @@ -2552,7 +2557,7 @@ class BM_Object(bpy.types.PropertyGroup):
# Item Bake Props
bake_save_internal : bpy.props.BoolProperty(
name="Internal",
description="Saved baked maps into the current Blender file",
description="Pack baked maps into the current Blender file",
default=True,
update=BM_ITEM_PROPS_bake_save_internal_Update)

Expand Down Expand Up @@ -2603,7 +2608,7 @@ class BM_Object(bpy.types.PropertyGroup):

bake_create_material : bpy.props.BoolProperty(
name="Create Material",
description="Assign a new material to the object after bake with all baked maps inlcuded",
description="Assign a new material to the object after bake with all baked maps included",
default=False,
update=BM_ITEM_PROPS_bake_create_material_Update)

Expand All @@ -2629,7 +2634,7 @@ class BM_Object(bpy.types.PropertyGroup):

bake_vg_index : bpy.props.IntProperty(
name="VG Index",
description="Object's Mesh will affect other Objects Meshes if their Visibility Group Indexes are equal to the same value.\nThe affect is noticable in areas where Meshes intersact",
description="Object's Mesh will affect other Objects Meshes if their Visibility Group Indexes are equal to the same value.\nThe effect is noticeable in areas where Meshes intersect",
default=0,
min=0,
step=1,
Expand Down
42 changes: 2 additions & 40 deletions ui_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,46 +66,8 @@ class BM_PT_Bake(BM_PT_BakeBase):
bl_category = bm_category
bl_parent_id = BM_PT_Main.bl_idname

"""
class BM_PT_Item_UVMap(BM_PT_Item_UVMapBase):
class BM_PT_Help(BM_PT_HelpBase):
bl_space_type = bm_space_type
bl_region_type = bm_region_type
bl_category = bm_category
bl_parent_id = BM_PT_Item.bl_idname
class BM_PT_Item_Output(BM_PT_Item_OutputBase):
bl_space_type = bm_space_type
bl_region_type = bm_region_type
bl_category = bm_category
bl_parent_id = BM_PT_Item.bl_idname
class BM_PT_Item_MapList(BM_PT_Item_MapListBase):
bl_space_type = bm_space_type
bl_region_type = bm_region_type
bl_category = bm_category
bl_parent_id = BM_PT_Main.bl_idname
class BM_PT_Item_Map(BM_PT_Item_MapBase):
bl_space_type = bm_space_type
bl_region_type = bm_region_type
bl_category = bm_category
bl_parent_id = BM_PT_Item_MapList.bl_idname
class BM_PT_Item_MainBake(BM_PT_Item_MainBakeBase):
bl_space_type = bm_space_type
bl_region_type = bm_region_type
bl_category = bm_category
bl_parent_id = BM_PT_Main.bl_idname
class BM_PT_Item_Bake(BM_PT_Item_BakeBase):
bl_space_type = bm_space_type
bl_region_type = bm_region_type
bl_category = bm_category
bl_parent_id = BM_PT_Item_MainBake.bl_idname
class BM_PT_Item_MainBakeSettings(BM_PT_Item_MainBakeSettingsBase):
bl_space_type = bm_space_type
bl_region_type = bm_region_type
bl_category = bm_category
bl_parent_id = BM_PT_Item_MainBake.bl_idname
"""
bl_parent_id = BM_PT_Main.bl_idname
Loading

0 comments on commit 80c44ae

Please sign in to comment.