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
oldarray=#("One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten") | |
fn RandomizeArray arr:#() = | |
( | |
local list = #() | |
while arr.count != 0 do | |
( | |
id = random 1 arr.count | |
append list arr[id] | |
deleteItem arr id |
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
fn ShuffleIndexes count = | |
( | |
list = #() | |
list.count = count | |
for k = 1 to count do | |
( | |
i = random 1 k | |
list[k] = list[i] | |
list[i] = k | |
) |
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
try(destroyDialog ::progressTest)catch() | |
rollout progressTest "Progress Test" | |
( | |
button doit "Process Scene" -- button to start processing | |
spinner spnSelectAmount fieldwidth:96 range:[0,512,0] type:#integer | |
progressbar pb color:red -- a red progress bar | |
on doit pressed do -- when the button is pressed... | |
( | |
objArray = geometry as array -- get all geometry objects into array |
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
void main() | |
{ | |
gl_FragColor = vec4(1.0,0.5,0.5,.5); | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; |
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
fn closeIcon s e = s.dispose() | |
fn balloonClicked s e = shelllaunch @"c:\windows\" "" | |
a = dotnetobject "notifyicon" | |
a.visible = true | |
a.icon = (dotnetclass "system.drawing.systemIcons").information | |
dotnet.addEventHandler a "BalloonTipClosed" closeIcon | |
dotnet.addEventHandler a "BalloonTipClicked" balloonClicked | |
a.showballoontip 1000 "test" "test2" (dotnetclass "tooltipicon").info |
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
fn GenPos posA posB offset: = (posB-(normalize (posB-posA))*offset) | |
delete objects | |
inset = 10 | |
ptStart = [100,75,0] | |
ptEnd = [250,175,10] | |
p1 = point pos:ptStart size:5 wirecolor:green cross:true box:false | |
p2 = point pos:ptEnd size:5 wirecolor:green cross:true box:false |
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 a python module so we can do the search&replace stuff | |
import re | |
import os | |
#select all nodes in the root graph | |
nuke.selectAll() | |
############# variables | |
writeNodeList = []; | |
imgType = "png" # use either 'png' / 'jpeg' |
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
fn GenRandomSumValuesArray numParts:4 minVal:0 maxVal:100 = | |
( | |
local parts = #(minVal,maxVal) | |
/* generate random numbers */ | |
while parts.count < numParts+1 do | |
( | |
appendIfUnique parts (random minVal maxVal) | |
) | |
sort parts |
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
/* Test Scene Setup */ | |
clearlistener() | |
delete objects | |
/* generate an array of random points */ | |
randomPts = for i = 1 to 3 collect (random [-30,-30,0] [30,30,0]) | |
/* Requires 3 point3 values */ | |
fn CalculateOffset offset:8 ptA:undefined ptB:undefined ptC:undefined = | |
( |
OlderNewer