Skip to content

Instantly share code, notes, and snippets.

View nmfisher's full-sized avatar

Nick Fisher nmfisher

View GitHub Profile
@nmfisher
nmfisher / UnityPlayerUtils.kt
Last active March 17, 2021 16:27
Modified UnityPlayerUtils to fix layering of Unity View inside Flutter
package com.xraph.plugin.flutter_unity_widget
import android.app.Activity
import android.graphics.PixelFormat
import android.os.Build
import android.os.Handler
import android.os.Looper
import android.util.Log
import android.view.ViewGroup
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
// MIT licence
import 'dart:async';
import 'dart:io';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:fluent_academy_app/blocs/initializable_cubit.dart';
import 'package:fluent_academy_app/widgets/user/auth/signin/sign_in_providers.dart';
import 'package:flutter/widgets.dart';
import 'package:firebase_auth/firebase_auth.dart' as auth;
import 'package:google_sign_in/google_sign_in.dart';
@nmfisher
nmfisher / shape_keys_from_pose.py
Created August 2, 2023 00:54
Generate shape keys from frame poses in Blender
# this assumes that every 10th frame is the pose corresponding to the shape key, ordered according to the variable arkit
# adjust frame_increment if this isn't correct (e.g. if each pose is on consecutive frames, set frame_increment to 1)
# reorder arkit to match the order of poses in your action if needed
# select the mesh in the viewport, then run this script
import bpy
rig_name="rig"
frame = -1
frame_increment = 10