Skip to content

Instantly share code, notes, and snippets.

View WesleyE's full-sized avatar

Wesley Elfring WesleyE

View GitHub Profile
@WesleyE
WesleyE / Textures 2 Rat.py
Last active August 29, 2015 14:23
Transcoding your textures to .rat files. Check http://scripts.wesleyelfring.nl/textures-to-rat/
import os
import glob
import subprocess
def we_startConversion():
#Double check overwrite
if hou.pwd().parm("cbOverwrite").eval() == 1:
if hou.ui.displayMessage("Are you sure you want to overwrite RAT files?", buttons=("Yes", "No")) == 1:
hou.pwd().parm("cbOverwrite").set(0)
@WesleyE
WesleyE / deleteMultidimensionalColumn
Last active August 29, 2015 14:11
Removes a whole column from a multidimensional resultset.
/**
* Removes a whole column from a multidimensional resultset.
* You could use the array_splice function, this is a bit slower (10.3%) but defragments the empty positions
* in the internal php array. Use this when removing a lot of columns on big (huge) resultsets.
*
* @param $aArray
* @param $sKey
* @return bool
*/
function deleteMultidimensionalColumn(&$aArray, $sKey, $bUseSplice = false) {