View Full Version : How to count objects in worldspace?
braam 01-28-2003, 02:18 PM I am writing an expression to get small region (dot shaped) on the planar brighter as a ball bounces on it. I store an array for information(distance) so I need know the exact amount of balls in the scene to limit my array. All balls in my scene have the same suffix (Sphere01, Sphere02.....).
Could anyone help me? :shrug:
|
|
alexx
01-28-2003, 02:53 PM
not sure if i got you right.
but you could group all your spheres and then read the bounding box information of the top group..
is that what you need?
cheers
alexx
braam
01-28-2003, 03:17 PM
Alexx: Yes, that's what i mean. How can you write to read the bounding box information of the top node?
:lightbulb
alexx
01-28-2003, 03:57 PM
float $minX = `getAttr yourGroupName.boundingBoxMinX`;
float $minY = `getAttr yourGroupName.boundingBoxMinY`;
float $minZ = `getAttr yourGroupName.boundingBoxMinZ`;
float $maxX = `getAttr yourGroupName.boundingBoxMaxX`;
float $maxY = `getAttr yourGroupName.boundingBoxMaxY`;
float $maxZ = `getAttr yourGroupName.boundingBoxMaxZ`;
cheers
CGTalk Moderation
01-14-2006, 07:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.