-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathproperties.py
58 lines (50 loc) · 2.06 KB
/
properties.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import bpy
class MeshGenEvent(bpy.types.PropertyGroup):
__annotations__ = {
"type": bpy.props.EnumProperty(
name="Type",
description="The type of event",
items=[
("THINKING", "Thinking", "The agent is thinking"),
("STEP", "Step", "A step in the agent's thought process"),
("ERROR", "Error", "An error occurred"),
("CANCELED", "Canceled", "The operation was canceled by the user"),
("SUCCESS", "Result", "The result of the operation"),
("LOADING", "Loading", "The model is loading"),
("LOADING_SUCCESS", "Loaded", "The model loaded successfully"),
("LOADING_ERROR", "Error", "The model failed to load"),
],
),
"content": bpy.props.StringProperty(
name="Content",
description="The content of the event",
default="",
),
}
class MeshGenProperties(bpy.types.PropertyGroup):
__annotations__ = {
"prompt": bpy.props.StringProperty(
name="Prompt",
description="Enter a request for the AI agent",
default="Create a cube",
),
"state": bpy.props.EnumProperty(
name="State",
description="The current state of the agent",
items=[
("READY", "Ready", "The agent is ready to process a request"),
("LOADING", "Loading", "The agent is loading"),
("RUNNING", "Running", "The agent is running"),
("CANCELED", "Canceled", "The operation is flagged for cancellation"),
],
default="READY",
),
"history": bpy.props.CollectionProperty(type=MeshGenEvent),
}
def register():
bpy.utils.register_class(MeshGenEvent)
bpy.utils.register_class(MeshGenProperties)
bpy.types.Scene.meshgen_props = bpy.props.PointerProperty(type=MeshGenProperties)
def unregister():
bpy.utils.unregister_class(MeshGenEvent)
bpy.utils.unregister_class(MeshGenProperties)