diff --git a/commands/helpcards.json b/commands/helpcards.json index b87e797..b95a3dc 100644 --- a/commands/helpcards.json +++ b/commands/helpcards.json @@ -11,8 +11,14 @@ "atan": "
Returns the arc-tangent of the argument.
atan(number
)
atan (1.73205)=60
Returns the arc-tangent of y
/x
.
atan2(y
, x
)
This is more stable than atan since it\ncan use the signs of y and x to determine the quadrant the angle is in.\nIt also handles the case where x is zero correctly, returning 90 or -90.
atan2(1, 0) = 90
atan2(0, 1) = 0
atan2(0, -1) = 180
Converts a string to a float.
atof(source
)
Returns a space-separated list of attribute names.
attriblist(surface_node
, class
)
The class
can be one of D_VERTEX
,D_POINT
, D_PRIMITIVE
, or D_DETAIL
\nfor the corresponding attribute class.
Returns bounding box information for a surface node.
bbox(surface_node
, type
)
The type
\ncan be one of D_XMIN, D_YMIN, D_ZMIN, D_XMAX, D_YMAX, D_ZMAX, D_XSIZE,\nD_YSIZE, or D_ZSIZE for the corresponding values of the bounding box.
Channel segment function: Bezier interpoloation spline
bezier()
Combines two numbers with bitwise-and.
bitand(abits
, bbits
)
Returns the abits and bbits combined with bitwise-and.
All operands are rounded to the nearest integer before processing.
bitand (0, 6) = 0
bitand (15, 6) = 6
Combines two numbers with bitwise-or.
bitor(abits
, bbits
)
Returns the abits and bbits combined with bitwise-or.
All operands are rounded to the nearest integer before processing.
bitor (0, 6) = 6
bitor (15, 6) = 15
Sets or clears a bit in a number.
bitset(number
, bit_index
, value
)
Returns the provided number with the bit corresponding to bit_index being either set if value is not zero, or clear if value is zero.
All operands are rounded to the nearest integer before processing.
Bit 0 corresponds to the rightmost bit. Negative bit indices, or bit indices over 63, will return the number unchanged.
bitset (0, 3, 1) = 8
bitset (15, 3, 0) = 7
Returns if a given bit is set.
bittest(number
, bit_index
)
Returns 1 if the given bit is set in the provided number.
The number is rounded to the nearest integer before testing. Bit 0 corresponds to the rightmost bit. Negative bit indices, or bit indices over 63, will always return 0.
bittest (8, 3) = 1
bittest (8, 1) = 0
Combines two numbers with bitwise-xor.
bitxor(abits
, bbits
)
Returns the abits and bbits combined with bitwise-or.
All operands are rounded to the nearest integer before processing.
bitxor (0, 6) = 6
bitxor (15, 6) = 9
Returns the angle at the joint between two bone objects.
boneangle(bone1
, bone2
)
Returns the smallest integer not less than the value passed in.
ceil()
Returns centroid information for a surface node.
centroid(surface_node
, type
)
The type
should\nbe one of D_X
, D_Y
, or D_Z
for the corresponding components of the\ncentroid.
centroid(\"../sphere1\", D_X)
centroid(\"../sphere1\", D_Y)
centroid(\"../sphere1\", D_Z)
The centroid is the center of the bounding box of the points, not the average position of the points.
Returns the start index of a CHOP.
chops(CHOP
)
chops(\"/ch/ch1/wave1\")
Returns the string value of a channel within a CHOP at the current time.
chopstr(channel
)
chopstr(\"/ch/ch1/wave1/chan1\")
Returns the value of a channel within a CHOP at a specified time.
chopt(channel
, time
)
chopt(\"/ch/ch1/wave1/chan1\", 0.5)
Returns the value of a ramp parameter at a specific position.
chramp(ramp_path
, position
, component_index
)
position
must be a value from 0 to 1.
component_index
is the component of the evaluated value to return. For\ncolor ramps, it must be either 0, 1, or 2. For single-valued ramps,\ncomponent_index
must be 0.
Return the second component of the evaluated ramp value at a position of 0.33:
chramp(\"/obj/geo1/popnet1/color1/rampcolor\", 0.33, 1)
Returns the value of a ramp parameter at a specific position and frame.
chrampf(ramp_path
, position
, component_index
, frame
)
position
must be a value from 0 to 1.
component_index
is the component of the evaluated value to return. For\ncolor ramps, it must be either 0, 1, or 2. For single-valued ramps,\ncomponent_index
must be 0.
Return second component of the evaluated ramp value at a position of 0.33 at frame 289:
chrampf(\"/obj/geo1/popnet1/color1/rampcolor\", 0.33, 1, 289)
Returns the value of a ramp parameter at a specific position and time.
chrampf(ramp_path
, position
, component_index
, time
)
position
must be a value from 0 to 1.
component_index
is the component of the evaluated value to return. For\ncolor ramps, it must be either 0, 1, or 2. For single-valued ramps,\ncomponent_index
must be 0.
Return second component of the evaluated ramp value at a position of 0.33 at 12 seconds into the scene:
chrampf(\"/obj/geo1/popnet1/color1/rampcolor\", 0.33, 1, 12)
Returns the value of a ramp parameter at a specific position.
chramp(ramp_path
, position
, component_index
)
When position
is outside of the interval [0, 1), it will be first wrapped\naround into such an interval before being used.
component_index
is the component of the evaluated value to return. For\ncolor ramps, it must be either 0, 1, or 2. For single-valued ramps,\ncomponent_index
must be 0.
Return the second component of the evaluated ramp value at a position of 0.33:
chramp(\"/obj/geo1/popnet1/color1/rampcolor\", 0.33, 1)
Returns the value of a ramp parameter at a specific position and frame.
chrampf(ramp_path
, position
, component_index
, frame
)
When position
is outside of the interval [0, 1), it will be first wrapped\naround into such an interval before being used.
component_index
is the component of the evaluated value to return. For\ncolor ramps, it must be either 0, 1, or 2. For single-valued ramps,\ncomponent_index
must be 0.
Return second component of the evaluated ramp value at a position of 0.33 at frame 289:
chrampf(\"/obj/geo1/popnet1/color1/rampcolor\", 0.33, 1, 289)
Returns the value of a ramp parameter at a specific position and time.
chrampf(ramp_path
, position
, component_index
, time
)
When position
is outside of the interval [0, 1), it will be first wrapped\naround into such an interval before being used.
component_index
is the component of the evaluated value to return. For\ncolor ramps, it must be either 0, 1, or 2. For single-valued ramps,\ncomponent_index
must be 0.
Return second component of the evaluated ramp value at a position of 0.33 at 12 seconds into the scene:
chrampf(\"/obj/geo1/popnet1/color1/rampcolor\", 0.33, 1, 12)
Evaluates the string value of a parameter at the current time.
chs(channel
)
This is useful for evaluating\nfilenames in parameters. The string will be expanded automatically.
Evaluates the parameter at the current time as a node path string.
chsop(\"path\")
Assumes the given parameter contains a node path, and automatically takes care of things like bundles and relative paths, returning a string containing an absolute path or a space-separated list of absolute paths.
For example, to get the Object node path used by the object_merge1
node:
chsop(\"../object_merge1/object1\")
Evaluates the parameter at the current time as a node path list string.
chsoplist(\"path\")
Assumes the given parameter contains a list of node paths, and automatically takes care of things like bundles and relative paths, returning a string containing an absolute path or a space-separated list of absolute paths. It can also expand adhoc bundle strings like /obj/null*
.
For example, to get the Object node path used by the object_merge1
node:
chsoplist(\"../object_merge1/object1\")
Decodes a node parameter name that was previously encoded.
decodeparm(s
)
Houdini parameter names are only allowed to contain letters, numbers, hash\ncharacters (for multiparms), and underscores, and must not begin with a\nnumber. Arbitrary strings can be passed through the encodeparm
method to\ngenerate a string that obeys these restriction. This method takes one of these\nencoded strings, and returns the original string. A string that has not been\nencoded will be returned unmodified.
Converts from radians to degrees.
deg(radians
)
Returns the degree a specified face or hull.
degree(surface_node
, prim_num
, D_U|D_V)
Polygons and meshes are expressed as\nlinear functions, so their degree is 1. Spline types \u2013 NURBS and Bezier\ncurves and surfaces \u2013 have degrees ranging from 1 to 10.
If the primitive is a polygon or a curve, D_U and D_V are\n irrelevant.
", - "detail": "Returns the value of a detail attribute.
detail(surface_node
, attrib_name
, attrib_index
)
This expression may not work if surface_node
is the currently cooking node.\n Try specifying an upstream node.
This can also be used to read the value of a detail intrinsic by specifying\n\"intrinsic:name_of_intrinsic\"
instead of an attribute name.
detail(\"/obj/geo1/attribpromote1\", \"area\", 0)
Returns the total area of the geometry, if the geometry had first\nbeen measured and then AttribPromote had promoted the area primitive\nattribute to a detail attribute with Sum as the promotion method.
", + "detail": "Returns the value of a detail attribute.
detail(surface_node
, attrib_name
, attrib_index
)
This expression may not work if surface_node
is the currently cooking node.\n Try specifying an upstream node.
This can also be used to read the value of a detail intrinsic by specifying\n\"intrinsic:name_of_intrinsic\"
instead of an attribute name.
Components of dictionary attributes can be resolved using .
, for\nexample \"param.key\"
will return the value of key
in the dictionary\nattribute param
.
detail(\"/obj/geo1/attribpromote1\", \"area\", 0)
Returns the total area of the geometry, if the geometry had first\nbeen measured and then AttribPromote had promoted the area primitive\nattribute to a detail attribute with Sum as the promotion method.
", + "detailattriblist": "Returns a space-separated list of detail attribute names.
detailattriblist(surface_node
)
Returns the number of components in a detail attribute.
detailattribsize(surface_node
, attribute
)
If the surface node or attribute is not found, returns 0.
detailattribsize( \"/obj/model/capture\", \"pCaptData\" )
Returns the number of elements in a \"pCaptData\" attribute.
Returns the type of a detail attribute.
detailattribtype(surface_node
, attribute
)
If the surface node or attribute are not found, returns -1.
Types are
detailattribsize( \"/obj/model/box\", \"Cd\" )
Returns 1 to denote a float attribute.
Returns the string value of a detail attribute.
details(surface_node
, attribute
)
This can also be used to read the value of a detail intrinsic by specifying\n\"intrinsic:name_of_intrinsic\"
instead of an attribute name.
details(\"/obj/geo1/attribcreate1\", \"varmap\")
Returns the currently bound index attribute\u2019s value.
", + "detailattribtype": "Returns the type of a detail attribute.
detailattribtype(surface_node
, attribute
)
If the surface node or attribute are not found, returns -1.
Types are
detailattribsize( \"/obj/model/box\", \"Cd\" )
Returns 1 to denote a float attribute.
Returns the string value of a detail attribute.
details(surface_node
, attribute
)
This can also be used to read the value of a detail intrinsic by specifying\n\"intrinsic:name_of_intrinsic\"
instead of an attribute name.
Components of dictionary attributes can be resolved using .
, for\nexample \"param.key\"
will return the value of key
in the dictionary\nattribute param
.
details(\"/obj/geo1/attribcreate1\", \"varmap\")
Returns the currently bound index attribute\u2019s value.
", "detailsmap": "Returns a string from a list of strings in a detail attribute.
detailsmap(surface_node
, attribute
, index
)
This function will return the index
th unique string bound to the given\ndetail attribute. Use detailsnummap to find the total number of unique\nstrings. Note that the exact order of the strings should not be\nrelied upon. The indexes start with 0 and go to detailsnummap()-1.
detailsmap(\"/obj/geo1/attribcreate1\", \"varmap\", 0)
Returns the first variable mappings on the given surface node.
", - "detailsnummap": "Returns the number of unique stings bound to a detail attribute.
detailsnummap(surface_node
, attribute
)
Use detailsmap to extract the strings.
detailsnummap(\"/obj/geo1/attribcreate1\", \"varmap\")
Returns number of variable mappings on the given surface node.
", + "detailsnummap": "Returns the number of unique strings bound to a detail attribute.
detailsnummap(surface_node
, attribute
)
Use detailsmap to extract the strings.
detailsnummap(\"/obj/geo1/attribcreate1\", \"varmap\")
Returns number of variable mappings on the given surface node.
", "determinant": "Returns the determinant of a matrix.
determinant(mat
)
This is only valid for a 4\u00d74 or 3\u00d73 matrix.\nIf the matrix is larger than 4\u00d74, the\n4\u00d74 determinant will be returned. If the matrix is smaller than 3\u00d73, the\nmatrix will be converted to a 3\u00d73 before the determinant is computed.\nThe results of the upward conversion are not guaranteed.
", "dihedral": "Computes the dihedral matrix between vectors v0
and v1
.
dihedral(v0
, v1
)
This returns a rotation matrix which will rotate vector v0 to vector v1.
", "distance": "Returns the distance between two 3D points.
distance(x1
, y1
, z1
, x2
, y2
, z2
)
A.K.A. sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)
.
Channel segment function: ease-out
easeout()
Slowly eases out of any change and comes to rest.
Channel segment function: ease-out with configurable acceleration.
easeoutp(number
)
Similar to the easeinp\nexpression only reversed. The change starts rapidly and begins to slow\nuntil it comes to rest. The number
determines the speed (i.e., the\nrate of channel change) at the beginning of the segment. A large value\ndefines a high speed.
easeoutp( 3 )
Eases out of a fairly high initial speed.
Channel segment function: ease-in and -out with configurable acceleration.
easep(number
)
This is a channel expression function which will gradually ease in to\nthe motion and gradually ease out. The number
controls how fast to\nease in or out. Mathematically, this argument determines the inflection\npoint of the curve. Increasing the number will shift the inflection\npoint to the right, while fractional numbers will towards zero will\nshift the inflection point to the right.
easep( 3 )
Eases in slowly and eases out quickly.
easep( 0.4 )
Eases in quickly and eases out slowly.
Returns the list of edge groups in a surface node.
edgegrouplist(surface_node
)
The returned string is a space separated list of group names.
To get a list of groups whose names match a pattern, use\nedgegroupmask.
Returns the list of edge groups matching a pattern in a surface node.
edgegroupmask(surface_node
, pattern
)
The returned string is a space separated list of group names.
To simply get a list of all edge groups (no pattern),\nuse edgegrouplist.
edgegroupmask(\"/obj/model\", \"group*\")
Returns the names of all edge groups in the specified surface node which\n start with \"group\". So this may be something like \"group1 group2\n group_smoke\".
Returns the list of edge groups in a surface node.
edgegrouplist(surface_node
)
The returned string is a space separated list of group names.
To get a list of groups whose names match a pattern, use\nedgegroupmask.
Returns the list of edge groups matching a pattern in a surface node.
edgegroupmask(surface_node
, pattern
)
The returned string is a space separated list of group names.
To simply get a list of all edge groups (no pattern),\nuse edgegrouplist.
edgegroupmask(\"/obj/model\", \"group*\")
Returns the names of all edge groups in the specified surface node which\n start with \"group\". So this may be something like \"group1 group2\n group_smoke\".
Encodes any string into a valid variable name.
encode(s
)
Houdini VEX variable names are only allowed to contain letters, numbers, and\nunderscores, and must not begin with a number. This method takes any string,\nand encodes it into a string that obeys these restrictions. The original\nstring can be recovered using the decode
method. A string that already\nobeys the rules is returned unmodified.
One exception to this rule is that a string starting with xn__
will be\nencoded even if it is already a valid variable name. This is because xn__
\nis the prefix used to identify an encoded string. In this case, an additional\nxn__
prefix will be added. This means a string can be encoded any number of\ntimes, then decoded the same number of times to always return to the original\nstring, regardless of its contents.
Encodes any string into a valid geometry attribute name.
encodeattrib(s
)
Houdini geometry attributes and group names are only allowed to contain\nletters, numbers, and underscores, and must not begin with a number. This\nmethod takes any string, and encodes it into a string that obeys these\nrestrictions. The original string can be recovered using the decodeattrib
\nmethod. A string that already obeys the rules is returned unmodified.
One exception to this rule is that a string starting with xn__
will be\nencoded even if it is already a valid attribute name. This is because xn__
\nis the prefix used to identify an encoded string. In this case, an additional\nxn__
prefix will be added. This means a string can be encoded any number of\ntimes, then decoded the same number of times to always return to the original\nstring, regardless of its contents.
Encodes any string into a valid node parameter name.
encodeparm(s
)
Houdini parameter names are only allowed to contain letters, numbers, hash\ncharacters (for multiparms), and underscores, and must not begin with a\nnumber. This method takes any string, and encodes it into a string that obeys\nthese restrictions. The original string can be recovered using the\ndecodeparm
method. A string that already obeys the rules is returned\nunmodified.
One exception to this rule is that a string starting with xn__
will be\nencoded even if it is already a valid parameter name. This is because xn__
\nis the prefix used to identify an encoded string. In this case, an additional\nxn__
prefix will be added. This means a string can be encoded any number of\ntimes, then decoded the same number of times to always return to the original\nstring, regardless of its contents.
Returns a string describing the set of elements with a given value for an integer attribute.
groupbyval(surface_node
, class
, attribute
, id
)
The class
can be one of D_VERTEX
,D_POINT
, D_PRIMITIVE
, or D_DETAIL
for the corresponding attribute class.
groupbyval(\"/obj/geo1/facet1\", D_PRIMITIVE, \"piece\", 1)
Returns a string describing the set of primitives with a value of 1\n for the piece
attribute in the facet1 surface node in geo1.
Returns a string describing the set of elements with a given value for a string attribute.
groupbyvals(surface_node
, class
, attribute
, id
)
The class
can be one of D_VERTEX
, D_POINT
, D_PRIMITIVE
, or D_DETAIL
for the corresponding attribute class.
groupbyvals(\"/obj/geo1/facet1\", D_PRIMITIVE, \"name\", \"piece1\")
Returns a string describing the set of primitives with a value of piece1
\n for the name
attribute in the facet1 surface node in geo1.
Returns a non-zero value if the specified context option exists.
hascontextoption(token
)
Checks if the provided context option exists in the current cook context. This\nvalue may have been set by a node requesting data from another node, or it may\nbe set as a global default context option stored in the hip file.
This function just tests if the context option exists. To get the value of the\ncontext option use contextoption or contextoptions.
", - "hasdetailattrib": "Returns 1 if a specified detail attribute exists.
hasdetailattrib(surface_node
, attribute
)
Returns 1 if a specified detail attribute exists.
hasdetailattrib(surface_node
, attribute
)
This can also be used to determine if a key exists in a detail-level\ndictionary attribute. \"param.key\"
will return 1 if key
is in\nthe param
dictionary attribute.
Returns 1 if the active PDG work item has the specified attribute.
haspdgattrib(attribute
)
Returns 1 if a specified point is in a specified group.
haspoint(group_name
, surface_node
, point_num
)
The function will return 0 if the group is a primitive group.
haspoint(\"ears\", \"/obj/geo1/facet1\", 4)
Returns 1 if the group \"ears\" contains point number 4, otherwise\n returns 0.
Returns 1 if a specified point attribute exists.
haspointattrib(surface_node
, attribute
)
Returns 1 if a specified primitive is in a specified group.
hasprim(group_name
, surface_node
, prim_num
)
The function will return 0 if the group is a point group.
hasprim(\"ears\", \"/obj/geo1/facet1\", 3)
Returns 1 if the group \"ears\" contains primitive number 3, otherwise\n returns 0.
Computes the rotation vector\nof a lookat from one object to another.
objlookat(base_node
, target_node
, upv
)
objlookat(\"/obj/null1\",\"/obj/null2\",vector3(0,1,0))[0]
Returns the rotation parameter for Rx to get null1 to look at null2
", "objpretransform": "Returns an object\u2019s pre-transform matrix.
objpretransform(object_name
)
objpretransform(\"/obj/bone1\")
Returns the pretransform matrix for /obj/bone1.
", "oc": "Returns the value of a CHOP\u2019s output at a specific sample index.
oc(output_channel_index
, index
)
oc(0, 10)
Queries the current OpenCL device with the provided flag
ocldeviceinfo(flag
)
flag
is a string containing the name of the device flag.
This function queries the current OpenCL device and returns the numeric value\nof the specified flag. Internally this function calls the OpenCL clGetDeviceInfo
\nfunction; the available flags are described in\nthe OpenCL documentation.
Some useful flags include:
The full list of flags supported is as follows:
CL_DEVICE_TYPE
CL_DEVICE_VENDOR_ID
CL_DEVICE_MAX_COMPUTE_UNITS
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS
CL_DEVICE_MAX_WORK_GROUP_SIZE
CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR
CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
CL_DEVICE_MAX_CLOCK_FREQUENCY
CL_DEVICE_ADDRESS_BITS
CL_DEVICE_MAX_READ_IMAGE_ARGS
CL_DEVICE_MAX_WRITE_IMAGE_ARGS
CL_DEVICE_MAX_MEM_ALLOC_SIZE
CL_DEVICE_IMAGE2D_MAX_WIDTH
CL_DEVICE_IMAGE2D_MAX_HEIGHT
CL_DEVICE_IMAGE3D_MAX_WIDTH
CL_DEVICE_IMAGE3D_MAX_HEIGHT
CL_DEVICE_IMAGE3D_MAX_DEPTH
CL_DEVICE_IMAGE_SUPPORT
CL_DEVICE_MAX_PARAMETER_SIZE
CL_DEVICE_MAX_SAMPLERS
CL_DEVICE_MEM_BASE_ADDR_ALIGN
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE
CL_DEVICE_SINGLE_FP_CONFIG
CL_DEVICE_GLOBAL_MEM_CACHE_TYPE
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE
CL_DEVICE_GLOBAL_MEM_SIZE
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE
CL_DEVICE_MAX_CONSTANT_ARGS
CL_DEVICE_LOCAL_MEM_TYPE
CL_DEVICE_LOCAL_MEM_SIZE
CL_DEVICE_ERROR_CORRECTION_SUPPORT
CL_DEVICE_PROFILING_TIMER_RESOLUTION
CL_DEVICE_ENDIAN_LITTLE
CL_DEVICE_AVAILABLE
CL_DEVICE_COMPILER_AVAILABLE
CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF
CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR
CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT
CL_DEVICE_NATIVE_VECTOR_WIDTH_INT
CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG
CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT
CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF
CL_DEVICE_HOST_UNIFIED_MEMORY
CL_DEVICE_LINKER_AVAILABLE
CL_DEVICE_IMAGE_MAX_BUFFER_SIZE
CL_DEVICE_IMAGE_MAX_ARRAY_SIZE
CL_DEVICE_PARTITION_MAX_SUB_DEVICES
CL_DEVICE_REFERENCE_COUNT
CL_DEVICE_PREFERRED_INTEROP_USER_SYNC
CL_DEVICE_PRINTF_BUFFER_SIZE
CL_DEVICE_IMAGE_PITCH_ALIGNMENT
CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT
CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS
CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE
CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
CL_DEVICE_MAX_ON_DEVICE_QUEUES
CL_DEVICE_MAX_ON_DEVICE_EVENTS
CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE
CL_DEVICE_MAX_PIPE_ARGS
CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS
CL_DEVICE_PIPE_MAX_PACKET_SIZE
CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT
CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT
CL_DEVICE_NUMERIC_VERSION
CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT
CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT
CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT
CL_DEVICE_DEVICE_ENQUEUE_SUPPORT
CL_DEVICE_PIPE_SUPPORT
Returns a pseudo-random number between 0 and 1.
oldrand(value
)
Using the same value
will give the same result each time. A\ndifferent number is returned if fractional values are different.
It is a good idea to use non-integer values as the argument to\n oldrand(). This function is similar to rand() but uses a different\n algorithm for generating the random numbers.
oldrand(12.1) gives a different result than oldrand(12.2)
Returns the full paths of all operators in a bundle.
opblist(bundle_name
)
Returns a string containing a space separated list of paths.
", "opcreator": "Returns the creator of this node.
opcreator(name
)
opcreator(\"/obj/geo1/line1\")
Returns /obj/geo1
, indicating that object geo1
is the creator network for line1
.
Returns the name of a node given its path.
opname(name
)
This is useful to find out the name of the network containing the node,\ne.g. opname(\"..\")
will return the name of the network containing the\ncurrent node.
Returns the number of nodes inside a container node.
opnchildren(name
)
This will return the number of nodes in a subnetwork or the number of surface\nnodes in an Geometry container object.
The count is non-recursive: it only counts the direct contents of the node,\nnot of the sub-nodes as well.
", "opninputs": "Returns the maximum number of connected inputs.
opninputs(name
)
Returns the number of the highest connected input. This is not the number of\nconnected inputs. If a node has four inputs and the fourth input is connected,\nopninputs
will return 4
. If the first and third inputs are connected,\nopninputs
will return 3
.
Returns the alphanumeric prefix of a node name eliminating trailing digits.
opnodigits(name
)
This function will return the numeric value of the last set of\nconsecutive digits in a node\u2019s name.
opnodigits(\"/obj/geo1\") = /obj/geo
opdigits(\".\") = /obj/geo
Returns the number of nodes connected to a node\u2019s output.
opnoutputs(name
)
Returns the name of a node connected a given node\u2019s output.
opoutput(name
, index
)
Multiple operators may be connected to a node\u2019s output\nand the index ordering is arbitrary.
Returns the full path of a node connected a given node\u2019s output.
opoutputpath(name
, index
)
Multiple operators may be connected to a node\u2019s output\nand the index ordering is arbitrary.
Returns a string padding a number to a given length with zeros.
padzero(size
, value
)
Returns a string containing value
preceded by enough zeros to make up\nsize
digits.
padzero(5, 126) = 00126
padzero(5, 23) = 00023
padzero(1, 23) = 23
Deprecated: use stamp instead.
param(token
, value
)
This function is now obsolete, please use stamp instead. A\nwarning will be generated if used.
Returns 1 if a specified parameter is a string.
parmisstring(parameter_name
)
echo `parmisstring(\"/obj/model/lookatpath\")`
Returns the value of a work item attribute
pdgattribute(name
, index
)
name
is the name of the attribute
index
is the component index of the attribute
This function is equivalent to doing @
, but makes it\n easier to programtically select the attribute name or index.name
.index
pdgattribute(\"pdg_frame\", 0)
Returns the frame value of the current work item - equivalent to @pdg_frame
pdgattribute(\"color\", 2)
Returns the second component of the \"color\" attribute.
Returns the string value of a work item attribute
pdgattributes(name
, index
)
name
is the name of the attribute
index
is the component index of the attribute
This function is equivalent to doing @
, but makes it\n easier to programtically select the attribute name or index.name
.index
pdgattributes(\"pdg_input\", 0)
Returns the first input file on the active work item. This is equivalent to using\n@pdg_input
.
pdgattributes(\"filenames\", 2)
Returns the second component of the \"filenames\" attribute.
Returns the value of a PDG work item attrib
pdgattrib(name
, index
)
name
is the name of the attribute
index
is the component index of the attribute
This function is equivalent to doing @
, but makes it\n easier to programtically select the attribute name or index.name
.index
pdgattrib(\"pdg_frame\", 0)
Returns the frame value of the current work item - equivalent to @pdg_frame
pdgattrib(\"color\", 2)
Returns the second component of the \"color\" attribute.
Returns a space-separated list of attribute names on the active PDG work item.
pdgattriblist()
Returns the string value of a PDG work item attribute
pdgattribs(name
, index
)
name
is the name of the attribute
index
is the component index of the attribute
This function is equivalent to doing @
, but makes it\n easier to programtically select the attribute name or index.name
.index
pdgattribs(\"pdg_input\", 0)
Returns the first input file on the active work item. This is equivalent to using\n@pdg_input
.
pdgattribs(\"filenames\", 2)
Returns the second component of the \"filenames\" attribute.
Returns the number of components in a PDG work item attribute.
pdgattribsize(attribute
)
If there is no active work item or the attribute is not found on the work item, returns 0
pdgattribsize( \"position\" )
Returns the size of the \"position\" attribute on the active work item
Returns the type of a PDG work item attribute.
pdgattribtype(attribute
)
If there is no active work item or the attribute does not exist, returns -1.
Types are
pdgattribtype( \"wedgeindex\" )
Returns 0, which indicates that the attribute is an integer.
Deprecated: replaced by pdgattrib.
pdgattribute(name
, index
)
Use pdgattrib instead.
", + "pdgattributes": "Deprecated: replaced by pdgattribs.
pdgattributes(name
, index
)
Use pdgattribs instead.
", + "pdgattribvals": "Returns the space separated list of values for a PDG work item attribute
pdgattribvals(name
)
name
is the name of the attribute
This function works for any type of attribute. Integer and float values will be converted to string. If any of the attribute values are strings with spaces in them, the string values will be wrapped in quotes automatically.
pdgattribvals(\"image_files\")
Returns the space separated list of values in the image_files
attribute. For example: image1.png image2.png \"image with space.png\"
.
pdgattribvals(\"wedgevalues\")
Example evaluation: 0.5 10 20
.
Returns a work item input file for the specified file index and tag
pdginput(index
, tag
, localize
)
index
the input file number, from the list of files on the active work item
tag
the tag, which can be set to empty string if unspecified
localize
set to 1 to indicate that the input file path should have PDG\n directory tokens resolved.
This function looks up an input file from the active work item. The file tag can be used to filter input files, for example by passing in \"file/geo\" to eliminate files that aren\u2019t geometry. The index parameter determines which file path to return if there are multiple valid input files, starting from 0. When a tag is specified the index is applied after filtering the files by the tag.
This function is a more generalized version of the @pdg_input
attribute.
pdginput(1, \"file/image\", 0)
Returns the input image file with index 1, from the list of input files on the active work item.
Returns the number of input files on the active PDG work item
pdginputsize(tag
)
tag
the tag, which can be set to empty string if unspecified
This function returns the number of input files to the active work item, with the specified file tag.
pdginputsize(\"file/geo\")
Returns the number of input geometry files.
Returns a space separated string of all work item input files for the specified tag
pdginputvals(tag
, localize
)
tag
the tag, which can be set to empty string if unspecified
localize
set to 1 to indicate that the input file path should have PDG\n directory tokens resolved.
This function looks up all input files from the active work item with the specified file tag. If any of the file paths have spaces in them, they are put in quotes automatically in the output string.
pdginputvals(\"file/image\", 0)
Returns all input image file paths. For example: image1.png image2.png \"image with space\".png
Returns a work item output file for the specified file index and tag
pdgoutput(index
, tag
, localize
)
index
the output file index
tag
the tag, which can be set to empty string if unspecified
localize
set to 1 to indicate that the input file path should have PDG\n directory tokens resolved.
This function is a more generalized version of the @pdg_output
attribute.
This function looks up an output file from the active work item. The file tag can be used to filter output files, for example by passing in \"file/geo\" to eliminate files that aren\u2019t geometry. The index parameter determines which file path to return if there are multiple valid files, starting from 0. When a tag is specified the index is applied after filtering the files by the tag.
pdgoutput(1, \"\", 0)
Returns the second output file from the active work item, equivalent to @pdg_output.1
.
Returns the number of output files on the active PDG work item
pdgoutputsize(tag
)
tag
the tag, which can be set to empty string if unspecified
This function returns the number of output files from the active work item, with the specified file tag.
pdgoutputsize(\"file/image\")
Returns the number of output image files.
Returns a space separated string of all work item output files for the specified tag
pdgoutputvals(tag
, localize
)
tag
the tag, which can be set to empty string if unspecified
localize
set to 1 to indicate that the input file path should have PDG\n directory tokens resolved.
This function looks up all output files from the active work item with the specified file tag. If any of the file paths have spaces in them, they are put in quotes automatically in the output string.
pdgoutputvals(\"file/geo\", 0)
Returns all output geometry file paths. For example: ropfetch1.01.bgeo.sc ropfetch2.02.bgeo.sc
.
Returns the color of a pixel in a compositing node.
pic(copname
, U
, V
, color_type
)
The color_type parameter can be one of the\nfollowing: D_CR, D_CG, D_CB, D_CA, D_CHUE, D_CSAT, D_CVAL, D_CLUM for\nthe red, green, blue, alpha, hue, saturation, value, or luminance of the\npixel.
The color returned will be interpolated smoothly between adjacent\npixels. For the non-interpolated color, use picni.
pic(\"/img/img1/color1\", .5, .5, D_CLUM)
Returns the non-interpolated color of a pixel in a compositing node.
picni(copname
, U
, V
, color_type
)
The color_type parameter can be one of the\nfollowing: D_CR, D_CG, D_CB, D_CA, D_CHUE, D_CSAT, D_CVAL, D_CLUM for\nthe red, green, blue, alpha, hue, saturation, value, or luminance of the\npixel.
The color returned will not be interpolated. That is, it will be\nthe exact color of the pixel.\nFor the interpolated color, use pic.
picni(\"/img/img1/color1\", .5, .5, D_CLUM)
Converts an English noun to its plural.
pluralize(s
)
Returns the value of a point attribute.
point(surface_node
, point_number
, attribute
, index
)
surface_node
is a path to a surface node, for example \"/obj/geo1/grid1\"
.
point_number
is the point number to read the attribute from.\n When instancing, you can use instancepoint to get the number of the\n point currently being instanced.
attribute
is the name of the attribute (for example, Cd
for diffuse\n color). Two special attributes exist: P
and Pw
which represent the\n position of the point in space (Pw
allows you to access the W\n component of the position).
index
specifies the component position in multi-component attributes such as vectors, colors, and arrays. For example, if the attribute is a color, an index
value of 0
returns the red component, 1
returns the green component, and 2
returns the blue component.
This function will interpolate between point values if the point\n number is fractional, such as 3.35
point(\"/obj/geo1/facet1\", 3, \"P\", 0)
Returns the X component of point 3 of the facet1 surface node in geo1.
point(\"/obj/geo1/facet1\", 3, \"N\", 2)
Returns the Z component of the normal attribute of point 3 in the
facet1 surface node of object geo1.
Returns the value of a point attribute.
point(surface_node
, point_number
, attribute
, index
)
surface_node
is a path to a surface node, for example \"/obj/geo1/grid1\"
.
point_number
is the point number to read the attribute from.\n When instancing, you can use instancepoint to get the number of the\n point currently being instanced.
attribute
is the name of the attribute (for example, Cd
for diffuse\n color). Two special attributes exist: P
and Pw
which represent the\n position of the point in space (Pw
allows you to access the W\n component of the position).
Components of dictionary attributes can be resolved using .
, for\n example \"param.key\"
will return the value of key
in the dictionary\n attribute param
.
index
specifies the component position in multi-component attributes such as vectors, colors, and arrays. For example, if the attribute is a color, an index
value of 0
returns the red component, 1
returns the green component, and 2
returns the blue component.
This function will interpolate between point values if the point\n number is fractional, such as 3.35.
point(\"/obj/geo1/facet1\", 3, \"P\", 0)
Returns the X component of point 3 of the facet1
surface node in geo1
.
point(\"/obj/geo1/facet1\", 3, \"N\", 2)
Returns the Z component of the normal attribute of point 3 in the facet1
surface node of object geo1
.
Returns a space-separated list of point attribute names.
pointattriblist(surface_node
)
Returns the number of components in a point attribute.
pointattribsize(surface_node
, attribute
)
If the surface node or attribute is not found, returns 0.
pointattribsize( \"/obj/model/grid1\", \"P\" )
Returns 3, the number of components in a \"P\"\n (position) attribute (X, Y, and Z).
Returns the type of a point attribute.
pointattribtype(surface_node
, attribute
)
If the surface node or attribute are not found, returns -1.
Types are
pointattribsize( \"/obj/model/box\", \"Cd\" )
Returns 1 to denote a float attribute.
Returns the type of a point attribute.
pointattribtype(surface_node
, attribute
)
If the surface node or attribute are not found, returns -1.
Types are
pointattribsize( \"/obj/model/box\", \"Cd\" )
Returns 1 to denote a float attribute.
Returns the average of an attribute across all points in a geometry.
pointavg(surface_node
, attribute
, index
)
This function works much like the point function, except that it\nreturns the average value of the attribute for all points in the\nspecified surface node.
index
specifies the component position in multi-component attributes such as vectors, colors, and arrays. For example, if the attribute is a color, an index
value of 0
returns the red component, 1
returns the green component, and 2
returns the blue component.
Returns the distance between a point and a primitive.
surface_node
, point_num
, surface_node
, prim_num
,return_type
)`
Given a point and a primitive, this function finds the distance between\nthe point and the closest spot on the primitive. If prim_num is minus\none, the closest distance to any primitive is found.
pointdist(\"/obj/geo1/add1\", 0, \"/obj/geo1/grid1\", 0, 0)
Returns the distance between point 0 of add1 and the closest spot\nfrom the surface of grid1 primitive number 0. If the return_type\nwere 1, the u parametric value that is closest to the point would be\nreturned.
Returns the list of point groups in a surface node.
pointgrouplist(surface_node
)
The returned string is a space separated list of group names.
To get a list of groups whose names match a pattern, use\npointgroupmask.
Returns the list of point groups matching a pattern in a surface node.
pointgroupmask(surface_node
, pattern
)
The returned string is a space separated list of group names.
To simply get a list of all point groups (no pattern),\nuse pointgrouplist.
pointgroupmask(\"/obj/model\", \"group*\")
Returns the names of all point groups in the specified surface node which\n start with \"group\". So this may be something like \"group1 group2\n group_smoke\".
Returns the list of point groups in a surface node.
pointgrouplist(surface_node
)
The returned string is a space separated list of group names.
To get a list of groups whose names match a pattern, use\npointgroupmask.
Returns the list of point groups matching a pattern in a surface node.
pointgroupmask(surface_node
, pattern
)
The returned string is a space separated list of group names.
To simply get a list of all point groups (no pattern),\nuse pointgrouplist.
pointgroupmask(\"/obj/model\", \"group*\")
Returns the names of all point groups in the specified surface node which\n start with \"group\". So this may be something like \"group1 group2\n group_smoke\".
Returns a list of all points in a point group.
pointlist(surface_node
, group_name
)
The returned string is a space separated list of point numbers.
Lists points that share a minimum number of primitives with\na specified point.
pointneighbours(surface_node
, point_num
, num_shared_prims
)
This function lists all the points that share at\nleast num_shared_prims
primitives with the point specified by\npoint_num
.
The returned string is a space separated list of point numbers.
pointneighbours(\"/obj/geo1/sphere1\", 88, 2)
Returns a list of numbers that identify the points in sphere1 that\n share at least 2 primitives (typically along an edge) with sphere1\n point number 88.
pointneighbours(\"/obj/geo1/sphere1\", 88, 1)
Returns a list of numbers that identify the points in sphere1 that\n share at least 1 primitive with sphere1 point number 88.
pointneighbours(\"/obj/geo1/sphere1\", 88, 0)
Returns a list of all the points in sphere1 except point number 88.
Returns a list of points that match a specified pattern.
pointpattern(surface_node
, pattern
)
The pattern is a space separated list of point numbers, point number ranges,\nor point group names.
The returned string is a space separated list of point numbers.
pointpattern(\"/obj/model/sphere1\", \"2-5 10-12\")
Returns \"2 3 4 5 10 11 12\", assuming the specified surface node exists and\n has that many points.
pointpattern(\"/obj/model/group1\", \"10 group1 20\")
Returns a list of all points in the group named \"group\", as well as\n 10 and 20. The order of the returned points is not guaranteed.
Returns the string value of a point attribute.
points(surface_node
, point_number
, attribute
)
points(\"/obj/geo1/facet1\", 3, \"instance\")
Returns the string associated with the string attribute \"instance\"\n for point 3 in the facet1 surface node in geo1.
", + "points": "Returns the string value of a point attribute.
points(surface_node
, point_number
, attribute
)
Components of dictionary attributes can be resolved using .
, for\nexample \"param.key\"
will return the value of key
in the dictionary\nattribute param
.
points(\"/obj/geo1/facet1\", 3, \"instance\")
Returns the string associated with the string attribute instance
for point 3 in the facet1
surface node in geo1
.
Returns a string from a list of strings in a point attribute.
pointsmap(surface_node
, attribute
, index
)
This function will return the index
th unique string bound to the given\npoint attribute. Use pointsnummap to find the total number of unique\nstrings. Note that the exact order of the strings is should not be\nrelied upon. The indexes start with 0 and go to pointsnummap()-1.
pointsmap(\"/obj/geo1/attribcreate1\", \"foo\", 0)
Returns the first unique string on the given surface node.
", "pointsnummap": "Returns the number of unique strings bound to a point attribute.
pointsnummap(surface_node
, attribute
)
pointsnummap(\"/obj/geo1/attribcreate1\", \"foo\")
Returns number of unique strings in the foo attribute.
", "pow": "Raises a number to an exponent.
pow(base
, exponent
)
pow(2, 3) = 8
Returns the value of a primitive attribute.
prim(surface_node
, prim_num
, attrib_name
, attrib_index
)
When given the \"P\" or \"Pw\" attribute, returns the centroid of the primitive.
This can also be used to read the value of a primitive intrinsic by specifying\n\"intrinsic:name_of_intrinsic\"
instead of an attribute name.
prim(\"/obj/geo1/facet1\", 3, \"P\", 0)
Evaluates the X component of the centroid of primitive 3 in the\n specified surface node.
prim(\"/obj/geo1/facet1\", 3, \"Cd\", 1)
Evaluate the green color of the \"Cd\" attribute of primitive 3.
Returns the value of a primitive attribute.
prim(surface_node
, prim_num
, attrib_name
, attrib_index
)
When given the P
or Pw
attribute, returns the centroid of the primitive.
This can also be used to read the value of a primitive intrinsic by specifying\n\"intrinsic:name_of_intrinsic\"
instead of an attribute name.
Components of dictionary attributes can be resolved using .
, for\nexample \"param.key\"
will return the value of key
in the dictionary\nattribute param
.
prim(\"/obj/geo1/facet1\", 3, \"P\", 0)
Evaluates the X component of the centroid of primitive 3 in the\n specified surface node.
prim(\"/obj/geo1/facet1\", 3, \"Cd\", 1)
Evaluate the green color of the Cd
attribute of primitive 3.
Returns a space-separated list of primitive attribute names.
primattriblist(surface_node
)
Returns the number of components in a primitive attribute.
primattribsize(surface_node
, attribute
)
If the surface node or attribute are not found, returns 0.
primattribsize( \"/obj/model/box\", \"Cd\" )
Returns the number of elements of a diffuse color attribute.
Returns the type of a primitive attribute.
primattribtype(surface_node
, attribute
)
If the surface node or attribute are not found, returns -1.
Types are
primattribsize( \"/obj/model/box\", \"Cd\" )
Returns 1 to denote a float attribute.
Returns the type of a primitive attribute.
primattribtype(surface_node
, attribute
)
If the surface node or attribute are not found, returns -1.
Types are
primattribsize( \"/obj/model/box\", \"Cd\" )
Returns 1 to denote a float attribute.
Returns the minimum distance and closest points between two primitives.
surface_node
, prim1_num
, surface_node
, prim2_num
,return_type
)`
Only works for faces, curves, and spline surfaces. Other types of\nprimitives will always return 0.
Minimum works in two groups. You can either use minimum between curves and polygons or between meshes, nurbs surfaces, and bezier surfaces. However, it will not work between the two groups. For example, a NURBS curve + NURBS surface will not work.
primdist(\"/obj/geo1/sphere1\", 0, \"/obj/geo1/grid1\", 0, 0)
Returns the distance between the first primitives in both sphere1\n and grid1.
Returns the partial derivatives of a primitive attribute.
surface_node
, prim_num
, attrib_name
, attrib_index
,u
, v
, du
, dv
)`
Evaluates the (partial) derivatives of a face or hull attribute at a\nparametric (u,v) position. u and v are unit values, defined in the\n[0,1]
interval. When given the \"P\" or \"Pw\" attribute, the positional\nderivative of (u,v)'s image on the primitive will be returned. If the\nprimitive is a face type, v and dv are ignored. If both du and dv are 0,\nprimduv becomes equivalent to primuv.
if the primitive is a polygon or a mesh, u and v are defined in\n terms of the number of vertices, or rows or columns respectively.
primduv(\"/obj/geo1/tube1\", 12, \"P\", 2, 0.4, 0.5, 1, 0)
Evaluates the Z component of the first-order partial derivative of\n primitive 12 with respect to u, at the parametric location\n (0.4,0.5).
Returns the list of primitive groups in a surface node.
primgrouplist(surface_node
)
The returned string is a space separated list of group names.
Returns the list of groups matching a pattern in a surface node.
primgroupmask(surface_node
, pattern
)
The returned string is a space separated list of group names.
To simply get a list of all primitive groups (no pattern),\nuse primgrouplist.
primgroupmask(\"/obj/model\", \"group*\")
Returns the names of all primitive groups in the specified surface node \n which start with \"group\". So this may be something like \"group1 group2\n group_leftleg\".
Returns the list of primitive groups in a surface node.
primgrouplist(surface_node
)
The returned string is a space separated list of group names.
Returns the list of groups matching a pattern in a surface node.
primgroupmask(surface_node
, pattern
)
The returned string is a space separated list of group names.
To simply get a list of all primitive groups (no pattern),\nuse primgrouplist.
primgroupmask(\"/obj/model\", \"group*\")
Returns the names of all primitive groups in the specified surface node \n which start with \"group\". So this may be something like \"group1 group2\n group_leftleg\".
Returns a list of all primitives in a surface node.
primlist(surface_node
, group_name
)
The return string is a space separated list of primitive numbers.
Lists primitives that share a minimum number of points with a\nspecified primitive.
primneighbours(surface_node
, prim_num
, num_shared_pts
)
This function lists all the primitives that share\nat least the given number of points with the primitive specified.
The returned string is a space separated list of primitive numbers.
primneighbours(\"/obj/geo1/sphere1\", 88, 2)
Returns a list of numbers that identify the primitives in sphere1\n that share at least 2 points (typically along an edge) with sphere1\n primitive number 88.
primneighbours(\"/obj/geo1/sphere1\", 88, 1)
Returns a list of numbers that identify the primitives in sphere1\n that share at least 1 point with sphere1 primitive number 88.
primneighbours(\"/obj/geo1/sphere1\", 88, 0)
Returns a list of all the primitives in sphere1 except primitive\n number 88.
Returns the string value of a primitive attribute.
prims(surface_node
, primitive_number
, attribute
)
This can also be used to read the value of a primitive intrinsic by specifying\n\"intrinsic:name_of_intrinsic\"
instead of an attribute name.
prims(\"/obj/geo1/facet1\", 3, \"texturemap\")
Returns the string associated with the string attribute \"texturemap\"\n for primitive 3 in the facet1 surface node in geo1.
", + "prims": "Returns the string value of a primitive attribute.
prims(surface_node
, primitive_number
, attribute
)
This can also be used to read the value of a primitive intrinsic by specifying\n\"intrinsic:name_of_intrinsic\"
instead of an attribute name.
Components of dictionary attributes can be resolved using .
, for\nexample \"param.key\"
will return the value of key
in the dictionary\nattribute param
.
prims(\"/obj/geo1/facet1\", 3, \"texturemap\")
Returns the string associated with the string attribute texturemap
\n for primitive 3 in the facet1
surface node in geo1
.
Returns a string from a list of strings in a primitive attribute.
primsmap(surface_node
, attribute
, index
)
This function will return the index
th unique string bound to the given\nprim attribute. Use primsnummap to find the total number of unique\nstrings. Note that the exact order of the strings is should not be\nrelied upon. The indexes start with 0 and go to primsnummap()-1.
primsmap(\"/obj/geo1/attribcreate1\", \"foo\", 0)
Returns the first unique string in the foo attribute.
", "primsnummap": "Returns the number of unique strings bound to a primitive attribute.
primsnummap(surface_node
, attribute
)
primsnummap(\"/obj/geo1/attribcreate1\", \"foo\")
Returns number of unique strings tied to the foo attribute.
", "primuv": "Returns the value of a primitive attribute at a certain UV location.
surface_node
, prim_num
, attrib_name
, attrib_index
,u
, v
)`
Evaluates the specified attribute at a parametric (u,v) position on the\nprimitive. u and v are unit values, defined in the [0,1]
interval. When\ngiven the \"P\" or \"Pw\" attribute, the x, y, or z image of the (u,v)\ndomain point will be returned. If the primitive is a face type or a\ncircle, v is ignored.
if the primitive is a polygon or a mesh, u and v are defined in\n terms of the number of vertices, or rows or columns respectively.\n Currently, only the position attribute of quadric primitives can\n be evaluated.
primuv(\"/obj/geo1/tube1\", 0, \"Cd\", 1, 0.7, 0.3)
Evaluates the Green component of the diffuse color attribute at a\n location on primitive 0 given by the parametric coordinates\n (0.7,0.3).
Converts a string specification into a vector.
vector(pattern
)
The pattern should\nconsist of a leading square bracket followed by a comma-separated list\nof values and a closing square bracket.
To access a value out of the vector, use the square bracket operator.
vector v = vector(\"[1,2,3,4,5]\");
float f = v[0]; # f is 1
Converts three values into a 3-component vector.
vector3(x
, y
, z
)
The pattern should\nconsist of a leading square bracket followed by a comma-separated list\nof values and a closing square bracket.
To access a value out of the vector, use the square bracket operator.
vector v = vector3(3,2,1);
float f = v[0]; # f is 3
Converts four values into a 4-component vector.
vector4(x
, y
, z
, w
)
To access a value out of the vector, use the square bracket operator.
vector v = vector4(3,2,1,0);
float f = v[0]; # f is 3
Returns the value of a vertex attribute.
surface_node
, primitive_number
, vertex_number
,attribute
, index
)`
attribute
is the name of the attribute (eg. \"Cd\"\nfor diffuse color). Two special attributes exist \"P\" and \"Pw\" which\nrepresent the position of the point in space (\"Pw\" allows you to access\nthe W component of the position).
This function will interpolate between point values if the vertex\n number is fractional, such as 3.35.
index
specifies the component position in multi-component attributes such as vectors, colors, and arrays. For example, if the attribute is a color, an index
value of 0
returns the red component, 1
returns the green component, and 2
returns the blue component.
vertex(\"/obj/geo1/facet1\", 2, 3, \"P\", 0)
Return the X component of vertex 3 of primitive2 in the facet1\n surface node of geo1.
point(\"/obj/geo1/facet1\", 2, 3, \"Cd\", 2)
Returns the Z component of the color attribute of vertex 3 of\n primitive 2 in the facet1 surface node of object geo1.
Returns the value of a vertex attribute.
surface_node
, primitive_number
, vertex_number
,attribute
, index
)`
attribute
is the name of the attribute (eg. Cd
for diffuse color). Two special attributes exist P
and Pw
which represent the position of the point in space. (Pw
allows you to access\nthe W component of the position).
Components of dictionary attributes can be resolved using .
, for example \"param.key\"
will return the value of key
in the dictionary attribute param
.
This function will interpolate between point values if the vertex\n number is fractional, such as 3.35.
index
specifies the component position in multi-component attributes such as vectors, colors, and arrays. For example, if the attribute is a color, an index
value of 0
returns the red component, 1
returns the green component, and 2
returns the blue component.
vertex(\"/obj/geo1/facet1\", 2, 3, \"P\", 0)
Return the X component of vertex 3 of primitive2 in the facet1
\n surface node of geo1
.
point(\"/obj/geo1/facet1\", 2, 3, \"Cd\", 2)
Returns the Z component of the color attribute of vertex 3 of\n primitive 2 in the facet1
surface node of object geo1
.
Returns a space-separated list of vertex attribute names.
vertexattriblist(surface_node
)
Returns the number of components in a vertex attribute.
vertexattribsize(surface_node
, attribute
)
If the surface node or attribute are not found, returns 0.
vertexattribsize( \"/obj/model/sphere\", \"uv\" )
Returns the number of elements of a texture attribute.
Returns the type of a vertex attribute.
vertexattribtype(surface_node
, attribute
)
If the surface node or attribute are not found, returns -1.
Types are
vertexattribsize( \"/obj/model/box\", \"Cd\" )
Returns 1 to denote a float attribute.
Returns the string value of a vertex attribute.
surface_node
, primitive_number
, vertex_number
,attribute
)`
vertexs(\"/obj/geo1/facet1\", 1, 3, \"instance\")
Returns the string associated with the string attribute \"instance\"\n for vertex 3 of primitive 0 in the facet1 surface node in geo1.
", + "vertexattribtype": "Returns the type of a vertex attribute.
vertexattribtype(surface_node
, attribute
)
If the surface node or attribute are not found, returns -1.
Types are
vertexattribsize( \"/obj/model/box\", \"Cd\" )
Returns 1 to denote a float attribute.
Returns the list of vertex groups in a surface node.
vertexgrouplist(surface_node
)
The returned string is a space separated list of group names.
To get a list of groups whose names match a pattern, use\nvertexgroupmask.
Returns the list of vertex groups matching a pattern in a surface node.
vertexgroupmask(surface_node
, pattern
)
The returned string is a space separated list of group names.
To simply get a list of all vertex groups (no pattern),\nuse vertexgrouplist.
vertexgroupmask(\"/obj/model\", \"group*\")
Returns the names of all vertex groups in the specified surface node which\n start with \"group\". So this may be something like \"group1 group2\n group_smoke\".
Returns the string value of a vertex attribute.
surface_node
, primitive_number
, vertex_number
,attribute
)`
Components of dictionary attributes can be resolved using .
, for\nexample \"param.key\"
will return the value of key
in the dictionary\nattribute param
.
vertexs(\"/obj/geo1/facet1\", 1, 3, \"instance\")
Returns the string associated with the string attribute instance
\n for vertex 3 of primitive 0 in the facet1
surface node in geo1
.
Returns a string from a list of strings in a vertex attribute.
vertexsmap(surface_node
, attribute
, index
)
This function will return the index
th unique string bound to the given\npoint attribute. Use vertexsnummap to find the total number of unique\nstrings. Note that the exact order of the strings is should not be\nrelied upon. The indexes start with 0 and go to vertexsnummap()-1.
vertexsmap(\"/obj/geo1/attribcreate1\", \"foo\", 0)
Returns the first unique string in the foo attribute.
", "vertexsnummap": "Returns the number of unique strings bound to a point attribute.
vertexsnummap(surface_node
, attribute
)
vertexsnummap(\"/obj/geo1/attribcreate1\", \"foo\")
Returns number of unique strings for the foo attribute.
", "vlength": "Returns the length of a vector.
vlength(vec
)
A.K.A. sqrt(dot(
.vec
, vec
))