Skip to content

Add smarter change detection for bpy.type.Image syncing #22

@McManning

Description

@McManning

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions