AniMall addon doesn't hide unselected vertices/beziers in dope sheet #75148

Closed
opened 2020-03-27 23:05:36 +01:00 by Rob · 9 comments

System Information
Operating system: Linux-4.15.0-91-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: Mesa DRI Intel(R) Ivybridge Desktop Intel Open Source Technology Center 4.2 (Core Profile) Mesa 19.2.8

Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-03-12 05:06, hash: 375c7dc4ca
Worked: (optional)

Short description of error
When using the AniMall addon to animate vertices, beziers etc. the "Only Selected" filter in the Dope Sheet and the Graph Editor doesn't hide keys for unselected vertices/beziers as expected but only for unselected objects, making animating more than a trivial number of vertices/beziers impossible.

Exact steps for others to reproduce the error
Turn on Animall in settings.
Select the cube and go into edit mode.
Select two vertices.
Press 'n', go to animate.
In the AniMall Dialouge, check 'Points'
In the AniMall Dialouge, click 'Insert'
Deselect one of vertices.
Open up the Dope Sheet and expand as necessary.
Both vertices are visible.

**System Information** Operating system: Linux-4.15.0-91-generic-x86_64-with-debian-buster-sid 64 Bits Graphics card: Mesa DRI Intel(R) Ivybridge Desktop Intel Open Source Technology Center 4.2 (Core Profile) Mesa 19.2.8 **Blender Version** Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-03-12 05:06, hash: `375c7dc4ca` Worked: (optional) **Short description of error** When using the AniMall addon to animate vertices, beziers etc. the "Only Selected" filter in the Dope Sheet and the Graph Editor doesn't hide keys for unselected vertices/beziers as expected but only for unselected objects, making animating more than a trivial number of vertices/beziers impossible. **Exact steps for others to reproduce the error** Turn on Animall in settings. Select the cube and go into edit mode. Select two vertices. Press 'n', go to animate. In the AniMall Dialouge, check 'Points' In the AniMall Dialouge, click 'Insert' Deselect one of vertices. Open up the Dope Sheet and expand as necessary. Both vertices are visible.
Author

Added subscriber: @robs_pangolin

Added subscriber: @robs_pangolin
Author

