Skip to content

Inspector : Fix editing of plugs with keyframes - #7293

Open
johnhaddon wants to merge 2 commits into
GafferHQ:mainfrom
johnhaddon:lightToolInspectorUsage
Open

johnhaddon wants to merge 2 commits into
GafferHQ:mainfrom
johnhaddon:lightToolInspectorUsage

Conversation

@johnhaddon

Copy link
Copy Markdown
Member

This fixes Inspector::edit() so it can make keyframes as necessary, and then updates LightTool to use Inspector::edit() instead of its own code.

In doing this I came across a bit of a discrepancy in PlugAlgo. To date, we've paired a call to setValueOrInsertKeyFromData() with canSetValueFromData(), but the latter supports a wider variety of type coercions than the former. I have a work-in-progress commit (not in this PR) that adds canSetValueOrInsertKeyFromData() with the appropriate logic, but I'm not sure that's actually what we want. Perhaps we should make setValueOrInsertKeyFromData() support the full set of coercions instead? On a related note, setValueOrInsertKeyFromData() looks like it doesn't support CompoundNumericPlug, which would also require a bit of refactoring to get right. I'm calling that out of scope for this PR, but can do it as a follow-up once we've discussed what we want.

This lets us remove a bunch of code, and fixes the editing of animation viewed through a timewarp (the tool was making keys at the current time, whereas the Inspector correctly makes edits at the upstream (warped) time).
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