feat: 添加 ComfyProjector Blender 插件初始版本
- 新增插件核心文件 __init__.py,包含插件信息和注册逻辑 - 添加工具模块 utils.py,实现 AOV 烘焙和网格视图生成功能 - 包含资产文件:Materials.blend 和 geonodesuvpack.blend - 添加 .gitignore 文件以忽略 Python 缓存目录 - 插件提供 3D 视图面板,包含两个操作按钮
This commit is contained in:
34
__init__.py
Normal file
34
__init__.py
Normal file
@@ -0,0 +1,34 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user