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 hou | |
def _e(expr): return(hou.hscriptExpression(expr)) | |
nodes = hou.selectedNodes() | |
for n in nodes: | |
g = n.geometry() | |
if g is None: continue | |
pi = 0 |
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 hou | |
nodes = hou.selectedNodes() | |
for n in nodes: | |
print n | |
g = n.displayNode().geometry() | |
for f in g.prims(): | |
print "f %d:" % f.number(), | |
for v in f.vertices(): | |
print v.point().number(), | |
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
@if(0)==(0) echo off | |
cscript.exe //NoLogo //E:JScript "%~f0" %* | |
goto :eof | |
@end | |
f1: | |
// command <movie file> [<frame>] | |
var ws = WScript; | |
if(ws.Arguments.Count()<1) ws.Quit(); | |
var fn = ws.Arguments.Item(0); | |
var qt = ws.CreateObject("QuickTimePlayerLib.QuickTimePlayerApp"); |
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
(function (me) | |
{ | |
var prj=app.project; | |
function _indexOf(arr, itm){ | |
for(var i=0; i<arr.length; i++) if(arr[i]==itm) return(i); | |
return(-1); | |
} | |
function _note(arr) | |
{ |
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
proc RF_makeCopyBat() | |
{ | |
if(!`pluginInfo -q -l "realflow"`) return; | |
string $buf[]={}; | |
if(catchQuiet( $buf=`ls -type "RealflowMesh"` )) return; | |
if(catchQuiet( $buf=`ls -type "RealflowEmitter"` )) return; | |
clear $buf; | |
string $sn = `file -q -sn`; |
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
proc _sendFileToClipboard(string $filename) | |
{ | |
string $fn = $filename; | |
if($fn=="") return; | |
if(!`filetest -r $fn`) return; | |
system("shell clip < \""+$fn+"\""); | |
} | |
_sendToClipboard("C:/TEMP/test.txt"); |
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
#-------------------------------- | |
# cfField.py: curveFlow Field | |
#-------------------------------- | |
import math, sys | |
import maya.OpenMaya as om | |
import maya.OpenMayaUI as omUI | |
import maya.OpenMayaMPx as omMPx | |
import maya.OpenMayaRender as omRen |
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
function _sendToClipboardStr(str) | |
{ | |
var wsh = new ActiveXObject("WScript.Shell"); | |
var fs = new ActiveXObject("Scripting.FileSystemObject"); | |
var fn = wsh.Environment("Process")("TEMP") + "\\_sendToClipboard_.tmp"; | |
var f = fs.CreateTextFile(fn, true, false); f.WriteLine(str); f.Close(); | |
wsh.run("cmd.exe /c clip < " + fn, 0, true); | |
} | |
function _sendToClipboardFile(filename) | |
{ |
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
@if(0)==(0) echo off | |
cscript.exe //NoLogo //E:JScript "%~f0" %* | |
goto :eof | |
@end | |
f1: | |
var ws = WScript; | |
var wsh = new ActiveXObject("WScript.Shell"); | |
var wmi = GetObject("winmgmts:\\\\.\\root\\cimv2"); | |
var qtpr = wmi.ExecQuery("Select * from Win32_Process where name='QuickTimePlayer.exe'"); | |
if(qtpr.Count < 1) ws.Quit(); |
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
proc _createInstanceMesh_fromSelectedFaces(int $inv) | |
{ | |
string $sels[]=`ls -sl`; | |
if(size($sels)<1) return; | |
string $nodes[]={}; | |
for($s in $sels){ | |
$nodes[size($nodes)] = substituteAllString($s, (match("\\.[^.:]+\[[0-9:]+\]$", $s)), ""); | |
} | |
$nodes = stringArrayRemoveDuplicates($nodes); |
OlderNewer