Animation: operator to lock all non-selected channels in graph editor #95856

Open
opened 2022-02-18 04:38:05 +01:00 by Jason schleifer · 19 comments

Currently the graph editor has an operator to HIDE all non-selected channels by using the hotkey Shift+H:

bpy.ops.graph.hide(unselected=True)

There is no operator that lets you protect all non-selected channels - you can only select the protected channel by pressing the TAB hotkey.

Ideally we would have a similar operator for consistency:

bpy.ops.graph.protect(unselected=True)

However, there is an existing operator that seems like it should work, but may be broken.
The mode parameter has multiple options - TOGGLE and INVERT being two of them..

# Toggles the selected channel(s) locked or unlocked
bpy.ops.anim.channels_setting_disable(mode='TOGGLE', type='PROTECT') 

The 'INVERT' mode seems like it should lock the inverted channels - but it currently does exactly the same as 'TOGGLE':

bpy.ops.anim.channels_setting_disable(mode='INVERT', type='PROTECT') 

Is this simply a bug in bpy.ops.anim.channels_setting_disable?

Currently the graph editor has an operator to HIDE all non-selected channels by using the hotkey Shift+H: ``` bpy.ops.graph.hide(unselected=True) ``` There is no operator that lets you protect all non-selected channels - you can only select the protected channel by pressing the TAB hotkey. Ideally we would have a similar operator for consistency: ``` bpy.ops.graph.protect(unselected=True) ``` However, there is an _existing_ operator that seems like it should work, but may be broken. The mode parameter has multiple options - TOGGLE and INVERT being two of them.. ``` # Toggles the selected channel(s) locked or unlocked bpy.ops.anim.channels_setting_disable(mode='TOGGLE', type='PROTECT') ``` The 'INVERT' mode seems like it should lock the inverted channels - but it currently does exactly the same as 'TOGGLE': ``` bpy.ops.anim.channels_setting_disable(mode='INVERT', type='PROTECT') ``` Is this simply a bug in bpy.ops.anim.channels_setting_disable?
Author
Member

Added subscriber: @JasonSchleifer

Added subscriber: @JasonSchleifer

Added subscriber: @LucianoMunoz

Added subscriber: @LucianoMunoz

That'd be nice.

That'd be nice.
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Member

Thanks for the report, but please use other channels for user feedback and feature requests: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests

For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug

Thanks for the report, but please use other channels for user feedback and feature requests: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug
Member

Added subscriber: @BClark

Added subscriber: @BClark
Member

I thought that there was a bug? with the Object level selection in the graph editor, TAB wasn't working to lock/protect a channel vs, having an channel selected.

I thought that there was a bug? with the Object level selection in the graph editor, TAB wasn't working to lock/protect a channel vs, having an channel selected.
Author
Member

This was brought up in the animation module meeting - can we re-open?

This was brought up in the animation module meeting - can we re-open?

if it was agreed on the meeting it should probably turned into a Design Task instead of a "feature request"

in the design task describe the problem its solving, and how we'd have it in the interface, hotkeys etc, basically leave little room to imagination so it can be tackled quick by a dev.

if it was agreed on the meeting it should probably turned into a Design Task instead of a "feature request" in the design task describe the problem its solving, and how we'd have it in the interface, hotkeys etc, basically leave little room to imagination so it can be tackled quick by a dev.

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'
Sybren A. Stüvel changed title from Feature Request - Operator to lock all non-selected channels in graph editor. to Animation: operator to lock all non-selected channels in graph editor. 2022-02-18 17:53:21 +01:00
Jason schleifer changed title from Animation: operator to lock all non-selected channels in graph editor. to Design Task - Operator to lock all non-selected channels in graph editor. 2022-02-18 17:54:42 +01:00
Author
Member

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Jason schleifer changed title from Design Task - Operator to lock all non-selected channels in graph editor. to Animation: operator to lock all non-selected channels in graph editor 2022-02-18 17:55:15 +01:00
Author
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Author
Member

Oops - sorry @dr.sybren - I was editing the description the same time you were & it ended up re-archived and closed. I don't have permissions to re-open it. :)

Oops - sorry @dr.sybren - I was editing the description the same time you were & it ended up re-archived and closed. I don't have permissions to re-open it. :)
Member

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'

Added subscriber: @daviddomingues

Added subscriber: @daviddomingues

So If understand what @JasonSchleifer as proposed is to have a operator that locks all non selected channels? Wouldn't it be just the case of creating a new parameter that looks at selected channels and when selecting ignores any non selected channels. I'm not sure about the locking part seems unnecessary. Maybe I miss interpreted everything.

So If understand what @JasonSchleifer as proposed is to have a operator that locks all non selected channels? Wouldn't it be just the case of creating a new parameter that looks at selected channels and when selecting ignores any non selected channels. I'm not sure about the locking part seems unnecessary. Maybe I miss interpreted everything.
Member

Added subscriber: @Mets

Added subscriber: @Mets
Member

I implemented this in a simple Python operator, it can be found in this addon.

I implemented this in a simple Python operator, it can be found in [this](https://developer.blender.org/diffusion/BSTS/browse/master/anim-cupboard/) addon.
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:35:12 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#95856
No description provided.