Finding custom properties by type

Many custom properties, like self-installing custom properties, have a specific type that isn’t “customparamset”. This means you can filter the collection returned by XSIApplication.FindObjects2.

from sipyutils import si		# win32com.client.Dispatch('XSI.Application')
from sipyutils import C			# win32com.client.constants

si = si()

props = si.FindObjects2( C.siCustomPropertyID ).Filter( 'Arnold_Render_Options' )
print props.Count
for p in props:
	print p.FullName
	print "   Shaders search path : %s" % p.Parameters( "shaders_path" ).Value
	print "   Textures search path: %s" % p.Parameters( "textures_path" ).Value


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