/ introspection / __init__.py
__init__.py
 1  """
 2  DreamTalk Introspection Module
 3  
 4  Provides semantic scene analysis for AI-assisted development and creative work.
 5  This module understands DreamTalk object semantics and returns meaningful
 6  descriptions rather than raw Cinema 4D data.
 7  
 8  Usage:
 9      from DreamTalk.introspection import describe_hierarchy, inspect_object
10  
11      # Get structured description of current scene
12      result = describe_hierarchy()
13  
14      # Deep dive into a single object
15      obj_info = inspect_object("Campfire")
16  
17      # Check materials
18      materials = inspect_materials()
19  
20      # Analyze animation
21      animation = inspect_animation(start_frame=0, end_frame=90)
22  
23      # Validate before render
24      validation = validate_scene()
25  
26      # Format for AI consumption
27      markdown = format_for_ai(result, "markdown")
28  """
29  
30  from .hierarchy import (
31      # Universal introspection (primary tool)
32      describe_scene,
33      # Legacy/internal functions (still available if needed)
34      describe_hierarchy,
35      describe_object,
36      inspect_object,
37      inspect_materials,
38      inspect_animation,
39      validate_scene,
40      find_object_by_name,
41      # XPresso introspection
42      inspect_xpresso,
43      # Scene diffing (now integrated into describe_scene)
44      get_scene_snapshot,
45      diff_scene,
46      reset_snapshot,
47      # Console log tracking (for describe_scene delta)
48      add_console_message,
49      get_console_delta,
50      reset_console_log,
51  )
52  from .formatters import format_for_ai, format_markdown, format_json, format_describe_scene
53  
54  __all__ = [
55      # Universal introspection (primary)
56      "describe_scene",
57      # Legacy/internal (still available)
58      "describe_hierarchy",
59      "describe_object",
60      "find_object_by_name",
61      "inspect_object",
62      "inspect_materials",
63      "inspect_animation",
64      "validate_scene",
65      "inspect_xpresso",
66      "get_scene_snapshot",
67      "diff_scene",
68      "reset_snapshot",
69      # Console log tracking
70      "add_console_message",
71      "get_console_delta",
72      "reset_console_log",
73      # Formatters
74      "format_for_ai",
75      "format_markdown",
76      "format_json",
77      "format_describe_scene",
78  ]