/
getCount
getCount
Description
Returns the number of items in the given array. Returns 0 if the variable is not an array or has no elements.
The getCount command helps you to manage different types of objects and arrays. You can also set up loops based on the returned number of objects of interest.
Functional area
Data retrieval
Command syntax
Syntax
getCount array |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
array_variable | Name of a module array |
Flags
None
Return value
integer
Examples
string $bones[]; $bones = `getModules -type "BoneNode"`; int $num = `getCount $bones`; print $num; // This script returns the number of BoneNodes in the scene.
Additional information
Related commands
, multiple selections available,