- 新增插件核心文件 __init__.py,包含插件信息和注册逻辑 - 添加工具模块 utils.py,实现 AOV 烘焙和网格视图生成功能 - 包含资产文件:Materials.blend 和 geonodesuvpack.blend - 添加 .gitignore 文件以忽略 Python 缓存目录 - 插件提供 3D 视图面板,包含两个操作按钮
35 lines
1.0 KiB
Python
35 lines
1.0 KiB
Python
bl_info = {
|
|
"name" : "ComfyProjector",
|
|
"author" : "Blender Procedural",
|
|
"description" : "Projector for ComfyUI",
|
|
"blender" : (5, 0, 0),
|
|
"version" : (1, 0, 0),
|
|
"location" : "",
|
|
"warning" : "",
|
|
"doc_url": "",
|
|
"tracker_url": "",
|
|
"category" : "3D View"
|
|
}
|
|
|
|
import bpy # noqa: E402
|
|
from .utils import classes # noqa: E402
|
|
|
|
|
|
def register():
|
|
for cls in classes:
|
|
bpy.utils.register_class(cls)
|
|
bpy.types.Scene.sna_activeobject = bpy.props.PointerProperty(type=bpy.types.Object)
|
|
bpy.types.Scene.sna_bakecam = bpy.props.PointerProperty(type=bpy.types.Object)
|
|
bpy.types.Scene.sna_activeobject_name = bpy.props.StringProperty()
|
|
|
|
|
|
def unregister():
|
|
if hasattr(bpy.types.Scene, "sna_activeobject_name"):
|
|
del bpy.types.Scene.sna_activeobject_name
|
|
if hasattr(bpy.types.Scene, "sna_bakecam"):
|
|
del bpy.types.Scene.sna_bakecam
|
|
if hasattr(bpy.types.Scene, "sna_activeobject"):
|
|
del bpy.types.Scene.sna_activeobject
|
|
for cls in reversed(classes):
|
|
bpy.utils.unregister_class(cls)
|