Skip to content

Instantly share code, notes, and snippets.

@bigjko
bigjko / ZzzLog.cs
Created June 5, 2025 09:29
Debug.Log on screen
using UnityEngine;
using System.Collections;
public class ZzzLog : MonoBehaviour
{
uint qsize = 15; // number of messages to keep
Queue myLogQueue = new Queue();
void Start() {
Debug.Log("Started up logging.");
// Make Layers React to a Mask
// Based on knowledge from The Power of Expression Book
// https://aescripts.com/the-power-of-expression/
//
// Requires the new 'Javascript' expressions engine introduced in AE 16.0 (CC2019)
// You can set this in File -> Project Settings: https://drop.aescripts.com/NQurXWmG
// If you replace all "let" to "var" this expression will should work in previous versions
//
// v1 initial version
// v2 added feathering support
@bigjko
bigjko / ae_expressions.jsx
Created October 10, 2022 08:25
AE Expressions
// POSITION ON SPLINE
p = thisComp.layer("SPLINE").content("Path").content("Path 1").path;
thisComp.layer("SPLINE").toWorld(p.pointOnPath(percentage = effect("Position On Path")("Slider"), t = time))
@bigjko
bigjko / constraints.py
Last active August 20, 2019 08:18
Create constraints for mocap data. Select two groups of bones, the source mocap data and the target rig (the target rig must be in the same pose as the mocap data at that frame, and the mocap data must be below the target in the hierarchy) and then execute. It'll create constraints for bones with the same names.
import c4d
from c4d import gui
# Main function
def main():
obj = doc.GetActiveObjects(0)
doc.StartUndo()
print recurse_hierarchy(obj[0], obj[1])
doc.EndUndo()
@bigjko
bigjko / PhotoController.cs
Last active January 14, 2019 19:59
Code for grabbing a texture from camera (with image effects!)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PhotoController : MonoBehaviour
{
bool grab;
Texture2D texture;
public RawImage display;