def checkForChildPlugsAndAddToDoc( doc, plug , inDepth ):
	depth = inDepth + 1

	childPlugs = plug.children()

	#if this plug is not a compound plug, or is a IO plug, or is made up of rgb/xyz data we don't need to go any deeper
	endPlugs = ['Gaffer::Color3fPlug', 'Gaffer::Color4fPlug', 'Gaffer::V3fPlug']#, 'Gaffer::CompoundDataPlug::MemberPlug']
	if len(childPlugs) == 0 or isPlugPluggable( plug ) and plug.typeName() in endPlugs:
		addPlugDefinitionToDoc( doc, plug.getName(), Gaffer.Metadata.plugDescription(plug), plug.typeName(), depth )

	elif plug.typeName() == 'Gaffer::CompoundDataPlug::MemberPlug':
		#special case for these compound plugs that have the enable/disable check.
		#we will promote the type of their child 'value' plug to this level.
		valueType = ''
		for cplug in childPlugs:
			if cplug.getName() == 'value':
				valueType = cplug.typeName()

		addPlugDefinitionToDoc( doc, plug.getName()+'.value', Gaffer.Metadata.plugDescription(plug), valueType, depth )

	else:
		#we have children so recursively check for more children
		addPlugDefinitionToDoc( doc, plug.getName(), Gaffer.Metadata.plugDescription(plug), plug.typeName(), depth )
		for childPlug in childPlugs:
			checkForChildPlugsAndAddToDoc( doc, childPlug, depth )
dataset/ETHPy150Open ImageEngine/gaffer/contrib/doc/GafferNodeReference/dynamicContentGenerators/nodeDescriptionGenerator.py/checkForChildPlugsAndAddToDoc/operator `or` -> `and`