User Guide

Chapter 3160
Examples
These examples determine the number of various types of objects within a 3D cast member called
3D World.
numberOfCameras = member("3D World").camera.count
put member("3D World").light.count
-- 3
numberOfModels = member("3D World").model.count
numberOfTextures = member("3D World").texture.count
put member("3D World").modelResource("mesh2").face.count
-- 4
This statement shows that the first mesh of the model named Ear is composed of 58 faces.
put member("Scene").model("Ear").meshdeform.mesh[1].face.count
-- 58
This statement shows that the model named Ear is composed of three meshes.
put member("Scene").model("Ear").meshdeform.mesh.count
-- 3
This statement shows that the first mesh of the model named Ear has two texture layers.
put member("Scene").model("Ear").meshdeform.mesh[1].\
textureLayer.count
-- 2
See also
cameraCount()
cpuHogTicks
Syntax
the cpuHogTicks
Description
System property; determines how often Director releases control of the CPU to let the computer
process background events, such as events in other applications, network events, clock updates,
and other keyboard events.
The default value is 20 ticks. To give more time to Director before releasing the CPU to
background events or to control how the computer responds to network operations, set
cpuHogTicks to a higher value.
To create faster auto-repeating key performance but slower animation, set
cpuHogTicks to a
lower value. In a movie, when a user holds down a key to generate a rapid sequence of auto-
repeating key presses, Director typically checks for auto-repeating key presses less frequently than
the rate set in the computers control panel.
The
cpuHogTicks property works only on the Macintosh.
Example
This statement tells Director to release control of the CPU every 6 ticks, or every 0.10 of a second:
the cpuHogTicks = 6
See also
ticks