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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-12-18 20:18:00 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-12-21 18:05:48 +0300
commit0edd93effbc1c0adf7aa9c5647ef69845496f669 (patch)
tree66cf32ac697824226fa8de790b0d70ada5ce42b5 /source/blender/blenkernel/BKE_object.h
parentadec52a8a843a5224e1e59a1dfdcff4986d7dc18 (diff)
Fix inconsistent/broken Cycles object visibility for instances.
Object visibility is now handled by the depsgraph iterator, but this API was incomplete as it made no distinction for visibility of the object itself, particles and generated instances. The depsgraph iterator API now includes information about which part of the object is visible, and this is used by Cycles to replace the old custom logic. Cycles and EEVEE visibility should now be consistent, which unfortunately does means some subtle compatibility breakage for both. Fixes T58956, T58202, T59284. Differential Revision: https://developer.blender.org/D4109
Diffstat (limited to 'source/blender/blenkernel/BKE_object.h')
-rw-r--r--source/blender/blenkernel/BKE_object.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 0b405b52a17..50e095720e0 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -97,13 +97,14 @@ bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode)
bool BKE_object_data_is_in_editmode(const struct ID *id);
-typedef enum eObjectVisibilityCheck {
- OB_VISIBILITY_CHECK_FOR_VIEWPORT,
- OB_VISIBILITY_CHECK_FOR_RENDER,
- OB_VISIBILITY_CHECK_UNKNOWN_RENDER_MODE,
-} eObjectVisibilityCheck;
-
-bool BKE_object_is_visible(const struct Object *ob, const eObjectVisibilityCheck mode);
+typedef enum eObjectVisibilityResult {
+ OB_VISIBLE_SELF = 1,
+ OB_VISIBLE_PARTICLES = 2,
+ OB_VISIBLE_INSTANCES = 4,
+ OB_VISIBLE_ALL = (OB_VISIBLE_SELF | OB_VISIBLE_PARTICLES | OB_VISIBLE_INSTANCES),
+} eObjectVisibilityResult;
+
+int BKE_object_visibility(const struct Object *ob, const int dag_eval_mode);
void BKE_object_init(struct Object *ob);
struct Object *BKE_object_add_only_object(