Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2019-09-11 15:58:14 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-09-11 19:01:45 +0300
commit7e245e482ca6f1c1d9a84c317feb151758316d34 (patch)
tree55cf950fe32c115e4141500d6d053aee0332b115 /source/blender/editors/space_view3d/view3d_edit.c
parent30aa67d5d57b3ee4a1f72bfdbb5ee53600ce7fcd (diff)
Fix T59143: Frame Selected Doesn't work in hair particle editmode
This is caused by rBeb521b22b2b1. Looks like `PE_minmax` doesnt play nice with the evaluated view_layer. If we look inside `PE_get_current`, then `BKE_ptcache_ids_from_object` will actually return a list of `PTCacheID` for the evaluated object. However, looking further, then `PTCacheEdit` / `psys->pointcache->edit` is always NULL for the evaluated object. Without a valid `PTCacheEdit`, `PE_minmax` will basically do nothing. So now we are passing the non-evaluated view layer in the case of particles. Regarding to @sergey, in a longer term we should probably make it so evaluated pointcache have pointer to edit. Reviewers: sergey Maniphest Tasks: T59143 Differential Revision: https://developer.blender.org/D5758
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index e76ef2b0458..4bc74ab8fba 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -2997,7 +2997,7 @@ static int viewselected_exec(bContext *C, wmOperator *op)
ok = paintface_minmax(ob_eval, min, max);
}
else if (ob_eval && (ob_eval->mode & OB_MODE_PARTICLE_EDIT)) {
- ok = PE_minmax(scene, view_layer_eval, min, max);
+ ok = PE_minmax(scene, CTX_data_view_layer(C), min, max);
}
else if (ob_eval && (ob_eval->mode & (OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT |
OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) {