[Bf-blender-cvs] [cb67be3f22c] blender2.8: Bitflag tests simplification

Dalai Felinto noreply at git.blender.org
Wed Nov 22 10:18:10 CET 2017


Commit: cb67be3f22c4d139ad43d6863ceea168d7872070
Author: Dalai Felinto
Date:   Wed Nov 15 13:29:40 2017 -0200
Branches: blender2.8
https://developer.blender.org/rBcb67be3f22c4d139ad43d6863ceea168d7872070

Bitflag tests simplification

===================================================================

M	source/blender/blenloader/intern/versioning_280.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 44ce2014e99..8d057330822 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -330,14 +330,8 @@ void do_versions_after_linking_280(Main *main)
 
 							/* Add new collection bases. */
 							for (int layer = 0; layer < 20; layer++) {
-								if ((
-								        (scene->lay & (1 << layer)) &&
-								        (srl->lay & (1 << layer)) &&
-								        ((srl->lay_exclude & (1 << layer)) == 0)) ||
-								    (
-								        (srl->lay_zmask & (1 << layer)) &&
-								        ((scene->lay | srl->lay_exclude) & (1 << layer)))
-								    )
+								if ((scene->lay & srl->lay & ~(srl->lay_exclude) & (1 << layer)) ||
+								    (srl->lay_zmask & (scene->lay | srl->lay_exclude) & (1 << layer)))
 								{
 									if (collections[DO_VERSION_COLLECTION_VISIBLE].created & (1 << layer)) {



More information about the Bf-blender-cvs mailing list