From aa602a7bb8280ad97073420c1ececc7cf37df136 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Wed, 17 Jul 2024 09:16:27 +0800 Subject: [PATCH] fix: update to blender 4.2 LTS - update to Blender 4.2 LTS - fix issue that can not find specular property in priniciple BSDF when applying virtools material. - update blender manifest toml to let plugin works. - there are various mesh works need to be fixed in later commits. this commit can not works normally on blender 4.2 --- bbp_ng/PROP_virtools_material.py | 2 +- bbp_ng/blender_manifest.toml | 2 +- docs/docs/zh-cn/tech-infos.md | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bbp_ng/PROP_virtools_material.py b/bbp_ng/PROP_virtools_material.py index 292e0d1..efd445a 100644 --- a/bbp_ng/PROP_virtools_material.py +++ b/bbp_ng/PROP_virtools_material.py @@ -397,7 +397,7 @@ def apply_to_blender_material(mtl: bpy.types.Material): # bnode.inputs["Emission"].default_value = rawdata.mEmissive.to_const_rgba() mtl.specular_intensity = rawdata.mSpecularPower - bnode.inputs["Specular"].default_value = UTIL_functions.clamp_float( + bnode.inputs["Specular IOR Level"].default_value = UTIL_functions.clamp_float( rawdata.mSpecularPower, 0.0, 1.0 ) diff --git a/bbp_ng/blender_manifest.toml b/bbp_ng/blender_manifest.toml index 8df40e6..dc82f1a 100644 --- a/bbp_ng/blender_manifest.toml +++ b/bbp_ng/blender_manifest.toml @@ -44,7 +44,7 @@ license = [ # ] # Optional list of supported platforms. If ommitted, the extension will be available in all operating systems. -platforms = ["windows-amd64", "linux-x86_64"] +platforms = ["windows-amd64", "windows-x64", "linux-x86_64", "linux-x64"] # Supported platforms: "windows-amd64", "macos-arm64", "linux-x86_64", "windows-arm64", "macos-x86_64" # Optional: bundle 3rd party Python modules. diff --git a/docs/docs/zh-cn/tech-infos.md b/docs/docs/zh-cn/tech-infos.md index b51e6ec..e9f4262 100644 --- a/docs/docs/zh-cn/tech-infos.md +++ b/docs/docs/zh-cn/tech-infos.md @@ -4,4 +4,9 @@ * 制图工具链标准及`meshes`文件夹下的文件的格式:https://github.com/yyc12345/gist/blob/master/BMFileSpec/YYCToolsChainSpec_ZH.md * BMERevenge的JSON文件的格式:https://github.com/yyc12345/gist/blob/master/BMERevenge/DevDocument_v2.0_ZH.md -本插件配合了`fake-bpy-module`模块来实现类型提示以加快开发速度。本插件目前基于Blender 3.6,因此使用`pip install fake-bpy-module-latest==20230627`来安装Blender的类型提示库。 这主要是因为`fake-bpy-module`没有发布官方的适用于Blender 3.6的包,因此我只能通过选择最接近Blender 3.6版本发布时间的每日编译版本来安装它。 +本插件配合了`fake-bpy-module`模块来实现类型提示以加快开发速度。使用如下命令来安装Blender的类型提示库。 + +* Blender 3.6: `pip install fake-bpy-module-latest==20230627` +* Blender 4.2: `pip install fake-bpy-module-latest==20240716` + +这么做主要是因为`fake-bpy-module`没有发布官方的适用于指定Blender版本的包,因此我只能通过选择最接近Blender对应版本发布时间的每日编译版本来安装它。