Saturday snippet – Getting local properties of scene items

This snippet gets the local properties of anything in the selection list that has local properties.

from win32com.client import constants as C

for o in Application.Selection:
	localProps = (o.LocalProperties if o.IsClassOf( C.siSceneItemID ) else None)
	if localProps != None:
		for p in localProps:
			print p 

LocalProperties is a property of any SceneItem, so all you have to do is check whether the selected object implements the SceneItem interface.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s