File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,11 @@ def colormap(self):
9494 def colormap (self , value : Colormap ):
9595 self .gpu_objects .colormap = value
9696
97+ def set_needs_update (self ):
98+ """Invalidate cached state so build_clip_plane runs on next update."""
99+ self ._last_clipping_bytes = None
100+ super ().set_needs_update ()
101+
97102 def update (self , options : RenderOptions ):
98103 self .data .update (options )
99104 if self .data .data_3d is None :
@@ -127,7 +132,10 @@ def update(self, options: RenderOptions):
127132 )
128133 self .gpu_objects .complex_settings .update (options )
129134 if not self ._js_compute :
130- # Only recompute clipping triangles when the plane actually changed
135+ # Only recompute clipping triangles when inputs actually changed.
136+ # Clipping plane changes are detected by comparing uniform bytes.
137+ # Mesh/deformation changes go through set_needs_update() which
138+ # invalidates _last_clipping_bytes, forcing a rebuild.
131139 clipping_bytes = bytes (self ._clipping .uniforms )
132140 if clipping_bytes != self ._last_clipping_bytes :
133141 self ._last_clipping_bytes = clipping_bytes
You can’t perform that action at this time.
0 commit comments