Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
andybak opened this issue May 1, 2021 · 0 comments

Comments

@andybak
Copy link

andybak commented May 1, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant