diff --git a/bbp_ng/.gitignore b/bbp_ng/.gitignore index 52394bb..b0a243a 100644 --- a/bbp_ng/.gitignore +++ b/bbp_ng/.gitignore @@ -1,7 +1,7 @@ ## ===== Personal ===== -# Do not include PyBMap in this repository. +# Do not include pybmap in this repository. # Order user build and fetch it manually. -PyBMap/ +pybmap/ # Disable generated assets but keep the directory hierarchy. icons/* diff --git a/bbp_ng/OP_EXPORT_virtools.py b/bbp_ng/OP_EXPORT_virtools.py index eb8a6d5..b21db81 100644 --- a/bbp_ng/OP_EXPORT_virtools.py +++ b/bbp_ng/OP_EXPORT_virtools.py @@ -4,7 +4,7 @@ import tempfile, os, typing from . import PROP_preferences, UTIL_ioport_shared, UTIL_naming_convention from . import UTIL_virtools_types, UTIL_functions, UTIL_file_browser, UTIL_blender_mesh, UTIL_ballance_texture from . import PROP_virtools_group, PROP_virtools_material, PROP_virtools_mesh, PROP_virtools_texture, PROP_virtools_light -from .PyBMap import bmap_wrapper as bmap +from .pybmap import bmap_wrapper as bmap class BBP_OT_export_virtools(bpy.types.Operator, UTIL_file_browser.ExportVirtoolsFile, UTIL_ioport_shared.ExportParams, UTIL_ioport_shared.VirtoolsParams, UTIL_ioport_shared.BallanceParams): """Export Virtools File""" diff --git a/bbp_ng/OP_IMPORT_virtools.py b/bbp_ng/OP_IMPORT_virtools.py index 58e3b07..d4d3905 100644 --- a/bbp_ng/OP_IMPORT_virtools.py +++ b/bbp_ng/OP_IMPORT_virtools.py @@ -4,7 +4,7 @@ import tempfile, os, typing from . import PROP_preferences, UTIL_ioport_shared, UTIL_naming_convention from . import UTIL_virtools_types, UTIL_functions, UTIL_file_browser, UTIL_blender_mesh, UTIL_ballance_texture from . import PROP_virtools_group, PROP_virtools_material, PROP_virtools_mesh, PROP_virtools_texture, PROP_virtools_light, PROP_ballance_map_info -from .PyBMap import bmap_wrapper as bmap +from .pybmap import bmap_wrapper as bmap class BBP_OT_import_virtools(bpy.types.Operator, UTIL_file_browser.ImportVirtoolsFile, UTIL_ioport_shared.ImportParams, UTIL_ioport_shared.VirtoolsParams, UTIL_ioport_shared.BallanceParams): """Import Virtools File""" diff --git a/bbp_ng/PROP_ptrprop_resolver.py b/bbp_ng/PROP_ptrprop_resolver.py index e89f415..f4c71f9 100644 --- a/bbp_ng/PROP_ptrprop_resolver.py +++ b/bbp_ng/PROP_ptrprop_resolver.py @@ -202,7 +202,7 @@ class PropsVisitor(): """ encodings = get_ioport_encodings(self.__mAssocScene) encodings.clear() - for default_enc in UTIL_virtools_types.g_PyBMapDefaultEncodings: + for default_enc in UTIL_virtools_types.g_PybmapDefaultEncodings: item = encodings.add() item.encoding = default_enc def draw_ioport_encodings(self, layout: bpy.types.UILayout) -> None: diff --git a/bbp_ng/UTIL_virtools_types.py b/bbp_ng/UTIL_virtools_types.py index ab7fd63..25bebda 100644 --- a/bbp_ng/UTIL_virtools_types.py +++ b/bbp_ng/UTIL_virtools_types.py @@ -2,8 +2,8 @@ import bpy, mathutils import typing, math from . import UTIL_functions -# extract all declarations in PyBMap -from .PyBMap.virtools_types import * +# extract all declarations in pybmap +from .pybmap.virtools_types import * # and add some patches for them # mainly patch them with functions exchanging data with blender # and the convertion between differnet coordinate system. @@ -273,11 +273,11 @@ def virtools_name_regulator(name: str | None) -> str: else: return bpy.app.translations.pgettext_data('annoymous', 'BME/UTIL_virtools_types.virtools_name_regulator()') # YYC MARK: -# There are default encodings for PyBMap. We support Western European and Simplified Chinese in default. +# There are default encodings for pybmap. We support Western European and Simplified Chinese in default. # Since LibCmo 0.2, the encoding name of LibCmo become universal encoding which is platfoorm independent. # So no need set it according to different platform. # Use universal encoding name (like Python). -g_PyBMapDefaultEncodings: tuple[str, ...] = ( +g_PybmapDefaultEncodings: tuple[str, ...] = ( 'cp1252', 'gbk' ) diff --git a/docs/docs/en/compile-distribute-plugin.md b/docs/docs/en/compile-distribute-plugin.md index a0f859d..d2d7841 100644 --- a/docs/docs/en/compile-distribute-plugin.md +++ b/docs/docs/en/compile-distribute-plugin.md @@ -4,13 +4,13 @@ This page will guide you in compiling the plugin as well as distributing it. ## Compiling LibCmo with BMap -BBP's Virtools file native import/export functionality relies on BMap and its Python binding PyBMap. In order to distribute the plugin, we need to first compile BMap and its predecessor LibCmo, and before doing so, you need to check the version of BMap you need. Because BBP doesn't always use the latest version of BMap, e.g. if you're compiling an older version of BBP, it's obviously not possible to rely on the latest version of BMap. BMap is constantly being upgraded, and the functionality it provides is constantly changing, and different versions of BMap are incompatible. BBP usually states the version of BMap it uses at the time of release, but if BBP doesn't point it out, you may need to look for the most recent version of BMap that compiles with the version of BBP at the time of its release. +BBP's Virtools file native import/export functionality relies on BMap and its Python binding pybmap. In order to distribute the plugin, we need to first compile BMap and its predecessor LibCmo, and before doing so, you need to check the version of BMap you need. Because BBP doesn't always use the latest version of BMap, e.g. if you're compiling an older version of BBP, it's obviously not possible to rely on the latest version of BMap. BMap is constantly being upgraded, and the functionality it provides is constantly changing, and different versions of BMap are incompatible. BBP usually states the version of BMap it uses at the time of release, but if BBP doesn't point it out, you may need to look for the most recent version of BMap that compiles with the version of BBP at the time of its release. After specifying the version, you need to visit [LibCmo GitHub repository](https://github.com/yyc12345/libcmo21). Then clone the project and use the Git command to go to the corresponding version (or just download the source code of the corresponding version). Then follow LibCmo's compilation manual to compile to get BMap. on Windows, you'll usually get the files `BMap.dll` and `BMap.pdb`. On Linux, it will be `BMap.so`. -Then we need to configure PyBMap, which comes with LibCmo. Please follow the manual of PyBMap to combine the compiled binary BMap library with PyBMap. That is to complete the PyBMap configuration. +Then we need to configure pybmap, which comes with LibCmo. Please follow the manual of pybmap to combine the compiled binary BMap library with pybmap. That is to complete the pybmap configuration. -Then we need to copy the configured PyBMap to our project under `bbp_ng/PyBMap` to complete this step. +Then we need to copy the configured pybmap to our project under `bbp_ng/pybmap` to complete this step. ## Generate Resources diff --git a/docs/docs/zh-cn/compile-distribute-plugin.md b/docs/docs/zh-cn/compile-distribute-plugin.md index f25209f..3d7e7b4 100644 --- a/docs/docs/zh-cn/compile-distribute-plugin.md +++ b/docs/docs/zh-cn/compile-distribute-plugin.md @@ -4,13 +4,13 @@ ## 编译LibCmo与BMap -BBP的Virtools文件原生导入导出功能依赖BMap以及其Python绑定PyBMap来实现。为了分发插件,我们需要首先编译BMap及其前置LibCmo。而在编译前,你需要先确认你需要的BMap版本。因为BBP并不总是使用最新的BMap,例如你正在编译一个旧版的BBP,其显然不可能依赖最新的BMap。BMap也在不断升级中,其提供的功能也在不断变化,不同版本的BMap是不兼容的。BBP通常会在发布时写明其所用的BMap版本,如果BBP没有指出,你可能需要寻找与BBP发布时最近的BMap版本来编译。 +BBP的Virtools文件原生导入导出功能依赖BMap以及其Python绑定pybmap来实现。为了分发插件,我们需要首先编译BMap及其前置LibCmo。而在编译前,你需要先确认你需要的BMap版本。因为BBP并不总是使用最新的BMap,例如你正在编译一个旧版的BBP,其显然不可能依赖最新的BMap。BMap也在不断升级中,其提供的功能也在不断变化,不同版本的BMap是不兼容的。BBP通常会在发布时写明其所用的BMap版本,如果BBP没有指出,你可能需要寻找与BBP发布时最近的BMap版本来编译。 在明确版本后,你需要访问[LibCmo位于GitHub的存储库](https://github.com/yyc12345/libcmo21)。然后克隆项目,使用Git命令转到对应版本(或者直接下载对应版本的源码)。然后按照LibCmo的编译手册编译得到BMap。在Windows上,你通常会得到`BMap.dll`和`BMap.pdb`这两个文件。而在Linux上,则会是`BMap.so`。 -然后我们需要配置PyBMap。PyBMap是随LibCmo一起提供的。请按照PyBMap的手册,将编译得到的二进制BMap库,和PyBMap结合在一起。即完成PyBMap配置。 +然后我们需要配置pybmap。pybmap是随LibCmo一起提供的。请按照pybmap的手册,将编译得到的二进制BMap库,和pybmap结合在一起。即完成pybmap配置。 -然后我们需要将配置好的PyBMap拷贝到本项目的根目录下即可完成此步(即存在`bbp_ng/PyBMap`文件夹,为配置好的PyBMap)。 +然后我们需要将配置好的pybmap拷贝到本项目的根目录下即可完成此步(即存在`bbp_ng/pybmap`文件夹,为配置好的pybmap)。 ## 生成资源