Difference between pages "Color to RGB" and "ConvertStrToVector MEL"
From scripting
(Difference between pages)
(Created page with " Function Color_to_RGB(Color As Long) As Variant Dim CurRGB() As Integer ReDim CurRGB(2) CurRGB(0) = Color Mod 256 CurRGB(1) = (Color \ 256) Mod 256 CurRGB(2) = (Co...") |
(Created page with " global proc vector ConvertStrToVector(string $CurStr) { //0001D LLC 2015 Nick Pisca //string $CurStr = "234.32,332.043"; string $DestUVs[]; $numTokens = `tokenize $Cu...") |
||
Line 1: | Line 1: | ||
− | + | global proc vector ConvertStrToVector(string $CurStr) { | |
− | + | //0001D LLC 2015 Nick Pisca | |
− | + | //string $CurStr = "234.32,332.043"; | |
− | + | string $DestUVs[]; | |
− | + | $numTokens = `tokenize $CurStr "," $DestUVs`; | |
− | + | vector $TempVec = <<float($DestUVs[0]),float($DestUVs[1]),0.0>>; | |
− | + | return $TempVec; | |
− | + | } | |
− | [[Category: | + | ''More information on vectors and arrays, read pages 12-16 in [http://stores.lulu.com/nickpisca YSYT]. |
+ | [[Category:MEL]] |
Latest revision as of 05:16, 22 April 2017
global proc vector ConvertStrToVector(string $CurStr) { //0001D LLC 2015 Nick Pisca //string $CurStr = "234.32,332.043"; string $DestUVs[]; $numTokens = `tokenize $CurStr "," $DestUVs`; vector $TempVec = <<float($DestUVs[0]),float($DestUVs[1]),0.0>>; return $TempVec; }
More information on vectors and arrays, read pages 12-16 in YSYT.