I have had a try at implementing this, and I don't think it can be done in AniMall as the required hooks don't exist in the main code. The best I think you can do is turn off the unwanted channels in the graph view (i.e it is not possible to hide them in the dope sheet using python). I have included the python code I use to do this below in case it is useful to anyone else, but it might not work in all cases. I had a look at what was required in the main blender code to properly hide unselected vertices, but it was beyond me :(


import bpy

def hide_unselected_vertex_fcurves(o):
    
    - get all selected vertices
    - we need to switch from Edit mode to Object mode so the selection gets updated
    mode = bpy.context.active_object.mode
    bpy.ops.object.mode_set(mode='OBJECT')

    selectedVerts = [v.index for v in bpy.context.active_object.data.vertices if v.select]
            
    # back to whatever mode we were in
    bpy.ops.object.mode_set(mode=mode)
    
    # select or unselect the respective fcurves
    for fcurve in o.data.animation_data.action.fcurves:
        vNumber = int(fcurve.data_path[9:-4])
        if vNumber not in selectedVerts:
            fcurve.hide = True
        else:
            fcurve.hide = False
            
def hide_unselected_curve_fcurves(o):
    
    - get all selected vertices
    - we need to switch from Edit mode to Object mode so the selection gets updated
    mode = bpy.context.active_object.mode
    bpy.ops.object.mode_set(mode='OBJECT')

    i = 0
    selectedPoints = []
    for point in bpy.context.active_object.data.splines[0].bezier_points:
        if point.select_control_point:
            selectedPoints.append(i)
        i = i + 1
            
    # back to whatever mode we were in
    bpy.ops.object.mode_set(mode=mode)
    
    # select or unselect the respective fcurves
    for fcurve in o.data.animation_data.action.fcurves:
        vNumber = int(fcurve.data_path.split('.')[1][14:-1])
        if vNumber not in selectedPoints:
            fcurve.hide = True
        else:
            fcurve.hide = False

o = bpy.context.object
#hide_unselected_vertex_fcurves(o)
hide_unselected_curve_fcurves(o)
I have had a try at implementing this, and I don't think it can be done in AniMall as the required hooks don't exist in the main code. The best I think you can do is turn off the unwanted channels in the graph view (i.e it is not possible to hide them in the dope sheet using python). I have included the python code I use to do this below in case it is useful to anyone else, but it might not work in all cases. I had a look at what was required in the main blender code to properly hide unselected vertices, but it was beyond me :( ``` import bpy def hide_unselected_vertex_fcurves(o): - get all selected vertices - we need to switch from Edit mode to Object mode so the selection gets updated mode = bpy.context.active_object.mode bpy.ops.object.mode_set(mode='OBJECT') selectedVerts = [v.index for v in bpy.context.active_object.data.vertices if v.select] # back to whatever mode we were in bpy.ops.object.mode_set(mode=mode) # select or unselect the respective fcurves for fcurve in o.data.animation_data.action.fcurves: vNumber = int(fcurve.data_path[9:-4]) if vNumber not in selectedVerts: fcurve.hide = True else: fcurve.hide = False def hide_unselected_curve_fcurves(o): - get all selected vertices - we need to switch from Edit mode to Object mode so the selection gets updated mode = bpy.context.active_object.mode bpy.ops.object.mode_set(mode='OBJECT') i = 0 selectedPoints = [] for point in bpy.context.active_object.data.splines[0].bezier_points: if point.select_control_point: selectedPoints.append(i) i = i + 1 # back to whatever mode we were in bpy.ops.object.mode_set(mode=mode) # select or unselect the respective fcurves for fcurve in o.data.animation_data.action.fcurves: vNumber = int(fcurve.data_path.split('.')[1][14:-1]) if vNumber not in selectedPoints: fcurve.hide = True else: fcurve.hide = False o = bpy.context.object #hide_unselected_vertex_fcurves(o) hide_unselected_curve_fcurves(o) ```
Member

Added subscribers: @dr.sybren, @pioverfour

Added subscribers: @dr.sybren, @pioverfour
Member

Hello @robs_pangolin,
thanks for the report and workaround. This isn’t specific to AnimAll, but a known limitation of Blender’s animation system, which isn’t normally used to animate individual mesh (etc.) components. I don’t know if it’s desirable to support this either, since many types of data would need to be checked.

Perhaps @dr.sybren has details on this? Could and should the dopesheet.show_only_selected filtering be made to work with new object data?
image.png

Hello @robs_pangolin, thanks for the report and workaround. This isn’t specific to AnimAll, but a known limitation of Blender’s animation system, which isn’t normally used to animate individual mesh (etc.) components. I don’t know if it’s desirable to support this either, since many types of data would need to be checked. Perhaps @dr.sybren has details on this? Could and should the `dopesheet.show_only_selected` filtering be made to work with new object data? ![image.png](https://archive.blender.org/developer/F9367916/image.png)

This is indeed a known limitation of the animation system. It would have to be implemented in the skip_fcurve_selected_data() function (see anim_filter.c).

This is indeed a known limitation of the animation system. It would have to be implemented in the `skip_fcurve_selected_data()` function (see `anim_filter.c`).
Member

Removed subscriber: @pioverfour

Removed subscriber: @pioverfour
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

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

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

Thanks for the report, but as Sybren mentioned, this is a known limitation and the issue reported here is a request for modified/improved behavior and not a bug in current behavior. Closing as this bug tracker is only for bugs and errors.

For user requests and feedback, please use other channels: 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 as Sybren mentioned, this is a known limitation and the issue reported here is a request for modified/improved behavior and not a bug in current behavior. Closing as this bug tracker is only for bugs and errors. For user requests and feedback, please use other channels: 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
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
4 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#75148
No description provided.