MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ inspect_modulator_tree()

InspectResult MayaFlux::Portal::Forma::Inspector::inspect_modulator_tree ( const Nodes::ModulatorTree &  tree,
Surface &  surface,
LayoutCursor &  cursor,
float  x_min,
float  x_max,
float  row_h,
int  depth 
)
private

Definition at line 36 of file NodeQuery.cpp.

41{
42 const float ind = x_min + static_cast<float>(depth) * k_inspect_indent;
43
44 const std::string header_label = std::string(role_label(tree.role))
45 + ": " + Reflect::short_dynamic_type_name(*tree.node);
46
47 auto node_ref = tree.node;
48 std::vector<EntrySpec> entrys {
49 EntrySpec {
50 .label = "out",
51 .reader = [node_ref] { return std::to_string(node_ref->get_last_output()); },
52 },
53 };
54
55 auto hbuf = make_header_buffer(surface.window());
56 auto rbufs = make_row_buffers(surface.window(), entrys.size());
57
58 auto group = make_entry_group(entrys, header_label, std::move(hbuf), rbufs,
59 surface, cursor, ind, x_max, row_h, false);
60
61 InspectResult result;
62 result.group = std::move(group);
63
64 for (const auto& child : tree.modulators) {
65 auto child_result = inspect_modulator_tree(
66 child, surface, cursor,
67 x_min, x_max, row_h, depth + 1);
68 surface.layer().relate(
69 result.group.header.header_id,
70 child_result.group.header.header_id);
71 result.children.push_back(std::move(child_result));
72 }
73
74 return result;
75}
uint32_t depth
std::shared_ptr< Buffers::FormaBuffer > make_header_buffer(const std::shared_ptr< Core::Window > &window) const
A "text"-slotted buffer, registered with the BufferManager.
Definition Inspector.cpp:11
InspectResult inspect_modulator_tree(const Nodes::ModulatorTree &tree, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, int depth)
Definition NodeQuery.cpp:36
std::vector< EntryBuffer > make_row_buffers(const std::shared_ptr< Core::Window > &window, size_t count) const
count row targets, slices of one "text"-slotted buffer, for make_entry_group's rows.
Definition Inspector.cpp:24
EntryGroup make_entry_group(std::span< const EntrySpec > entrys, std::string_view header_label, FormaTarget header_buf, std::span< const EntryBuffer > row_bufs, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, bool initially_open)
Construct a collapsible header followed by N entry rows under it.
Definition Entry.cpp:104
constexpr float k_inspect_indent
std::string short_dynamic_type_name(const T &obj) noexcept
Returns the unqualified dynamic type name of obj.
Definition TypeInfo.hpp:95

References MayaFlux::Portal::Forma::InspectResult::children, depth, MayaFlux::Portal::Forma::InspectResult::group, MayaFlux::Portal::Forma::EntryGroup::header, MayaFlux::Portal::Forma::Collapsible::header_id, inspect_modulator_tree(), MayaFlux::Portal::Forma::k_inspect_indent, MayaFlux::Portal::Forma::EntrySpec::label, MayaFlux::Portal::Forma::Surface::layer(), MayaFlux::Portal::Forma::make_entry_group(), make_header_buffer(), make_row_buffers(), MayaFlux::Nodes::ModulatorTree::modulators, MayaFlux::Nodes::ModulatorTree::node, MayaFlux::Portal::Forma::Layer::relate(), MayaFlux::Nodes::ModulatorTree::role, MayaFlux::Reflect::short_dynamic_type_name(), and MayaFlux::Portal::Forma::Surface::window().

Referenced by inspect_modulator_tree(), and node().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: