def __defaultValueExtractor( plug, topLevelPlug, value ) :

	with IECore.IgnoredExceptions( AttributeError ) :
		value = value.value

	# Deal with the simple atomic plug case.
	if plug.isSame( topLevelPlug ) :
		return value

	# Plug must be a child of a compound of
	# some sort. We need to try to extract
	# the right part of the compound value.
	for name in plug.relativeName( topLevelPlug ).split( "." ) :
		try :
			value = getattr( value, name )
		except __HOLE__ :
			accessor = getattr( value, "get" + name[0].upper() + name[1:], None )
			if accessor is not None :
				value = accessor()
			else :
				return None

	return value
dataset/ETHPy150Open ImageEngine/gaffer/python/Gaffer/PythonExpressionEngine.py/__defaultValueExtractor