Hi there,
HtoA 6.0.1.0 (Arnold 7.0.0.0)
Houdini 18.5.696
CentOS Linux 7 (Core), Linux kernel 3.10.0-1160.31.1.el7.x86_64
I was recently testing the API for procedurals using the examples in the official documentation (e.g: the one for random flakes here https://docs.arnoldrenderer.com/display/A5ARP/Random+Flake+Procedural) but this line (and similar AiNode() calls in the other 2 examples in the docs) was causing some interesting problems:
// create node with procedural node as parent
AtNode *points_node = AiNode("points", "flake", node)This will compile and link without issues (which is interesting), but will break at runtime with the following symptoms:
I finally bit the bullet and looked at the signature for AiNode() in the API docs, which explains the problem: The first argument is supposed to be a pointer to AtUniverse (and the examples are passing a pointer to char). Anyway, things work fine once I change those to match the signature with something like:
// create node with procedural node as parent
AtNode *points_node = AiNode(AiNodeGetUniverse(node), "points", "flake", node)So the RFE: Please update the docs ![]()
P.S: Interesting the compiler didn't catch this -- the signature for AiNode in ai_nodes.h has explicit types for the pointers (as opposed to void*), so unless there's some indirection that masks that, I would have hoped that it would catch it... have to dig deeper... just getting started on all of this.
Cheers!
You can define AI_ENABLE_DEPRECATION_WARNINGS to get warnings.
That will be defined by default in the future...
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.