Skip to content

Instantly share code, notes, and snippets.

View kohyuk91's full-sized avatar

kohyuk91

View GitHub Profile
@kohyuk91
kohyuk91 / mesh_from_points.py
Created September 13, 2021 16:47
'Mesh from Points' for Maya
# -*- coding: utf-8 -*-
# original script
# https://github.com/domlysz/BlenderGIS/blob/master/operators/utils/delaunay_voronoi.py
# - 2021.09.14 modified by Hyuk Ko ([email protected])
# USAGE
@kohyuk91
kohyuk91 / userSetup.mel
Last active February 19, 2021 03:29
Dealing with Maya Malicious Script Nodes
// Sets the scriptJob ID for the exploit to an invalid value, so Maya never actually runs the malicious code.
global int $autoUpdateAttrEd_aoto_int;
$autoUpdateAttrEd_aoto_int = -1;
import unreal
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
soft_references = asset_tools.find_soft_references_to_object(unreal.SoftObjectPath(path_string='/Game/InfinityBladeGrassLands/NewLevelSequence1.NewLevelSequence1'))
# [LevelSequenceActor'"/Game/InfinityBladeGrassLands/Maps/ElvenRuins.ElvenRuins:PersistentLevel.NewLevelSequence1"']
umap = soft_references[0].get_world()
# <Object '/Game/InfinityBladeGrassLands/Maps/ElvenRuins.ElvenRuins' (0x000001BCACF82B00) Class 'World'>
ffmpeg.exe -i input.mov -filter_complex "pad=height=ih+80:y=40" output.mov
# Author : HYUK KO | [email protected] | github.com/kohyuk91
import os
import re
import maya.cmds as mc
DEFAULT_PADDING = 3
# Author : HYUK KO | [email protected] | github.com/kohyuk91
import maya.cmds as mc
def getObjectType(sel):
try:
objectType = mc.objectType(sel) # Get object type.
except:
import maya.cmds as mc
def createCone(locName,tx,ty,tz):
cone = mc.polyCone(name='cone_'+locName, r=1, h=2, sx=4, sy=1, sz=0, ax=[0,0,0], rcp=0, cuv=3, ch=True)[0]
mc.move(1, y=True)
mc.rotate(180, x=True)
mc.rotate(45, y=True)
mc.move(0, 0, 0, cone+".scalePivot", cone+".rotatePivot", absolute=True)
mc.makeIdentity(apply=True, translate=True, rotate=True)
mc.xform(cone, a=True, ws=True, translation=(tx,ty,tz))
from maya import cmds
def main():
window = "graphEditor1Window"
try:
if cmds.workspaceControl(window, q=True, floating=True):
cmds.warning("There is no docked '{0}'.".format(window))
return
except:
#
# Name:
# atomClipboard.py
#
# Author:
# Hyuk Ko | [email protected] | github.com/kohyuk91
#
"""
import atomClipboard
"""
import template
try:
t.close()
t.deleteLater()
except:
pass
t = template.Template()
t.show()
"""