Skip to content

Instantly share code, notes, and snippets.

## run on blender
import os
def importfbx(f):
print("import", f)
bpy.ops.import_scene.fbx(filepath=f)
def import_path(path):
files = os.listdir(path)
@celoron
celoron / LevelScriptEditor.cs
Last active August 28, 2017 17:29
Unity Custom Inspector
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(LevelScript))]
public class LevelScriptEditor : Editor
{
public override void OnInspectorGUI()
{
LevelScript myTarget = (LevelScript)target;
@celoron
celoron / UnityEventInvoke.cs
Last active December 25, 2016 23:16
Unity Event Invoke
using UnityEngine;
using UnityEngine.EventSystems;
public class UnityEventInvoke : MonoBehaviour {
public EventTrigger.TriggerEvent onClick;
void Start() {
BaseEventData eventData = new BaseEventData(EventSystem.current);
onClick.Invoke(eventData);
}
@celoron
celoron / facebookLoginTest.py
Created January 23, 2013 11:31
very simple script that can login facebook.
import cookielib, urllib2, time
from pyquery import PyQuery as pq
email="mail@mail.com"
pwd="yeasure :D"
cj = cookielib.CookieJar()
go = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
d= pq(go.open("http://www.facebook.com/").read())