Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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