svn merge ^/trunk/blender -r49118:49143
[blender.git] / intern / cycles / blender / blender_sync.h
index dcfb7c6d6227e56412866cd8d103701cc1b4607c..8a8452b75d9dda689341460a637e2ee461e5c6ca 100644 (file)
@@ -128,10 +128,25 @@ private:
                BL::Material material_override;
                bool use_background;
                bool use_viewport_visibility;
+               bool use_localview;
                int samples;
        } render_layer;
 };
 
+/* we don't have spare bits for localview (normally 20-28)
+ * because PATH_RAY_LAYER_SHIFT uses 20-32.
+ * So - check if we have localview and if so, shift local
+ * view bits down to 1-8, since this is done for the view
+ * port only - it should be OK and not conflict with
+ * render layers. - Campbell.
+ *
+ * ... as an alternative we could use uint64_t
+ */
+#define CYCLES_LOCAL_LAYER_HACK(use_localview, layer)   \
+       if (use_localview) {                                \
+               layer >>= 20;                                   \
+       } (void)0
+
 CCL_NAMESPACE_END
 
 #endif /* __BLENDER_SYNC_H__ */