UI/DebugUtil.py

# Copyright 2009 Autodesk, Inc.  All rights reserved.
# Use of this software is subject to the terms of the Autodesk license agreement 
# provided at the time of installation or download, or which otherwise accompanies
# this software in either electronic or hard copy form.

# Script description:
# Utility methods to print information about properties or geometry
#

def PrintPropertyList(propList):
    """Print the name of all properties in a property list"""
    for p in propList:
        print p.GetName(), "Is Internal:", p.IsInternal()

def PrintGeometry(c):
    print c.Name
    print "Left: %d, Top:%d, Width:%d, Height:%d" % (c.Left, c.Top, c.Width, c.Height)
    print "RegionX: %d, RegionY:%d, RegionWidth:%d, RegionHeight:%d" % (c.RegionX, c.RegionY, c.RegionWidth, c.RegionHeight)
    print "RegionMinX: %d, RegionMinY:%d, RegionMaxX:%d, RegionMaxY:%d" % (c.RegionMinX, c.RegionMinY, c.RegionMaxX, c.RegionMaxY)