Skip to content

Instantly share code, notes, and snippets.

import SwiftGodot
class ArrayTest : Node {
// MARK: - Required initializers for Godot
required init(nativeHandle _: UnsafeRawPointer) {
fatalError("init(nativeHandle:) called, it is a sign that something is wrong, as these objects should not be re-hydrated")
}
required init() {
@Airyzz
Airyzz / normalize.jsx
Last active September 29, 2020 03:49
Script to resize all selected layers to the size of the first selected layer
app.activeViewer.setActive();
var activeComp = app.project.activeItem;
var layers = app.project.activeItem.selectedLayers;
var time = app.project.activeItem.time
if(layers.length > 1)
{
target = layers[0].sourceRectAtTime(t = time, includeExtents = true)
target_scale_w = layers[0].scale.value[0] / 100;
target_scale_h = layers[0].scale.value[1] / 100;
import bpy
import bpy
from mathutils import *
from math import *
scale = 0.33333333
class cube:
pos = Vector((0, 0, 0))
@Airyzz
Airyzz / sphere_packing.py
Created September 5, 2020 06:42
Blender Sphere Packing Generator
import bpy
from mathutils import *
import random
rad = 5
numSpheres = 5000
resolution = 0.1
spheres = list()
def dist(point1, point2):
import bpy
armature = bpy.context.active_object
bpy.ops.object.empty_add(type='PLAIN_AXES', location=(0,0,0))
parent = bpy.context.selected_objects[0]
parent.name = 'metarig'
for bone in armature.pose.bones:
import bpy
def ApplyArmatures():
for ob in bpy.context.selected_objects:
bpy.context.view_layer.objects.active = ob
for mod in [m for m in ob.modifiers if m.type == 'ARMATURE']:
bpy.ops.object.modifier_apply( modifier = mod.name )