<commit_before>@import '~/github/movingimages_sketch/MovingImages.js';

// log(context);

var selectedShapeGroups = context.selection;
var selectedCount = selectedShapeGroups.count();

if (selectedCount == 0) {
  log('No layers are selected.');
} else {
  log('Selected shape groups: ' + selectedCount);
  for (var i = 0; i < selectedCount; i++) {
    var shapeGroup = selectedShapeGroups[i];
    var style = shapeGroup.style();
    // log(MovingImages.MSBlendModeToMIBlendMode(style.contextSettings().blendMode()))
    var fills = style.fills();
    var countFills = fills.count();
    log(countFills);
    for (var j = 0; j < countFills; ++j) {
      var fill = fills.objectAtIndex(j);
      log(fill.treeAsDictionary());
    }
    // var borders = style.borders();
    // var countBorders = borders.count();
    // log(countBorders);
  }<commit_msg>Using CGRects not MSRect for certain calls.<commit_after>@import '~/github/movingimages_sketch/MovingImages.js';

// log(context);

var selectedShapeGroups = context.selection;
var selectedCount = selectedShapeGroups.count();

if (selectedCount == 0) {
  log('No layers are selected.');
} else {
  log('Selected shape groups: ' + selectedCount);
  for (var i = 0; i < selectedCount; i++) {
    var shapeGroup = selectedShapeGroups[i];
    var layer = shapeGroup.layers().objectAtIndex(0);
    log(layer.treeAsDictionary())
    var frame = layer.frame();
    var bWidth = 4;
    log(layer.bezierPath());
    var cgRect = CGRectMake(frame.x() - bWidth, frame.y() - bWidth, frame.width() + 2.0 * bWidth, frame.height() + 2.0 * bWidth);
    log(cgRect);
    var bezierPath = layer.path().bezierPathInRect(cgRect);
    log(bezierPath.svgPathAttribute());
    log(layer.bezierPath().svgPathAttribute());
    var style = shapeGroup.style();
    // log(MovingImages.MSBlendModeToMIBlendMode(style.contextSettings().blendMode()))
    var fills = style.fills();
    var countFills = fills.count();
    log(countFills);
    for (var j = 0; j < countFills; ++j) {
      var fill = fills.objectAtIndex(j);
      // log(fill.treeAsDictionary());
    }
    // var borders = style.borders();
    // var countBorders = borders.count();
    // log(countBorders);
  }
{'fraction_non_alphanumeric': 0.15545454545454546, 'fraction_numerical': 0.005454545454545455, 'mean_word_length': 3.673036093418259, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5795287', 'n_tokens_mistral': 721, 'n_tokens_neox': 696, 'n_words': 155}