[Bf-blender-cvs] [3982a36c10f] blender-v2.79a-release: Minor change to last commit
Campbell Barton
noreply at git.blender.org
Thu Feb 15 05:47:39 CET 2018
Commit: 3982a36c10fc728c841768b512b0d4486db55310
Author: Campbell Barton
Date: Mon Feb 5 17:56:09 2018 +1100
Branches: blender-v2.79a-release
https://developer.blender.org/rB3982a36c10fc728c841768b512b0d4486db55310
Minor change to last commit
Keep mode checks simple, nest other checks in their body.
===================================================================
M source/blender/editors/util/ed_util.c
===================================================================
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 7ec223a8eb9..03f2125bc0f 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -168,23 +168,23 @@ bool ED_editors_flush_edits(const bContext *C, bool for_render)
* exiting we might not have a context for edit object and multiple sculpt
* objects can exist at the same time */
for (ob = bmain->object.first; ob; ob = ob->id.next) {
- if ((ob->mode & OB_MODE_SCULPT) &&
- /* Don't allow flushing while in the middle of a stroke (frees data in use).
- * Auto-save prevents this from happening but scripts may cause a flush on saving: T53986. */
- ((ob->sculpt && ob->sculpt->cache) == 0))
- {
- /* flush multires changes (for sculpt) */
- multires_force_update(ob);
- has_edited = true;
-
- if (for_render) {
- /* flush changes from dynamic topology sculpt */
- BKE_sculptsession_bm_to_me_for_render(ob);
- }
- else {
- /* Set reorder=false so that saving the file doesn't reorder
- * the BMesh's elements */
- BKE_sculptsession_bm_to_me(ob, false);
+ if (ob->mode & OB_MODE_SCULPT) {
+ /* Don't allow flushing while in the middle of a stroke (frees data in use).
+ * Auto-save prevents this from happening but scripts may cause a flush on saving: T53986. */
+ if ((ob->sculpt && ob->sculpt->cache) == 0) {
+ /* flush multires changes (for sculpt) */
+ multires_force_update(ob);
+ has_edited = true;
+
+ if (for_render) {
+ /* flush changes from dynamic topology sculpt */
+ BKE_sculptsession_bm_to_me_for_render(ob);
+ }
+ else {
+ /* Set reorder=false so that saving the file doesn't reorder
+ * the BMesh's elements */
+ BKE_sculptsession_bm_to_me(ob, false);
+ }
}
}
else if (ob->mode & OB_MODE_EDIT) {
More information about the Bf-blender-cvs
mailing list