UI/DebugUtil.py

UI/DebugUtil.py
1 # Copyright 2009 Autodesk, Inc. All rights reserved.
2 # Use of this software is subject to the terms of the Autodesk license agreement
3 # provided at the time of installation or download, or which otherwise accompanies
4 # this software in either electronic or hard copy form.
5 
6 # Script description:
7 # Utility methods to print information about properties or geometry
8 #
9 
10 def PrintPropertyList(propList):
11  """Print the name of all properties in a property list"""
12  for p in propList:
13  print p.GetName(), "Is Internal:", p.IsInternal()
14 
15 def PrintGeometry(c):
16  print c.Name
17  print "Left: %d, Top:%d, Width:%d, Height:%d" % (c.Left, c.Top, c.Width, c.Height)
18  print "RegionX: %d, RegionY:%d, RegionWidth:%d, RegionHeight:%d" % (c.RegionX, c.RegionY, c.RegionWidth, c.RegionHeight)
19  print "RegionMinX: %d, RegionMinY:%d, RegionMaxX:%d, RegionMaxY:%d" % (c.RegionMinX, c.RegionMinY, c.RegionMaxX, c.RegionMaxY)