Page MenuHome

Hair particles lose position data when "Disconnect All" is used the first time from program load
Closed, ResolvedPublic

Description

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



Event Timeline

Taylor Loz (zmaster587) raised the priority of this task from to 90.
Taylor Loz (zmaster587) updated the task description. (Show Details)
Taylor Loz (zmaster587) edited a custom field.

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

win10 64bits

Bastien Montagne (mont29) lowered the priority of this task from 90 to 50.Mar 12 2016, 6:55 PM

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 Sharybin (sergey), @Campbell Barton (campbellbarton), think this is not possible nor desired in current design?

@Bastien Montagne (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.