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:
authorBastien Montagne <bastien@blender.org>2022-05-18 18:21:37 +0300
committerBastien Montagne <bastien@blender.org>2022-05-18 18:21:37 +0300
commit47dbdf8dd5744bc61f2e16f8d5c5eb4203ce0c48 (patch)
tree3845296f5e58840d1fab040373ace109d91980cc /source/blender/editors
parentb712dbe5de2dcba3338f42b74b75388453d52d23 (diff)
parent14a893f20ea3b0bb6b2ff33c2245b3c78ee407b3 (diff)
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/util/ed_util.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index f07364cd4d3..e7b3bce700e 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -19,6 +19,7 @@
#include "BKE_collection.h"
#include "BKE_global.h"
+#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_lib_remap.h"
#include "BKE_main.h"
@@ -137,8 +138,12 @@ void ED_editors_init(bContext *C)
ED_object_posemode_enter_ex(bmain, ob);
}
- /* Other edit/paint/etc. modes are only settable for objects in active scene currently. */
- if (!BKE_collection_has_object_recursive(scene->master_collection, ob)) {
+ /* Other edit/paint/etc. modes are only settable for objects visible in active scene currently.
+ * Otherwise, they (and their obdata) may not be (fully) evaluated, which is mandatory for some
+ * modes like Sculpt.
+ * Ref. T98225. */
+ if (!BKE_collection_has_object_recursive(scene->master_collection, ob) ||
+ !BKE_scene_has_object(scene, ob) || (ob->visibility_flag & OB_HIDE_VIEWPORT) != 0) {
continue;
}