Skip to content

Instantly share code, notes, and snippets.

View lowteq's full-sized avatar

lowteq lowteq

View GitHub Profile
import bpy
def pivotpointchange(pivotpoint):
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
area.spaces[0].pivot_point = pivotpoint
def currentpivotpoint():
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
@lowteq
lowteq / faceexshapekey.py
Created March 13, 2020 11:57
顔の出し入れするメッシュのシェイプキーを作成する
import bpy
def pivotpointchange(pivotpoint):
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
area.spaces[0].pivot_point = pivotpoint
def currentpivotpoint():
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
return area.spaces[0].pivot_point
@lowteq
lowteq / charshader.shader
Created March 8, 2020 14:08
文字をランダムに表示するシェーダー GPUInstancingでオブジェクト毎に表示を変える(カメラの距離で描画が変わってしまうのでだめ)
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
Shader "Unlit/charshader_babel"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_sw("string length in line",int) = 30
_line("line",int) = 20
@lowteq
lowteq / charsshader.shader
Created March 5, 2020 04:29
文字をランダムに表示するシェーダー
Shader "Unlit/charshader"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
@lowteq
lowteq / applyCurveMirror.py
Last active February 20, 2020 03:22
blender2.7x curveをmirror適用
import bpy
def axislist(axisbool):
r = []
for i in range(len(axisbool)):
l = [False,False,False]
if axisbool[i]:
l[i] = True
r.append(l)
@lowteq
lowteq / select_pointgzero.py
Created February 9, 2020 01:39
select points where x is greater than 0
import bpy
import bmesh
bpy.ops.object.mode_set(mode='OBJECT')
obj = bpy.context.active_object
bpy.ops.object.mode_set(mode='EDIT')
mesh = bmesh.from_edit_mesh(obj.data)
bpy.ops.mesh.select_all(action="DESELECT")
for v in mesh.verts:
@lowteq
lowteq / dynamicraymarching.shader
Created February 1, 2020 20:28
dynamicraymarchingshader 未完成 standardshaderの最小構成
Shader "dynamicraymarching"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5
using UnityEngine;
using System;
using System.Collections.Generic;
using System.Linq;
#if UNITY_EDITOR
using UnityEditor;
public class BroochEditor : EditorWindow
{
private class PathTool
using UnityEngine;
using System;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
public class BroochEditor : EditorWindow
{
private class PathTool
{
@lowteq
lowteq / BroochEditor.cs
Created January 9, 2020 22:59
UnityEditorWindow上で外枠のパスを入力し立体物に変換するスクリプト
using UnityEngine;
using System;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
public class BroochEditor : EditorWindow
{
private class PathTool
{