def __updateActivations( self ) :

		with self.getContext() :
			# Must scope the context when getting activators, because they are typically
			# computed from the plug values, and may therefore trigger a compute.
			activators = self.__metadataValue( self.__parent, self.__layoutName + ":activators" ) or {}

		activators = { k : v.value for k, v in activators.items() } # convert CompoundData of BoolData to dict of booleans

		def active( activatorName ) :

			result = True
			if activatorName :
				result = activators.get( activatorName )
				if result is None :
					with self.getContext() :
						result = self.__metadataValue( self.__parent, self.__layoutName + ":activator:" + activatorName )
					result = result if result is not None else False
					activators[activatorName] = result

			return result

		for item, widget in self.__widgets.items() :
			if widget is not None :
				widget.setEnabled( active( self.__itemMetadataValue( item, "activator" ) ) )
				widget.setVisible( active( self.__itemMetadataValue( item, "visibilityActivator" ) ) )
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUI/PlugLayout.py/PlugLayout.__updateActivations/original