15 nodes_.append(std::unique_ptr<Node>(
node));
16 top_level_nodes_.add_new(
node);
24 clusters_.append(std::unique_ptr<Cluster>(cluster));
25 top_level_clusters_.add_new(cluster);
33 edges_.append(std::unique_ptr<UndirectedEdge>(edge));
40 edges_.append(std::unique_ptr<DirectedEdge>(edge));
46 if (parent_ == new_parent) {
49 if (parent_ ==
nullptr) {
50 graph_.top_level_clusters_.remove(
this);
51 new_parent->children_.add_new(
this);
53 else if (new_parent ==
nullptr) {
54 parent_->children_.remove(
this);
55 graph_.top_level_clusters_.add_new(
this);
58 parent_->children_.remove(
this);
59 new_parent->children_.add_new(
this);
66 if (cluster_ == cluster) {
69 if (cluster_ ==
nullptr) {
70 graph_.top_level_nodes_.remove(
this);
71 cluster->nodes_.add_new(
this);
73 else if (cluster ==
nullptr) {
74 cluster_->nodes_.remove(
this);
75 graph_.top_level_nodes_.add_new(
this);
78 cluster_->nodes_.remove(
this);
79 cluster->nodes_.add_new(
this);
89 for (
Cluster *cluster : top_level_clusters_) {
90 cluster->set_random_cluster_bgcolors();
96 float hue = rand() / (
float)RAND_MAX;
97 float staturation = 0.3f;
101 for (
Cluster *cluster : children_) {
102 cluster->set_random_cluster_bgcolors();
109 while (current !=
nullptr) {
110 if (current ==
this) {
113 current = current->parent_;
123 std::stringstream ss;
128 for (
const std::unique_ptr<DirectedEdge> &edge : edges_) {
129 edge->export__as_edge_statement(ss);
139 std::stringstream ss;
144 for (
const std::unique_ptr<UndirectedEdge> &edge : edges_) {
145 edge->export__as_edge_statement(ss);
159 for (
Node *
node : top_level_nodes_) {
160 node->export__as_declaration(ss);
163 for (
Cluster *cluster : top_level_clusters_) {
164 cluster->export__declare_nodes_and_clusters(ss);
170 ss <<
"subgraph " << this->
name() <<
" {\n";
177 node->export__as_declaration(ss);
180 for (
Cluster *cluster : children_) {
181 cluster->export__declare_nodes_and_clusters(ss);
211 ss << key <<
"=" << value <<
", ";
215 for (
char c : value) {
244 if (port_name_.has_value()) {
245 ss <<
":" << *port_name_;
251 std::stringstream ss;
252 ss << std::setprecision(4) << h <<
' ' << s <<
' ' <<
v;
262 std::stringstream ss;
264 ss << R
"(<<table border="0" cellspacing="3">)";
267 ss << R
"(<tr><td colspan="3" align="center"><b>)";
268 ss << ((name.size() == 0) ? "No Name" : name);
269 ss <<
"</b></td></tr>";
273 for (
int i = 0; i < socket_max_amount; i++) {
275 if (i < input_names.
size()) {
277 if (name.
size() == 0) {
280 ss << R
"(<td align="left" port="in)" << i << "\">";
288 if (i < output_names.
size()) {
290 if (name.
size() == 0) {
293 ss << R
"(<td align="right" port="out)" << i << "\">";
typedef float(TangentPoint)[2]
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its hue
ATTR_WARN_UNUSED_RESULT const BMVert * v
void foreach_item(const FuncT &func) const
constexpr int64_t size() const
constexpr int64_t size() const
void export__as_bracket_list(std::stringstream &ss) const
void set(StringRef key, StringRef value)
void set_parent_cluster(Cluster *new_parent)
bool contains(Node &node) const
void export__declare_nodes_and_clusters(std::stringstream &ss) const
void set_random_cluster_bgcolors()
void export__as_edge_statement(std::stringstream &ss) const
DirectedEdge & new_edge(NodePort from, NodePort to)
std::string to_dot_string() const
Cluster & new_cluster(StringRef label="")
void set_random_cluster_bgcolors()
Node & new_node(StringRef label)
void export__declare_nodes_and_clusters(std::stringstream &ss) const
void to_dot_string(std::stringstream &ss) const
NodeWithSocketsRef(Node &node, StringRef name, Span< std::string > input_names, Span< std::string > output_names)
void set_shape(Attr_shape shape)
void export__as_declaration(std::stringstream &ss) const
void export__as_id(std::stringstream &ss) const
void set_parent_cluster(Cluster *cluster)
void export__as_edge_statement(std::stringstream &ss) const
UndirectedEdge & new_edge(NodePort a, NodePort b)
std::string to_dot_string() const
std::string color_attr_from_hsv(float h, float s, float v)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
_W64 unsigned int uintptr_t