Since | 19.0 |
int usd_setvisibility(int stagehandle, string primpath, int code)
This function makes the primitive visible or invisible, or configures it to inherit the visibility from the parent.
Making a primitive visible may require changing the visibility state of its ancestors, while making it invisible or configuring it to inherit the visibility from the parent only requires setting its attribute.
NOTE: This function is similar to usd_setvisible()
which, is equivalent to calling this function with either visibility or invisibility code.
stagehandle
書き出し先のステージのハンドル。
現在のところ、唯一有効な値は0
のみです。
この値は、ノード内の現在のステージを意味します(今後は、この引数を使用することで他のステージへの書き出しが可能になります)。
primpath
Primのパス。
code
A numeric code for visibility
-
0 - make the primitive invisible
-
1 - configure the primitive to be visible
-
2 - mark the primitive to inherit visibility from the parent
Note, these numeric codes are reflected as defines in the “usd.h” header file, as USD_VISIBILITY_INVISIBLE, USD_VISIBILITY_VISIBLE, and USD_VISIBILITY_INHERIT.
Returns
The value of stagehandle
on success or -1
on failure.
Examples
#include <usd.h> // Make the sphere primitive visible. usd_setvisibility(0, "/geo/sphere", USD_VISIBILITY_VISIBLE); // Configure the cube primitive to inherit visibility from parent. usd_setvisibility(0, "/geo/cube", USD_VISIBILITY_INHERIT);
See also | |
usd | |
usd_prim |
|