Hair particles lose position data when "Disconnect All" is used the first time from program load #47750

Closed
opened 2016-03-10 20:22:42 +01:00 by Taylor Loz · 9 comments

System Information
Ubuntu 14.04LTS
Radeon HD 7400M

Blender Version
Broken: 2.76 48f7dd6 and 2.77 1e1118e
Worked: unknown

Short description of error
When a mesh has multiple hair particle systems and disconnect->all is run on a particle system all particles appear to set their location to object origin and loose rotation information.
(screenshots included)

If the user runs undo and selects disconnect hair again (all is already checked), the operation performs as expected without loss of information.

Exact steps for others to reproduce the error
From the provided .blend file:

  1. Select either ParticleSystemA or ParticleSystemB (doesn't matter, unexpected behavior will occur with either one)
  2. Disconnect Hair
  3. Check "All hair" in the operator tab
  4. At this point the unexpected behavior should occur

I have found that at this point undo (ctrl+z) then clicking disconnect "hair again" performs as expected

hairBug.blend
hairBugBefore.png
hairBugAfter.png

**System Information** Ubuntu 14.04LTS Radeon HD 7400M **Blender Version** Broken: 2.76 48f7dd6 and 2.77 1e1118e Worked: unknown **Short description of error** When a mesh has multiple hair particle systems and disconnect->all is run on a particle system all particles appear to set their location to object origin and loose rotation information. (screenshots included) If the user runs undo and selects disconnect hair again (all is already checked), the operation performs as expected without loss of information. **Exact steps for others to reproduce the error** From the provided .blend file: 1. Select either ParticleSystemA or ParticleSystemB (doesn't matter, unexpected behavior will occur with either one) 2. Disconnect Hair 3. Check "All hair" in the operator tab 4. At this point the unexpected behavior should occur I have found that at this point undo (ctrl+z) then clicking disconnect "hair again" performs as expected [hairBug.blend](https://archive.blender.org/developer/F289370/hairBug.blend) ![hairBugBefore.png](https://archive.blender.org/developer/F289371/hairBugBefore.png) ![hairBugAfter.png](https://archive.blender.org/developer/F289373/hairBugAfter.png)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @zmaster587

Added subscriber: @zmaster587

Added subscriber: @sindra1961

Added subscriber: @sindra1961

Even all versions in here were the same results.
(2.64a/2.69/2.74/2.76b)

win10 64bits

Even all versions in here were the same results. (2.64a/2.69/2.74/2.76b) win10 64bits

Added subscribers: @Sergey, @ideasman42, @mont29

Added subscribers: @Sergey, @ideasman42, @mont29

There are two issues here, both related to internal undo/redo performed by the operator when you edit its settings:

  1. the 'all hair' option in disabled state would not work at all except first time (due to how active psys is found in current code, easy to fix, will do soon).
  2. much more annoying, after the first undo/redo, psmd->dm_final is NULL (because undo/redo == file save/read, which clears this runtime-only data, and operator gets executed before object is updated again). This means psys_mat_hair_to_global() returns default unit matrix, hence the bad result.

Only way to fix point 2) would be to force an update (depsgraph evaluation) before re-running the operator, @Sergey, @ideasman42, think this is not possible nor desired in current design?

There are two issues here, both related to internal undo/redo performed by the operator when you edit its settings: 1) the 'all hair' option in disabled state would not work at all except first time (due to how active psys is found in current code, easy to fix, will do soon). 2) much more annoying, after the first undo/redo, `psmd->dm_final` is NULL (because undo/redo == file save/read, which clears this runtime-only data, and operator gets executed before object is updated again). This means `psys_mat_hair_to_global()` returns default unit matrix, hence the bad result. Only way to fix point 2) would be to force an update (depsgraph evaluation) before re-running the operator, @Sergey, @ideasman42, think this is not possible nor desired in current design?

@mont29, think it makes more sense to simply disable re-do for such operators and have two separate invoke buttons for it. Adding depsgraph evaluations just to deal with a broken system is not really nice way.

P.S. Actually, if ever we'll run into such situation again, think it'll make more sense to put DM into undo stack. That's more mem usage, but more instant redo and opens possibility of caching scene on SSD disks without huge penalty.

@mont29, think it makes more sense to simply disable re-do for such operators and have two separate invoke buttons for it. Adding depsgraph evaluations just to deal with a broken system is not really nice way. P.S. Actually, if ever we'll run into such situation again, think it'll make more sense to put DM into undo stack. That's more mem usage, but more instant redo and opens possibility of caching scene on SSD disks without huge penalty.

This issue was referenced by a078fe3539

This issue was referenced by a078fe35396a34c8f6440e22c37a3b27e0c1f61a

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
5 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#47750
No description provided.