Fixes for Blender 2.93

This commit is contained in:
Luke Street 2021-04-28 13:35:54 -04:00
parent e9b4cce6db
commit 55438bd2ea
4 changed files with 10 additions and 10 deletions

View File

@ -481,7 +481,7 @@ bool FRME::Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl:
"frme_obj.retro_widget_default_active = {}\n" "frme_obj.retro_widget_default_active = {}\n"
"frme_obj.retro_widget_cull_faces = {}\n" "frme_obj.retro_widget_cull_faces = {}\n"
"frme_obj.retro_widget_color = ({},{},{},{})\n" "frme_obj.retro_widget_color = ({},{},{},{})\n"
"frme_obj.retro_widget_model_draw_flags = bpy.types.Object.retro_widget_model_draw_flags[1]['items'][{}][0]\n" "frme_obj.retro_widget_model_draw_flags = bpy.types.Object.retro_widget_model_draw_flags.keywords['items'][{}][0]\n"
"frme_obj.retro_widget_is_worker = {}\n" "frme_obj.retro_widget_is_worker = {}\n"
"frme_obj.retro_widget_worker_id = {}\n" "frme_obj.retro_widget_worker_id = {}\n"
"if parentName not in bpy.data.objects:\n" "if parentName not in bpy.data.objects:\n"
@ -545,9 +545,9 @@ bool FRME::Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl:
"frme_obj.retro_textpane_jp_font_path = '{}'\n" "frme_obj.retro_textpane_jp_font_path = '{}'\n"
"frme_obj.retro_textpane_jp_font_scale = ({},{})\n" "frme_obj.retro_textpane_jp_font_scale = ({},{})\n"
"frme_obj.retro_textpane_hjustification = " "frme_obj.retro_textpane_hjustification = "
"bpy.types.Object.retro_textpane_hjustification[1]['items'][{}][0]\n" "bpy.types.Object.retro_textpane_hjustification.keywords['items'][{}][0]\n"
"frme_obj.retro_textpane_vjustification = " "frme_obj.retro_textpane_vjustification = "
"bpy.types.Object.retro_textpane_vjustification[1]['items'][{}][0]\n"), "bpy.types.Object.retro_textpane_vjustification.keywords['items'][{}][0]\n"),
info->xDim, info->zDim, scaleF[0], scaleF[1], scaleF[2], fontPath.getRelativePathUTF8(), info->xDim, info->zDim, scaleF[0], scaleF[1], scaleF[2], fontPath.getRelativePathUTF8(),
info->wordWrap ? "True" : "False", info->horizontal ? "True" : "False", fillF[0], fillF[1], fillF[2], info->wordWrap ? "True" : "False", info->horizontal ? "True" : "False", fillF[0], fillF[1], fillF[2],
fillF[3], outlineF[0], outlineF[1], outlineF[2], outlineF[3], extentF[0], extentF[1], fillF[3], outlineF[0], outlineF[1], outlineF[2], outlineF[3], extentF[0], extentF[1],

View File

@ -157,8 +157,8 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat
bool areaInit = false; bool areaInit = false;
size_t layerIdx = 0; size_t layerIdx = 0;
LayerResources layerResources; LayerResources layerResources;
for (const hecl::DirectoryEnumerator::Entry& e : const hecl::DirectoryEnumerator enumerator(area.path.getAbsolutePath(), hecl::DirectoryEnumerator::Mode::DirsSorted);
hecl::DirectoryEnumerator(area.path.getAbsolutePath(), hecl::DirectoryEnumerator::Mode::DirsSorted)) { for (const hecl::DirectoryEnumerator::Entry& e : enumerator) {
hecl::SystemString layerName; hecl::SystemString layerName;
hecl::SystemChar* endCh = nullptr; hecl::SystemChar* endCh = nullptr;
hecl::StrToUl(e.m_name.c_str(), &endCh, 0); hecl::StrToUl(e.m_name.c_str(), &endCh, 0);

View File

@ -275,9 +275,9 @@ def recursive_cook(buffer, obj, version, path_hasher, parent_name):
def cook(writepipebuf, version, path_hasher): def cook(writepipebuf, version, path_hasher):
global hjustifications, vjustifications, model_draw_flags_e global hjustifications, vjustifications, model_draw_flags_e
hjustifications = dict((i[0], i[3]) for i in bpy.types.Object.retro_textpane_hjustification[1]['items']) hjustifications = dict((i[0], i[3]) for i in bpy.types.Object.retro_textpane_hjustification.keywords['items'])
vjustifications = dict((i[0], i[3]) for i in bpy.types.Object.retro_textpane_vjustification[1]['items']) vjustifications = dict((i[0], i[3]) for i in bpy.types.Object.retro_textpane_vjustification.keywords['items'])
model_draw_flags_e = dict((i[0], i[3]) for i in bpy.types.Object.retro_widget_model_draw_flags[1]['items']) model_draw_flags_e = dict((i[0], i[3]) for i in bpy.types.Object.retro_widget_model_draw_flags.keywords['items'])
buffer = bytearray() buffer = bytearray()
buffer += struct.pack('>IIII', 0, 0, 0, 0) buffer += struct.pack('>IIII', 0, 0, 0, 0)

View File

@ -249,10 +249,10 @@ def cook(writebuf, mesh_obj):
if mesh_obj.type != 'MESH': if mesh_obj.type != 'MESH':
raise RuntimeError("%s is not a mesh" % mesh_obj.name) raise RuntimeError("%s is not a mesh" % mesh_obj.name)
obj_vismodes = dict((i[0], i[3]) for i in bpy.types.Object.retro_mapobj_vis_mode[1]['items']) obj_vismodes = dict((i[0], i[3]) for i in bpy.types.Object.retro_mapobj_vis_mode.keywords['items'])
# Write out visibility type # Write out visibility type
vis_types = dict((i[0], i[3]) for i in bpy.types.Scene.retro_map_vis_mode[1]['items']) vis_types = dict((i[0], i[3]) for i in bpy.types.Scene.retro_map_vis_mode.keywords['items'])
writebuf(struct.pack('I', vis_types[bpy.context.scene.retro_map_vis_mode])) writebuf(struct.pack('I', vis_types[bpy.context.scene.retro_map_vis_mode]))
# Copy mesh (and apply mesh modifiers with triangulation) # Copy mesh (and apply mesh modifiers with triangulation)