This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| import bpy | |
| from mathutils import * | |
| from math import * | |
| scale = 0.33333333 | |
| class cube: | |
| pos = Vector((0, 0, 0)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| from mathutils import * | |
| import random | |
| rad = 5 | |
| numSpheres = 5000 | |
| resolution = 0.1 | |
| spheres = list() | |
| def dist(point1, point2): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 ) | |