Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class RandomPointOnMesh : MonoBehaviour | |
{ | |
public MeshCollider lookupCollider; | |
public bool bangGetPoint; | |
private Vector3 randomPoint; |
import ctypes, sys | |
from ctypes import windll, wintypes | |
from uuid import UUID | |
class GUID(ctypes.Structure): # [1] | |
_fields_ = [ | |
("Data1", wintypes.DWORD), | |
("Data2", wintypes.WORD), | |
("Data3", wintypes.WORD), | |
("Data4", wintypes.BYTE * 8) |
Shader "Base_Texture" | |
{ | |
Properties | |
{ | |
_DiffuseAmount ( "Diffuse Amount", Range( 0.0, 1.0 ) ) = 0.25 | |
_TexAmount ( "Texture Amount", Range( 0.0, 1.0 ) ) = 0.25 | |
_SpecAmount ( "Specular Amount", Range( 0.0, 16.0 ) ) = 1.0 | |
_SpecTexAmount ( "Spec Texture Amount", Range( 0.0, 1.0 ) ) = 0.25 | |
_Diffusemap ( "Diffusemap", 2D ) = "diffuse" {} |
#!/bin/sh | |
echo "[post-rewrite hook: $1]" | |
# quick script to call "git submodule update" automatically if the | |
# .gitmodules file is changed | |
changedfiles=( `git diff-tree --no-commit-id --name-only HEAD@{1} HEAD` ) | |
if [[ "${changedfiles[*]}" =~ ".gitmodules" ]]; then | |
echo "initializing & updating submodule(s)" |
using UnityEngine; | |
using System.Collections; | |
public class FlyCamera : MonoBehaviour { | |
/* | |
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care. | |
Converted to C# 27-02-13 - no credit wanted. | |
Simple flycam I made, since I couldn't find any others made public. | |
Made simple to use (drag and drop, done) for regular keyboard layout |
fn closeIcon s e = s.dispose() | |
fn balloonClicked s e = shelllaunch @"c:\windows\" "" | |
a = dotnetobject "notifyicon" | |
a.visible = true | |
a.icon = (dotnetclass "system.drawing.systemIcons").information | |
dotnet.addEventHandler a "BalloonTipClosed" closeIcon | |
dotnet.addEventHandler a "BalloonTipClicked" balloonClicked | |
a.showballoontip 1000 "test" "test2" (dotnetclass "tooltipicon").info |
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
import maya.OpenMaya as om | |
import maya.cmds as mc | |
import uuid | |
def get_name(node): | |
"""Get the long name from the MObject where appropriate""" | |
if node.hasFn(om.MFn.kDagNode): | |
return om.MFnDagNode(node).fullPathName() | |
else: | |
return om.MFnDependencyNode(node).name() |
# Test is a given point is visible in the camera | |
# Convert between 3d and screen coordinates | |
import modo | |
# Assuming the camera is also the active view | |
def pointInCamera(cam, position): | |
aperture_x = cam.channel(lx.symbol.sICHAN_CAMERA_APERTUREX).get() | |
aperture_y = cam.channel(lx.symbol.sICHAN_CAMERA_APERTUREY).get() |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Reflection; | |
[InitializeOnLoad] | |
public class EditorCameraSpeed | |
: EditorWindow |