Skip to content

Runtime editing of brush parameters doesn't get applied to existing strokes #1

@andybak

Description

@andybak

The preview stroke is fine but as soon as you release the trigger the stroke adopts the old material.

I'm guessing the right place to fix this is inside this if block:

if (m_CatalogChanged)

in BrushCatalog.Update()

A really crude fix is to repaint everything:

StartCoroutine(
    OverlayManager.m_Instance.RunInCompositorWithProgress(
        OverlayType.LoadGeneric,
        SketchMemoryScript.m_Instance.RepaintCoroutine(),
        0.25f)
);

less crudely - how about adding an optional parameter to RepaintCoroutine to selectively repaint based on brush guid?

If you think the approach sounds plausible I'll attempt a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions