Skip to content

Instantly share code, notes, and snippets.

View U29's full-sized avatar
🐾
完全に理解した

akarin U29

🐾
完全に理解した
View GitHub Profile
import random
min = 0
minmax = 0.3
maxmin = 0.8
max = 1.0
choice = random.randint(0,1)
if choice:
def shapeCenter(node, shapeName, frame):
shape = node['curves'].toElement(shapeName)
x = 0
y = 0
for eachPoint in shape:
x = x + eachPoint.center.getPosition(nuke.frame(frame))[0]
y = y + eachPoint.center.getPosition(nuke.frame(frame))[1]
# avarage of point value
x = x / len(shape)
@U29
U29 / convert_num_half_to_full.py
Last active August 18, 2021 07:57
半角数字を全角数字に変換する関数 (Python2.x and Python3.x)
# -*- coding: utf-8 -*-
def convert_num_half_to_full(h_num):
F_NUM_LIST = ["0","1", "2", "3","4", "5", "6", "7", "8", "9"]
f_num_str = ""
h_num_str = str(h_num)
for string in h_num_str:
f_num_str += F_NUM_LIST[int(string)]
@U29
U29 / search_error_grade.py
Last active October 12, 2021 08:18
Nukeでchannelsがalphaでwhite_clampが無効になっているGradeノードの名前を返すスクリプト
import nuke
def search_error_grade():
error_grade = []
for n in nuke.allNodes("Grade"):
if(n["channels"].getValue() == 4.0 and n["white_clamp"].getValue() == 0):
error_grade.append(n.name())
return error_grade
print(search_error_grade())
@U29
U29 / Dissolve_Inserter_v001.txt
Last active July 16, 2021 01:48
A tool of Foundry Nuke
set cut_paste_input [stack 0]
version 12.1 v4
push $cut_paste_input
NoOp {
name Dissolve_Inserter
tile_color 0x6bffc0ff
note_font Verdana
note_font_size 9
note_font_color 0xff
selected true
@U29
U29 / jq-for-werewolf.py
Last active September 22, 2021 23:14
おうちでワンナイト人狼集計プログラム
# coding: utf-8
import subprocess
import os
from tqdm import tqdm
path = "C:\\Users\\fukuden\\Desktop\\ワンナイト人狼集計\\作業台210923"
files = os.listdir(path)
files_dir = [f for f in files if os.path.isdir(os.path.join(path, f))]
print(files_dir) # ['dir1', 'dir2']
print("jq .[].winner " + path + files_dir[0] + "\\finished_rooms.txt")
<component name="InspectionProjectProfileManager">
<settings>
<option name="useProjectProfile" value="false" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
<component name="InspectionProjectProfileManager">
<settings>
<option name="useProjectProfile" value="false" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
<component name="InspectionProjectProfileManager">
<settings>
<option name="useProjectProfile" value="false" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>