Hooks no longer working if some parts of the mesh are removed #48290
Labels
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#48290
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows
Blender Version
Broken: 2.77
Short description of error
Hooks no longer work properly if I remove vertices created before the hooked vertices
Exact steps to reproduce the error
Open: hook-remove.blend
How to reproduce from scratch
(aka, how to re-create the sample file)
Changed status to: 'Open'
Added subscriber: @dfelinto
Added subscriber: @lichtwerk
My findings after a quick glance at the code (will investigate more, too):
The hook modifier stores vertex indices from the original mesh to determine what to effect, so when these change (which they do when some vertices are deleted), the modifier will act on different vertices :/
But here is a nice workaround [that is somewhat hidden to be honest]:
(1) assign the desired hook-vertices to a vertexgroup
(2) deselect all vertices
(3) select the vertexgroup created in (1), making it active
(4) add the hook
the hook modifier will now have a vertex group already assigned (its basically a shortcut for a hook on all vertices limited to the vertexgroup)
this way you can delete vertices as you wish and the hook stays intact :)
not sure if this helps -- will also look more into the modifier to see if the original problem can be solved better...
That's an interering workaround, and it seems to work fine. Thanks @lichtwerk
Added subscriber: @gwentiv
Confirmed on 2.77a linux. It seems to work exactly like Philipp said.
I wonder what the solution is (I mean, to avoid using Vgroups).
I suppose each vertex has an ID (I guess it is the index used by the Build modifier for instance...)
So either the vertices need to be re-ordered so that the indices of the vertices concerned by the hook bindings are the same. But that won't work if you suppress more vertices whose indices are below the ones tied to a hook than you have vertices free ABOVE that index...
So the hooks tied to a particular mesh must be updated with new, updated sets of indices. Is that a difficult task ?
I could image it working on a pointer list instead of a index list, but that would need some further investigation (will do when time permits -- propably not before weekend though...)
Added subscriber: @ideasman42
This can be supported by ensuring
CD_SHAPE_KEYINDEX
is added when there are hooks or vertex parents present.Looked into this but would rather not do this in
BM_mesh_bm_from_me
which runs from modifiers.This could run from
ED_object_editmode_enter
instead.Added subscriber: @mont29
This issue was referenced by
6d0cae56e8
Changed status from 'Open' to: 'Resolved'