From 7778a2b1d3c7c2097cee702960cb43c6f266b13a Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Sun, 12 Mar 2023 22:47:32 -0700 Subject: [PATCH 01/19] Upversion and set dev flag back in dev --- MCprep_addon/__init__.py | 2 +- MCprep_addon/conf.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MCprep_addon/__init__.py b/MCprep_addon/__init__.py index 5738e0b6..f99e5c0a 100755 --- a/MCprep_addon/__init__.py +++ b/MCprep_addon/__init__.py @@ -41,7 +41,7 @@ bl_info = { "name": "MCprep", "category": "Object", - "version": (3, 4, 2), + "version": (3, 4, 2, 1), "blender": (2, 80, 0), "location": "3D window toolshelf > MCprep tab", "description": "Minecraft workflow addon for rendering and animation", diff --git a/MCprep_addon/conf.py b/MCprep_addon/conf.py index 79690398..7a40de58 100644 --- a/MCprep_addon/conf.py +++ b/MCprep_addon/conf.py @@ -31,6 +31,7 @@ # ADDON GLOBAL VARIABLES AND INITIAL SETTINGS # ----------------------------------------------------------------------------- + def init(): # ----------------------------------------------- @@ -38,7 +39,7 @@ def init(): # Used to print out extra information, set false with distribution # ----------------------------------------------- global dev - dev = False + dev = True global v v = True # $VERBOSE, UI setting From 6d89a0047a78877f27008a78c88b6a0131a62a01 Mon Sep 17 00:00:00 2001 From: mahid Date: Tue, 14 Mar 2023 21:09:06 -0500 Subject: [PATCH 02/19] Added a graceful exit to MTL reading There's been a issue recently where Mineways will name MTLs weirdly. For instance: - "Beach Town.obj" : "Beach_Town.mtl" - "hello there.obj" : "hello_there.mtl" The MTL conversion function simply replaces the extension of self.filepath, assuming that the MTL has the same name. However, since Mineways adds underscores, convert_mtl would throw an exception when attempting to read the file. The current workarounds are to: - Remove the underscores - Don't add spaces to OBJ names (ideally no one should be adding spaces to any filename because of issues like this) - Use jmc2OBJ, which as far as I know doesn't have this weird behavior This is more of a band-aid, and ideally we should check for underscores in the MTL name (we can take advantage of pathlib for this), but for now if an exception occurs due to a weirdly named MTL, we'll just print the error, return False, and call it a day. --- MCprep_addon/world_tools.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MCprep_addon/world_tools.py b/MCprep_addon/world_tools.py index 8b66e4d5..bbee6368 100644 --- a/MCprep_addon/world_tools.py +++ b/MCprep_addon/world_tools.py @@ -170,8 +170,13 @@ def convert_mtl(filepath): mtl = filepath.rsplit(".", 1)[0] + '.mtl' lines = None copied_file = None - with open(mtl, 'r') as mtl_file: - lines = mtl_file.readlines() + + try: + with open(mtl, 'r') as mtl_file: + lines = mtl_file.readlines() + except Exception as e: + print(e) + return False if bpy.context.scene.view_settings.view_transform in BUILTIN_SPACES: return None From 0d8d105f1cc2acd42458a6cbd775bfaab19e4d83 Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Tue, 14 Mar 2023 21:34:24 -0700 Subject: [PATCH 03/19] Moving to use more generic texture importing for models. Reusing the general purpose operator for generating materials. It does not expose the setting values for all of the ways to load the material, we can think more about that in a future release where there is texture pack stacking and potentially scene-level settings for the prep settings (as opposed to forcing a popup per each use ahead of time). --- MCprep_addon/materials/prep.py | 2 +- MCprep_addon/spawner/mcmodel.py | 29 +++++++++++++---------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/MCprep_addon/materials/prep.py b/MCprep_addon/materials/prep.py index 73a9b9d4..9a8f27ce 100755 --- a/MCprep_addon/materials/prep.py +++ b/MCprep_addon/materials/prep.py @@ -595,7 +595,7 @@ def generate_base_material(self, context, name, path): # need to create at least one texture node first, then the rest works mat.use_nodes = True nodes = mat.node_tree.nodes - node_diff = generate.create_node(nodes, 'ShaderNodeTexImage', image = image) + node_diff = generate.create_node(nodes, 'ShaderNodeTexImage', image=image) node_diff["MCPREP_diffuse"] = True # Initialize extra passes as well diff --git a/MCprep_addon/spawner/mcmodel.py b/MCprep_addon/spawner/mcmodel.py index 705aab9b..6c895d9a 100644 --- a/MCprep_addon/spawner/mcmodel.py +++ b/MCprep_addon/spawner/mcmodel.py @@ -28,6 +28,7 @@ from .. import conf from .. import util from .. import tracking +from ..materials import generate # ----------------------------------------------------------------------------- @@ -102,22 +103,18 @@ def add_element( def add_material(name="material", path=""): """Creates a simple material with an image texture from path.""" - conf.log(name + ": " + path, vv_only=True) - mat = bpy.data.materials.new(name=name) - mat.blend_method = 'CLIP' - mat.shadow_method = 'CLIP' - mat.use_nodes = True - matnodes = mat.node_tree.nodes - - tex = matnodes.new('ShaderNodeTexImage') - if os.path.isfile(path): - img = bpy.data.images.load(path, check_existing=True) - tex.image = img - tex.interpolation = 'Closest' - - shader = matnodes['Principled BSDF'] - mat.node_tree.links.new(shader.inputs['Base Color'], tex.outputs['Color']) - mat.node_tree.links.new(shader.inputs['Alpha'], tex.outputs['Alpha']) + cur_mats = list(bpy.data.materials) + res = bpy.ops.mcprep.load_material(filepath=path, skipUsage=True) + if res != {'FINISHED'}: + conf.log("Failed to generate material as specified") + post_mats = list(bpy.data.materials) + + new_mats = list(set(post_mats) - set(cur_mats)) + if not new_mats: + conf.log("Failed to fetch any generated material") + return None + + mat = new_mats[0] return mat From 9b364854696da323c6872348b9f5b8c85437c703 Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Tue, 14 Mar 2023 21:42:55 -0700 Subject: [PATCH 04/19] Updated test file for model importing --- test_files/addon_tests.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/test_files/addon_tests.py b/test_files/addon_tests.py index d2de7191..696e83cb 100644 --- a/test_files/addon_tests.py +++ b/test_files/addon_tests.py @@ -1567,16 +1567,24 @@ def model_spawner(self): return "Too few models loaded, missing texturepack?" # spawn with whatever default index - pre_objs = len(bpy.data.objects) + pre_objs = list(bpy.data.objects) bpy.ops.mcprep.spawn_model( filepath=scn_props.model_list[scn_props.model_list_index].filepath) - post_objs = len(bpy.data.objects) + post_objs = bpy.data.objects - if post_objs == pre_objs: + if len(post_objs) == len(pre_objs): return "No models spawned" - elif post_objs > pre_objs + 1: + elif len(post_objs) > len(pre_objs) + 1: return "More than one model spawned" + # Test that materials were properly added. + new_objs = list(set(post_objs) - set(pre_objs)) + model = new_objs[0] + if not model.active_material: + return "No material on model" + + # TODO: fetch/check there being a texture. + # Test collection/group added # Test loading from file. From a85b3b6e70a0ad72008b78ba70c8090f5f090c99 Mon Sep 17 00:00:00 2001 From: mahid Date: Wed, 15 Mar 2023 17:38:45 -0500 Subject: [PATCH 05/19] Fixed typo --- MCprep_addon/world_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MCprep_addon/world_tools.py b/MCprep_addon/world_tools.py index bbee6368..0c418fdc 100644 --- a/MCprep_addon/world_tools.py +++ b/MCprep_addon/world_tools.py @@ -213,7 +213,7 @@ def convert_mtl(filepath): for index, line in enumerate(lines): if line.startswith("map_d "): lines[index] = "# " + line - except Exception as e: + except FileNotFoundError as e: print(e) return False From ba194ab6f18fa41b9b4d46adf6ed7f715455fa1d Mon Sep 17 00:00:00 2001 From: mahid Date: Wed, 15 Mar 2023 17:56:52 -0500 Subject: [PATCH 06/19] Added an MTL existence check at the beginning By taking advantage of the pathlib module (Seriously, why don't we use it more? It makes file operations so much easier and is compatible with the os module), we check to see if the assumed MTL path is valid. If not, we then replace the spaces in the MTL filename with underscores. If still not, then we return False. This assumes that an MTL will always have either the same name as the corresponding OBJ, or that Mineways went ahead and added underscores. --- MCprep_addon/world_tools.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/MCprep_addon/world_tools.py b/MCprep_addon/world_tools.py index 0c418fdc..ac1abf0f 100644 --- a/MCprep_addon/world_tools.py +++ b/MCprep_addon/world_tools.py @@ -167,7 +167,16 @@ def convert_mtl(filepath): Returns: True if success or skipped, False if failed, or None if skipped """ - mtl = filepath.rsplit(".", 1)[0] + '.mtl' + # Check if the MTL exists. If not, then check if it + # uses underscores. If still not, then return False + mtl = Path(filepath.rsplit(".", 1)[0] + '.mtl') + if not mtl.exists(): + mtl_underscores = Path(mtl.parent.absolute()) / mtl.name.replace(" ", "_") + if mtl_underscores.exists(): + mtl = mtl_underscores + else: + return False + lines = None copied_file = None @@ -213,7 +222,7 @@ def convert_mtl(filepath): for index, line in enumerate(lines): if line.startswith("map_d "): lines[index] = "# " + line - except FileNotFoundError as e: + except Exception as e: print(e) return False From 1cf33352bd7f10b26a64489084fd8a50e492c42c Mon Sep 17 00:00:00 2001 From: ChippySpud <96747360+CFeeney333@users.noreply.github.com> Date: Tue, 21 Mar 2023 18:18:04 +0000 Subject: [PATCH 07/19] Fix bug in spawn_util Return False not True in order to skip the current file (this_file) --- MCprep_addon/spawner/spawn_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MCprep_addon/spawner/spawn_util.py b/MCprep_addon/spawner/spawn_util.py index 90651d41..ecc8abe4 100755 --- a/MCprep_addon/spawner/spawn_util.py +++ b/MCprep_addon/spawner/spawn_util.py @@ -151,7 +151,7 @@ def tuple_from_match(match): # If the suffix = 3.0 in `afile` file, and current blender is # below 3, then `afile` is the file that should be loaded, and the # current file `this_file` is to be skipped. - return res + return not res # If no matches (the most common case), then this file is eligible. return True From f49fe67aaa99e202521d53d0a0fd88150718b427 Mon Sep 17 00:00:00 2001 From: chippyspud Date: Wed, 22 Mar 2023 10:08:42 +0000 Subject: [PATCH 08/19] Fix bug in spawn_util.py If we find a versioned file with the same basename, check recursively to see if it's eligible. If it's not, we have to allow for a check to see if there are any more versioned files that are eligible. The previous version only allowed for one check, and could return a result without finding an eligible versioned file, even if there was an eligible versioned file (unchecked), so the previous fix could still have produced incorrect result. If we do find an eligible versioned file, we can return False, because we want that file to be used instead. Otherwise we can just continue to the next iteration for the next check. If there are no eligible versioned files, it will fall through to return True anyway. --- MCprep_addon/spawner/spawn_util.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/MCprep_addon/spawner/spawn_util.py b/MCprep_addon/spawner/spawn_util.py index ecc8abe4..c67bb24c 100755 --- a/MCprep_addon/spawner/spawn_util.py +++ b/MCprep_addon/spawner/spawn_util.py @@ -146,12 +146,24 @@ def tuple_from_match(match): base_afile = os.path.splitext(afile)[0] matches = find_suffix.search(base_afile) if matches: - tuple_ver = tuple_from_match(matches) - res = util.min_bv(tuple_ver) - # If the suffix = 3.0 in `afile` file, and current blender is - # below 3, then `afile` is the file that should be loaded, and the - # current file `this_file` is to be skipped. - return not res + # afile is guaranteed to have the same basename, not be the same file, and has a suffix + # because it has a suffix, the recursively called function will not reach the containing for loop + if not check_blend_eligible(afile, all_files): + # if afile is not eligible, we can continue to the next iteration to see if there is another + # file with a suffix that is eligible + # previously this only allowed for 1 other file with a suffix to be checked + continue + else: + # if a file with a suffix is eligible here, we should not use the current file, but should use afile + # instead, so return False for the current file + return False + + # tuple_ver = tuple_from_match(matches) + # res = util.min_bv(tuple_ver) + # # If the suffix = 3.0 in `afile` file, and current blender is + # # below 3, then `afile` is the file that should be loaded, and the + # # current file `this_file` is to be skipped. + # return not res # If no matches (the most common case), then this file is eligible. return True From 323028eac9854041ff47e8d7318ee08c7bf15a01 Mon Sep 17 00:00:00 2001 From: ChippySpud <96747360+CFeeney333@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:31:42 +0000 Subject: [PATCH 09/19] Remove commented out code --- MCprep_addon/spawner/spawn_util.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/MCprep_addon/spawner/spawn_util.py b/MCprep_addon/spawner/spawn_util.py index c67bb24c..7877c70b 100755 --- a/MCprep_addon/spawner/spawn_util.py +++ b/MCprep_addon/spawner/spawn_util.py @@ -158,13 +158,6 @@ def tuple_from_match(match): # instead, so return False for the current file return False - # tuple_ver = tuple_from_match(matches) - # res = util.min_bv(tuple_ver) - # # If the suffix = 3.0 in `afile` file, and current blender is - # # below 3, then `afile` is the file that should be loaded, and the - # # current file `this_file` is to be skipped. - # return not res - # If no matches (the most common case), then this file is eligible. return True From a51f45b5d3678856f8ff7622c56ccc15f19f0561 Mon Sep 17 00:00:00 2001 From: ChippySpud <96747360+CFeeney333@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:35:17 +0000 Subject: [PATCH 10/19] Wrap long comments --- MCprep_addon/spawner/spawn_util.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/MCprep_addon/spawner/spawn_util.py b/MCprep_addon/spawner/spawn_util.py index 7877c70b..e96ab16c 100755 --- a/MCprep_addon/spawner/spawn_util.py +++ b/MCprep_addon/spawner/spawn_util.py @@ -146,15 +146,20 @@ def tuple_from_match(match): base_afile = os.path.splitext(afile)[0] matches = find_suffix.search(base_afile) if matches: - # afile is guaranteed to have the same basename, not be the same file, and has a suffix - # because it has a suffix, the recursively called function will not reach the containing for loop + # afile is guaranteed to have the same basename, + # not be the same file, and has a suffix + # Because it has a suffix, the recursively called + # function will not reach the containing for loop if not check_blend_eligible(afile, all_files): - # if afile is not eligible, we can continue to the next iteration to see if there is another + # if afile is not eligible, we can continue to the next + # iteration to see if there is another # file with a suffix that is eligible - # previously this only allowed for 1 other file with a suffix to be checked + # previously this only allowed for 1 other file with a + # suffix to be checked continue else: - # if a file with a suffix is eligible here, we should not use the current file, but should use afile + # if a file with a suffix is eligible here, we should not + # use the current file, but should use afile # instead, so return False for the current file return False From 3e6c9402956cb5bee31f742507e476a0a362e67e Mon Sep 17 00:00:00 2001 From: mahid Date: Wed, 22 Mar 2023 18:11:30 -0500 Subject: [PATCH 11/19] Added check for if conversion is really necesary Basically we check to see if any of the lines have "map_d" in it. If not, then we just ignore it and return None --- MCprep_addon/world_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MCprep_addon/world_tools.py b/MCprep_addon/world_tools.py index ac1abf0f..d45cdd56 100644 --- a/MCprep_addon/world_tools.py +++ b/MCprep_addon/world_tools.py @@ -187,7 +187,7 @@ def convert_mtl(filepath): print(e) return False - if bpy.context.scene.view_settings.view_transform in BUILTIN_SPACES: + if bpy.context.scene.view_settings.view_transform in BUILTIN_SPACES or any("map_d" in s for s in lines): return None # This represents a new folder that'll backup the MTL filepath From 1f6c9576a17584b20e0ee27b1f15e66336f61315 Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Wed, 22 Mar 2023 22:06:44 -0700 Subject: [PATCH 12/19] Fixing check_blend_eligible and adding more tests Previously this function would try to exit early true after only inspecting this_file on its own, when in reality it would always need to compare against all files in the list. --- MCprep_addon/spawner/spawn_util.py | 99 +++++++++++++++++++----------- test_files/addon_tests.py | 44 +++++++++++++ 2 files changed, 106 insertions(+), 37 deletions(-) diff --git a/MCprep_addon/spawner/spawn_util.py b/MCprep_addon/spawner/spawn_util.py index e96ab16c..fb1103da 100755 --- a/MCprep_addon/spawner/spawn_util.py +++ b/MCprep_addon/spawner/spawn_util.py @@ -98,21 +98,29 @@ def filter_collections(data_from): def check_blend_eligible(this_file, all_files): - """Returns true if the path blend file is ok for this blender version. + """Returns true if this_file is the BEST blend file variant for this rig. Created to better support older blender versions without having to - compeltely remake new rig contirbutions from scratch. See for more details: + completely remake new rig contributions from scratch. See for more details: https://github.com/TheDuckCow/MCprep/issues/317 - If the "pre#.#.#" suffix is found in any similar prefix named blend files, - evaluate whether the target file itself is eligible. If pre3.0.0 is found - in path, then this function returns False if the current blender version is - 3.0 to force loading the non pre3.0.0 version instead, and if pre3.0.0 is - not in the path variable but pre#.#.# is found in another file, then it - returns true. If no pre#.#.# found in any files of the common base, would - always return True. + This function searches for "pre#.#.#" in the filename of passed in files, + where if found, it indicates that file should only be used if the current + running blender version is below that version (non inclusive). The function + then finds the highest versioned file and checks if this_file is that + the same one. If so, it returns true, otherwise returns false. Most rigs + do not have versioned names are are assumed to work with the latest blender + version, hence they are treated as a "max_ver" to never get thrown out. + + Examples, presuming current blender is v2.93 + for list ["rig pre2.8.0", "rig"] + -> returns true for "rig" + for list ["rig pre2.8.0", "rig pre3.0.0", "rig"] + -> returns true for "rig pre3.0.0" + """ basename = os.path.splitext(this_file)[0] + max_ver = (99, 99, 99) # Standin for an impossibly high blender version. # Regex code to any matches of pre#.#.# at very end of name. # (pre) for exact match, @@ -129,42 +137,59 @@ def tuple_from_match(match): return tuple_ver matches = find_suffix.search(basename) + base_match = basename + + # Exit early, or find the common base after splitting out " pre#.#.#.blend" if matches: - tuple_ver = tuple_from_match(matches) - res = util.min_bv(tuple_ver) - # If the suffix = 3.0 and we are BELOW 3.0, return True (use this file) - return not res + base_match = re.split(code, basename)[0].strip() + this_ver = tuple_from_match(matches) + res = util.min_bv(this_ver, inclusive=True) + if res is True: + # E.g. rig pre3.0.0 in blender 3.0.1 or 3.0.0, so file ineligible. + return False + else: + # ie rig pre3.0.0 with current blender 2.9, so this is eligible - + # but another file might still be a better match. + pass + else: + this_ver = max_ver - # Remaining case: no suffix found in this target, but see if any other - # files have the same base and *do* have a suffix indicator. + # Iterate over all files, structure of: + # List of list[filepath, tuple detected] + other_eligible = [] for afile in all_files: - if not afile.startswith(basename): - continue - if afile == this_file: - continue # Already checked above. + if not afile.startswith(base_match): + continue # Not part of the same base name, skip it base_afile = os.path.splitext(afile)[0] matches = find_suffix.search(base_afile) if matches: - # afile is guaranteed to have the same basename, - # not be the same file, and has a suffix - # Because it has a suffix, the recursively called - # function will not reach the containing for loop - if not check_blend_eligible(afile, all_files): - # if afile is not eligible, we can continue to the next - # iteration to see if there is another - # file with a suffix that is eligible - # previously this only allowed for 1 other file with a - # suffix to be checked - continue - else: - # if a file with a suffix is eligible here, we should not - # use the current file, but should use afile - # instead, so return False for the current file - return False + tuple_ver = tuple_from_match(matches) + res = util.min_bv(tuple_ver, inclusive=True) + if res is False: + # E.g. rig pre3.0.0 in blender 2.9 is an eligible choice + other_eligible.append([tuple_ver, afile]) + else: + # This would be the typical case of a "latest, non versioned" file. + # E.g. rig.blend with no "pre3.3.0" text, also a eligible choice. + # Give an artificial version to compare against for next step. + other_eligible.append([max_ver, afile]) + + if len(other_eligible) == 1: + # Only this_file is eligible, and thus must be "the one". + return True + + # If multiple files, then we should use the one that is the largest version + # without being equal to or greater than the current running blender ver. + sorted_eligible = sorted(other_eligible, key=lambda x: x[0]) + latest_allowed = None + for tple, afile in sorted_eligible: + if util.min_bv(tple, inclusive=True) is False: + latest_allowed = afile + else: + break - # If no matches (the most common case), then this file is eligible. - return True + return latest_allowed != this_file def attemptScriptLoad(path): diff --git a/test_files/addon_tests.py b/test_files/addon_tests.py index 696e83cb..4d334e38 100644 --- a/test_files/addon_tests.py +++ b/test_files/addon_tests.py @@ -58,6 +58,7 @@ def __init__(self): self.spawn_mob, self.spawn_mob_linked, self.check_blend_eligible, + self.check_blend_eligible_middle, self.change_skin, self.import_world_split, self.import_world_fail, @@ -733,6 +734,49 @@ def check_blend_eligible(self): if res is not False: return "Should have been false since we are above this min blender" + def check_blend_eligible_middle(self): + # Warden-like example, where we have equiv of pre2.80, pre3.0, and + # live blender 3.0+ (presuming we want to test a 2.93-like user) + from MCprep.spawner import spawn_util + fake_base = "WardenExample" + + # Assume the "current" version of blender is like 9.1 + # To make test not be flakey, actual version of blender can be anything + # in range of 2.7.0 upwards to 8.999. + suffix_old = " pre2.7.0" # Force active blender instance as older. + suffix_mid = " pre9.0.0" # Force active blender instance as older. + suffix_new = "" # presume "latest" version + + p_old = fake_base + suffix_old + ".blend" + p_mid = fake_base + suffix_mid + ".blend" + p_new = fake_base + suffix_new + ".blend" + + # Test in order + filelist = [p_old, p_mid, p_new] + + res = spawn_util.check_blend_eligible(p_old, filelist) + if res is True: + return "Older file should not match (in order)" + res = spawn_util.check_blend_eligible(p_mid, filelist) + if res is not True: + return "Mid file SHOULD match (in order)" + res = spawn_util.check_blend_eligible(p_new, filelist) + if res is True: + return "Newer file should not match (in order)" + + # Test out of order + filelist = [p_mid, p_new, p_old] + + res = spawn_util.check_blend_eligible(p_old, filelist) + if res is True: + return "Older file should not match (out of order)" + res = spawn_util.check_blend_eligible(p_mid, filelist) + if res is not True: + return "Mid file SHOULD match (out of order)" + res = spawn_util.check_blend_eligible(p_new, filelist) + if res is True: + return "Newer file should not match (out of order)" + def change_skin(self): """Test scenarios for changing skin after adding a character.""" self._clear_scene() From 330ec1d1796a5c7315b5e85a44b8a4e227bcdee7 Mon Sep 17 00:00:00 2001 From: mahid Date: Fri, 24 Mar 2023 17:32:57 -0500 Subject: [PATCH 13/19] Added comment and fixed mistake The mistake was accidently ommiting an `not` keyword in the if statement, which would have made this function exit all the time --- MCprep_addon/world_tools.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MCprep_addon/world_tools.py b/MCprep_addon/world_tools.py index d45cdd56..5dec4ba2 100644 --- a/MCprep_addon/world_tools.py +++ b/MCprep_addon/world_tools.py @@ -186,8 +186,10 @@ def convert_mtl(filepath): except Exception as e: print(e) return False - - if bpy.context.scene.view_settings.view_transform in BUILTIN_SPACES or any("map_d" in s for s in lines): + + # This checks to see if the user is using a built-in colorspace or if none of the lines have map_d. If so + # then ignore this file and return None + if bpy.context.scene.view_settings.view_transform in BUILTIN_SPACES or not any("map_d" in s for s in lines): return None # This represents a new folder that'll backup the MTL filepath From d37a44224b83226641c631839690bdf26601a0b8 Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Sat, 25 Mar 2023 08:25:15 -0700 Subject: [PATCH 14/19] Forcing users to restart if there is any update detected. This applies to both manual as well as addon-updater updates. The reason for this change is to avoid errors that will happen in future versions when we rename modules, remove functions, and generally revamp the structure of MCprep. Many users encounter errors due to not restarting Blender already, even with 'typical' updates. --- MCprep_addon/conf.py | 1 + MCprep_addon/mcprep_ui.py | 119 +++++++++++++++++++++++++++++++++++--- 2 files changed, 112 insertions(+), 8 deletions(-) diff --git a/MCprep_addon/conf.py b/MCprep_addon/conf.py index 7a40de58..73e332ec 100644 --- a/MCprep_addon/conf.py +++ b/MCprep_addon/conf.py @@ -65,6 +65,7 @@ def init(): os.path.dirname(__file__), "MCprep_resources", "mcprep_data.json") + global json_path_update json_path_update = os.path.join( os.path.dirname(__file__), "MCprep_resources", diff --git a/MCprep_addon/mcprep_ui.py b/MCprep_addon/mcprep_ui.py index f69493ac..be0ed8b9 100644 --- a/MCprep_addon/mcprep_ui.py +++ b/MCprep_addon/mcprep_ui.py @@ -16,10 +16,10 @@ # # ##### END GPL LICENSE BLOCK ##### +import os +import time -# library imports import bpy -import os # addon imports from . import addon_updater_ops @@ -45,12 +45,64 @@ OPT_IN = 'URL' if util.bv28() else 'HAND' +def addon_just_updated(): + """Indicates an addon was updated mid session, to force a user restart. + + Put into UI calls, therefore called often and should lightweight. + """ + if addon_updater_ops.updater.invalid_updater: + return False + if not addon_updater_ops.updater.json: + return False + did_update = addon_updater_ops.updater.json.get("just_updated") is True + if did_update: + return True + + # If not alreaedy flipped to be recongized as an update, do a slightly more + # thorough check by seeing if the mcprep_data_update.json exists (ie it + # hasn't been renamed yet to mcprep_data.json, which happens on init after + # an install/update) + global last_check_for_updated + check_interval = 5 # Time in seconds + if time.time() - check_interval > last_check_for_updated: + check_for_updated_files() + last_check_for_updated = time.time() + return + + +def check_for_updated_files(): + """Checks for a file which would only exist after an auto/manual update. + + We check for the mcprep_data_update.json file, which would only exist after + an automated or manual update and before blender has been restarted. This + file is auto renamed to overwrite any existing mcprep_data.json file, but + that only runs on addon startup, so it's a good flag to use to force users + to restart. + + This covers the scenario where someone used the native blender install + addon *instead* of the auto updater route to update the addon. + """ + if os.path.isfile(conf.json_path_update): + addon_updater_ops.updater.json["just_updated"] = True + + +def restart_layout(layout): + """Draws a restart button, used when addon_just_updated is true.""" + box = layout.box() + col = box.column() + alert_row = col.row() + alert_row.alert = True + alert_row.operator( + "wm.quit_blender", + text="Restart blender", + icon="ERROR") + col.label(text="to complete update") + + # ----------------------------------------------------------------------------- -# Above for class functions/operators -# Below for UI +# UI class functions # ----------------------------------------------------------------------------- - class MCPREP_MT_mob_spawner(bpy.types.Menu): """Shift-A menu in the 3D view""" bl_label = "Mob Spawner" @@ -236,6 +288,9 @@ class MCPREP_MT_3dview_add(bpy.types.Menu): bl_idname = "MCPREP_MT_3dview_add" def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return layout = self.layout props = context.scene.mcprep_props @@ -686,6 +741,12 @@ def draw(self, context): # check for update in background thread if appropraite addon_updater_ops.check_for_update_background() + # show update ready if available + addon_updater_ops.update_notice_box_ui(self, context) + if addon_just_updated(): + # Don't draw restart_layout() here, as we already have a box + return + layout = self.layout split = layout.split() col = split.column(align=True) @@ -832,9 +893,6 @@ def draw(self, context): split = layout.split() row = split.row(align=True) - # show update ready if available - addon_updater_ops.update_notice_box_ui(self, context) - class MCPREP_PT_bridge(bpy.types.Panel): """MCprep panel for directly importing and reloading minecraft saves""" @@ -845,6 +903,10 @@ class MCPREP_PT_bridge(bpy.types.Panel): bl_category = "MCprep" def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return + # bridge.panel_draw(self, context) pass @@ -858,6 +920,10 @@ class MCPREP_PT_world_tools(bpy.types.Panel): def draw(self, context): layout = self.layout + if addon_just_updated(): + restart_layout(layout) + return + rw = layout.row() col = rw.column() row = col.row(align=True) @@ -909,6 +975,10 @@ class MCPREP_PT_skins(bpy.types.Panel): def draw(self, context): layout = self.layout + if addon_just_updated(): + restart_layout(layout) + return + scn_props = context.scene.mcprep_props sind = context.scene.mcprep_skins_list_index mob_ind = context.scene.mcprep_props.mob_list_index @@ -1020,6 +1090,10 @@ def draw(self, context): scn_props = context.scene.mcprep_props layout = self.layout + if addon_just_updated(): + restart_layout(layout) + return + row = layout.row() # row.operator("mcprep.create_default_material") split = layout.split() @@ -1061,6 +1135,10 @@ class MCPREP_PT_materials_subsettings(bpy.types.Panel): bl_context = "material" def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return + b_row = self.layout.row() b_col = b_row.column(align=False) b_col.label(text="Resource pack") @@ -1619,6 +1697,9 @@ class MCPREP_PT_spawn(bpy.types.Panel): bl_category = "MCprep" def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return row = self.layout.row(align=True) row.label(text="Click triangle to open") ops = row.operator( @@ -1637,6 +1718,9 @@ class MCPREP_PT_mob_spawner(bpy.types.Panel): bl_options = {'DEFAULT_CLOSED'} def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return is_obj_mode = context.mode == "OBJECT" if not is_obj_mode: draw_mode_warning(self.layout) @@ -1662,6 +1746,9 @@ class MCPREP_PT_model_spawner(bpy.types.Panel): bl_options = {'DEFAULT_CLOSED'} def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return is_obj_mode = context.mode == "OBJECT" if not is_obj_mode: draw_mode_warning(self.layout) @@ -1687,6 +1774,9 @@ class MCPREP_PT_item_spawner(bpy.types.Panel): bl_options = {'DEFAULT_CLOSED'} def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return is_obj_mode = context.mode == "OBJECT" is_pose_mode = context.mode == "POSE" if not is_obj_mode and not is_pose_mode: @@ -1713,6 +1803,9 @@ class MCPREP_PT_effects_spawner(bpy.types.Panel): bl_options = {'DEFAULT_CLOSED'} def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return is_obj_mode = context.mode == "OBJECT" if not is_obj_mode: draw_mode_warning(self.layout) @@ -1738,6 +1831,9 @@ class MCPREP_PT_entity_spawner(bpy.types.Panel): bl_options = {'DEFAULT_CLOSED'} def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return is_obj_mode = context.mode == "OBJECT" if not is_obj_mode: draw_mode_warning(self.layout) @@ -1763,6 +1859,9 @@ class MCPREP_PT_meshswap_spawner(bpy.types.Panel): bl_options = {'DEFAULT_CLOSED'} def draw(self, context): + if addon_just_updated(): + restart_layout(self.layout) + return is_obj_mode = context.mode == "OBJECT" if not is_obj_mode: draw_mode_warning(self.layout) @@ -2007,6 +2106,10 @@ def register(): bpy.types.IMAGE_MT_uvs.append(mcprep_uv_tools) # bpy.types.IMAGE_MT_image.append(mcprep_image_tools) # crashes, re-do ops + # Used to avoid checking for update file on disk too frequently. + global last_check_for_updated + last_check_for_updated = 0 + def unregister(): for cls in reversed(classes): From 3270d08d3a147a13234a292e08631f22414103ee Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Sat, 25 Mar 2023 08:45:39 -0700 Subject: [PATCH 15/19] Creating a more real integration test for the warden rig selection. This test now correctly fails on older versions of blender, while it passes on 3.0 and up, it fails under 2.90. --- test_files/addon_tests.py | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/test_files/addon_tests.py b/test_files/addon_tests.py index 4d334e38..d7c101fb 100644 --- a/test_files/addon_tests.py +++ b/test_files/addon_tests.py @@ -59,6 +59,7 @@ def __init__(self): self.spawn_mob_linked, self.check_blend_eligible, self.check_blend_eligible_middle, + self.check_blend_eligible_real, self.change_skin, self.import_world_split, self.import_world_fail, @@ -777,6 +778,57 @@ def check_blend_eligible_middle(self): if res is True: return "Newer file should not match (out of order)" + def check_blend_eligible_real(self): + # This order below matches a user's who was encountering an error + # (the actual in-memory python list order) + riglist = [ + "bee - Boxscape.blend", + "Blaze - Trainguy.blend", + "Cave Spider - Austin Prescott.blend", + "creeper - TheDuckCow.blend", + "drowned - HissingCreeper-thefunnypie2.blend", + "enderman - Trainguy.blend", + "Ghast - Trainguy.blend", + "guardian - Trainguy.blend", + "hostile - boxscape.blend", + "illagers - Boxscape.blend", + "mobs - Rymdnisse.blend", + "nether hostile - Boxscape.blend", + "piglin zombified piglin - Boxscape.blend", + "PolarBear - PixelFrosty.blend", + "ravager - Boxscape.blend", + "Shulker - trainguy.blend", + "Skeleton - Trainguy.blend", + "stray - thefunnypie2.blend", + "Warden - DigDanAnimates pre2.80.0.blend", + "Warden - DigDanAnimates pre3.0.0.blend", + "Warden - DiaDanAnimates.blend", + "Zombie - Hissing Creeper.blend", + "Zombie Villager - Hissing Creeper-thefunnypie2.blend" + ] + target_list = [ + "Warden - DigDanAnimates pre2.80.0.blend", + "Warden - DigDanAnimates pre3.0.0.blend", + "Warden - DiaDanAnimates.blend", + ] + + from MCprep.spawner import spawn_util + if bpy.app.version < (2, 80): + correct = "Warden - DigDanAnimates pre2.80.0.blend" + elif bpy.app.version < (3, 0): + correct = "Warden - DigDanAnimates pre3.0.0.blend" + else: + correct = "Warden - DiaDanAnimates.blend" + + for rig in target_list: + res = spawn_util.check_blend_eligible(rig, riglist) + if rig == correct: + if res is not True: + return "Did not pick {} as correct rig".format(rig) + else: + if res is True: + return "Should not have returned correct for {}".format(rig) + def change_skin(self): """Test scenarios for changing skin after adding a character.""" self._clear_scene() From 09bbc5f901c26184e57724c986090e51f2f346cd Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Sat, 25 Mar 2023 09:39:40 -0700 Subject: [PATCH 16/19] Fixed typo in test list. TBH surprised this was the only typo from my image-to-text copy. --- test_files/addon_tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_files/addon_tests.py b/test_files/addon_tests.py index d7c101fb..34b1fb46 100644 --- a/test_files/addon_tests.py +++ b/test_files/addon_tests.py @@ -802,14 +802,14 @@ def check_blend_eligible_real(self): "stray - thefunnypie2.blend", "Warden - DigDanAnimates pre2.80.0.blend", "Warden - DigDanAnimates pre3.0.0.blend", - "Warden - DiaDanAnimates.blend", + "Warden - DigDanAnimates.blend", "Zombie - Hissing Creeper.blend", "Zombie Villager - Hissing Creeper-thefunnypie2.blend" ] target_list = [ "Warden - DigDanAnimates pre2.80.0.blend", "Warden - DigDanAnimates pre3.0.0.blend", - "Warden - DiaDanAnimates.blend", + "Warden - DigDanAnimates.blend", ] from MCprep.spawner import spawn_util @@ -818,7 +818,7 @@ def check_blend_eligible_real(self): elif bpy.app.version < (3, 0): correct = "Warden - DigDanAnimates pre3.0.0.blend" else: - correct = "Warden - DiaDanAnimates.blend" + correct = "Warden - DigDanAnimates.blend" for rig in target_list: res = spawn_util.check_blend_eligible(rig, riglist) @@ -827,7 +827,7 @@ def check_blend_eligible_real(self): return "Did not pick {} as correct rig".format(rig) else: if res is True: - return "Should not have returned correct for {}".format(rig) + return "Should have said {} was correct - not {}".format(correct, rig) def change_skin(self): """Test scenarios for changing skin after adding a character.""" From 524a3599c1748e93c9ed118668be2c7b1536ce7e Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Sat, 25 Mar 2023 11:09:11 -0700 Subject: [PATCH 17/19] Moving global to conf per code review --- MCprep_addon/conf.py | 4 ++++ MCprep_addon/mcprep_ui.py | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/MCprep_addon/conf.py b/MCprep_addon/conf.py index 73e332ec..ab5cc13e 100644 --- a/MCprep_addon/conf.py +++ b/MCprep_addon/conf.py @@ -71,6 +71,10 @@ def init(): "MCprep_resources", "mcprep_data_update.json") + # Used to avoid checking for update file on disk too frequently. + global last_check_for_updated + last_check_for_updated = 0 + # if new update file found from install, replace old one with new if os.path.isfile(json_path_update): if os.path.isfile(json_path) is True: diff --git a/MCprep_addon/mcprep_ui.py b/MCprep_addon/mcprep_ui.py index be0ed8b9..4b24b4a1 100644 --- a/MCprep_addon/mcprep_ui.py +++ b/MCprep_addon/mcprep_ui.py @@ -62,11 +62,10 @@ def addon_just_updated(): # thorough check by seeing if the mcprep_data_update.json exists (ie it # hasn't been renamed yet to mcprep_data.json, which happens on init after # an install/update) - global last_check_for_updated check_interval = 5 # Time in seconds - if time.time() - check_interval > last_check_for_updated: + if time.time() - check_interval > conf.last_check_for_updated: check_for_updated_files() - last_check_for_updated = time.time() + conf.last_check_for_updated = time.time() return @@ -2106,10 +2105,6 @@ def register(): bpy.types.IMAGE_MT_uvs.append(mcprep_uv_tools) # bpy.types.IMAGE_MT_image.append(mcprep_image_tools) # crashes, re-do ops - # Used to avoid checking for update file on disk too frequently. - global last_check_for_updated - last_check_for_updated = 0 - def unregister(): for cls in reversed(classes): From e641d495d0c2990c4bc958112a1ca38e3ac364f5 Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Sat, 25 Mar 2023 19:37:38 -0700 Subject: [PATCH 18/19] Automated mcprep_data update based on 23w12a snapshot. --- .../MCprep_resources/mcprep_data_update.json | 217 ++++++++++++++---- 1 file changed, 174 insertions(+), 43 deletions(-) diff --git a/MCprep_addon/MCprep_resources/mcprep_data_update.json b/MCprep_addon/MCprep_resources/mcprep_data_update.json index fd0c4b42..e0940e67 100644 --- a/MCprep_addon/MCprep_resources/mcprep_data_update.json +++ b/MCprep_addon/MCprep_resources/mcprep_data_update.json @@ -856,7 +856,7 @@ "block_mapping_mc": { "Campfire": "campfire_log", "absorption": "mob_effect/absorption", - "acacia": "gui/hanging_signs/acacia", + "acacia": "entity/chest_boat/acacia", "acacia_door_bottom": "acacia_door_bottom", "acacia_door_top": "acacia_door_top", "acacia_leaves": "acacia_leaves", @@ -877,16 +877,20 @@ "all_black": "entity/cat/all_black", "allay": "entity/allay/allay", "allium": "allium", + "amethyst": "trims/color_palettes/amethyst", "amethyst_block": "amethyst_block", "amethyst_cluster": "amethyst_cluster", "ancient_debris_side": "ancient_debris_side", "ancient_debris_top": "ancient_debris_top", "andesite": "andesite", + "angler_pottery_pattern": "entity/decorated_pot/angler_pottery_pattern", "angry": "particle/angry", "anvil": "anvil", "anvil_top": "anvil_top", + "archer_pottery_pattern": "entity/decorated_pot/archer_pottery_pattern", "ari": "entity/player/wide/ari", - "armorer": "entity/zombie_villager/profession/armorer", + "armorer": "entity/villager/profession/armorer", + "arms_up_pottery_pattern": "entity/decorated_pot/arms_up_pottery_pattern", "arrow": "entity/projectiles/arrow", "ascii": "font/ascii", "ascii_sga": "font/ascii_sga", @@ -907,7 +911,7 @@ "azure_bluet": "azure_bluet", "back": "painting/back", "bad_omen": "mob_effect/bad_omen", - "bamboo": "gui/hanging_signs/bamboo", + "bamboo": "entity/chest_boat/bamboo", "bamboo_block": "bamboo_block", "bamboo_block_top": "bamboo_block_top", "bamboo_door_bottom": "bamboo_door_bottom", @@ -932,7 +936,7 @@ "bars": "gui/bars", "basalt_side": "basalt_side", "basalt_top": "basalt_top", - "base": "entity/conduit/base", + "base": "entity/banner/base", "bat": "entity/bat", "beacon": "beacon", "beacon_beam": "entity/beacon_beam", @@ -976,7 +980,7 @@ "big_smoke_7": "particle/big_smoke_7", "big_smoke_8": "particle/big_smoke_8", "big_smoke_9": "particle/big_smoke_9", - "birch": "gui/hanging_signs/birch", + "birch": "entity/chest_boat/birch", "birch_door_bottom": "birch_door_bottom", "birch_door_top": "birch_door_top", "birch_leaves": "birch_leaves", @@ -998,6 +1002,7 @@ "black_wool": "black_wool", "blackstone": "blackstone", "blackstone_top": "blackstone_top", + "blade_pottery_pattern": "entity/decorated_pot/blade_pottery_pattern", "blast_furnace": "gui/container/blast_furnace", "blast_furnace_front": "blast_furnace_front", "blast_furnace_front_on": "blast_furnace_front_on", @@ -1023,11 +1028,13 @@ "bone_block_top": "bone_block_top", "book": "gui/book", "bookshelf": "bookshelf", + "boots_trim": "trims/items/boots_trim", "border": "entity/banner/border", "brain_coral": "brain_coral", "brain_coral_block": "brain_coral_block", "brain_coral_fan": "brain_coral_fan", "break_particle": "entity/conduit/break_particle", + "brewer_pottery_pattern": "entity/decorated_pot/brewer_pottery_pattern", "brewing_stand": "brewing_stand", "brewing_stand_base": "brewing_stand_base", "bricks": "bricks", @@ -1058,9 +1065,10 @@ "bubble_pop_4": "particle/bubble_pop_4", "budding_amethyst": "budding_amethyst", "bundle": "gui/container/bundle", + "burn_pottery_pattern": "entity/decorated_pot/burn_pottery_pattern", "burning_skull": "painting/burning_skull", "bust": "painting/bust", - "butcher": "entity/zombie_villager/profession/butcher", + "butcher": "entity/villager/profession/butcher", "cactus_bottom": "cactus_bottom", "cactus_side": "cactus_side", "cactus_top": "cactus_top", @@ -1071,6 +1079,9 @@ "cake_side": "cake_side", "cake_top": "cake_top", "calcite": "calcite", + "calibrated_sculk_sensor_amethyst": "calibrated_sculk_sensor_amethyst", + "calibrated_sculk_sensor_input_side": "calibrated_sculk_sensor_input_side", + "calibrated_sculk_sensor_top": "calibrated_sculk_sensor_top", "calico": "entity/cat/calico", "camel": "entity/camel/camel", "campfire_fire": "campfire_fire", @@ -1082,7 +1093,7 @@ "carrots_stage1": "carrots_stage1", "carrots_stage2": "carrots_stage2", "carrots_stage3": "carrots_stage3", - "cartographer": "entity/zombie_villager/profession/cartographer", + "cartographer": "entity/villager/profession/cartographer", "cartography_table": "gui/container/cartography_table", "cartography_table_side1": "cartography_table_side1", "cartography_table_side2": "cartography_table_side2", @@ -1109,6 +1120,28 @@ "chat_tags": "gui/chat_tags", "checkbox": "gui/checkbox", "checkmark": "gui/checkmark", + "cherry": "entity/chest_boat/cherry", + "cherry_0": "particle/cherry_0", + "cherry_1": "particle/cherry_1", + "cherry_10": "particle/cherry_10", + "cherry_11": "particle/cherry_11", + "cherry_2": "particle/cherry_2", + "cherry_3": "particle/cherry_3", + "cherry_4": "particle/cherry_4", + "cherry_5": "particle/cherry_5", + "cherry_6": "particle/cherry_6", + "cherry_7": "particle/cherry_7", + "cherry_8": "particle/cherry_8", + "cherry_9": "particle/cherry_9", + "cherry_door_bottom": "cherry_door_bottom", + "cherry_door_top": "cherry_door_top", + "cherry_leaves": "cherry_leaves", + "cherry_log": "cherry_log", + "cherry_log_top": "cherry_log_top", + "cherry_planks": "cherry_planks", + "cherry_sapling": "cherry_sapling", + "cherry_trapdoor": "cherry_trapdoor", + "chestplate_trim": "trims/items/chestplate_trim", "chicken": "entity/chicken", "chipped_anvil_top": "chipped_anvil_top", "chiseled_bookshelf_empty": "chiseled_bookshelf_empty", @@ -1131,12 +1164,14 @@ "christmas_right": "entity/chest/christmas_right", "circle": "entity/banner/circle", "clay": "clay", - "cleric": "entity/zombie_villager/profession/cleric", + "cleric": "entity/villager/profession/cleric", "closed_eye": "entity/conduit/closed_eye", "clouds": "environment/clouds", "coal_block": "coal_block", "coal_ore": "coal_ore", "coarse_dirt": "coarse_dirt", + "coast": "trims/models/armor/coast", + "coast_leggings": "trims/models/armor/coast_leggings", "cobbled_deepslate": "cobbled_deepslate", "cobblestone": "cobblestone", "cobweb": "cobweb", @@ -1158,7 +1193,7 @@ "composter_top": "composter_top", "conduit": "conduit", "conduit_power": "mob_effect/conduit_power", - "configure_icon": null, + "copper": "trims/color_palettes/copper", "copper_block": "copper_block", "copper_ore": "copper_ore", "cornflower": "cornflower", @@ -1177,7 +1212,7 @@ "creebet": "painting/creebet", "creeper": "entity/banner/creeper", "creeper_armor": "entity/creeper/creeper_armor", - "crimson": "gui/hanging_signs/crimson", + "crimson": "entity/signs/hanging/crimson", "crimson_door_bottom": "crimson_door_bottom", "crimson_door_top": "crimson_door_top", "crimson_fungus": "crimson_fungus", @@ -1212,7 +1247,8 @@ "damage": "particle/damage", "damaged_anvil_top": "damaged_anvil_top", "dandelion": "dandelion", - "dark_oak": "gui/hanging_signs/dark_oak", + "danger_pottery_pattern": "entity/decorated_pot/danger_pottery_pattern", + "dark_oak": "entity/chest_boat/dark_oak", "dark_oak_door_bottom": "dark_oak_door_bottom", "dark_oak_door_top": "dark_oak_door_top", "dark_oak_leaves": "dark_oak_leaves", @@ -1245,6 +1281,8 @@ "dead_tube_coral_fan": "dead_tube_coral_fan", "debug": "debug", "debug2": "debug2", + "decorated_pot_base": "entity/decorated_pot/decorated_pot_base", + "decorated_pot_side": "entity/decorated_pot/decorated_pot_side", "deepslate": "deepslate", "deepslate_bricks": "deepslate_bricks", "deepslate_coal_ore": "deepslate_coal_ore", @@ -1258,7 +1296,7 @@ "deepslate_tiles": "deepslate_tiles", "deepslate_top": "deepslate_top", "demo_background": "gui/demo_background", - "desert": "entity/zombie_villager/type/desert", + "desert": "entity/villager/type/desert", "destroy_stage_0": "destroy_stage_0", "destroy_stage_1": "destroy_stage_1", "destroy_stage_2": "destroy_stage_2", @@ -1275,8 +1313,9 @@ "diagonal_right": "entity/banner/diagonal_right", "diagonal_up_left": "entity/banner/diagonal_up_left", "diagonal_up_right": "entity/banner/diagonal_up_right", - "diamond": "entity/zombie_villager/profession_level/diamond", + "diamond": "entity/villager/profession_level/diamond", "diamond_block": "diamond_block", + "diamond_darker": "trims/color_palettes/diamond_darker", "diamond_layer_1": "models/armor/diamond_layer_1", "diamond_layer_2": "models/armor/diamond_layer_2", "diamond_ore": "diamond_ore", @@ -1308,6 +1347,8 @@ "dropper_front_vertical": "dropper_front_vertical", "drowned": "entity/zombie/drowned", "drowned_outer_layer": "entity/zombie/drowned_outer_layer", + "dune": "trims/models/armor/dune", + "dune_leggings": "trims/models/armor/dune_leggings", "earth": "painting/earth", "edition": "gui/title/edition", "efe": "entity/player/wide/efe", @@ -1320,12 +1361,13 @@ "effect_6": "particle/effect_6", "effect_7": "particle/effect_7", "elytra": "entity/elytra", - "emerald": "entity/zombie_villager/profession_level/emerald", + "emerald": "entity/villager/profession_level/emerald", "emerald_block": "emerald_block", "emerald_ore": "emerald_ore", "empty_frame": null, + "enchanted_glint_entity": "misc/enchanted_glint_entity", + "enchanted_glint_item": "misc/enchanted_glint_item", "enchanted_hit": "particle/enchanted_hit", - "enchanted_item_glint": "misc/enchanted_item_glint", "enchanting_table": "gui/container/enchanting_table", "enchanting_table_book": "entity/enchanting_table_book", "enchanting_table_bottom": "enchanting_table_bottom", @@ -1353,6 +1395,7 @@ "experience_orb": "entity/experience_orb", "expired_icon": null, "expires_soon_icon": null, + "explorer_pottery_pattern": "entity/decorated_pot/explorer_pottery_pattern", "explosion_0": "particle/explosion_0", "explosion_1": "particle/explosion_1", "explosion_10": "particle/explosion_10", @@ -1371,7 +1414,9 @@ "explosion_9": "particle/explosion_9", "exposed_copper": "exposed_copper", "exposed_cut_copper": "exposed_cut_copper", - "farmer": "entity/zombie_villager/profession/farmer", + "eye": "trims/models/armor/eye", + "eye_leggings": "trims/models/armor/eye_leggings", + "farmer": "entity/villager/profession/farmer", "farmland": "farmland", "farmland_moist": "farmland_moist", "fern": "fern", @@ -1383,11 +1428,11 @@ "fire_coral_block": "fire_coral_block", "fire_coral_fan": "fire_coral_fan", "fire_resistance": "mob_effect/fire_resistance", - "fisherman": "entity/zombie_villager/profession/fisherman", + "fisherman": "entity/villager/profession/fisherman", "fishing_hook": "entity/fishing_hook", "flame": "particle/flame", "flash": "particle/flash", - "fletcher": "entity/zombie_villager/profession/fletcher", + "fletcher": "entity/villager/profession/fletcher", "fletching_table_front": "fletching_table_front", "fletching_table_side": "fletching_table_side", "fletching_table_top": "fletching_table_top", @@ -1397,9 +1442,11 @@ "flowering_azalea_side": "flowering_azalea_side", "flowering_azalea_top": "flowering_azalea_top", "foliage": "colormap/foliage", + "footer_separator": "gui/footer_separator", "forcefield": "misc/forcefield", "fox": "entity/fox/fox", "fox_sleep": "entity/fox/fox_sleep", + "friend_pottery_pattern": "entity/decorated_pot/friend_pottery_pattern", "frogspawn": "frogspawn", "frosted_ice_0": "frosted_ice_0", "frosted_ice_1": "frosted_ice_1", @@ -1442,11 +1489,15 @@ "glowing": "mob_effect/glowing", "glowstone": "glowstone", "goat": "entity/goat/goat", - "gold": "entity/rabbit/gold", + "gold": "entity/villager/profession_level/gold", "gold_block": "gold_block", + "gold_darker": "trims/color_palettes/gold_darker", "gold_layer_1": "models/armor/gold_layer_1", "gold_layer_2": "models/armor/gold_layer_2", "gold_ore": "gold_ore", + "goldheart_0": "particle/goldheart_0", + "goldheart_1": "particle/goldheart_1", + "goldheart_2": "particle/goldheart_2", "gradient": "entity/banner/gradient", "gradient_up": "entity/banner/gradient_up", "graham": "painting/graham", @@ -1494,8 +1545,12 @@ "haste": "mob_effect/haste", "hay_block_side": "hay_block_side", "hay_block_top": "hay_block_top", + "header_separator": "gui/header_separator", "health_boost": "mob_effect/health_boost", "heart": "particle/heart", + "heart_pottery_pattern": "entity/decorated_pot/heart_pottery_pattern", + "heartbreak_pottery_pattern": "entity/decorated_pot/heartbreak_pottery_pattern", + "helmet_trim": "trims/items/helmet_trim", "hero_of_the_village": "mob_effect/hero_of_the_village", "hoglin": "entity/hoglin/hoglin", "honey_block_bottom": "honey_block_bottom", @@ -1527,12 +1582,16 @@ "horse_skeleton": "entity/horse/horse_skeleton", "horse_white": "entity/horse/horse_white", "horse_zombie": "entity/horse/horse_zombie", + "host": "trims/models/armor/host", + "host_leggings": "trims/models/armor/host_leggings", + "howl_pottery_pattern": "entity/decorated_pot/howl_pottery_pattern", "hunger": "mob_effect/hunger", "husbandry": "gui/advancements/backgrounds/husbandry", "husk": "entity/zombie/husk", "ice": "ice", "icons": "gui/icons", "illusioner": "entity/illager/illusioner", + "info_icon": "gui/info_icon", "inspiration": null, "instant_damage": "mob_effect/instant_damage", "instant_health": "mob_effect/instant_health", @@ -1540,9 +1599,10 @@ "invisibility": "mob_effect/invisibility", "invitation_icons": null, "invite_icon": null, - "iron": "entity/zombie_villager/profession_level/iron", + "iron": "entity/villager/profession_level/iron", "iron_bars": "iron_bars", "iron_block": "iron_block", + "iron_darker": "trims/color_palettes/iron_darker", "iron_door_bottom": "iron_door_bottom", "iron_door_top": "iron_door_top", "iron_golem": "entity/iron_golem/iron_golem", @@ -1564,7 +1624,7 @@ "jukebox_side": "jukebox_side", "jukebox_top": "jukebox_top", "jump_boost": "mob_effect/jump_boost", - "jungle": "gui/hanging_signs/jungle", + "jungle": "entity/chest_boat/jungle", "jungle_door_bottom": "jungle_door_bottom", "jungle_door_top": "jungle_door_top", "jungle_leaves": "jungle_leaves", @@ -1579,6 +1639,7 @@ "kelp_plant": "kelp_plant", "ladder": "ladder", "lantern": "lantern", + "lapis": "trims/color_palettes/lapis", "lapis_block": "lapis_block", "lapis_ore": "lapis_ore", "large_amethyst_bud": "large_amethyst_bud", @@ -1592,15 +1653,16 @@ "leather_layer_1_overlay": "models/armor/leather_layer_1_overlay", "leather_layer_2": "models/armor/leather_layer_2", "leather_layer_2_overlay": "models/armor/leather_layer_2_overlay", - "leatherworker": "entity/zombie_villager/profession/leatherworker", - "leave_icon": null, + "leatherworker": "entity/villager/profession/leatherworker", "lectern_base": "lectern_base", "lectern_front": "lectern_front", "lectern_sides": "lectern_sides", "lectern_top": "lectern_top", + "legacy_smithing": "gui/container/legacy_smithing", + "leggings_trim": "trims/items/leggings_trim", "lever": "lever", "levitation": "mob_effect/levitation", - "librarian": "entity/zombie_villager/profession/librarian", + "librarian": "entity/villager/profession/librarian", "light_blue": "entity/bed/light_blue", "light_blue_candle": "light_blue_candle", "light_blue_candle_lit": "light_blue_candle_lit", @@ -1612,6 +1674,7 @@ "light_blue_stained_glass_pane_top": "light_blue_stained_glass_pane_top", "light_blue_terracotta": "light_blue_terracotta", "light_blue_wool": "light_blue_wool", + "light_dirt_background": "gui/light_dirt_background", "light_gray": "entity/bed/light_gray", "light_gray_candle": "light_gray_candle", "light_gray_candle_lit": "light_gray_candle_lit", @@ -1663,7 +1726,7 @@ "magma": "magma", "magmacube": "entity/slime/magmacube", "makena": "entity/player/wide/makena", - "mangrove": "gui/hanging_signs/mangrove", + "mangrove": "entity/chest_boat/mangrove", "mangrove_door_bottom": "mangrove_door_bottom", "mangrove_door_top": "mangrove_door_top", "mangrove_leaves": "mangrove_leaves", @@ -1678,7 +1741,7 @@ "map_background": "map/map_background", "map_background_checkerboard": "map/map_background_checkerboard", "map_icons": "map/map_icons", - "mason": "entity/zombie_villager/profession/mason", + "mason": "entity/villager/profession/mason", "match": "painting/match", "medium_amethyst_bud": "medium_amethyst_bud", "melon_side": "melon_side", @@ -1686,6 +1749,7 @@ "melon_top": "melon_top", "minecart": "entity/minecart", "minecraft": "gui/title/minecraft", + "miner_pottery_pattern": "entity/decorated_pot/miner_pottery_pattern", "mining_fatigue": "mob_effect/mining_fatigue", "mojang": "entity/banner/mojang", "mojangstudios": "gui/title/mojangstudios", @@ -1693,6 +1757,7 @@ "moss_block": "moss_block", "mossy_cobblestone": "mossy_cobblestone", "mossy_stone_bricks": "mossy_stone_bricks", + "mourner_pottery_pattern": "entity/decorated_pot/mourner_pottery_pattern", "mud": "mud", "mud_bricks": "mud_bricks", "muddy_mangrove_roots_side": "muddy_mangrove_roots_side", @@ -1714,7 +1779,9 @@ "nether_wart_stage0": "nether_wart_stage0", "nether_wart_stage1": "nether_wart_stage1", "nether_wart_stage2": "nether_wart_stage2", + "netherite": "trims/color_palettes/netherite", "netherite_block": "netherite_block", + "netherite_darker": "trims/color_palettes/netherite_darker", "netherite_layer_1": "models/armor/netherite_layer_1", "netherite_layer_2": "models/armor/netherite_layer_2", "netherrack": "netherrack", @@ -1722,7 +1789,7 @@ "news_icon": null, "news_notification_mainscreen": null, "night_vision": "mob_effect/night_vision", - "nitwit": "entity/zombie_villager/profession/nitwit", + "nitwit": "entity/villager/profession/nitwit", "nonlatin_european": "font/nonlatin_european", "noor": "entity/player/wide/noor", "normal": "entity/chest/normal", @@ -1730,7 +1797,7 @@ "normal_right": "entity/chest/normal_right", "note": "particle/note", "note_block": "note_block", - "oak": "gui/hanging_signs/oak", + "oak": "entity/chest_boat/oak", "oak_door_bottom": "oak_door_bottom", "oak_door_top": "oak_door_top", "oak_leaves": "oak_leaves", @@ -1803,6 +1870,8 @@ "pink_concrete": "pink_concrete", "pink_concrete_powder": "pink_concrete_powder", "pink_glazed_terracotta": "pink_glazed_terracotta", + "pink_petals": "pink_petals", + "pink_petals_stem": "pink_petals_stem", "pink_shulker_box": "pink_shulker_box", "pink_stained_glass": "pink_stained_glass", "pink_stained_glass_pane_top": "pink_stained_glass_pane_top", @@ -1814,9 +1883,19 @@ "piston_side": "piston_side", "piston_top": "piston_top", "piston_top_sticky": "piston_top_sticky", - "plains": "entity/zombie_villager/type/plains", + "pitcher_crop_bottom": "pitcher_crop_bottom", + "pitcher_crop_bottom_stage_1": "pitcher_crop_bottom_stage_1", + "pitcher_crop_bottom_stage_2": "pitcher_crop_bottom_stage_2", + "pitcher_crop_bottom_stage_3": "pitcher_crop_bottom_stage_3", + "pitcher_crop_bottom_stage_4": "pitcher_crop_bottom_stage_4", + "pitcher_crop_side": "pitcher_crop_side", + "pitcher_crop_top": "pitcher_crop_top", + "pitcher_crop_top_stage_3": "pitcher_crop_top_stage_3", + "pitcher_crop_top_stage_4": "pitcher_crop_top_stage_4", + "plains": "entity/villager/type/plains", "plant": "painting/plant", "playful_panda": "entity/panda/playful_panda", + "plenty_pottery_pattern": "entity/decorated_pot/plenty_pottery_pattern", "plus_icon": null, "podzol_side": "podzol_side", "podzol_top": "podzol_top", @@ -1860,6 +1939,7 @@ "powered_rail_on": "powered_rail_on", "prismarine": "prismarine", "prismarine_bricks": "prismarine_bricks", + "prize_pottery_pattern": "entity/decorated_pot/prize_pottery_pattern", "pufferfish": "entity/fish/pufferfish", "pumpkin_side": "pumpkin_side", "pumpkin_stem": "pumpkin_stem", @@ -1879,6 +1959,7 @@ "purpur_block": "purpur_block", "purpur_pillar": "purpur_pillar", "purpur_pillar_top": "purpur_pillar_top", + "quartz": "trims/color_palettes/quartz", "quartz_block_bottom": "quartz_block_bottom", "quartz_block_side": "quartz_block_side", "quartz_block_top": "quartz_block_top", @@ -1889,6 +1970,8 @@ "rail": "rail", "rail_corner": "rail_corner", "rain": "environment/rain", + "raiser": "trims/models/armor/raiser", + "raiser_leggings": "trims/models/armor/raiser_leggings", "ravager": "entity/illager/ravager", "raw_copper_block": "raw_copper_block", "raw_gold_block": "raw_gold_block", @@ -1896,7 +1979,7 @@ "realms": null, "recipe_book": "gui/recipe_book", "recipe_button": "gui/recipe_button", - "red": "entity/cat/red", + "red": "entity/bed/red", "red_candle": "red_candle", "red_candle_lit": "red_candle_lit", "red_concrete": "red_concrete", @@ -1916,6 +1999,7 @@ "red_terracotta": "red_terracotta", "red_tulip": "red_tulip", "red_wool": "red_wool", + "redstone": "trims/color_palettes/redstone", "redstone_block": "redstone_block", "redstone_dust_dot": "redstone_dust_dot", "redstone_dust_line0": "redstone_dust_line0", @@ -1950,6 +2034,8 @@ "respawn_anchor_top_off": "respawn_anchor_top_off", "restore_icon": null, "rhombus": "entity/banner/rhombus", + "rib": "trims/models/armor/rib", + "rib_leggings": "trims/models/armor/rib_leggings", "rooted_dirt": "rooted_dirt", "rose_bush_bottom": "rose_bush_bottom", "rose_bush_top": "rose_bush_top", @@ -1960,7 +2046,7 @@ "sandstone_bottom": "sandstone_bottom", "sandstone_top": "sandstone_top", "saturation": "mob_effect/saturation", - "savanna": "entity/zombie_villager/type/savanna", + "savanna": "entity/villager/type/savanna", "scaffolding_bottom": "scaffolding_bottom", "scaffolding_side": "scaffolding_side", "scaffolding_top": "scaffolding_top", @@ -2007,6 +2093,8 @@ "sea_lantern": "sea_lantern", "sea_pickle": "sea_pickle", "seagrass": "seagrass", + "sentry": "trims/models/armor/sentry", + "sentry_leggings": "trims/models/armor/sentry_leggings", "server_selection": "gui/server_selection", "sga_a": "particle/sga_a", "sga_b": "particle/sga_b", @@ -2035,9 +2123,13 @@ "sga_y": "particle/sga_y", "sga_z": "particle/sga_z", "shadow": "misc/shadow", + "shaper": "trims/models/armor/shaper", + "shaper_leggings": "trims/models/armor/shaper_leggings", + "sheaf_pottery_pattern": "entity/decorated_pot/sheaf_pottery_pattern", "sheep": "entity/sheep/sheep", "sheep_fur": "entity/sheep/sheep_fur", - "shepherd": "entity/zombie_villager/profession/shepherd", + "shelter_pottery_pattern": "entity/decorated_pot/shelter_pottery_pattern", + "shepherd": "entity/villager/profession/shepherd", "shield_base": "entity/shield_base", "shield_base_nopattern": "entity/shield_base_nopattern", "shriek": "particle/shriek", @@ -2061,10 +2153,14 @@ "shulker_white": "entity/shulker/shulker_white", "shulker_yellow": "entity/shulker/shulker_yellow", "siamese": "entity/cat/siamese", + "silence": "trims/models/armor/silence", + "silence_leggings": "trims/models/armor/silence_leggings", "silverfish": "entity/silverfish", - "skeleton": "painting/skeleton", + "skeleton": "entity/skeleton/skeleton", "skull": "entity/banner/skull", "skull_and_roses": "painting/skull_and_roses", + "skull_pottery_pattern": "entity/decorated_pot/skull_pottery_pattern", + "slider": "gui/slider", "slime": "entity/slime/slime", "slime_block": "slime_block", "slot_frame": null, @@ -2090,6 +2186,13 @@ "smooth_basalt": "smooth_basalt", "smooth_stone": "smooth_stone", "smooth_stone_slab_side": "smooth_stone_slab_side", + "sniffer": "entity/sniffer/sniffer", + "sniffer_egg_not_cracked": "sniffer_egg_not_cracked", + "sniffer_egg_slightly_cracked": "sniffer_egg_slightly_cracked", + "sniffer_egg_very_cracked": "sniffer_egg_very_cracked", + "snort_pottery_pattern": "entity/decorated_pot/snort_pottery_pattern", + "snout": "trims/models/armor/snout", + "snout_leggings": "trims/models/armor/snout_leggings", "snow": "snow", "snow_fox": "entity/fox/snow_fox", "snow_fox_sleep": "entity/fox/snow_fox_sleep", @@ -2154,6 +2257,8 @@ "spell_7": "particle/spell_7", "spider": "entity/spider/spider", "spider_eyes": "entity/spider_eyes", + "spire": "trims/models/armor/spire", + "spire_leggings": "trims/models/armor/spire_leggings", "spit": "entity/llama/spit", "splash_0": "particle/splash_0", "splash_1": "particle/splash_1", @@ -2162,7 +2267,7 @@ "sponge": "sponge", "spore_blossom": "spore_blossom", "spore_blossom_base": "spore_blossom_base", - "spruce": "gui/hanging_signs/spruce", + "spruce": "entity/chest_boat/spruce", "spruce_door_bottom": "spruce_door_bottom", "spruce_door_top": "spruce_door_top", "spruce_leaves": "spruce_leaves", @@ -2209,6 +2314,8 @@ "stripped_bamboo_block_top": "stripped_bamboo_block_top", "stripped_birch_log": "stripped_birch_log", "stripped_birch_log_top": "stripped_birch_log_top", + "stripped_cherry_log": "stripped_cherry_log", + "stripped_cherry_log_top": "stripped_cherry_log_top", "stripped_crimson_stem": "stripped_crimson_stem", "stripped_crimson_stem_top": "stripped_crimson_stem_top", "stripped_dark_oak_log": "stripped_dark_oak_log", @@ -2237,7 +2344,15 @@ "sunny": "entity/player/wide/sunny", "sunset": "painting/sunset", "survival_spawn": null, - "swamp": "entity/zombie_villager/type/swamp", + "suspicious_gravel_0": "suspicious_gravel_0", + "suspicious_gravel_1": "suspicious_gravel_1", + "suspicious_gravel_2": "suspicious_gravel_2", + "suspicious_gravel_3": "suspicious_gravel_3", + "suspicious_sand_0": "suspicious_sand_0", + "suspicious_sand_1": "suspicious_sand_1", + "suspicious_sand_2": "suspicious_sand_2", + "suspicious_sand_3": "suspicious_sand_3", + "swamp": "entity/villager/type/swamp", "sweep_0": "particle/sweep_0", "sweep_1": "particle/sweep_1", "sweep_2": "particle/sweep_2", @@ -2250,13 +2365,14 @@ "sweet_berry_bush_stage1": "sweet_berry_bush_stage1", "sweet_berry_bush_stage2": "sweet_berry_bush_stage2", "sweet_berry_bush_stage3": "sweet_berry_bush_stage3", + "tab_button": "gui/tab_button", "tab_inventory": "gui/container/creative_inventory/tab_inventory", "tab_item_search": "gui/container/creative_inventory/tab_item_search", "tab_items": "gui/container/creative_inventory/tab_items", "tabby": "entity/cat/tabby", - "tabs": "gui/container/creative_inventory/tabs", + "tabs": "gui/advancements/tabs", "tadpole": "entity/tadpole/tadpole", - "taiga": "entity/zombie_villager/type/taiga", + "taiga": "entity/villager/type/taiga", "tall_grass_bottom": "tall_grass_bottom", "tall_grass_top": "tall_grass_top", "tall_seagrass_bottom": "tall_seagrass_bottom", @@ -2265,6 +2381,8 @@ "target_top": "target_top", "temperate_frog": "entity/frog/temperate_frog", "terracotta": "terracotta", + "tide": "trims/models/armor/tide", + "tide_leggings": "trims/models/armor/tide_leggings", "tinted_glass": "tinted_glass", "tipped_arrow": "entity/projectiles/tipped_arrow", "tnt_bottom": "tnt_bottom", @@ -2272,8 +2390,12 @@ "tnt_top": "tnt_top", "toast": "entity/rabbit/toast", "toasts": "gui/toasts", - "toolsmith": "entity/zombie_villager/profession/toolsmith", + "toolsmith": "entity/villager/profession/toolsmith", "torch": "torch", + "torchflower": "torchflower", + "torchflower_crop_stage0": "torchflower_crop_stage0", + "torchflower_crop_stage1": "torchflower_crop_stage1", + "torchflower_crop_stage2": "torchflower_crop_stage2", "trader_llama": "entity/llama/decor/trader_llama", "trailer_icons": null, "trapped": "entity/chest/trapped", @@ -2286,6 +2408,7 @@ "triangles_top": "entity/banner/triangles_top", "trident": "entity/trident", "trident_riptide": "entity/trident_riptide", + "trim_palette": "trims/color_palettes/trim_palette", "tripwire": "tripwire", "tripwire_hook": "tripwire_hook", "tropical_a": "entity/fish/tropical_a", @@ -2538,12 +2661,14 @@ "unknown_pack": "misc/unknown_pack", "unknown_server": "misc/unknown_server", "unluck": "mob_effect/unluck", + "unseen_notification": "gui/unseen_notification", "upload": null, "user_icon": null, "verdant_froglight_side": "verdant_froglight_side", "verdant_froglight_top": "verdant_froglight_top", "vex": "entity/illager/vex", "vex_charging": "entity/illager/vex_charging", + "vex_leggings": "trims/models/armor/vex_leggings", "vibration": "particle/vibration", "vignette": "misc/vignette", "villager": "entity/villager/villager", @@ -2553,13 +2678,15 @@ "void": "painting/void", "wanderer": "painting/wanderer", "wandering_trader": "entity/wandering_trader", + "ward": "trims/models/armor/ward", + "ward_leggings": "trims/models/armor/ward_leggings", "warden": "entity/warden/warden", "warden_bioluminescent_layer": "entity/warden/warden_bioluminescent_layer", "warden_heart": "entity/warden/warden_heart", "warden_pulsating_spots_1": "entity/warden/warden_pulsating_spots_1", "warden_pulsating_spots_2": "entity/warden/warden_pulsating_spots_2", "warm_frog": "entity/frog/warm_frog", - "warped": "gui/hanging_signs/warped", + "warped": "entity/signs/warped", "warped_door_bottom": "warped_door_bottom", "warped_door_top": "warped_door_top", "warped_fungus": "warped_fungus", @@ -2578,9 +2705,11 @@ "water_flow": "water_flow", "water_overlay": "water_overlay", "water_still": "water_still", + "wayfinder": "trims/models/armor/wayfinder", + "wayfinder_leggings": "trims/models/armor/wayfinder_leggings", "weak_panda": "entity/panda/weak_panda", "weakness": "mob_effect/weakness", - "weaponsmith": "entity/zombie_villager/profession/weaponsmith", + "weaponsmith": "entity/villager/profession/weaponsmith", "weathered_copper": "weathered_copper", "weathered_cut_copper": "weathered_cut_copper", "weeping_vines": "weeping_vines", @@ -2607,12 +2736,14 @@ "white_terracotta": "white_terracotta", "white_tulip": "white_tulip", "white_wool": "white_wool", - "widgets": "gui/widgets", - "wind": "painting/wind", + "widgets": "gui/advancements/widgets", + "wild": "trims/models/armor/wild", + "wild_leggings": "trims/models/armor/wild_leggings", + "wind": "entity/conduit/wind", "wind_vertical": "entity/conduit/wind_vertical", "window": "gui/advancements/window", "witch": "entity/witch", - "wither": "painting/wither", + "wither": "entity/wither/wither", "wither_armor": "entity/wither/wither_armor", "wither_invulnerable": "entity/wither/wither_invulnerable", "wither_rose": "wither_rose", From e1077318c542d51bd45807b1f6eec7d5cf2254d4 Mon Sep 17 00:00:00 2001 From: "Patrick W. Crawford" Date: Sat, 25 Mar 2023 20:49:44 -0700 Subject: [PATCH 19/19] Upversion and test mitigation --- MCprep_addon/__init__.py | 2 +- test_files/addon_tests.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MCprep_addon/__init__.py b/MCprep_addon/__init__.py index f99e5c0a..1982f630 100755 --- a/MCprep_addon/__init__.py +++ b/MCprep_addon/__init__.py @@ -41,7 +41,7 @@ bl_info = { "name": "MCprep", "category": "Object", - "version": (3, 4, 2, 1), + "version": (3, 4, 3), "blender": (2, 80, 0), "location": "3D window toolshelf > MCprep tab", "description": "Minecraft workflow addon for rendering and animation", diff --git a/test_files/addon_tests.py b/test_files/addon_tests.py index 34b1fb46..13c43dff 100644 --- a/test_files/addon_tests.py +++ b/test_files/addon_tests.py @@ -1785,6 +1785,8 @@ def collection_effect_spawner(self): def img_sequence_effect_spawner(self): """Test the image sequence variant of effect spawning works.""" + if bpy.app.version < (2, 81): + return "Disabled due to consistent crashing" self._clear_scene() scn_props = bpy.context.scene.mcprep_props etype = "img_seq" @@ -2252,10 +2254,9 @@ def qa_rigs(self): issues.append([blend, resp]) checked += 1 - return "Checked {} rigs, issues: {}".format( - checked, issues) if issues: - return issues + return "Checked {} rigs, issues: {}".format( + checked, issues) def convert_mtl_simple(self): """Ensures that conversion of the mtl with other color space works."""