#NEWLINE# @ staticmethod #NEWLINE# def load( collada , localscope , node ) : #NEWLINE# #INDENT# samplernode = node . find ( tag ( 'sampler2D' ) ) #NEWLINE# if ( samplernode is None ) : #NEWLINE# #INDENT# raise DaeIncompleteError ( 'No sampler found in newparam' ) #NEWLINE# #UNINDENT# sourcenode = samplernode . find ( tag ( 'source' ) ) #NEWLINE# if ( sourcenode is None ) : #NEWLINE# #INDENT# raise DaeIncompleteError ( 'No source found in sampler' ) #NEWLINE# #UNINDENT# minnode = samplernode . find ( tag ( 'minfilter' ) ) #NEWLINE# if ( minnode is None ) : #NEWLINE# #INDENT# minfilter = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# minfilter = minnode . text #NEWLINE# #UNINDENT# magnode = samplernode . find ( tag ( 'magfilter' ) ) #NEWLINE# if ( magnode is None ) : #NEWLINE# #INDENT# magfilter = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# magfilter = magnode . text #NEWLINE# #UNINDENT# surfaceid = sourcenode . text #NEWLINE# id = node . get ( 'sid' ) #NEWLINE# surface = localscope . get ( surfaceid ) #NEWLINE# if ( ( surface is None ) or ( type ( surface ) != Surface ) ) : #NEWLINE# #INDENT# raise DaeBrokenRefError ( ( 'Missing surface ' + surfaceid ) ) #NEWLINE# #UNINDENT# return Sampler2D ( id , surface , minfilter , magfilter , xmlnode = node )