
    pj                     D    d dl mZ d dlmZ d dlmZmZ d dlmZ d Zd Z	y)   )
class_name)	serialize)reference_idwrap_id)cache_propertiesc                 V   t        |d      r|j                         nd}t        |d      r|j                         ng d}|dk(  rt        |d      r|j                         }t	        |       |t        |      t        ||i d|d|d	|j                         d
|j                         d|j                         d|j                         d|j                         d|j                         d|j                         d|j                         d|j                         d|j                         d|j!                         rdndd|j#                         rdndd|j%                         rdndd|j'                         d|j)                         d|j+                         rdndi      dS )NGetRepresentation   GetDiffuseColor)r   r   r   r   GetColorrepresentationdiffuseColorcolorambientColorspecularColor	edgeColorambientdiffusespecularspecularPoweropacityinterpolationedgeVisibility    backfaceCullingfrontfaceCulling	pointSize	lineWidthlighting)parentidtype
properties)hasattrr	   r   r   r   r   r   GetAmbientColorGetSpecularColorGetEdgeColor
GetAmbient
GetDiffuseGetSpecularGetSpecularPower
GetOpacityGetInterpolationGetEdgeVisibilityGetBackfaceCullingGetFrontfaceCullingGetPointSizeGetLineWidthGetLighting)r    prop_objprop_obj_idcontextdepthr   color_to_uses          Y/DATA/.local/lib/python3.12/site-packages/trame_vtk/modules/vtk/serializers/properties.pyproperty_serializerr:      s
   (/:M(N""$TU 
 8./ 	  " 
 wx<((* v&8$& . **,  8 8 :	
  !:!:!< X224 8..0 8..0 H002  !:!:!< 8..0  !:!:!< !x'A'A'C! "(C(C(E11 #)E)E)GAQ  X224!" X224#$ !5!5!7AQ%
	     c                    g }g }|j                         }|rNt        |      }t        |||||dz         }	|	r/|j                  |	       |j                  ddt	        |      gg       |j                         }
|
rNt        |
      }t        ||
|||dz         }|r/|j                  |       |j                  ddt	        |      gg       t        |       |t        |      |j                         |j                         |j                         |j                         |j                         |j                         |j                         d||dS )Nr   setRGBTransferFunctionr   setScalarOpacity)independentComponentsinterpolationTypeshader   r   r   r   )r    r!   r"   r#   callsdependencies)GetRGBTransferFunctionr   r   appendr   GetScalarOpacityr   GetIndependentComponentsGetInterpolationTypeGetShader(   r)   r*   r+   )r    r4   r5   r6   r7   rB   rC   lutlookup_table_idlookup_table_instancepwfpwf_idpwf_instances                r9   volume_property_serializerrP   2   sR   EL 
)
)
+C
&s+ )c?GUQY!
 ! 56LL2Q8P4QRS 
#
#
%C
c" 3K-LL,q'&/.BCD v&8$%-%F%F%H!)!>!>!@&&(**,**, ,,.%668

 $! r;   N)
registryr   r   utilsr   r   cacher   r:   rP    r;   r9   <module>rU      s        ( #(V+r;   