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 random | |
# Reference: https://www.youtube.com/watch?v=r8hqLh_HE08 | |
# After running the script, go to the Animation tab and hit SPACE to run the animation | |
def delete_all_cubes(): | |
# Select all cubes by name | |
for o in bpy.context.scene.objects: |
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
# This is the `code.py` for CircuitPy | |
""" | |
G9 = 127 | |
"A4" = 69 | |
C4 = 60 | |
C0 = 12 | |
""" | |
from adafruit_macropad import MacroPad | |
# C minor pentatonic |
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
# Remove a prefix from all files in recursive subdirs | |
import os | |
PREFIX_TO_REMOVE = "Something - " | |
ROOT_DIR = "." | |
for (dirpath, dirs, files) in os.walk(ROOT_DIR): | |
for filename in files: | |
# print(f'{filename} {dirpath} {dirs}') |
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
""" | |
This script automates the process of exporting the .glb file. | |
You can run this script from the command-line in a headless mode. | |
Example usages: | |
```sh | |
blender -b -P export_gltf.py mymodel.blend | |
/Applications/Blender.app/Contents/MacOS/Blender -b -P export_gltf.py "Monkey.blend" | |
``` |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerMovementController : MonoBehaviour | |
{ | |
public CharacterController characterController; | |
public Camera playerCamera; | |
private Vector3 playerVelocity; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayAnimationOnKey : MonoBehaviour | |
{ | |
public Animation animationToPlay; | |
// Start is called before the first frame update | |
void Start() | |
{ |
OlderNewer