Skip to content

Conversation

@murraystevenson
Copy link
Contributor

Following the recent addition of SceneInspector.draggedParameters() we can improve the creation of ShaderTweaks from parameters dragged from the Scene Inspector, removing the need to drag both name and value when creating a tweak, and we now disambiguate the parameter name for non-output shaders.

We now also support creating multiple tweaks when multiple parameters are dragged from the Scene Inspector.

I've left the existing ObjectMatrix support in ShaderTweaksUI._TweaksFooter.__dropData(), but it might be worth removing if we have no other use for it?

ShaderQuery would also benefit from similar functionality.

When in comparison mode, the user may wish to drag values from either column. If both columns are selected, we take the first.
We now use `SceneInspector.draggedParameters()` to provide a consistent dict of parameter names and values when either a name or value is dragged from the Scene Inspector. This did require extending `draggedParameters()` to return disambiguated parameter names for non-output shaders, which was slightly more of a faff than I'd hoped.

With this we now support creating multiple tweaks when multiple parameters are dragged from the Scene Inspector. We're not doing any checking here to prevent the same tweaks from being created again if they already exist, but that would be straightforward to support...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Review

Development

Successfully merging this pull request may close these issues.

1 participant