About Me

Not Specified
Not Specified


Recent Forum Posts

detail expression query Jan. 19, 2020, 2:16 a.m.

The last argument is always ignored. It is just there so you can change a prim/point/vertex call (which each have an element number argument) to a detail call by changing the name without having to change the arguments as well.

at this point it's important to make a distinction
what you are talking about is detail() VEX function
the thread title (also the code snippet in the first post) suggests we are talking about detail() expression function

for detail() VEX function if the 3rd argument is specified, it will be ignored altogether, however you can also use just 2 arguments

in case of detail() HScript expression function, this still applies https://www.sidefx.com/forum/topic/71592/#post-303412 [www.sidefx.com]

detail expression query Jan. 18, 2020, 10:15 p.m.

According to another post (it seems to have been deleted), the “0” is “the default value DETAIL will use if it can't get a valid value from the object”, which tallies with what I thought it might be.

This is not mentioned in the link above, btw (Babaj). If anyone would like to confirm this is correct, feel free to post.
If there was such answer and it's now deleted it's probably because it's incorrect

the help page is pretty descriptive, however it requires some prior knowledge (like undestanding what a component of a vector, or array attribute value is)
detail() expression function returns only a scalar value, single number

if your detail attribute is vector or array it will consist of multiple scalar values like {2.3, 4.7, 2}…
0 is simply an index specifying which value to pick
0 will pick first, which in case of example vector {2.3, 4.7, 2} will be 2.3
1 second, 4.7
2 third, 2
etc …

If your detail attribute is already a scalar value (float or int) then specifying index is sort of meaningless, but since detail() expression function expects it, you still have to put something in there, usually 0

Also for string values you'll need to use details() function, which unfortunately doesn't allow for specifying the index, so it's not possible to read specific values from string array attribites

Create points from curve attributes? Jan. 18, 2020, 6:52 p.m.

Scatter SOP can take density attribute