McManning / McManning/Coherence
Add smarter change detection for bpy.type.Image syncing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 30
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Enhancement to #6 - right now syncing a bpy.type.Image to Unity happens under the following conditions:
- Whenever a SpaceImageEditor redraws (via
draw_handler_add) and the draw tool is active - 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the bpy.type.Image synchronization paths described for SpaceImageEditor and SpaceView3D, including the draw_handler_add and PAINT_TEXTURE redraw conditions. Compare their update triggers and verify that image changes update Unity without continual per-frame memcpys; the issue provides no file or test names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, unity
- Domain
- computer-graphics, game-dev, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100