[Bf-blender-cvs] [bdfe539479b] temp-lineart-contained: Merge remote-tracking branch 'origin/master' into temp-lineart-contained

YimingWu noreply at git.blender.org
Sun Jun 27 05:38:30 CEST 2021


Commit: bdfe539479b65c4430b4c756ba9a9a93a84240e4
Author: YimingWu
Date:   Fri Jun 25 20:35:40 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rBbdfe539479b65c4430b4c756ba9a9a93a84240e4

Merge remote-tracking branch 'origin/master' into temp-lineart-contained

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



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

diff --cc source/blender/blenloader/intern/versioning_300.c
index 90be756f377,cb0f1f29bff..bb0857dcbae
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@@ -392,21 -393,28 +395,41 @@@ void blo_do_versions_300(FileData *fd, 
  
        BKE_animdata_main_cb(bmain, do_version_bbone_len_scale_animdata_cb, NULL);
      }
 +    if (!DNA_struct_elem_find(
 +            fd->filesdna, "LineartGpencilModifierData", "bool", "use_crease_on_smooth")) {
 +      LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
 +        if (ob->type == OB_GPENCIL) {
 +          LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) {
 +            if (md->type == eGpencilModifierType_Lineart) {
 +              LineartGpencilModifierData *lmd = (LineartGpencilModifierData *)md;
 +              lmd->calculation_flags |= LRT_USE_CREASE_ON_SMOOTH_SURFACES;
 +            }
 +          }
 +        }
 +      }
 +    }
    }
  
+   if (!MAIN_VERSION_ATLEAST(bmain, 300, 5)) {
+     /* Add a dataset sidebar to the spreadsheet editor. */
+     LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+       LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+         LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
+           if (sl->spacetype == SPACE_SPREADSHEET) {
+             ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
+                                    &sl->regionbase;
+             ARegion *spreadsheet_dataset_region = do_versions_add_region_if_not_found(
+                 regionbase, RGN_TYPE_CHANNELS, "spreadsheet dataset region", RGN_TYPE_FOOTER);
+ 
+             if (spreadsheet_dataset_region) {
+               spreadsheet_dataset_region->alignment = RGN_ALIGN_LEFT;
+               spreadsheet_dataset_region->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM);
+             }
+           }
+         }
+       }
+     }
+   }
    /**
     * Versioning code until next subversion bump goes here.
     *
diff --cc source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 9d47ef2ffe9,b87ed9e431a..403da5e22ff
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@@ -403,23 -363,13 +403,22 @@@ static void options_panel_draw(const bC
      return;
    }
  
 -  uiLayout *col = uiLayoutColumn(layout, true);
 +  uiLayout *row = uiLayoutRowWithHeading(layout, false, IFACE_("Custom Camera"));
 +  uiItemR(row, ptr, "use_custom_camera", 0, "", 0);
 +  uiLayout *subrow = uiLayoutRow(row, true);
 +  uiLayoutSetActive(subrow, RNA_boolean_get(ptr, "use_custom_camera"));
 +  uiLayoutSetPropSep(subrow, true);
 +  uiItemR(subrow, ptr, "source_camera", 0, "", ICON_OBJECT_DATA);
 +
 +  uiItemR(layout, ptr, "overscan", 0, NULL, ICON_NONE);
  
 -  uiItemR(col, ptr, "use_remove_doubles", 0, NULL, ICON_NONE);
 -  uiItemR(col, ptr, "use_edge_overlap", 0, IFACE_("Overlapping Edges As Contour"), ICON_NONE);
 -  uiItemR(col, ptr, "use_object_instances", 0, NULL, ICON_NONE);
 -  uiItemR(col, ptr, "use_clip_plane_boundaries", 0, NULL, ICON_NONE);
 -  uiItemR(col, ptr, "allow_overlap_edge_types", 0, NULL, ICON_NONE);
 +  uiItemR(layout, ptr, "use_remove_doubles", 0, NULL, ICON_NONE);
 +  uiItemR(layout, ptr, "use_edge_overlap", 0, IFACE_("Overlapping Edges As Contour"), ICON_NONE);
 +  uiItemR(layout, ptr, "use_object_instances", 0, NULL, ICON_NONE);
 +  uiItemR(layout, ptr, "use_clip_plane_boundaries", 0, NULL, ICON_NONE);
-   uiItemR(layout, ptr, "floating_as_contour", 0, NULL, ICON_NONE);
 +  uiItemR(layout, ptr, "use_multiple_edge_types", 0, NULL, ICON_NONE);
 +  uiItemR(layout, ptr, "use_crease_on_smooth", 0, IFACE_("Crease On Smooth"), ICON_NONE);
 +  uiItemR(layout, ptr, "use_crease_on_sharp", 0, IFACE_("Crease On Sharp"), ICON_NONE);
  }
  
  static void style_panel_draw(const bContext *UNUSED(C), Panel *panel)
@@@ -619,11 -517,17 +622,18 @@@ static void chaining_panel_draw(const b
    uiLayout *col = uiLayoutColumnWithHeading(layout, true, IFACE_("Chain"));
    uiItemR(col, ptr, "use_fuzzy_intersections", 0, NULL, ICON_NONE);
    uiItemR(col, ptr, "use_fuzzy_all", 0, NULL, ICON_NONE);
-   uiItemR(col, ptr, "chain_floating_edges", 0, NULL, ICON_NONE);
++
+   uiItemR(col, ptr, "chain_floating_edges", 0, IFACE_("Floating Edges"), ICON_NONE);
 -  uiItemR(col, ptr, "floating_as_contour", 0, NULL, ICON_NONE);
    uiItemR(col, ptr, "chain_geometry_space", 0, NULL, ICON_NONE);
  
-   uiItemR(layout, ptr, "chaining_image_threshold", 0, NULL, ICON_NONE);
+   uiItemR(layout,
+           ptr,
+           "chaining_image_threshold",
+           0,
+           is_geom ? IFACE_("Geometry Threshold") : NULL,
+           ICON_NONE);
+ 
 +  uiItemR(layout, ptr, "smooth_tolerance", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
    uiItemR(layout, ptr, "split_angle", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
  }
  
@@@ -731,14 -611,8 +741,16 @@@ static void panelRegister(ARegionType *
                                       transparency_panel_draw_header,
                                       transparency_panel_draw,
                                       occlusion_panel);
 +  gpencil_modifier_subpanel_register(region_type,
 +                                     "intersection",
 +                                     "",
 +                                     intersection_panel_draw_header,
 +                                     intersection_panel_draw,
 +                                     panel_type);
 +  gpencil_modifier_subpanel_register(
 +      region_type, "face_mark", "", face_mark_panel_draw_header, face_mark_panel_draw, panel_type);
+   gpencil_modifier_subpanel_register(
+       region_type, "face_mark", "", face_mark_panel_draw_header, face_mark_panel_draw, panel_type);
    gpencil_modifier_subpanel_register(
        region_type, "chaining", "Chaining", NULL, chaining_panel_draw, panel_type);
    gpencil_modifier_subpanel_register(
diff --cc source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
index e143239991a,408e0081990..58c33b883bf
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
@@@ -595,9 -587,9 +595,9 @@@ void MOD_lineart_chain_split_for_fixed_
          }
          else {
            /* Set the same occlusion level for the end vertex, so when further connection is needed
-            * the backwards occlusion info is also correct.  */
+            * the backwards occlusion info is also correct. */
            eci->occlusion = fixed_occ;
 -          eci->transparency_mask = fixed_mask;
 +          eci->transparency_mask = fixed_trans_mask;
            /* No need to split at the last point anyway. */
            break;
          }
diff --cc source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 752e71b4bf4,ebf9bcc17e2..409a41fc4dd
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@@ -3131,14 -3028,10 +3130,14 @@@ static LineartRenderBuffer *lineart_cre
    /* See lineart_edge_from_triangle() for how this option may impact performance. */
    rb->allow_overlapping_edges = (lmd->calculation_flags & LRT_ALLOW_OVERLAPPING_EDGES) != 0;
  
-   rb->allow_duplicated_types = (lmd->calculation_flags & LRT_ALLOW_MULTIPLE_EDGE_TYPES) != 0;
+   rb->allow_duplicated_types = (lmd->calculation_flags & LRT_ALLOW_OVERLAP_EDGE_TYPES) != 0;
  
 +  rb->force_crease = (lmd->calculation_flags & LRT_USE_CREASE_ON_SMOOTH_SURFACES) != 0;
 +  rb->sharp_as_crease = (lmd->calculation_flags & LRT_USE_CREASE_ON_SHARP_EDGES) != 0;
 +
    int16_t edge_types = lmd->edge_types_override;
  
 +  /* lmd->edge_types_override contains all used flags in the modifier stack. */
    rb->use_contour = (edge_types & LRT_EDGE_FLAG_CONTOUR) != 0;
    rb->use_crease = (edge_types & LRT_EDGE_FLAG_CREASE) != 0;
    rb->use_material = (edge_types & LRT_EDGE_FLAG_MATERIAL) != 0;
diff --cc source/blender/makesdna/DNA_lineart_types.h
index 39654ce7555,3a3af622dd5..ce0c813fd50
--- a/source/blender/makesdna/DNA_lineart_types.h
+++ b/source/blender/makesdna/DNA_lineart_types.h
@@@ -53,12 -53,9 +53,12 @@@ typedef enum eLineartMainFlags 
    LRT_FILTER_FACE_MARK = (1 << 9),
    LRT_FILTER_FACE_MARK_INVERT = (1 << 10),
    LRT_FILTER_FACE_MARK_BOUNDARIES = (1 << 11),
-   LRT_CHAIN_FLOATING_EDGES = (1 << 11),
-   LRT_CHAIN_GEOMETRY_SPACE = (1 << 12),
-   LRT_ALLOW_MULTIPLE_EDGE_TYPES = (1 << 13),
-   LRT_USE_CUSTOM_CAMERA = (1 << 14),
-   LRT_USE_CREASE_ON_SMOOTH_SURFACES = (1 << 15),
-   LRT_USE_CREASE_ON_SHARP_EDGES = (1 << 16),
+   LRT_CHAIN_FLOATING_EDGES = (1 << 12),
+   LRT_CHAIN_GEOMETRY_SPACE = (1 << 13),
+   LRT_ALLOW_OVERLAP_EDGE_TYPES = (1 << 14),
++  LRT_USE_CUSTOM_CAMERA = (1 << 15),
++  LRT_USE_CREASE_ON_SMOOTH_SURFACES = (1 << 16),
++  LRT_USE_CREASE_ON_SHARP_EDGES = (1 << 17),
  } eLineartMainFlags;
  
  typedef enum eLineartEdgeFlag {
diff --cc source/blender/makesrna/intern/rna_gpencil_modifier.c
index cc99eb74196,baa37f84f9d..96bdd5546f2
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@@ -2875,47 -2862,17 +2875,49 @@@ static void rna_def_modifier_gpencillin
    prop = RNA_def_property(srna, "chain_geometry_space", PROP_BOOLEAN, PROP_NONE);
    RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_CHAIN_GEOMETRY_SPACE);
    RNA_def_property_ui_text(
 -      prop, "Use Geometry Space", "Use geometry distance for chaining instead of image space.");
 +      prop, "Use Geometry Space", "Use geometry distance for chaining instead of image space");
    RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
  
-   prop = RNA_def_property(srna, "use_multiple_edge_types", PROP_BOOLEAN, PROP_NONE);
-   RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_ALLOW_MULTIPLE_EDGE_TYPES);
-   RNA_def_property_ui_text(
-       prop, "Multiple Edge Types", "Allow edges with muliple types be added for every type");
+   prop = RNA_def_property(srna, "allow_overlap_edge_types", PROP_BOOLEAN, PROP_NONE);
+   RNA_def_property_boolean_sdna(prop, NULL, "calculation_fl

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list