[Bf-blender-cvs] [5746475921c] lineart-shadow: Merge remote-tracking branch 'origin/master' into lineart-shadow

YimingWu noreply at git.blender.org
Fri Jul 30 06:45:07 CEST 2021


Commit: 5746475921c2b5a95a242c274bf0fe8ba793812c
Author: YimingWu
Date:   Fri Jul 30 07:47:09 2021 +0800
Branches: lineart-shadow
https://developer.blender.org/rB5746475921c2b5a95a242c274bf0fe8ba793812c

Merge remote-tracking branch 'origin/master' into lineart-shadow

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



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

diff --cc source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 0a31f8933b4,ac458041ca3..5499fa3f36f
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@@ -411,47 -380,14 +411,49 @@@ static void options_shadow_camera_draw(
      return;
    }
  
+   uiItemR(layout, ptr, "overscan", 0, NULL, ICON_NONE);
+ 
 +  uiItemR(layout, ptr, "shadow_camera_size", 0, NULL, ICON_NONE);
 +
    uiLayout *col = uiLayoutColumn(layout, true);
 +  uiItemR(col, ptr, "shadow_camera_near", 0, NULL, ICON_NONE);
 +  uiItemR(col, ptr, "shadow_camera_far", 0, NULL, ICON_NONE);
 +}
 +
 +static void options_panel_draw(const bContext *UNUSED(C), Panel *panel)
 +{
 +  uiLayout *layout = panel->layout;
 +  PointerRNA ob_ptr;
 +  PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, &ob_ptr);
  
 -  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);
 +  const bool is_baked = RNA_boolean_get(ptr, "is_baked");
 +  const bool use_cache = RNA_boolean_get(ptr, "use_cache");
 +  const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data);
 +
 +  uiLayoutSetPropSep(layout, true);
 +  uiLayoutSetEnabled(layout, !is_baked);
 +
 +  if (use_cache && !is_first) {
 +    uiItemL(layout, "Cached from the first line art modifier.", ICON_INFO);
 +    return;
 +  }
 +
 +  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(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, "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);
 +  uiItemR(layout, ptr, "use_back_face_culling", 0, NULL, ICON_NONE);
  }
  
  static void style_panel_draw(const bContext *UNUSED(C), Panel *panel)
diff --cc source/blender/makesdna/DNA_gpencil_modifier_types.h
index 8704985b4de,c91afa58cb1..4414e9bc9d8
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@@ -944,9 -942,11 +944,10 @@@ struct LineartCache
  typedef struct LineartGpencilModifierData {
    GpencilModifierData modifier;
  
 -  /** Line type enable flags, bits in #eLineartEdgeFlag. */
 -  short edge_types;
 +  uint16_t edge_types; /* line type enable flags, bits in eLineartEdgeFlag */
  
-   char source_type; /* Object or Collection, from eLineartGpencilModifierSource */
+   /** Object or Collection, from #eLineartGpencilModifierSource. */
+   char source_type;
  
    char use_multiple_levels;
    short level_start;
@@@ -996,21 -988,15 +997,21 @@@
    /** `0..PI` angle, for splitting strokes at sharp points. */
    float angle_splitting_threshold;
  
 -  /* Doubles as geometry threshold when geometry space chaining is enabled */
 +  /** Strength for smoothing jagged chains */
 +  float chain_smooth_tolerance;
 +
 +  /* CPU mode */
    float chaining_image_threshold;
  
 -  /* Ported from SceneLineArt flags. */
 +  /* eLineartMainFlags, for one time calculation. */
    int calculation_flags;
  
-   /* eLineArtGPencilModifierFlags, modifier internal state. */
+   /* #eLineArtGPencilModifierFlags, modifier internal state. */
    int flags;
  
 +  /* Move strokes towards camera to avoid clipping while preserve depth for the viewport. */
 +  float stroke_offset;
 +
    /* Runtime data. */
  
    /* Because we can potentially only compute features lines once per modifier stack (Use Cache), we



More information about the Bf-blender-cvs mailing list