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

AbstractPlugin should deliver WorldPainterView for construction operations #418

Open
IR0NSIGHT opened this issue Aug 19, 2024 · 3 comments

Comments

@IR0NSIGHT
Copy link

Basically all existing operations (inheriting from abstractoperation) require a WorldPainterView for their constructor.
WorldPainterView is hidden inside App, which is a. private field, b. not part of public api

Therefore its impossible for plugins right now to inherit and instantiate operations that are more specialized than AbstractBrushOperation

But i would really like to use RadiusOperation for my plugin.

Right now:
public List AbstractPlugins.getOperations()
delivers operations.

I suggest instead:
public List getOperations(WorldPainterView view)

to allow plugins to use the full range of preexisting operations.
AbstractPlugins.getOperations() can be kept or deprecated.

alternatively a App.getView or dimension.getWorldView getter would also do.

@IR0NSIGHT
Copy link
Author

addition:
on first glance it seems impossible to get a clean solution for reverse engineering a radius operation too.
App will call setRadius on RadiusOperations.
There is no preexisting hook for keyboard/mouseevents as far as i can tell too

so no way to catch a mousewheel event without extra steps.

@Captain-Chaos
Copy link
Owner

I thought I already addressed this in the snapshot version I delivered, but it's been a while so maybe not, or this is something new. I'll take a look.

@IR0NSIGHT
Copy link
Author

Yes there was a similar problem: FilteredOperation

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

2 participants