[Bf-blender-cvs] [a2cb7ffa666] temp-lanpr-staging: LANPR: Apply cleanup branch result.

YimingWu noreply at git.blender.org
Thu Sep 12 11:10:25 CEST 2019


Commit: a2cb7ffa66691f4a210ab9f19ea22c2b614f2e7a
Author: YimingWu
Date:   Thu Sep 12 17:09:50 2019 +0800
Branches: temp-lanpr-staging
https://developer.blender.org/rBa2cb7ffa66691f4a210ab9f19ea22c2b614f2e7a

LANPR: Apply cleanup branch result.

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

M	intern/cycles/render/film.h
M	intern/ghost/intern/GHOST_ContextCGL.mm
M	intern/ghost/intern/GHOST_SystemCocoa.mm
M	release/scripts/startup/bl_operators/freestyle.py
M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/blenkernel/intern/customdata.c
M	source/blender/blenkernel/intern/data_transfer.c
M	source/blender/draw/engines/lanpr/lanpr_dpix.c
M	source/blender/draw/intern/draw_common.c
M	source/blender/editors/include/UI_resources.h
M	source/blender/editors/interface/resources.c
M	source/blender/editors/lanpr/lanpr_cpu.c
M	source/blender/editors/mesh/editmesh_path.c
M	source/blender/editors/mesh/editmesh_select_similar.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/mesh/mesh_intern.h
M	source/blender/editors/mesh/mesh_ops.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
M	source/blender/makesdna/DNA_customdata_types.h
M	source/blender/makesdna/DNA_material_types.h
M	source/blender/makesdna/DNA_meshdata_types.h
M	source/blender/makesrna/intern/rna_mesh.c
M	source/blender/modifiers/CMakeLists.txt
D	source/blender/modifiers/intern/MOD_featureline.c
M	source/blender/python/bmesh/bmesh_py_types_customdata.c

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

diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h
index 2c4e07d60ae..20f6261a871 100644
--- a/intern/cycles/render/film.h
+++ b/intern/cycles/render/film.h
@@ -91,7 +91,7 @@ class Film : public Node {
   void device_free(Device *device, DeviceScene *dscene, Scene *scene);
 
   bool modified(const Film &film);
-  void tag_passes_update(Scene *scene, const vector<Pass> &passes_, bool update_passes = true);
+  void tag_passes_update(Scene *scene, const vector<Pass> &passes_, bool update_passes=true);
   void tag_update(Scene *scene);
 };
 
diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm
index 0fca41306a6..12c340ffe97 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@ -34,8 +34,7 @@
 
 static void ghost_fatal_error_dialog(const char *msg)
 {
-  @autoreleasepool
-  {
+  @autoreleasepool {
     NSString *message = [NSString stringWithFormat:@"Error opening window:\n%s", msg];
 
     NSAlert *alert = [[NSAlert alloc] init];
@@ -338,8 +337,7 @@ static const OSType METAL_CORE_VIDEO_PIXEL_FORMAT = kCVPixelFormatType_32BGRA;
 
 void GHOST_ContextCGL::metalInit()
 {
-  @autoreleasepool
-  {
+  @autoreleasepool {
     id<MTLDevice> device = m_metalLayer.device;
 
     // Create a command queue for blit/present operation
@@ -534,8 +532,7 @@ void GHOST_ContextCGL::metalUpdateFramebuffer()
 
 void GHOST_ContextCGL::metalSwapBuffers()
 {
-  @autoreleasepool
-  {
+  @autoreleasepool {
     updateDrawingContext();
     glFlush();
 
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 80a521a7ca5..376ebfa2a21 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1358,8 +1358,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr)
 
   // Check open windows if some changes are not saved
   if (m_windowManager->getAnyModifiedState()) {
-    @autoreleasepool
-    {
+    @autoreleasepool {
       NSAlert *alert = [[NSAlert alloc] init];
       NSString *title = [NSString stringWithFormat:@"Opening %@", [filepath lastPathComponent]];
       NSString *text = @"Current document has not been saved.\nDo you really want to proceed?";
diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py
index b86c6eba5a9..baac3556fb2 100644
--- a/release/scripts/startup/bl_operators/freestyle.py
+++ b/release/scripts/startup/bl_operators/freestyle.py
@@ -148,7 +148,7 @@ class SCENE_OT_freestyle_add_edge_marks_to_keying_set(bpy.types.Operator):
         scene = context.scene
         ks = scene.keying_sets.active
         if ks is None:
-            ks = scene.keying_sets.new(idname="LanprEdgeMarkKeyingSet", name="Freestyle Edge Mark Keying Set")
+            ks = scene.keying_sets.new(idname="FreestyleEdgeMarkKeyingSet", name="Freestyle Edge Mark Keying Set")
             ks.bl_description = ""
         # add data paths to the keying set
         ob = context.active_object
@@ -179,7 +179,7 @@ class SCENE_OT_freestyle_add_face_marks_to_keying_set(bpy.types.Operator):
         scene = context.scene
         ks = scene.keying_sets.active
         if ks is None:
-            ks = scene.keying_sets.new(idname="LanprFaceMarkKeyingSet", name="Freestyle Face Mark Keying Set")
+            ks = scene.keying_sets.new(idname="FreestyleFaceMarkKeyingSet", name="Freestyle Face Mark Keying Set")
             ks.bl_description = ""
         # add data paths to the keying set
         ob = context.active_object
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 2b7e9e785a7..124fe77cb52 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1641,12 +1641,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "thresh", text="Threshold")
         col.prop(md, "face_influence")
 
-    def FEATURE_LINE(self, layout, _ob, _md):
-        if not (bpy.context.scene.render.engine == "BLENDER_LANPR" or bpy.context.scene.lanpr.enabled):
-            layout.label(text="LANPR is disabled.")
-        else:
-            layout.label(text="Settings are inside the LANPR tab.")
-        
 
 class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
     bl_label = "Modifiers"
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 2c34c8cbafe..6732f8fcc68 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3462,11 +3462,11 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
             col.operator("mesh.mark_sharp")
             col.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
 
-            if scene.lanpr.enabled or render.engine=="BLENDER_LANPR":
+            if render.use_freestyle or scene.lanpr.enabled or render.engine=="BLENDER_LANPR":
                 col.separator()
 
-                col.operator("mesh.mark_lanpr_edge").clear = False
-                col.operator("mesh.mark_lanpr_edge", text="Clear Freestyle Edge").clear = True
+                col.operator("mesh.mark_freestyle_edge").clear = False
+                col.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
 
             col.separator()
 
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index e9ecde19574..8ac0f71cd7e 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1611,10 +1611,10 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
      layerInterp_mvert_skin,
      NULL,
      layerDefault_mvert_skin},
-    /* 37: CD_LANPR_EDGE */
-    {sizeof(LanprEdge), "LanprEdge", 1, NULL, NULL, NULL, NULL, NULL, NULL},
-    /* 38: CD_LANPR_FACE */
-    {sizeof(LanprFace), "LanprFace", 1, NULL, NULL, NULL, NULL, NULL, NULL},
+    /* 37: CD_FREESTYLE_EDGE */
+    {sizeof(FreestyleEdge), "FreestyleEdge", 1, NULL, NULL, NULL, NULL, NULL, NULL},
+    /* 38: CD_FREESTYLE_FACE */
+    {sizeof(FreestyleFace), "FreestyleFace", 1, NULL, NULL, NULL, NULL, NULL, NULL},
     /* 39: CD_MLOOPTANGENT */
     {sizeof(float[4]), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
     /* 40: CD_TESSLOOPNORMAL */
@@ -1663,8 +1663,8 @@ static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
     "CDPaintMask",
     /* 35-36 */ "CDGridPaintMask",
     "CDMVertSkin",
-    /* 37-38 */ "CDLanprEdge",
-    "CDLanprFace",
+    /* 37-38 */ "CDFreestyleEdge",
+    "CDFreestyleFace",
     /* 39-41 */ "CDMLoopTangent",
     "CDTessLoopNormal",
     "CDCustomLoopNormal",
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 3dc025bdcf2..0414c6d0a02 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -222,14 +222,14 @@ int BKE_object_data_transfer_dttype_to_cdtype(const int dtdata_type)
     case DT_TYPE_BWEIGHT_EDGE:
       return CD_FAKE_BWEIGHT;
     case DT_TYPE_FREESTYLE_EDGE:
-      return CD_LANPR_EDGE;
+      return CD_FREESTYLE_EDGE;
 
     case DT_TYPE_UV:
       return CD_FAKE_UV;
     case DT_TYPE_SHARP_FACE:
       return CD_FAKE_SHARP;
     case DT_TYPE_FREESTYLE_FACE:
-      return CD_LANPR_FACE;
+      return CD_FREESTYLE_FACE;
 
     case DT_TYPE_VCOL:
       return CD_MLOOPCOL;
@@ -519,11 +519,11 @@ static void data_transfer_layersmapping_add_item_cd(ListBase *r_map,
 {
   uint64_t data_flag = 0;
 
-  if (cddata_type == CD_LANPR_EDGE) {
-    data_flag = LANPR_EDGE_MARK;
+  if (cddata_type == CD_FREESTYLE_EDGE) {
+    data_flag = FREESTYLE_EDGE_MARK;
   }
-  else if (cddata_type == CD_LANPR_FACE) {
-    data_flag = LANPR_FACE_MARK;
+  else if (cddata_type == CD_FREESTYLE_FACE) {
+    data_flag = FREESTYLE_FACE_MARK;
   }
 
   data_transfer_layersmapping_add_item(r_map,
diff --git a/source/blender/draw/engines/lanpr/lanpr_dpix.c b/source/blender/draw/engines/lanpr/lanpr_dpix.c
index 7ebb28d2b2e..dd136b5f378 100644
--- a/source/blender/draw/engines/lanpr/lanpr_dpix.c
+++ b/source/blender/draw/engines/lanpr/lanpr_dpix.c
@@ -186,7 +186,7 @@ int lanpr_feed_atlas_data_obj(void *UNUSED(vedata),
   struct BMVert *v1, *v2;
   struct BMEdge *e;
   struct BMLoop *l1, *l2;
-  LanprEdge *fe;
+  FreestyleEdge *fe;
   int CanFindFreestyle = 0;
   int edge_count = me->totedge;
   int i, idx;
@@ -210,7 +210,7 @@ int lanpr_feed_atlas_data_obj(void *UNUSED(vedata),
                      }));
   BM_mesh_elem_table_ensure(bm, BM_VERT | BM_EDGE | BM_FACE);
 
-  if (CustomData_has_layer(&bm->edata, CD_LANPR_EDGE)) {
+  if (CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE)) {
     CanFindFreestyle = 1;
   }
 
@@ -242,8 +242,8 @@ int lanpr_feed_atlas_data_obj(void *UNUSED(vedata),
     AtlasPointsR[idx + 3] = 1;
 
     if (CanFindFreestyle) {
-      fe = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE);
-      if (fe->flag & LANPR_EDGE_MARK) {
+      fe = CustomData_bmesh_get(&bm->edata, e->head.data, FREESTYLE_EDGE_MARK);
+      if (fe->flag & FREESTYLE_EDGE_MARK) {
         AtlasEdgeMask[idx + 1] = 1; /*  channel G */
       }
     }
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c
index d6e5da9307e..8e0f713add6 100644
--- a/source/blender/draw/intern/draw_common.c
+++ b/source/blender/draw/intern/draw_common.c
@@ -97,8 +97,8 @@ void DRW_globals_update(void)
   interp_v4_v4v4(gb->colorDupli, gb->colorBackground, gb->colorWire, 0.3f);
 
 #ifdef WITH_FREESTYLE
-  UI_GetThemeColor4fv(TH_LANPR_EDGE_MARK, gb->colorEdgeFreestyle);
-  UI_GetThemeColor4fv(TH_LANPR_FACE_MARK, gb->colorFaceFreestyle);
+  UI_GetThemeColor4fv(TH_FREESTYLE_EDGE_MARK, gb->colorEdgeFreestyle);
+  UI_GetThemeColor4fv(TH_FREESTYLE_FACE_MARK, gb->colorFaceFreestyle);
 #else
   zero_v4(gb->colorEdgeFreestyle);
   zero_v4(gb->colorFaceFreestyle);
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index efa35c84b9e..1c317ac

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list