[Bf-blender-cvs] [683a77256dc] master: Fix compilation issue under windows.

Jeroen Bakker noreply at git.blender.org
Tue Feb 22 10:30:12 CET 2022


Commit: 683a77256dc8845955a8592a730457e0bdc3c10c
Author: Jeroen Bakker
Date:   Tue Feb 22 10:30:02 2022 +0100
Branches: master
https://developer.blender.org/rB683a77256dc8845955a8592a730457e0bdc3c10c

Fix compilation issue under windows.

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

M	source/blender/editors/sculpt_paint/paint_image.cc

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

diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc
index 139fc6a0409..eda686d808d 100644
--- a/source/blender/editors/sculpt_paint/paint_image.cc
+++ b/source/blender/editors/sculpt_paint/paint_image.cc
@@ -67,6 +67,8 @@
 
 #include "paint_intern.h"
 
+extern "C" {
+
 /**
  * This is a static resource for non-global access.
  * Maybe it should be exposed as part of the paint operation,
@@ -1239,11 +1241,11 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
   Main *bmain = CTX_data_main(C);
   Scene *scene = CTX_data_scene(C);
   Object *ob = CTX_data_active_object(C);
-  const eObjectMode mode_flag = OB_MODE_TEXTURE_PAINT;
+  const int mode_flag = OB_MODE_TEXTURE_PAINT;
   const bool is_mode_set = (ob->mode & mode_flag) != 0;
 
   if (!is_mode_set) {
-    if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) {
+    if (!ED_object_mode_compat_set(C, ob, static_cast<eObjectMode>(mode_flag), op->reports)) {
       return OPERATOR_CANCELLED;
     }
   }
@@ -1385,3 +1387,4 @@ bool mask_paint_poll(bContext *C)
 {
   return BKE_paint_select_elem_test(CTX_data_active_object(C));
 }
+}



More information about the Bf-blender-cvs mailing list