Coherence icon indicating copy to clipboard operation
Coherence copied to clipboard

Add smarter change detection for bpy.type.Image syncing

Open McManning opened this issue 4 years ago • 0 comments

Enhancement to #6 - right now syncing a bpy.type.Image to Unity happens under the following conditions:

  1. Whenever a SpaceImageEditor redraws (via draw_handler_add) and the draw tool is active
  2. Whenever the SpaceView3D redraws and the PAINT_TEXTURE tool is active

Unfortunately, 2 happens way too often - space is setup to redraw at 30-60 FPS to keep up with Unity viewport renders, the frequency for updating the texture has its own throttle but it's constantly running (thus doing a bunch of memcpys) and isn't running reactive to changes at all - unlike the SpaceImageEditor.

It's fine for smaller textures (1024x1024) but once you scale up you start to feel it chug.

McManning avatar Jan 30 '21 17:01 McManning