This file contains 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 work comes directly from a tool available on the SideLabs houdini toolset | |
bl_info = { | |
"name": "Align object to axis", | |
"author": "Júlio Rodrigues", | |
"version": (0, 1), | |
"blender": (2, 80, 0), | |
"location": "View3D > Object > Align to Axis", | |
"description": "Align object to axis. Useful to put an object perfectly on top of the XY floor plane.", | |
"warning": "", |
This file contains 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 | |
addon_keymaps = [] | |
def main(context): | |
bpy.ops.mesh.select_more() | |
bpy.ops.mesh.region_to_loop() | |
class BoundaryFromTopVertice(bpy.types.Operator): | |
"""Boundary loop from top poked faces vertice""" |
This file contains 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 matplotlib | |
matplotlib.use('TKAgg') | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import math | |
import random | |
def circlePoints(sides, length=1): | |
angle = 0 | |
angleInc = 2*math.pi / sides |
This file contains 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
polyExtrudeVertex -constructionHistory 1 -width 0.5 -length 0 -divisions 1; | |
$allEdges = `polyListComponentConversion -fv -te`; | |
$allEdgesList = `ls -fl $allEdges`; | |
select -cl; | |
for($edge in $allEdgesList) { | |
string $tokens[]; | |
tokenize $edge "[]" $tokens; | |
int $id = (int) $tokens[1]; | |
if ($id % 2 == 0) { | |
$edgeName = $tokens[0] + "[" + $tokens[1] + "]"; |
This file contains 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
string $currPanel = `getPanel -withFocus`; // gets current panel with focus | |
string $panelType = `getPanel -to $currPanel`; // gets the panel type | |
// this is only applicable to the viewport (modelPanel in MEL's terminology) | |
if ($panelType == "modelPanel") | |
{ | |
int $wireOn = `modelEditor -q -wireframeOnShaded $currPanel`; // queries wireframeonShaded state | |
$wireOn = !$wireOn; // toggles the mode | |
modelEditor -e -wireframeOnShaded $wireOn $currPanel; // finally sets the new mode | |
} else { |
This file contains 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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
using System.Linq; | |
public enum WaveType { | |
Annihilation, | |
Timed, |
This file contains 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 enum PlayerState { | |
Idle, | |
Moving, | |
Hit, | |
Attack, | |
AttackMove |
This file contains 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 UnityEngine; | |
using System.Collections; | |
namespace Completed | |
{ | |
//The abstract keyword enables you to create classes and class members that are incomplete and must be implemented in a derived class. | |
public abstract class MovingObject : MonoBehaviour | |
{ | |
public float moveTime = 0.1f; //Time it will take object to move, in seconds. | |
public LayerMask blockingLayer; //Layer on which collision will be checked. |
This file contains 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 CarboLog; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[RequireComponent(typeof(DropsAnimator))] | |
public class Arbiter : MonoBehaviour { | |
const string DROP_TAG = "Drop"; |
NewerOlder