gH]kDwP&trueSpaceBeta 7.61[VS_O93YJClinton Reese, Clintons 3D Creations`d8pM*#ͺOD$PNG  IHDR`ZIDATx1 0@1B>2z*Xyq]` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5kX` 5k hpIENDB`/tfѭ8Lwb"qp܂dKu=BXinstall indigo exporter April 2010 draft3-a.;]kI 忞@.;]kI 忞@"SubObject*Encapsulated objects"`OSU,4W}@O{4W}@O{$ Owner4Owner of the Encapsulator$(XFҦV(XFҦV"LE2Data$LE2 Data for node >g'JNjn*p" zFAa| zFAa|DhelpText\vRm)EC!avRm)EC!aD leftClickScript\1V {E!Y1V {E!YD name\!K0}q!K0}qD"rightClickScript\-1OSM n-1OSM n"LayoutLayout 럆L<_ї"1V {E!YsayHello!K0}q2System.Alert("goodbye");(XFҦV>g'JNjn*pFDCr@@P@B?vRm)EC!a<System.Alert("hello there!"); zFAa|say hello-1OSM n 럆L<_ї%DefaultOˁ CRih[  h }}LActivity.Run('%THIS_NAME%' + "/doIt")8install buttons and scriptsZ`Ez]UO}}AA+`._E#ބ6BCustomFrame(`.;]kI 忞@"u`4W}@O{$*O΢C}*O΢C} WinIDWindow IDa-pϗO 0)t-pϗO 0)PositionShelf Position mz!OHwcbb>-MD'zZt>-MD'zZRectangle"Screen Rectangle THj6F 2s*bRÒGbDeC tRÒGbDeC  WidthWindow widthbc[FB%n*jt[FB%n*jHeightWindow heightb [GDJM [GDJMMin Width$Min. Window width%]GJ7ψ%]GJ7ψMin Height&Min. Window height^^Dy^^DyMax Width$Max. Window widthv43N tv43N tMax Height&Max. Window height~൱D@ j#^c~൱D@ j#^cMaximized(Window Is Maximized 9@'s9@'sRootNodeRootNode{Q !aOt {Q !aOt  TitleTitle Text6*Mv46*Mv4View Index$View window indexf$I `7f$I `7Frame TypeFrame Typej^G@!,j^G@!,"ViewersViewers array 2bOdA)f "I)LL !I)LL ! Def1D Default 1D GUID8M0cry8M0cry Def2D Default 2D GUIDF L$3F L$3 Def3D Default 3D GUIDobFFJL}obFFJL}SnappedTo$Snapped To WindowBXPjKɸtEBXPjKɸtE SnappedToTarget@Snapped To Window Target CornerkJHx(V@WkJHx(V@W SnappedToSource@Snapped To Window Source CornerKTLA7~fKTLA7~f"SnappedToOffsetX6Snapped To Window Offset XK8Y8O#=gtMK8Y8O#=gtM"SnappedToOffsetY6Snapped To Window Offset Ymk~_Lb.mk~_Lb.SnappedToWidth0Snapped To Window Width|7EId |7EId  SnappedToHeight2Snapped To Window HeightKXtO LKXtO L,StartSnappedToOffsetXBStart Snapped To Window Offset XVG))jHETVG))jHET,StartSnappedToOffsetYBStart Snapped To Window Offset Y?V{N7l?V{N7lSnappedToRatio,Snapped To Ratio Mode 86*n^HD9t 86*n^HD9t OwnedByOwned By|_ D|_ DTabsAsButtons Tabs As Buttons _N>G1_N>G1HiddenHidden Flag \q^2FII3w\q^2FII3wPreference,View Preference Panel >=жaMpT>=жaMpT&HideDockedTitlebarJHide Title bar when window is docked N'D)L-N'D)L-MinimizedBHJWindow Is Minimized into Blue Handle ϕ`&FSx9wϕ`&FSx9wSizeLockPrevent horizontal and/or vertical size change. 0x01 - horizontal, 0x02 - vertical˽OS˽OSDispTitleText,Display Titlebar Text Ī8mݧC>!7Ī8mݧC>!7SmallerTabs*Display smaller Tabs (XFҦV"&BXPjKɸtEkJHx(V@W|_ D8M0cryN{485B725E-A69D-4AD5-A876-B3BBA72D2C0A}mk~_Lb.[FB%n*jRÒGbDeC 1 [GDJM6*Mv4K8Y8O#=gtM\q^2FII3w{Q !aOt f$I `7v43N t I)LL !obFFJL}Ī8mݧC>!7^^Dy(XFҦV>g'JNjn*pFBCX@1@?*O΢C}N{5FDDFE6E-518F-464A-B4B9-8D24B556E36C}9@'s_N>G1-pϗO 0)mz!OHwc ˽OSF L$3>=жaMpTϕ`&FSx9w>-MD'zZ%]GJ7ψj^G@!,2bOdA)f 6^r[HJv-, ^r[HJv-, KXtO LVG))jHET?V{N7l ~൱D@ j#^cKTLA7~f|7EId 86*n^HD9t N'D)L-^r[HJv-, ,BToolbar.;]kI 忞@"u4W}@O{$n_<&KES Qn_<&KES Q NameItem nameo(K ]p do(K ]p dHelpTextHelp text8Cechg8Cechg RowsToolbar RowsNL {NL {$Dimension$Toolbar dimension$Z_IFL!OSZ_IFL!OSHorizontal Horizontal Flag .S)A2UЍc.S)A2UЍcIsSubToolbar$IsSubToolbar Flag =JM@hM Q3=JM@hM Q3IsImportant2IsImportant Toolbar Flag .UuwO e.UuwO eIDToolbar ID'0#ԪC'X/9}'0#ԪC'X/9}$ IndexItem Index$_N>G1JdWJc~JdWJc~PrototypePrototype name<9BH@b\<9BH@b\IsMinimizedPTrue/False flag if toolbar is minimized m O1Wwm O1Ww$IsAspectT(Aspect Toolbar Flag $(XFҦV".UuwO e'0#ԪC'X/9}=JM@hM Q3 m O1Ww(XFҦV>g'JNjn*pFBCb@ f@?NL {Z_IFL!OS _N>G18CechgJdWJc~n_<&KES Q.S)A2UЍc o(K ]p d<9BH@b\ R/$ķKniaWBexportIGS'0#ԪC'X/9}]8teO?s]8teO?s"MaxItemTxtHeight.Maximal item text size% sH?DC sH?DCTagTag%IlfāA>ˁwIlfāA>ˁwTagAliasTag Alias%/ru|GF0/ru|GF0AgentIDUpdate agentID(XFҦVLE2Data, 1"-1OSM n".;]kI 忞@"4W}@O{$n_<&KES Qo(K ]p dQm6l3Ll/V^Qm6l3Ll/V^CommandAction commandN="QEj%:N="QEj%:RClickCommand,RClick Action Command$ܿORE bi$ܿORE biPreview2D8Item preview 2D resource id*S]?G[~x;*S]?G[~x;Preview3D8Item preview 3D resource idSr)B8Sr)B8Package"Package class idDNOQsP'ѭDNOQsP'ѭBitmap.Item preview 3D bitmap eSBgciDsL[wiDsL[wRadio Group(Radio buttons group4E*4E*ControlID2D&User Control ID 2Dh>ǑJ]@<h>ǑJ]@<ControlID3D&User Control ID 3D+fyOA7XC+fyOA7XC MaxItemBmpWidth2Maximal item bitmap sizeTl@fC.^&GZTl@fC.^&GZ"MaxItemBmpHeight2Maximal item bitmap sizeh0OY~ C h0OY~ C  MaxItemTxtWidth.Maximal item text size%?Aυ D)7t?Aυ D)7tGrayPercentxGray icon about specified percents if it is not highlighted][D+Iv(][D+Iv( MenuAct As Menu 8{Nm(!8{Nm(!IsMenuButtonIs Menu Button ko6ǑJ]@<N{2BBC850E-6EEF-4364-9265-A4A606AE464B}4W}@O{/ru|GF0N{00000000-0000-0000-0000-000000000000}$ܿORE bi/(XFҦV>g'JNjn*pF@Db@v@p8B?+fyOA7XCko6ˁwn_<&KES QIGSexportPanelo(K ]p d2open Indigo export panelTl@fC.^&GZ?Aυ D)7tU]8teO?s-1OSM n 럆L<_ї0Sr)B8.;]kI 忞@ sH?DCDNOQsP'ѭeSBgc" C:\Documents and Settings\Clinton\My Documents\My Pictures\indigoIcon.bmp~N ˒L6eN xeYlg$u>gیNb7RsTUDq$MCEDHR*P%)F Mo*q"P)"pϱAūF9ss]3FRZ$!Q!A6*1rllFN+@"'IFb+Χ(Mɏ$"qᘗpĭ 9!<bQn63.ۆuh|NA0AHBXQQEnBa%c==lTPceY9*h)Ή%W\*_.!`S٭*nk/2xQ~Jʏ⌕$$Iɻz*bʗd‹<&ڗ6rL0ǎOYʼn!RɴIf)D҇f0gH괝*:zrsTqIaҊ#%JHg$b;kh~rqk7'aFvayWϡ %vBs2\TsR9Q&D^wvrz4ĻyyMoq޸c54gPEN;33>=ZBA]˳5kw̿7)uaQxJE1tU)/J|]c\ə*D(e4uuZ\9! OбGi{1.Ncfi@aTfhpG'uٍe:zG1 :ANdx[8sx_q{N]BaWsf:gs>j3`XOV-1 C ?pE>%}}W_S:h׹@ħ9gj1Kwix1{w_#]WRVm3QGM?gIn;,d.e™ ]|4}毃d߭>M՟c:4>y"Ow2A*!(l8H>w4޽xdAm[?5_~ϋ 8n|feh91#C28Wg*wl3<LԳmGt; ZG?4# 5-}w?_ֳ+-O1z *bEXwOVڹSW> v ̝̈IFďsd.[:ٲ%.@ۢ_XѬs{wpRuRq*MQ]HW[u?a{3:Ӭ1QQD.};#IN0\yCqvU|rLUuwkKODfV8'onJ|dbQH5It_7%;WY\PΜs3u- XŋEΌ[sr~IJ|"OQ.YR$)YN<#WXzSNR`[Sf[/VnG{ўb>FӚS,e5kLb&7SZ5<g? m'9If6.+6G0e{ I=@MgN6!)V=O(*$}XΨ̣aG{M Yֆj]6jNR{z*'\Sɜ2,()_$Eكcq%Lcz7Ѻ}+vݐOrE}a*'Y3I3S"K1&'rvl;A23rت&ʏw=gJc-3}VJ4:zƢNy.KWqv2K&Һf]'7Ɯ|=]`B9=gC+ ëwΜ9U3\48@J g'JNjn*pceZU@䑧rceZU@䑧r$_scriptData*Internal Script data [җJs@ %4W}@O{$(XFҦVLE2Data, 1#J@#QLJ@#QLLE2Data$LE2 Data for node >g'JNjn*pLE2Data, 3MT^RwL~YYTMT^RwL~YYTޢLE2Data$LE2 Data for node >g'JNjn*pLE2Data, 22|=Bynj2|=Bynj Control OutTransitionOutz@Hoz@Ho Control InTransitionIn 2|=Bynj2AEHM'>g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ NewCommand// Execute // Called to execute the command function Execute(params) { // TODO: put your action code here owner = System.ThisOwner(); button1 = "exportIGS"; theScript = "tS2Indigo2"; //theScript2 = "tS2Indigo1"; theScript3 = "packageScene"; theScript4 = "renderRegion"; theWidget = "renderArea"; theWidgetPath = "/Widgets/Tools/View tools"; // if(Node.Exists("/Project/Windows Manager Space/CustomFrame/Toolbar/" + button1)) { replaceLeft = System.Question(button1 + " button already exists in the toolbar. Would you like to replace it?"); if(replaceLeft) Node.Delete("/Project/Windows Manager Space/CustomFrame/Toolbar/" + button1); else return; } //check for and create customframe if(!Node.Exists("/Project/Windows Manager Space/CustomFrame")) Node.Copy(owner + "/CustomFrame","/Project/Windows Manager Space"); //copy buttons to custom frame oldButt = Node.Copy(owner + "/" + button1,"/Project/Windows Manager Space/CustomFrame/Toolbar"); //copy script to custom commands //create CustomCommands if(!Node.Exists("/Scripts/CustomCommands")) { temp = Node.Create("Kernel Package/Object","/Scripts"); custcom = Node.Rename(temp,"CustomCommands"); } if(Node.Exists("/Scripts/CustomCommands/" + theScript)) { replaceLeft = System.Question(theScript + " script already exists. Would you like to replace it?"); if(replaceLeft) Node.Delete("/Scripts/CustomCommands/" + theScript); else return; } Node.Copy(owner + "/" + theScript,"/Scripts/CustomCommands"); if(Node.Exists("/Scripts/CustomCommands/" + theScript3)) { replaceLeft = System.Question(theScript3 + " script already exists. Would you like to replace it?"); if(replaceLeft) Node.Delete("/Scripts/CustomCommands/" + theScript3); else return; } Node.Copy(owner + "/" + theScript3,"/Scripts/CustomCommands"); if(Node.Exists("/Scripts/CustomCommands/" + theScript4)) { replaceLeft = System.Question(theScript4 + " script already exists. Would you like to replace it?"); if(replaceLeft) Node.Delete("/Scripts/CustomCommands/" + theScript4); else return; } Node.Copy(owner + "/" + theScript4,"/Scripts/CustomCommands"); if(Node.Exists(theWidgetPath + "/" + theWidget)) { replaceLeft = System.Question(theWidget + " widget already exists. Would you like to replace it?"); if(replaceLeft) Node.Delete(theWidgetPath + "/" + theWidget); else return; } Node.Copy(owner + "/" + theWidget, theWidgetPath); //special processing set indigo exe file path WshShell = new ActiveXObject("WScript.Shell"); try { var bKey = WshShell.RegRead ("HKCU\\Software\\Glare Technologies\\Indigo Renderer\\InstallDirectory"); bKey = bKey + "\\indigo.exe"; Node.Value("/Scripts/CustomCommands/" + theScript,'exeFile') = bKey; Node.Value("/Scripts/CustomCommands/" + theScript2,'exeFile') = bKey; } catch(err) { System.Alert("Could not find a registry key for indigo install directory. Must be set manually."); } //activate it WindowsManager.Activate(); WindowsManager.UpdateWindowsStructure(); //reset the toolbar //1D Aspect WindowsManager.SetWindowAspect('/Project/Windows Manager Space/CustomFrame', 1); //2D Aspect WindowsManager.SetWindowAspect('/Project/Windows Manager Space/CustomFrame', 2); } NScript Object Package/jScript language~൱D-#^c4W}@O{(XFҦV>g'JNjn*pn7C`b@H@2|=Bynj|?z@Hoۙ>?J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?-1OSM n 럆L<_їjControlOˁ CRih[ Ca8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0 Ca:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@Ho܂dKu=BrenderRegion O.;]kI 忞@" M”ɔ̔єٔߔO4W}@O{$(XFҦV"-1OSM n"(XFҦV>g'JNjn*pFBPC`@@@B?-1OSM n 럆L<_їˣ GFʠN=H3}}script version 1.0Z`Ez]UO}}48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ (NewCommandx// Execute // Called to execute the command function Execute(params) { var camera = params.ConValue('camera'); var fov = params.ConValue('fov'); var matrix = params.ConValue('matrix'); // TODO: put your action code here Node.Value(camera,"FOV") = fov; Node.Value(camera,"Matrix") = matrix; } NScript Object Package/jScript languageh ,?* stringcameraAICnumberfov o'Ie{>Math Package/Matrix Float Datamatrix `^02eE{|@6E z4W}@O{(XFҦV>g'JNjn*pn`DBb@@X@2|=Bynj|?z@Hoۙ>?6E zAICB/Project/textureScene, 6/Camera1J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UO o'Ie{?MT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@Ho48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ NewCommandB// Execute // Called to execute the command function Execute(params) { // TODO: put your action code here //System.Alert("selectSceneObject"); scene = Space.CurrentScene(); firstSub = Node.SubObject(scene, 1);//select random object Node.Select(scene + "/" + firstSub); } NScript Object Package/jScript language\4W}@O{(XFҦV>g'JNjn*pn_CCb@H@2|=Bynj|?z@Hoۙ>?J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@Ho48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ J NewCommand function ExploreNode(thePath) { //declare local variables for recursive calls var curIndex; var curnumObj; var childPath, MyObj; shortname = Node.ShortName(thePath); if(shortname=="RectangleZoom") { minX = Node.Value(thePath,"MinX"); minY = Node.Value(thePath,"MinY"); maxX = Node.Value(thePath,"MaxX"); maxY = Node.Value(thePath,"MaxY"); mesg = "minXY : maxXY =" + minX + ", " + minY + " : " + maxX + ", " + maxY; System.Alert(mesg); } //get first child curIndex = 0; curnumObj = Node.SubObjectCount(thePath); if(curnumObj > 0) { MyObj = Node.SubObject(thePath,0); childPath = thePath + "/" + MyObj; } //recursion runs here - get the next child while(curnumObj > 0) { ExploreNode(childPath); curIndex = curIndex + 1; if(curIndex < curnumObj) { MyObj = Node.SubObject(thePath, curIndex); childPath = thePath + "/" + MyObj; } else curnumObj = 0; } } // Execute // Called to execute the command function Execute(params) { //System.Alert("readRectValues"); //search for the RectangleZoom node and read it's values basepath = "/Widgets/Active Widgets Layer"; startpath = "/Widgets/Active Widgets Layer1"; curpathindex = 1; while(Node.Exists(startpath)) { ExploreNode(startpath); curpathindex++; startpath = basepath + curpathindex; } } NScript Object Package/jScript language~൱D@ j#^c4W}@O{(XFҦV>g'JNjn*pn!DHBb@H@2|=Bynj|?z@Hoۙ>?J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@HonwNJ!Kż7QԧBMouse Listener 1wâMa|1wâMa|Mouse X.Raw mouse X coordinate֩G% $O֩G% $OMouse Y.Raw mouse Y coordinate,y?Jgp,y?JgpMouse ButtonsFMouse buttons state (virtual keys)+.vO`);\R-+.vO`);\R-Scene XJMouse intersection with scene groundL I@ڲL I@ڲScene YJMouse intersection with scene groundȔ'+jIeV'+jIeVView WidthLWidth of the view window under cursorΔԔȔU|.(gNTsU|.(gNTsView Height^Height of the current view window under cursorΔӔɔ4W}@O{$(XFҦV" asvHhTG asvHhTG$NodeIconNodeIcon eSBgc$֩G% $Ok(XFҦV>g'JNjn*pFCHBb@ `@?1wâMa| asvHhTGeSBgch ~N ˒L6eXhx}wXW73ޓo2i3Į{J)" EH.TQAQ޻7׹\dLϳK^{}uttoffe+?k,9307x&f  ̌iqc0iI덱}aWkoe=Z_{?VĮaNȌ_f?\\0;| wBǧWFo\_ͬWُ7k_L8=4pZpmIq~[kze؋ogoΦ纎=3uw_^[k+ǟS? h{I )n=۬USг7swX O*nII1lX.l= ϥ?=FfuC~KlT|w0i0X,ۯn<ƷybhsI A{{~^3V7m/?~6.zsWLo.wuEÏW/cvnNW{6\o[дјa n[b̖^~X( VG .:̮q\-_[HDZ(XeK^w_^KMֿ;m+}:Ŗ"9}t>\z̴n`{xn_ gggO#8x%"~#lJ-[Q]m(ɕk"?+_܌dmMKGVoڌ-Ӑq36KAڍؘcm\ֈG!bE$C|W'' x1*/vY#.X:c6A]-f&\av)<\(lLހl۶E^V T*+GeI kE(V.r$yE(E^Vdd?d+ڜ m^boĒxDR? gf E-▞pZ3vk\cb%1C0$%n@ff6JRZp^UU;cNƮrǻǵ^#Cl;Wb{iʒ HPcDaN} )]c//l\ HO$$qlZ|z[z^yDk~.љ؋w'yz=`ذ~$VUaGU`]ըۍݻnw޽Z^#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, width) { //declare local variables for recursive calls var curIndex; var curnumObj; var childPath, MyObj; shortname = Node.ShortName(thePath); if(shortname=="RectangleZoom") { minX = Node.Value(thePath,"MinX"); minY = Node.Value(thePath,"MinY"); maxX = Node.Value(thePath,"MaxX"); maxY = Node.Value(thePath,"MaxY"); halfheight = height/2; halfwidth = width/2; mesg = "minXY : maxXY =" + minX + ", " + minY + " : " + maxX + ", " + maxY; System.Alert(mesg); minX = minX * halfwidth + halfwidth; minY = minY * halfheight + halfheight; maxX = maxX * halfwidth + halfwidth; maxY = maxY * halfheight + halfheight; mesg = "minXY : maxXY =" + minX + ", " + minY + " : " + maxX + ", " + maxY; System.Alert(mesg); } //get first child curIndex = 0; curnumObj = Node.SubObjectCount(thePath); if(curnumObj > 0) { MyObj = Node.SubObject(thePath,0); childPath = thePath + "/" + MyObj; } //recursion runs here - get the next child while(curnumObj > 0) { ExploreNode(childPath, height, width); curIndex = curIndex + 1; if(curIndex < curnumObj) { MyObj = Node.SubObject(thePath, curIndex); childPath = thePath + "/" + MyObj; } else curnumObj = 0; } } // Execute // Called to execute the command function Execute(params) { var height = params.ConValue('height'); var width = params.ConValue('width'); // TODO: put your action code here //search for the RectangleZoom node and read it's values basepath = "/Widgets/Active Widgets Layer"; startpath = "/Widgets/Active Widgets Layer1"; curpathindex = 1; while(Node.Exists(startpath)) { ExploreNode(startpath, height, width); curpathindex++; startpath = basepath + curpathindex; } } NScript Object Package/jScript languageintheight„"\ES+int width7H>F"_X4W}@O{(XFҦV>g'JNjn*pn.DBb@@T@2|=Bynj|?z@Hoۙ>?J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?„"\ES+7H>F"_X-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@Ho48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ nNewCommand.var minX, minY, maxX, maxY;//globals function ExploreNode(thePath, height, width) { //declare local variables for recursive calls var curIndex; var curnumObj; var childPath, MyObj; shortname = Node.ShortName(thePath); if(shortname=="RectangleZoom") { minX = Node.Value(thePath,"MinX"); minY = Node.Value(thePath,"MinY"); maxX = Node.Value(thePath,"MaxX"); maxY = Node.Value(thePath,"MaxY"); halfheight = height/2; halfwidth = width/2; //mesg = "minXY : maxXY =" + minX + ", " + minY + " : " + maxX + ", " + maxY; //System.Alert(mesg); minX = minX * halfwidth + halfwidth; minY = minY * halfheight + halfheight; maxX = maxX * halfwidth + halfwidth; maxY = maxY * halfheight + halfheight; //mesg = "minXY : maxXY =" + minX + ", " + minY + " : " + maxX + ", " + maxY; //System.Alert(mesg); } //get first child curIndex = 0; curnumObj = Node.SubObjectCount(thePath); if(curnumObj > 0) { MyObj = Node.SubObject(thePath,0); childPath = thePath + "/" + MyObj; } //recursion runs here - get the next child while(curnumObj > 0) { ExploreNode(childPath, height, width); curIndex = curIndex + 1; if(curIndex < curnumObj) { MyObj = Node.SubObject(thePath, curIndex); childPath = thePath + "/" + MyObj; } else curnumObj = 0; } } // Execute // Called to execute the command function Execute(params) { var height = params.ConValue('height'); var width = params.ConValue('width'); // TODO: put your action code here basepath = "/Widgets/Active Widgets Layer"; startpath = "/Widgets/Active Widgets Layer1"; curpathindex = 1; while(Node.Exists(startpath)) { ExploreNode(startpath, height, width); curpathindex++; startpath = basepath + curpathindex; } params.ConValue("minx") = minX; params.ConValue("miny") = minY; params.ConValue("maxx") = maxX; params.ConValue("maxy") = maxY; } NScript Object Package/jScript languageintheight?9CmFint width]+ƊJPȋ6int minxC}OtN_int minyۚǮHְint maxx#gCsQIYint maxyъDOX4W}@O{(XFҦV>g'JNjn*pn.DtCb@ b@2|=Bynj|?z@Hoۙ>?#gCsQIY!J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>??9CmFъDOX@y@-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?C}OtN_ o@ۚǮHְ_`@z@Ho48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ NewCommand// script part of render region get rectangle - goes in /Scripts/CustomCommands // widget part - goes in /Widgets/Tools/View tools // // Execute // Called to execute the command function Execute(params) { var scenecamera = params.ConValue('scenecamera'); // TODO: put your action code here if(!Node.Exists(scenecamera)) { //for testing have camera selected firstSel = Node.FirstSelected(); if(!Node.IsCamera(firstSel)) return; savefov = Node.Value(firstSel,"FOV"); savematrix = Node.Value(firstSel,"Matrix"); thesel = firstSel; } else { if(Node.IsCamera(scenecamera)) { //System.Alert(firstSel); //save camera attributes savefov = Node.Value(scenecamera,"FOV"); savematrix = Node.Value(scenecamera,"Matrix"); thesel = scenecamera; } else return; } params.ConValue('fov') = savefov; params.ConValue('matrix') = savematrix; params.ConValue('camera') = thesel; if(Node.Exists('/Widgets/Tools/View tools/renderArea')) Widgets.ActivateViewToolWidget('/Widgets/Tools/View tools/renderArea','Default'); } NScript Object Package/jScript language8lnumberfov穝 OdK̃>Math Package/Matrix Float Datamatrix `^02eE{|@bJ?0stringcamera 6IC==stringscenecamera=$`_DZO K 6IC==B/Project/textureScene, 6/Camera14W}@O{(XFҦV>g'JNjn*pn@^Db@ `@2|=Bynj|?z@Hoۙ>?穝 OdK̃?=$`_DZO KB/Project/textureScene, 6/Camera1J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?bJ?0`^02eE{|@Bټk? M}>sr<x?Cw?z<ߛ}⩿Z갿?3?z@Ho48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ NewCommand// Execute // Called to execute the command function Execute(params) { var rrx1 = params.ConValue('rrx1'); var rry1 = params.ConValue('rry1'); var rrx2 = params.ConValue('rrx2'); var rry2 = params.ConValue('rry2'); // TODO: put your action code here if(Node.Exists("/Scripts/CustomCommands/tS2Indigo2")) { Node.Value("/Scripts/CustomCommands/tS2Indigo2","rrx1") = rrx1; Node.Value("/Scripts/CustomCommands/tS2Indigo2","rry1") = rry1; Node.Value("/Scripts/CustomCommands/tS2Indigo2","rrx2") = rrx2; Node.Value("/Scripts/CustomCommands/tS2Indigo2","rry2") = rry2; } } NScript Object Package/jScript language~൱DtZ#^cnumber rrx11`MyWa/number rry1VޕRH+%ZxJ#number rrx2+ a.@(ڸnumber rry2( 7GNJH1`MyWa/ o@4W}@O{( 7GNJH@y@(XFҦV>g'JNjn*pn DCb@@\@2|=Bynj|?z@Hoۙ>?+ a.@(ڸ!J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?VޕRH+%ZxJ#_`@-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@Hok 3V I"BCrenderArea.;]kI 忞@";>@4W}@O{$8ܖE){h8ܖE){hHelp stringHelp stringqMN,,qMN,, Icon Icon eSBgc՞'fA5-_՞'fA5-_D3DEYED3DEYE =xNT{-1OSM n"qjigzAZ{\qjigzAZ{\LE2Data, 2$LE2 Data for node >g'JNjn*p(XFҦVLE2Data, 1"qMN,,qjigzAZ{\>g'JNjn*pFBDC`@0@?4W}@O{(XFҦV>g'JNjn*pFBC`@@@ C??՞'fA5-_-1OSM n 럆L<_їˣ GFʠN=p3}}widget version 1.0Z`Ez]UO}}.;]kI 忞@8ܖE){hRectangle zoomBCCnf!E2)O=.ADefault ()K{()K{Help stringHelp string^H@$E)}Ϟ^H@$E)}Ϟ Icon Icon eSBgcAd3@>'zCGAtAd3@>'zCGAAspect name4Name of the widget aspect6Sm6FCbE^mt6Sm6FCbE^mAspect&Aspect name output9C]O<%`9C]O<%`All contextsCheck to make widget visible in all contexts. Uncheck to use context rules to evaluate widget visibility WW} @?lWW} @?l$Coordinate systemJDefault coordinate system for widget 0d'O5S.JNCp;?NCp;?Cachable:Check to cache widget aspect EP/Mv0d `EP/Mv0d `$Widget components^Widget components to activate with this aspect p\_Fœŗ!O[Lޜ~6pŗ!O[Lޜ~6pIn front8Render in front of geometry 4W}@O{$(XFҦVLE2Data, 1"-1OSM n" Ad3@>'zCGADefault4W}@O{ŗ!O[Lޜ~6p (XFҦV>g'JNjn*pFCAb@ h@?9C]O<%` -1OSM n 럆L<_ї0()K{^H@$E)}Ϟ6Sm6FCbE^mDefaultNCp;?WW} @?lEP/Mv0d `܂dKu=BRect select .;]kI 忞@#,/364W}@O{%啯]`O둒B啯]`O둒BLE2Data, 5$LE2 Data for node >g'JNjn*p-1OSM n"nptDwJ@RvnptDwJ@RvLE2Data, 3$LE2 Data for node >g'JNjn*p՞'fA5-_lK E/&R6lK E/&R6LE2Data, 6$LE2 Data for node >g'JNjn*p9F*DI}58P9F*DI}58PLE2Data, 4$LE2 Data for node >g'JNjn*p(XFҦVLE2Data, 1"OCh}?d=OCh}?d=LE2Data, 2$LE2 Data for node >g'JNjn*p`|oC3`|oC3 DockingPosition"Docking position \J C[>azM@aazM@aLE2Data, 5$LE2 Data for node >g'JNjn*p lK E/&R6>g'JNjn*pFDC`@0@C,B)\?4W}@O{nptDwJ@Rv>g'JNjn*pFC@C`@0@?(XFҦV>g'JNjn*pFCCb@@@NC?azM@a>g'JNjn*pFC@C`@0@$B?啯]`O둒B>g'JNjn*pFC@C`@0@BB?՞'fA5-_9F*DI}58P>g'JNjn*pFC@C`@0@!?OCh}?d=>g'JNjn*pFC@C`@0@?`|oC3-1OSM n 럆L<_ї8.;]kI 忞@wI}g$BGestureWGA^ֵ WGA^ֵ InputFilterInput filters C`N,n<%C`N,n<%ControlOut&Control activation3⸄BxɜJK@B>y⸄BxɜJK@B>yGestureGesture output Է`HgC:MUk1<:KU~k1<:KU~ActiveGesture active 4W}@O{$lK E/&R6LE2Data(XFҦVLE2Data, 1"-1OSM n"lK E/&R6>g'JNjn*pFCC`@T@?⸄BxɜJK@B>y4W}@O{(XFҦV>g'JNjn*pFBCb@@T@?C`N,n<%k1<:KU~ WGA^ֵ -1OSM n 럆L<_ї0sN!{8EB:Background widget controller !N޷IZ}յQ!N޷IZ}յQ DockingPosition"Docking position \J C[>k+D"J>Pk+D"J>PActive>True, it base widget is active S:iD p\ohe}S:iD p\ohe}GesturesJGestures assigned to control surface Է`HgC:MUhd~F Hwhd~F HwOrientation6Coordinate system modifier `^02eE{|@cLo@d:cLo@d:$Coordinate system$Coordinate system 0d'O5S.J-1OSM n#4W}@O{%(XFҦVLE2Data, 1#dCu繹NdCu繹NPriorityTool priority dCu繹NS:iD p\ohe}4W}@O{!N޷IZ}յQhd~F Hw(XFҦV>g'JNjn*pFC8Bb@_@?cLo@d:k+D"J>P -1OSM n 럆L<_ї0DOEBMouse LDragbŽiI[_"tbŽiI[_"$Input stateInput state NO7*-%7z^drAE7z^drAEKeyfilterIn(Key control flow in mIo`'ǾpTmIo`'ǾpKeyfilterOut*Key control flow out 4W}@O{%(XFҦVLE2Data, 1#-1OSM n#4W}@O{(XFҦV>g'JNjn*pFCb@H@?mIo`'ǾpbŽiI[_"7z^drAE -1OSM n 럆L<_ї0܂dKu=4BCRender rect .;]kI 忞@" !&4W}@O{$-1OSM n#G,FOeG1 G,FOeG1  Min XfxOWfxOW Min Yo2|IDmyno2|IDmyn Max X Y[aeDnQCY[aeDnQC Max Y ^ !&UMJHo^ !&UMJHo DockingPosition"Docking position \J C[>"OC^KE]ٌOC^KE]ٌVisibleNSet to make static base widget visible $cLo@d:$(XFҦV"{-OTІX{-OTІXBase widget$Basewidget output pMY@KNܹK Y[aeDnQC^ !&UMJHo{-OTІXfxOWOC^KE]ٌ 4W}@O{o2|IDmyn(XFҦV>g'JNjn*pFfDBb@ b@g@?cLo@d:G,FOeG1 -1OSM n 럆L<_ї0.;]kI 忞@wCqU F3f\B2Object Render AttributesS $hKnPSVmTS $hKnPSVm"RenderAttributes"RenderAttributes HEoq5v8Ns2]t8Ns2] Surface Opacity Surface Opacity^mګA~Ksi[t^mګA~Ksi[Points opacityPoints opacity(lrsGrt(lrsGrPoints Size>Point Size in Point rendering.\Eh{5t\Eh{5Points ColorLColor of points during the rendering. -n,Njlpg"PbEGDߗrt"PbEGDߗr0Ignore mesh point color0Ignore mesh point color  F?N dtF?N d.Ignore mesh point size.Ignore mesh point size  ]*qBCxt]*qBCxEdges opacityEdges opacity \J:I%7ut\J:I%7uEdges ColorEdges Color -n,Njlpg iA޲1rIK>XtiA޲1rIK>X0Ignore mesh edges color0Ignore mesh edges color  ,ot"AaYt,ot"AaY$Show hidden lines`Do not use ZBuffer in point and wireframe modes  ^RI8ÿRt^RI8ÿRShow backfaceslEnable two-sided rendering when Color mode is enabled  çwH5#VtçwH5#V0Ignore layer attributesvDo not combine render attributes with layer defined values W0@zdW0@zd%VersionVersion% 4W}@O{%(XFҦV"-1OSM n"ȅ8vDCxZtȅ8vDCxZInvisibleInvisible flag F+2MGtF+2MGCast shadows$Cast shadows flag I2GWM:).$tI2GWM:).$ Receive shadows Receive shadows mBޖw ptmBޖw pLayer index(Modeler layer indexo[nfFto[nfF Overlay opacity Overlay opacityzgGFohN)tzgGFohN)Overlay ColorOverlay Color. -n,NjlpgvhD zʔtvhD zʔ4Ignore mesh overlay color6Ignore mesh overlay color. fB #^tfB #^$Transparency Mode@Quality of transparency solving :KrbSx|$}mK;)t|$}mK;) OverlayEnable*Enable color overlay  rg@*oHtrg@*oH O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Z`Ez]UOY@ GFʠN=( < }} Opacity8Ns2]Z`Ez]UON\q+nN-K^(h A?8Ns2]Z`Ez]UOY@ GFʠN=h,}} SurfaceZ`Ez]UO GFʠN= h0*}} EdgesZ`Ez]UO GFʠN=h+}} PointsZ`Ez]UO GFʠN=Ph`5 }} fB #^Z`Ez]UOnevG4'hP`̎ fB #^VNo hidden faces No solving Triangle sortZ`Ez]UO^RI8ÿR |$}mK;)!eLZE^NiA޲1rIK>X "AtA$D3DMaterialSimpleJurGNCltJurGNClDiffuseColorDiffuse color -n,Njlpg.F_P#T.F_P#D3DMaterial Output material D瞲tEY&ak4W}@O{%(XFҦV"-1OSM n"JurGNCl-n,Njlpg????4W}@O{(XFҦV>g'JNjn*pF@DCb@H@?.F_P#-1OSM n 럆L<_ї047m2O dATransform<ĠF姁J]t<ĠF姁J]DMatrix,Object's input matrix `^02eE{|@EWAGtWAGOwnerMatrixOwner's matrix `^02eE{|@偢jD%~`8t偢jD%~`8BObjMatrix Object's matrix `^02eE{|@C׊;Jf|ڢT׊;Jf|ڢBWldMatrixWorld matrix `^02eE{|@C4W}@O{%(XFҦV"-1OSM n"偢jD%~`84W}@O{(XFҦV>g'JNjn*pFDCX@1@?׊;Jf|ڢWAG`^02eE{|@B????<ĠF姁J]`^02eE{|@B????-1OSM n 럆L<_ї0_%fKl;A@Simple visualization controller s܁C:oTts܁C:oT MeshShape input >W5f@(䐈˛HpDIGt˛HpDIGMatrix,Euler transform input `^02eE{|@ČmꁗBMi,YrtČmꁗBMi,YrMaterialMaterialO9N3tO9N3Attributes$Render attributes HEoq5v]vJru|]vJru| Cursor distance~Estimated on-screen distance from active shape to mouse cursorWڠJ_B~TWڠJ_B~*Widget visualization*Widget visualization pLJg'JNjn*pF:DCb@_@?ČmꁗBMi,Yrs܁C:oTWڠJ_B~-1OSM n 럆L<_ї0]vJru|PG]sAsW5f@(䐈CG,FOeG1 pfxOWp o2|IDmynp Y[aeDnQCp!4W}@O{%(XFҦV"-1OSM n"Y[aeDnQCfxOW4W}@O{o2|IDmyn(XFҦV>g'JNjn*pFDCb@@X@?G,FOeG1 tveDCE`"IWJ-1OSM n 럆L<_ї0.cJ<&oA2Static widget controller "^ !&UMJHop%#86F+3$:Pt86F+3$:P(WidgetVisualization*Widget visualization pLJg'JNjn*pFrDvCb@@\@?86F+3$:PcLo@d:1z)HED,b@-1OSM n 럆L<_ї0ܳӚ@;JD~BRectangleZoom 'Sm$@B0 Sm$@B0 ControlInControl in(3xFtFs3xFtFs MinXRect min x(ED޻CzigED޻Czig MinYRect min y)t_[J~  t_[J~   MaxXRect max x):YnfLUYj3EJ:YnfLUYj3EJ MaxYRect max y*KFg$KFg$ActiveActive *Ca;HCa;HUndoable>Enable undo/redo for this tool i:4Ox1i:4Ox1$ Active viewport6Active viewport parameters 3obݠOG`ѷ$JAQH\ 8JAQH\ 8$$Widget parameters2Hidden widget parameters WAMydY_$,4W}@O{$(XFҦV"-1OSM n" 3xFtFsCa;H (XFҦV>g'JNjn*pF@D"Cb@ `@?JAQH\ 8i:4Ox1:YnfLUYj3EJKFg$ -1OSM n 럆L<_ї0t_[J~  Sm$@B0 ED޻CzigƳ1'E嶋dB0Desktop preferences con-!,Lp)t!,Lp) NameFDesktop preferences connector name..:MMu>T:MMu> Value\Specified desktop preferences connector value*.YʑDy zmtYʑDy zm$ValueIn$./4W}@O{$(XFҦV"-1OSM n"!,Lp)Camera undo(XFҦV>g'JNjn*pFCb@H@?:MMu> -1OSM n 럆L<_ї0YʑDy zm A^[Lۇ~8\C,Simple Script Command0ոV*!JLոV*!JLConntrolInControl inucT @daucT @daCommand&Command to execute9Lg x\9Lg x\Undo commandUndo commandJAQH\ 8$(XFҦV"34W}@O{$9Lg x\(XFҦV>g'JNjn*pFWDCb@@P@?JAQH\ 8ucT @daActivity.Run('/Scripts/CustomCommands/renderRegion/selectSceneObject')ոV*!JLHZ>YTMH{~C(Continuous Sequence3ˆ%#@~ˆ%#@~ControlInControl in4B~OuqhcB~Ouqhc First8First action, button style.'4ZqNBaZqNBaSecondBSecond action, continuous style.0JAQH\ 8$(XFҦV"64W}@O{$ˆ%#@~(XFҦV>g'JNjn*pFCCb@@P@?JAQH\ 8ZqNBaB~Ouqhc6G0E1ZKm<,~CScreen docking 6[fN>CT[fN>C"Docking position"Docking position \J C[>D7j[ؤKfGPtj[ؤKfGPX positionLRelative screen position; X direction67t=N) tt=N) Y positionLRelative screen position; Y direction68)lHIM4GNt)lHIM4GNZ distance.Z distance from screen68[OO^ZWݭ"t[OO^ZWݭ"Offset X,Offset in X direction691/BOt1/BOOffset Y,Offset in Y direction69 wG]Ót wG]ÓAlways visible@Show widget with default values6:eK^LVWϛeK^LVWϛ"Widget component"Widget component p\_Fœ:cLo@d:p6;JAQH\ 8p%6;4W}@O{%(XFҦV"-1OSM n# t=N) eK^LVWϛ[fN>C)lHIM4GN.@4W}@O{(XFҦV>g'JNjn*pF?&Cb@ d@?1/BOcLo@d:JAQH\ 8[OO^ZWݭ" wG]Ó1-1OSM n 럆L<_ї0j[ؤKfGP-Jcy}C$Coordinate system=JAQH\ 8p%==0G_RE}T0G_RE}$Coordinate system$coordinate system 0d'O5S.J>4W}@O{%(XFҦV#-1OSM n#0G_RE}4W}@O{(XFҦV>g'JNjn*pF@xBb@@@?JAQH\ 8-1OSM n 럆L<_ї0܂dKu=|CCancel ?.;]kI 忞@#GLOR@4W}@O{%啯]`O둒B-1OSM n"nptDwJ@Rv՞'fA5-_lK E/&R69F*DI}58P(XFҦVLE2Data, 1"OCh}?d=D`|oC3IazM@a lK E/&R6>g'JNjn*pFDC`@0@C,B)\?4W}@O{nptDwJ@Rv>g'JNjn*pFC@C`@0@?(XFҦV>g'JNjn*pF{CCb@@@C?azM@a>g'JNjn*pFC@C`@0@$B?啯]`O둒B>g'JNjn*pFC@C`@0@BB?՞'fA5-_9F*DI}58P>g'JNjn*pFC@C`@0@!?OCh}?d=>g'JNjn*pFC@C`@0@?`|oC3-1OSM n 럆L<_ї0.;]kI 忞@wI}gTCGestureEWGA^ֵ FC`N,n<%QF⸄BxɜJK@B>yJk1<:KU~G4W}@O{$lK E/&R6LE2Data(XFҦVLE2Data, 1"-1OSM n"lK E/&R6>g'JNjn*pFCC`@T@?⸄BxɜJK@B>y4W}@O{(XFҦV>g'JNjn*pFOCCb@@T@?C`N,n<%k1<:KU~ WGA^ֵ -1OSM n 럆L<_ї0sN!{8Ed|C:Background widget controller I!N޷IZ}յQk+D"J>PJS:iD p\ohe}hd~F HwcLo@d:-1OSM n#L4W}@O{%(XFҦVLE2Data, 1#dCu繹N dCu繹NS:iD p\ohe}4W}@O{!N޷IZ}յQhd~F Hw`^02eE{|@B????(XFҦV>g'JNjn*pFCCb@_@?cLo@d:k+D"J>P -1OSM n 럆L<_ї02Owj%{g{CMouse RClickNbŽiI[_"p%O7z^drAEOmIo`'ǾpPEO4W}@O{%(XFҦVLE2Data, 1#-1OSM n#4W}@O{(XFҦV>g'JNjn*pFP Cb@H@?mIo`'ǾpbŽiI[_"7z^drAE -1OSM n 럆L<_ї0aI]6Ez354{C*Close Widget CommandQaIvhc(aIvhc(ConntrolInControl in(XFҦV"R4W}@O{$(XFҦV>g'JNjn*pFCCb@O@?aIvhc(܂dKu=zCpackageSceneR.;]kI 忞@"VZ_cS4W}@O{$(XFҦV"-1OSM n"(XFҦV>g'JNjn*pF`Dk@u@AB?-1OSM n 럆L<_їDefault Notes Oˁ CRih[(<}}lActivity.Run('%THIS_NAME%' + "/package indigo scene")$package the sceneZ`Ez]UOOˁ CRih[(P<}}pActivity.Run('%THIS_NAME%' + "/unpackage indigo scene")(unpackage the sceneZ`Ez]UOOˁ CRih[(J}}lActivity.Run('%THIS_NAME%' + "/package indigo scene")$package the sceneZ`Ez]UOOˁ CRih[(PJ}}pActivity.Run('%THIS_NAME%' + "/unpackage indigo scene")(unpackage the sceneZ`Ez]UO GFʠN=PpJcWYjBSteps for packaging a scene file for transfer to another computer.ƄvR^I҂{iks GFʠN=pJK}}*1. Save the scene file to an empty folder.Z`Ez]UO GFʠN=JC}}"2. Click the package scene button.Z`Ez]UO GFʠN=J_}}>3. Save the scene file again to include the packaging changes.Z`Ez]UO GFʠN=JCYYj"Steps to unpackage the scene file.ƄvR^I҂{iks GFʠN=(J8}}1. Load the scene file.Z`Ez]UO GFʠN=(@JE}}$2. Click the unpackage scene button.Z`Ez]UO GFʠN=J\}};4. Transfer the entire folder to the new computer/location.Z`Ez]UO}}}}48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ +NewCommandN+function ExploreNode(thePath,scenePath,fso) { //declare local variables for recursive calls var curIndex; var curnumObj; var childPath, MyObj; //System.Trace(thePath); //if texture file copy if(Node.ConExists(thePath,"FileName")) { textureFile = Node.Value(thePath,"FileName"); //System.Trace(textureFile); //f = fso.GetFile(textureFile); //f.Copy(scenePath); //now copy packagePath node if nothing connected to FileName connector inputcount = Node.LinkedInputNodeCount(thePath,"FileName"); //System.Trace(inputcount); if(inputcount == 0) { f = fso.GetFile(textureFile); f.Copy(scenePath); //parent = Node.LookupParentValue(thePath); parent = Node.Owner(thePath); //System.Trace(parent); fpp = Node.Copy(owner + "/filepackagepath", parent); Node.Value(fpp,"sceneFile") = scenePath; filetext = f.Name; Node.Value(fpp,"filename") = filetext; //Node.ConnectTo(Space.CurrentScene() + "/Materials/Material/D3D material/filepackagepath, 1", "absFileName", Space.CurrentScene() + "/Materials/Material/D3D material/ImportColorBitmap", "FileName") Node.ConnectTo(fpp, "absFileName", thePath, "FileName"); } } //if indigo material script copy the folder if(Node.ConExists(thePath,"igmFilename")) { igmFile = Node.Value(thePath,"igmFilename"); //System.Trace(igmFile); //f = fso.GetFile(igmFile); //igmFolder = f.ParentFolder; //System.Trace(igmFolder); //System.Trace(scenePath); //fso.CopyFolder(igmFolder, scenePath); inputcount = Node.LinkedInputNodeCount(thePath,"igmFilename"); if(inputcount == 0) { f = fso.GetFile(igmFile); igmFolder = f.ParentFolder; fso.CopyFolder(igmFolder, scenePath); parent = Node.Owner(thePath); fpp = Node.Copy(owner + "/filepackagepath", parent); Node.Value(fpp,"sceneFile") = scenePath; //System.Alert(scenePath); //System.Alert(igmFolder); foldname = igmFolder.Name; //Node.Value(fpp,"sceneFile") = scenePath + foldname + "\\"; filetext = f.Name; //Node.Value(fpp,"filename") = filetext; Node.Value(fpp,"filename") = foldname + "\\" + filetext; Node.ConnectTo(fpp, "absFileName", thePath, "igmFilename"); } } //get first child curIndex = 0; curnumObj = Node.SubObjectCount(thePath); if(curnumObj > 0) { MyObj = Node.SubObject(thePath,0); childPath = thePath + "/" + MyObj; } //recursion runs here - get the next child while(curnumObj > 0) { ExploreNode(childPath, scenePath,fso); curIndex = curIndex + 1; if(curIndex < curnumObj) { MyObj = Node.SubObject(thePath, curIndex); childPath = thePath + "/" + MyObj; } else curnumObj = 0; } } function ExploreIESNode(thePath,scenePath,fso) { //declare local variables for recursive calls var curIndex; var curnumObj; var childPath, MyObj; //if ies file node if(Node.ConExists(thePath,"iesFilename")) { iesFile = Node.Value(thePath,"iesFilename"); //f = fso.GetFile(iesFile); //iesFolder = f.ParentFolder; //fso.CopyFolder(iesFolder, scenePath); inputcount = Node.LinkedInputNodeCount(thePath,"iesFilename"); if(inputcount == 0) { f = fso.GetFile(iesFile); iesFolder = f.ParentFolder; //fso.CopyFolder(iesFolder, scenePath); f.Copy(scenePath); parent = Node.Owner(thePath); fpp = Node.Copy(owner + "/filepackagepath", parent); Node.Value(fpp,"sceneFile") = scenePath; filetext = f.Name; Node.Value(fpp,"filename") = filetext; Node.ConnectTo(fpp, "absFileName", thePath, "iesFilename"); } } //get first child curIndex = 0; curnumObj = Node.SubObjectCount(thePath); if(curnumObj > 0) { MyObj = Node.SubObject(thePath,0); childPath = thePath + "/" + MyObj; } //recursion runs here - get the next child while(curnumObj > 0) { ExploreIESNode(childPath, scenePath,fso); curIndex = curIndex + 1; if(curIndex < curnumObj) { MyObj = Node.SubObject(thePath, curIndex); childPath = thePath + "/" + MyObj; } else curnumObj = 0; } } // Execute // Called to execute the command function Execute(params) { // TODO: put your action code here if(Node.Exists("Status Line")) if(Node.ConExists("Status Line","Model")) Node.Value("Status Line","Model") = "indigo scene packaging..."; // Project/Windows Manager Space/Frame Window/ToolbarFrame/Toolbar/File/Mn Recent Files/Toolbar Button Item/Command recentSave = Node.Value("Project/Windows Manager Space/Frame Window/ToolbarFrame/Toolbar/File/Mn Recent Files/Toolbar Button Item","Command"); //System.Alert(recentSave); //split by sngle quote get second item tag = recentSave.split("'"); packageSceneFile = tag[1]; //System.Alert(packageScenePath); //go through each material and copy texture files scene = Space.CurrentScene(); owner = System.ThisOwner(); if(!Node.Exists(scene + "/Materials")) return;//no d3d materials to search fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.Getfile(packageSceneFile); packageScenePath = f.ParentFolder + "\\"; //System.Alert(packageScenePath); ExploreNode(scene + "/Materials", packageScenePath, fso); ExploreIESNode(scene, packageScenePath, fso);//add ies lights to package process if(Node.Exists("Status Line")) if(Node.ConExists("Status Line","Model")) Node.Value("Status Line","Model") = " "; System.Alert("package complete. save the scene again to include the packager changes"); } NScript Object Package/jScript language~൱DT#^c4W}@O{(XFҦV>g'JNjn*pndCA`@S@2|=Bynj|?z@Hoۙ>?J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@Hoͤ*EgbĬlyC filepackagepath 2AEHM'ceZU@䑧r%Z4W}@O{$(XFҦV#.;]kI 忞@"-1OSM n#\xC|'BY6utxC|'BY6uDsceneFileD]\+4 @Y8U9t+4 @Y8U9DfilenameD]]p_HjѪtp_HjѪBabsFileNameB 2AEHM'>g'JNjn*pFBC`@0@?ceZU@䑧r[җJs@ NewObjectl// OnComputeOutputs // Called to compute values of all output connectors function OnComputeOutputs(params) { var sceneFile = params.ConValue('sceneFile'); var filename = params.ConValue('filename'); // TODO: put your computation here params.ConValue('absFileName') = sceneFile + filename; } NScript Object Package/jScript languagep=stringsceneFilexC|'BY6ustringfilename+4 @Y8U9stringabsFileNamep_HjѪp_HjѪ4W}@O{xC|'BY6u+4 @Y8U9(XFҦV>g'JNjn*pFBCw@@P@?-1OSM n 럆L<_ї˓Default GFʠN=F1 }}+4 @Y8U9Z`Ez]UO1釥GP>aFp0 }}+4 @Y8U9Z`Ez]UO GFʠN=F 1 }}xC|'BY6uZ`Ez]UO1釥GP>aFp 0 }}xC|'BY6uZ`Ez]UO GFʠN= F01 }}p_HjѪZ`Ez]UO1釥GP>aF p00 }}p_HjѪZ`Ez]UO}}.;]kI 忞@48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ 6NewCommandfunction ExploreNode(thePath,scenePath,fso) { //declare local variables for recursive calls var curIndex; var curnumObj; var childPath, MyObj; //System.Trace(thePath); //if texture file copy //if(Node.ConExists(thePath,"FileName")) if(Node.ConExists(thePath,"absFileName")) if(Node.ConExists(thePath,"filename")) if(Node.ConExists(thePath,"sceneFile")) { Node.Value(thePath,"sceneFile") = scenePath; } //get first child curIndex = 0; curnumObj = Node.SubObjectCount(thePath); if(curnumObj > 0) { MyObj = Node.SubObject(thePath,0); childPath = thePath + "/" + MyObj; } //recursion runs here - get the next child while(curnumObj > 0) { ExploreNode(childPath, scenePath,fso); curIndex = curIndex + 1; if(curIndex < curnumObj) { MyObj = Node.SubObject(thePath, curIndex); childPath = thePath + "/" + MyObj; } else curnumObj = 0; } } // Execute // Called to execute the command function Execute(params) { // TODO: put your action code here if(Node.Exists("Status Line")) if(Node.ConExists("Status Line","Model")) Node.Value("Status Line","Model") = "indigo scene unpackaging..."; // Project/Windows Manager Space/Frame Window/ToolbarFrame/Toolbar/File/Mn Recent Files/Toolbar Button Item/Command recentSave = Node.Value("Project/Windows Manager Space/Frame Window/ToolbarFrame/Toolbar/File/Mn Recent Files/Toolbar Button Item","Command"); //System.Alert(recentSave); //split by sngle quote get second item tag = recentSave.split("'"); packageSceneFile = tag[1]; //System.Alert(packageScenePath); //go through each material and copy texture files scene = Space.CurrentScene(); owner = System.ThisOwner(); if(!Node.Exists(scene + "/Materials")) return;//no d3d materials to search fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.Getfile(packageSceneFile); packageScenePath = f.ParentFolder + "\\"; //System.Alert(packageScenePath); //ExploreNode(scene + "/Materials", packageScenePath, fso); ExploreNode(scene, packageScenePath, fso);//get ies files too if(Node.Exists("Status Line")) if(Node.ConExists("Status Line","Model")) Node.Value("Status Line","Model") = " "; } NScript Object Package/jScript languageF p04W}@O{(XFҦV>g'JNjn*pn:CCb@H@2|=Bynj|?z@Hoۙ>?J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@Ho48@J g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ NewCommand4numMatList = 0; pathList = System.CreateDO('Common Data Package/String Array Data'); function ExploreNode(thePath) { //declare local variables for recursive calls var curIndex; var curnumObj; var childPath, MyObj; //System.Trace(thePath); //if texture file copy //if(Node.ConExists(thePath,"FileName")) //get first child curIndex = 0; curnumObj = Node.SubObjectCount(thePath); if(curnumObj > 0) { MyObj = Node.SubObject(thePath,0); childPath = thePath + "/" + MyObj; } if(Node.ConExists(thePath,"absFileName")) if(Node.ConExists(thePath,"filename")) if(Node.ConExists(thePath,"sceneFile")) { //Node.Value(thePath,"sceneFile") = scenePath; //Node.Delete(thePath); pathList.Add(thePath); numMatList++; } //recursion runs here - get the next child while(curnumObj > 0) { ExploreNode(childPath); curIndex = curIndex + 1; if(curIndex < curnumObj) { //System.Trace(thePath); //System.Trace(curIndex); MyObj = Node.SubObject(thePath, curIndex); childPath = thePath + "/" + MyObj; } else curnumObj = 0; } } // Execute // Called to execute the command function Execute(params) { // TODO: put your action code here if(Node.Exists("Status Line")) if(Node.ConExists("Status Line","Model")) Node.Value("Status Line","Model") = "indigo scene packaging cleanup..."; //go through each material and remove the path reconstruction nodes scene = Space.CurrentScene(); owner = System.ThisOwner(); if(!Node.Exists(scene + "/Materials")) return;//no d3d materials to search numMatList = 0; pathList.Clear(); //ExploreNode(scene + "/Materials"); ExploreNode(scene);//cleanup ies nodes too for(i=0;i<numMatList;i++) { thePath = pathList.GetAt(i); fn = Node.Value(thePath,"absFileName"); cnt = Node.LinkedOutputNodeCount(thePath, "absFileName"); if(cnt==1) { target = Node.LinkedOutputNode(thePath, "absFileName",0); Node.Delete(thePath); if(Node.ConExists(target,"igmFilename")) Node.Value(target,"igmFilename") = fn; if(Node.ConExists(target,"iesFilename")) Node.Value(target,"iesFilename") = fn; } } if(Node.Exists("Status Line")) if(Node.ConExists("Status Line","Model")) Node.Value("Status Line","Model") = " "; } NScript Object Package/jScript language~൱DUh#^c4W}@O{(XFҦV>g'JNjn*pnCCb@O@2|=Bynj|?z@Hoۙ>?J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?-1OSM n 럆L<_їjControlOˁ CRih[ a8Activity.Run('%THIS_NAME%') StartZ`Ez]UOOˁ CRih[ 0a:Activity.Stop('%THIS_NAME%') StopZ`Ez]UOMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?z@Ho48@J ePvA e#>ePvA e#D$SaveTonemappedEXR D$+=@oBUih$+=@oBUihD(SaveUnTonemappedEXR Dr J3fr J3fDexeFileDEu?F\5[Eu?F\5[D resXDgfeDfT?gfeDfT?D resYDIl@˨Il@˨D rrx1D_P JJm_P JJmD rry1D7Gqu07Gqu0D rrx2DEG*UYJE]vEG*UYJE]vD rry2D(-UMҠD/(-UMҠD/DrenderRegion D'H/LFia'H/LFiaDfgAlpha D2|=Bynjz@Ho.>ePvA e# GGQMT1Eu?F\5[X$+=@oBUih  "Ht  -n,Njlpg?2|=Bynj'H/LFia 3{gH،cA gfeDfT?U׍@`꒘!3Env_Map7Gqu0|/ؚL2 J@#QL>g'JNjn*pnBB`@T@2|=Bynj|?z@Hoۙ>?ceZU@䑧r[җJs@ NewCommand // ***** BEGIN GPL LICENSE BLOCK ***** // //-------------------------------------------------------------------- // trueSpace7.11 to Indigo 0.8 Exporter 0.02 //-------------------------------------------------------------------- // // Authors: // * Indigo exporter - Johny, ...(please add your name here if you make an update) // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // ***** END GPL LICENSE BLOCK ***** function Execute(params) { var renderRegion = params.ConValue('renderRegion'); var rrx1 = params.ConValue('rrx1'); var rry1 = params.ConValue('rry1'); var rrx2 = params.ConValue('rrx2'); var rry2 = params.ConValue('rry2'); var fgAlpha = params.ConValue('fgAlpha'); //access windows script shell winSh = new ActiveXObject("WScript.Shell"); exeFile = params.ConValue('exeFile'); // DEGTORAD = 0.01745329251994; OutputFile = params.ConValue('OutputFile'); if (OutputFile == '') { System.Alert("No output file chosen."); return; } else TargetFileName = OutputFile; ownernm = System.ThisOwner(); scene = Space.CurrentScene(); // if indigoEnvironment exists in the scene copy it's values if(Node.Exists(scene + "/indigoEnvironment")) { params.ConValue('bgcolor') = Node.Value(scene + "/indigoEnvironment",'bgcolor'); params.ConValue('EnvironmentType') = Node.Value(scene + "/indigoEnvironment",'EnvironmentType'); params.ConValue('SkyTurbidity') = Node.Value(scene + "/indigoEnvironment",'SkyTurbidity'); params.ConValue('SkylightHorizontalDegre') = Node.Value(scene + "/indigoEnvironment",'SkylightHorizontalDegre'); params.ConValue('SkylightVerticalDegre') = Node.Value(scene + "/indigoEnvironment",'SkylightVerticalDegre'); params.ConValue('EnvMapType') = Node.Value(scene + "/indigoEnvironment",'EnvMapType'); params.ConValue('EnvMapFile') = Node.Value(scene + "/indigoEnvironment",'EnvMapFile'); params.ConValue('EnvMapGain') = Node.Value(scene + "/indigoEnvironment",'EnvMapGain'); params.ConValue('EnvMapWidth') = Node.Value(scene + "/indigoEnvironment",'EnvMapWidth'); rectLightPowerDrawn = Node.Value(scene + "/indigoEnvironment",'rectLightPowerDrawn'); meshLightPowerDrawn = Node.Value(scene + "/indigoEnvironment",'meshLightPowerDrawn'); rectLightLumEff = Node.Value(scene + "/indigoEnvironment",'rectLightLumEff'); meshLightLumEff = Node.Value(scene + "/indigoEnvironment",'meshLightLumEff'); } else { rectLightPowerDrawn = 100000;//Watts meshLightPowerDrawn = 100000; rectLightLumEff = 20;//Lumens per Watt (lm/W) meshLightLumEff = 20; } resolution = params.ConValue('resolution'); bgcolor = params.ConValue('bgcolor'); //arbitrary resolution resX = params.ConValue('resX'); resY = params.ConValue('resY'); if (resolution == "160x120") {SizeX = 160; SizeY = 120; } else if (resolution == "320x240") {SizeX = 320; SizeY = 240;} else if (resolution == "640x480") {SizeX = 640; SizeY = 480;} else if (resolution == "800x600") {SizeX = 800; SizeY = 600;} else if (resolution == "custom") {SizeX = resX; SizeY = resY;} inMesh = System.CreateDO('Space 3D Package/Mesh Data'); dN = System.CreateDO('Space 3D Package/Vertex Normal Stream Data'); dF = System.CreateDO('Space 3D Package/Triangle Vertices Stream Data'); dM = System.CreateDO('Space 3D Package/Material List Data'); dMtx = System.CreateDO('Math Package/Matrix Float Data'); dME1 = System.CreateDO('Common Data Package/Color Data'); dME2 = System.CreateDO('Space 3D Package/Material Chunk Data'); fileError = ""; fso = new ActiveXObject("Scripting.FileSystemObject");//global // var ofl = fso.CreateTextFile(TargetFileName, true); ofl = fso.CreateTextFile(TargetFileName, true); ofl.write("<?xml version=\"1.0\" standalone=no>\n\n"); ofl.write("<scene>\n\n"); ofl.write("\t<renderer_settings>\n"); ofl.write("\t\t<width>"+SizeX+"</width>\n"); ofl.write("\t\t<height>"+SizeY+"</height>\n"); if (params.ConValue('Metropolis') == true) ofl.write("\t\t<metropolis>true</metropolis>\n"); else ofl.write("\t\t<metropolis>false</metropolis>\n"); if (params.ConValue('Bidirectional') == true) ofl.write("\t\t<bidirectional>true</bidirectional>\n"); else ofl.write("\t\t<bidirectional>false</bidirectional>\n"); if (params.ConValue('Hybrid') == true) ofl.write("\t\t<hybrid>true</hybrid>\n"); else ofl.write("\t\t<hybrid>false</hybrid>\n"); if (params.ConValue('Logging') == true) ofl.write("\t\t<logging>true</logging>\n"); else ofl.write("\t\t<logging>false</logging>\n"); if (params.ConValue('SaveTonemappedEXR') == true) ofl.write("\t\t<save_tonemapped_exr>true</save_tonemapped_exr>\n"); else ofl.write("\t\t<save_tonemapped_exr>false</save_tonemapped_exr>\n"); if (params.ConValue('SaveUnTonemappedEXR') == true) ofl.write("\t\t<save_untonemapped_exr>true</save_untonemapped_exr>\n"); else ofl.write("\t\t<save_untonemapped_exr>false</save_untonemapped_exr>\n"); if (params.ConValue('Save_igi') == true) ofl.write("\t\t<save_igi>true</save_igi>\n"); else ofl.write("\t\t<save_igi>false</save_igi>\n"); numthreads = params.ConValue('Num_threads'); if(numthreads < 1) { ofl.write("\t\t<auto_choose_num_threads>true</auto_choose_num_threads>\n"); ofl.write("\t\t<num_threads>1</num_threads>\n"); } else { ofl.write("\t\t<auto_choose_num_threads>false</auto_choose_num_threads>\n"); ofl.write("\t\t<num_threads>"+params.ConValue('Num_threads')+"</num_threads>\n"); } ofl.write("\t\t<halt_time>"+params.ConValue('Halt_time')+"</halt_time>\n"); ofl.write("\t\t<display_period>"+params.ConValue('Display_period')+"</display_period>\n"); ofl.write("\t\t<image_save_period>"+params.ConValue('Image_save_period')+"</image_save_period>\n"); //render region? if(renderRegion) { ofl.write("\t\t<render_region>\n"); ofl.write("\t\t\t<x1>" +rrx1 + "</x1>\n"); ofl.write("\t\t\t<y1>" +rry1 + "</y1>\n"); ofl.write("\t\t\t<x2>" +rrx2 + "</x2>\n"); ofl.write("\t\t\t<y2>" +rry2 + "</y2>\n"); ofl.write("\t\t</render_region>\n"); } if(fgAlpha) ofl.write("\t\t<render_foreground_alpha>true</render_foreground_alpha>\n"); ofl.write("\t</renderer_settings>\n\n"); ofl.write("\t<tonemapping>\n"); ofl.write("\t\t<reinhard>\n"); ofl.write("\t\t\t<pre_scale>1.0</pre_scale>\n"); ofl.write("\t\t\t<post_scale>1.0</post_scale>\n"); ofl.write("\t\t</reinhard>\n"); ofl.write("\t</tonemapping>\n\n"); scene = Space.CurrentScene(); nSubObj=Node.SubObjectCount(scene); EnvironmentType = params.ConValue('EnvironmentType'); if (EnvironmentType == "Background") { ofl.write("\t<background>\n"); ofl.write("\t\t<spectrum>\n"); ofl.write("\t\t\t<rgb>\n"); ofl.write("\t\t\t\t<rgb>"+bgcolor.GetRed()*10000+" "+bgcolor.GetGreen()*10000+" "+bgcolor.GetBlue()*10000+"</rgb>\n"); ofl.write("\t\t\t\t<gamma>2.2</gamma>\n");//october 2009 pc gamma ofl.write("\t\t\t</rgb>\n"); ofl.write("\t\t</spectrum>\n"); ofl.write("\t</background>\n\n"); } else if (EnvironmentType == "Skylight") { SkylightHorizontalDegre = params.ConValue('SkylightHorizontalDegre')*DEGTORAD; SkylightVerticalDegre = params.ConValue('SkylightVerticalDegre')*DEGTORAD; ofl.write("\t<skylight>\n"); //check for sky light - if exist get direction from it if(Node.Exists(scene + "/Sky")) { //read matrix rotation dMtx = Node.Value(scene + "/Sky", "Matrix"); rotMatrix = System.CreateDO("Math Package/Matrix Float Data"); rotMatrix.LoadIdentity(); rotMatrix.SetPitch(dMtx.GetPitch()); rotMatrix.SetRoll(dMtx.GetRoll()); rotMatrix.SetYaw(dMtx.GetYaw()); tpoint = System.CreateDO("Math Package/Point Data"); rpoint = System.CreateDO("Math Package/Point Data"); tpoint.x = 0; tpoint.y = 0; tpoint.z = 1; rpoint = rotMatrix.TransformPoint(tpoint); ofl.write("\t\t<sundir>" + rpoint.x.toFixed(6)+" "+ -rpoint.y.toFixed(6) +" "+ -rpoint.z.toFixed(6) +"</sundir>\n"); } else ofl.write("\t\t<sundir>"+Math.cos(SkylightVerticalDegre)*Math.cos(SkylightHorizontalDegre)+" "+Math.cos(SkylightVerticalDegre)*Math.sin(SkylightHorizontalDegre)+" "+Math.sin(SkylightVerticalDegre)+"</sundir>\n"); SkyTurbidity = params.ConValue('SkyTurbidity'); ofl.write("\t\t<turbidity>"+SkyTurbidity+"</turbidity>\n"); ofl.write("\t</skylight>\n\n"); } else if (EnvironmentType == "Env_Map") { EnvMapType = params.ConValue('EnvMapType'); ofl.write("\t<env_map>\n"); if (EnvMapType == "Lat-Long") { ofl.write("\t\t<latlong>\n"); ofl.write("\t\t\t<path>"+params.ConValue('EnvMapFile')+"</path>\n"); ofl.write("\t\t\t<gain>"+params.ConValue('EnvMapGain')+"</gain>\n"); ofl.write("\t\t</latlong>\n"); } else if (EnvMapType == "Spherical") { ofl.write("\t\t<spherical>\n"); ofl.write("\t\t\t<path>"+params.ConValue('EnvMapFile')+"</path>\n"); ofl.write("\t\t\t<gain>"+params.ConValue('EnvMapGain')+"</gain>\n"); ofl.write("\t\t\t<width>"+params.ConValue('EnvMapWidth')+"</width>\n"); ofl.write("\t\t</spherical>\n"); } ofl.write("\t</env_map>\n\n"); //if(!fso.FileExists(EnvMapFile)) fileError = fileError + EnvMapFile + "\n";//Nov 2009 if(!fso.FileExists(params.ConValue('EnvMapFile'))) fileError = fileError + params.ConValue('EnvMapFile') + "\n";//april 2010 } //october search for all area lights tnSubObj = nSubObj; SearchForLights(ofl,scene,tnSubObj); ofl.write("\t<material>\n"); ofl.write("\t\t<name>Default</name>\n"); //exit portal compatible default material ofl.write("\t\t\t<phong>\n"); ofl.write("\t\t\t\t<exponent>500</exponent>\n") ofl.write("\t\t\t\t<diffuse>0.8 0.8 0.8</diffuse>\n") ofl.write("\t\t\t\t<ior>1.60838</ior>\n") ofl.write("\t\t\t</phong>\n"); ofl.write("\t</material>\n\n"); IMEBank = scene+'/IMEBank'; if (Node.Exists(IMEBank) == 1) { AllUseDefaultMaterial = false; nMatCount=Node.SubObjectCount(IMEBank); for (i=0;i<nMatCount;i++) { nowSubObj = Node.SubObject(IMEBank,i); tmp=IMEBank+'/'+nowSubObj; if (Node.ConExists(tmp,'IMEType') == 1) { IMEType = Node.Value(tmp,'IMEType'); if (IMEType == "Diffuse") { ofl.write("\t<material>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<diffuse>\n"); ofl.write("\t\t\t<albedo_spectrum>\n"); ofl.write("\t\t\t\t<rgb>\n"); ofl.write("\t\t\t\t\t<rgb>"+Node.Value(tmp,'Red')+" "+Node.Value(tmp,'Green')+" "+Node.Value(tmp,'Blue')+"</rgb>\n"); ofl.write("\t\t\t\t\t<gamma>2.2</gamma>\n"); ofl.write("\t\t\t\t</rgb>\n"); ofl.write("\t\t\t</albedo_spectrum>\n"); Albedo = Node.Value(tmp,'Albedo'); if (Albedo != "") { ofl.write("\t\t\t<albedo_texture>\n"); ofl.write("\t\t\t\t<path>"+Albedo+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>"+Node.Value(tmp,'AlbedoExponent')+"</exponent>\n"); ofl.write("\t\t\t\t<a>"+Node.Value(tmp,'Albedo_a')+"</a>\n"); ofl.write("\t\t\t\t<b>"+Node.Value(tmp,'Albedo_b')+"</b>\n"); ofl.write("\t\t\t\t<c>"+Node.Value(tmp,'Albedo_c')+"</c>\n"); ofl.write("\t\t\t</albedo_texture>\n"); if(!fso.FileExists(Albedo)) fileError = fileError + Albedo + "\n";//Nov 2009 } BumpMap = Node.Value(tmp,'BumpMap'); if (BumpMap != "") { ofl.write("\t\t\t<bump_map>\n"); ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>"+Node.Value(tmp,'BumpMapExponent')+"</exponent>\n"); ofl.write("\t\t\t\t<a>"+Node.Value(tmp,'BumpMap_a')+"</a>\n"); ofl.write("\t\t\t\t<b>"+Node.Value(tmp,'BumpMap_b')+"</b>\n"); ofl.write("\t\t\t\t<c>"+Node.Value(tmp,'BumpMap_c')+"</c>\n"); ofl.write("\t\t\t</bump_map>\n"); if(!fso.FileExists(BumpMap)) fileError = fileError + BumpMap + "\n";//Nov 2009 } ofl.write("\t\t</diffuse>\n"); ofl.write("\t</material>\n\n"); } else if (IMEType == "Phong") { ofl.write("\t<material>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<phong>\n"); ofl.write("\t\t\t<diffuse_albedo_spectrum>\n"); ofl.write("\t\t\t\t<rgb>\n"); ofl.write("\t\t\t\t\t<rgb>"+Node.Value(tmp,'Red')+" "+Node.Value(tmp,'Green')+" "+Node.Value(tmp,'Blue')+"</rgb>\n"); ofl.write("\t\t\t\t\t<gamma>2.2</gamma>\n"); ofl.write("\t\t\t\t</rgb>\n"); ofl.write("\t\t\t</diffuse_albedo_spectrum>\n"); ofl.write("\t\t\t<ior>"+Node.Value(tmp,'IOR')+"</ior>\n"); ofl.write("\t\t\t<exponent>"+Node.Value(tmp,'Exponent')+"</exponent>\n"); Albedo = Node.Value(tmp,'Albedo'); if (Albedo != "") { ofl.write("\t\t\t<albedo_texture>\n"); ofl.write("\t\t\t\t<path>"+Albedo+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>"+Node.Value(tmp,'AlbedoExponent')+"</exponent>\n"); ofl.write("\t\t\t\t<a>"+Node.Value(tmp,'Albedo_a')+"</a>\n"); ofl.write("\t\t\t\t<b>"+Node.Value(tmp,'Albedo_b')+"</b>\n"); ofl.write("\t\t\t\t<c>"+Node.Value(tmp,'Albedo_c')+"</c>\n"); ofl.write("\t\t\t</albedo_texture>\n"); if(!fso.FileExists(Albedo)) fileError = fileError + Albedo + "\n";//Nov 2009 } BumpMap = Node.Value(tmp,'BumpMap'); if (BumpMap != "") { ofl.write("\t\t\t<bump_map>\n"); ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>"+Node.Value(tmp,'BumpMapExponent')+"</exponent>\n"); ofl.write("\t\t\t\t<a>"+Node.Value(tmp,'BumpMap_a')+"</a>\n"); ofl.write("\t\t\t\t<b>"+Node.Value(tmp,'BumpMap_b')+"</b>\n"); ofl.write("\t\t\t\t<c>"+Node.Value(tmp,'BumpMap_c')+"</c>\n"); ofl.write("\t\t\t</bump_map>\n"); if(!fso.FileExists(BumpMap)) fileError = fileError + BumpMap + "\n";//Nov 2009 } ofl.write("\t\t</phong>\n"); ofl.write("\t</material>\n\n"); } else if (IMEType == "nkdata") { ofl.write("\t<material>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<phong>\n"); ofl.write("\t\t\t<nk_data>nkdata/"+Node.Value(tmp,'nkdata')+".nk</nk_data>\n"); ofl.write("\t\t\t<exponent>"+Node.Value(tmp,'Exponent')+"</exponent>\n"); ofl.write("\t\t</phong>\n"); ofl.write("\t</material>\n\n"); } if (IMEType == "SpecularBasic") { ofl.write("\t<medium>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<precedence>"+Node.Value(tmp,'Precedence')+"</precedence>\n"); ofl.write("\t\t<basic>\n"); ofl.write("\t\t\t<ior>"+Node.Value(tmp,'IOR')+"</ior>\n"); ofl.write("\t\t\t<cauchy_b_coeff>"+Node.Value(tmp,'Cauchy_b_Coefficient')+"</cauchy_b_coeff>\n"); ofl.write("\t\t\t<absorption_coefficient_spectrum>\n"); ofl.write("\t\t\t\t<rgb>\n"); ofl.write("\t\t\t\t\t<rgb>"+Node.Value(tmp,'Red')+" "+Node.Value(tmp,'Green')+" "+Node.Value(tmp,'Blue')+"</rgb>\n"); ofl.write("\t\t\t\t\t<gamma>2.2</gamma>\n");//october 2009 ofl.write("\t\t\t\t</rgb>\n"); ofl.write("\t\t\t</absorption_coefficient_spectrum>\n"); if (Node.Value(tmp,'SSS') == true) { ofl.write("\t\t\t<subsurface_scattering>\n"); ofl.write("\t\t\t\t<scattering_coefficient_spectrum>\n"); if (Node.Value(tmp,'ScatteringType') == "RGB") { ofl.write("\t\t\t\t\t<rgb>\n"); ofl.write("\t\t\t\t\t\t<rgb>"+Node.Value(tmp,'SSSR')+" "+Node.Value(tmp,'SSSG')+" "+Node.Value(tmp,'SSSB')+"</rgb>\n"); ofl.write("\t\t\t\t\t\t<gamma>2.2</gamma>\n");//oct 2009 ofl.write("\t\t\t\t\t</rgb>\n"); } else { ofl.write("\t\t\t\t\t<uniform>\n"); ofl.write("\t\t\t\t\t\t<value>"+Node.Value(tmp,'SSSUniform')+"</value>\n"); ofl.write("\t\t\t\t\t</uniform>\n"); } ofl.write("\t\t\t\t</scattering_coefficient_spectrum>\n"); ofl.write("\t\t\t\t<phase_function>\n"); ofl.write("\t\t\t\t\t<uniform/>\n"); ofl.write("\t\t\t\t</phase_function>\n"); ofl.write("\t\t\t</subsurface_scattering>\n"); } ofl.write("\t\t</basic>\n"); ofl.write("\t</medium>\n\n"); ofl.write("\t<material>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<specular>\n"); if (Node.Value(tmp,'Transparent') == true) ofl.write("\t\t\t<transparent>true</transparent>\n"); else ofl.write("\t\t\t<transparent>false</transparent>\n"); ofl.write("\t\t\t<internal_medium_name>"+nowSubObj+"</internal_medium_name>\n"); BumpMap = Node.Value(tmp,'BumpMap'); if (BumpMap != "") { ofl.write("\t\t\t<bump_map>\n"); ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>"+Node.Value(tmp,'BumpMapExponent')+"</exponent>\n"); ofl.write("\t\t\t\t<a>"+Node.Value(tmp,'BumpMap_a')+"</a>\n"); ofl.write("\t\t\t\t<b>"+Node.Value(tmp,'BumpMap_b')+"</b>\n"); ofl.write("\t\t\t\t<c>"+Node.Value(tmp,'BumpMap_c')+"</c>\n"); ofl.write("\t\t\t</bump_map>\n"); if(!fso.FileExists(BumpMap)) fileError = fileError + BumpMap + "\n";//Nov 2009 } ofl.write("\t\t</specular>\n"); ofl.write("\t</material>\n\n"); } else if (IMEType == "Script") { ofl.write(Node.Value(tmp,'ScriptText')); } } } } else AllUseDefaultMaterial = true; // // april 2009 // if(Node.Exists(scene + "/Materials")) { AllUseDefaultMaterial = false;//april2010 Use was not capitalized getSceneMaterials(ofl, scene); } //Camera process.. CamList = params.ConValue('CamList'); if (CamList.GetSize() == 0) { System.Alert('Export process canceled because there\'re no camera on cameras list!'); ofl.Close(); return; } ActiveCamera = scene+'/'+CamList.GetSelectedString(); // //april 2009 look at camera fov // FilmWidth = params.ConValue('FilmWidth'); fov = Node.Value(ActiveCamera,"FOV");//camera fov in vertical filmHeight = FilmWidth*SizeY/SizeX;//convert horizontal to vertical(0.00075) filmHeight = filmHeight*0.001;//convert mm to m ratio = 2 * Math.tan(fov/2); lensSensorDist = filmHeight/ratio; ofl.write("\t<camera>\n"); dMtx = Node.Value(ActiveCamera,"Matrix"); ofl.write("\t\t<pos>"+ -dMtx.GetAt(3,0).toFixed(6)+" "+dMtx.GetAt(3,1).toFixed(6)+" "+dMtx.GetAt(3,2).toFixed(6)+"</pos>\n"); ofl.write("\t\t<up>"+ -dMtx.GetAt(1,0).toFixed(6)+" "+dMtx.GetAt(1,1).toFixed(6)+" "+ dMtx.GetAt(1,2).toFixed(6)+"</up>\n"); ofl.write("\t\t<forwards>"+ -dMtx.GetAt(2,0).toFixed(6)+" "+ dMtx.GetAt(2,1).toFixed(6)+" "+ dMtx.GetAt(2,2).toFixed(6)+"</forwards>\n"); ApertureRadius = params.ConValue('ApertureRadius'); ofl.write("\t\t<aperture_radius>"+ApertureRadius.toFixed(6)+"</aperture_radius>\n"); FocusDistance = params.ConValue('FocusDistance'); ofl.write("\t\t<focus_distance>"+FocusDistance.toFixed(6)+"</focus_distance>\n"); ofl.write("\t\t<aspect_ratio>"+SizeX/SizeY+"</aspect_ratio>\n"); ofl.write("\t\t<sensor_width>"+FilmWidth*0.001+"</sensor_width>\n"); ofl.write("\t\t<lens_sensor_dist>" + lensSensorDist.toFixed(6) + "</lens_sensor_dist>\n"); WhiteBalance = params.ConValue('WhiteBalance'); ofl.write("\t\t<white_balance>"+WhiteBalance+"</white_balance>\n"); if (params.ConValue('AutoFocus') == true) ofl.write("\t\t<autofocus/>\n"); //if (params.ConValue('BloomEnable') == true) //{ // ofl.write("\t\t<bloom>\n"); // ofl.write("\t\t\t<weight>"+params.ConValue('BloomWeight')+"</weight>\n"); // ofl.write("\t\t\t<radius>"+params.ConValue('BloomRadius')+"</radius>\n"); // ofl.write("\t\t</bloom>\n"); //} ofl.write("\t</camera>\n\n"); orig_nSubObj = nSubObj; SearchingForMesh(ofl,scene,nSubObj); nSubObj = orig_nSubObj; //add meshlight SearchForMeshLight(ofl, scene, orig_nSubObj); //add exit portals SearchForExitPortal(ofl, scene, nSubObj); ofl.write("</scene>\n\n"); ofl.Close(); //run indigo render if(fileError=="") { runText = '"' + exeFile + '" "' + TargetFileName + '"'; winSh.Run(runText); } else { fileError = "Texture and igm file errors found.\n\n" + fileError; System.Alert(fileError); } } function SearchForLights(ofl,scene,tnSubObj) { var CurrentnSubObj = tnSubObj; for (var i=0;i<CurrentnSubObj;i++) { nowSubObj = Node.SubObject(scene,i); tmp=scene.concat("/"+nowSubObj); if (Node.IsLight(tmp) && Node.Exists(tmp + "/AreaLight")) { dMtx = Node.Value(tmp, "Matrix"); ofl.write("\t<rectanglelight>\n"); ofl.write("\t\t<pos>"+ -dMtx.GetTransX() + " " + dMtx.GetTransY() + " " + dMtx.GetTransZ() + "</pos>\n"); ofl.write("\t\t<width>" + dMtx.GetScaleX() + "</width>\n"); ofl.write("\t\t<height>" + dMtx.GetScaleY() + "</height>\n"); ofl.write("\t\t<spectrum>\n"); ofl.write("\t\t\t<rgb>\n"); col = System.CreateDO("Common Data Package/Color Data"); col = Node.Value(tmp, "Color"); ofl.write("\t\t\t\t<rgb>" + 1000*col.GetRed() + " " + 1000*col.GetGreen() + " " + 1000*col.GetBlue() + "</rgb>\n");//october 2009 ofl.write("\t\t\t\t<gamma>2.2</gamma>\n"); ofl.write("\t\t\t</rgb>\n"); ofl.write("\t\t</spectrum>\n"); //nov 2009 ofl.write("\t\t<efficacy_scale>\n"); ofl.write("\t\t\t<power_drawn>" + rectLightPowerDrawn + "</power_drawn>\n"); ofl.write("\t\t\t<overall_luminous_efficacy>" + rectLightLumEff + "</overall_luminous_efficacy>\n"); ofl.write("\t\t</efficacy_scale>\n"); // ofl.write("\t</rectanglelight>\n\n"); } else { var tnSubObj=Node.SubObjectCount(tmp); if (tnSubObj>0)SearchForLights(ofl,tmp,tnSubObj); } } } function SearchForExitPortal(ofl,scene,nSubObj) { // var CurrentnSubObj = nSubObj; for (var i=0;i<CurrentnSubObj;i++) { //System.Info('+'+i); nowSubObj = Node.SubObject(scene,i); tmp=scene.concat("/"+nowSubObj); if (Node.IsCamera(tmp)); else if (Node.IsLight(tmp)); else if (Node.IsRenderable(tmp) && Node.Exists(tmp + "/I_exitPortal")) { ofl.write("\t<exit_portal>\n"); ofl.write("\t\t<pos>0 0 0</pos>\n"); ofl.write("\t\t<scale>1</scale>\n"); ofl.write("\t\t<mesh_name>" + nowSubObj + "</mesh_name>\n"); ofl.write("\t</exit_portal>\n"); } else { var nSubObj=Node.SubObjectCount(tmp); if (nSubObj>0)SearchForExitPortal(ofl,tmp,nSubObj); } } } function SearchForMeshLight(ofl,scene,nSubObj) { try { guidata = System.CreateDO('Clintons3d Package/Material guid data'); } catch(err) { guidata = false; } // var CurrentnSubObj = nSubObj; for (var i=0;i<CurrentnSubObj;i++) { nowSubObj = Node.SubObject(scene,i); tmp=scene.concat("/"+nowSubObj); if (Node.IsCamera(tmp)); else if (Node.IsLight(tmp)); else if (Node.IsRenderable(tmp) && Node.Exists(tmp + "/I_meshlight")) { sceneMaterial = tmp + "/Material List"; if(Node.Exists(sceneMaterial) && guidata) { //material list subobject count is num materials + 1 numMaterials = Node.SubObjectCount(tmp + "/Material List") for(curM=0;curM<numMaterials;curM++) { subObj = Node.SubObject(sceneMaterial, curM); if(Node.ConExists(tmp + "/Material List/" + subObj, "Material Index")) { guidata.SetName(tmp + "/Material List/" + subObj); guid = guidata.GetName(); matCount = Node.SubObjectCount(scene + "/Materials"); for(j=0;j<matCount;j++) { curMat = Node.SubObject(scene + "/Materials", j); matFlav = scene + "/Materials/" + curMat + "/Material Flavor Manager"; matID = Node.Value(matFlav,"Material ID"); if(matID == guid) { //dont assume name oct 2009 ii = 0; contloop = 1; while(contloop==1) { msntest = Node.SubObject(scene + "/Materials/" + curMat,ii); if(Node.ConExists(scene + "/Materials/" + curMat + "/" + msntest,"Material")) { materialSubNode = scene + "/Materials/" + curMat + "/" + msntest; contloop = 0; } ii = ii + 1; } curNodeCount = Node.SubObjectCount(materialSubNode); for(findcnt=0;findcnt<curNodeCount;findcnt++) { tempNodeName = Node.SubObject(materialSubNode, findcnt); if(tempNodeName == "SolidColorShader") { //get color and write info to file IndigoMaterialNode = scene + "/Materials/" + curMat + "/" + msntest + "/" + tempNodeName; col = System.CreateDO("Common Data Package/Color Data"); col = Node.Value(IndigoMaterialNode, "Color"); ofl.write("\t<meshlight>\n"); ofl.write("\t\t<pos>0 0 0</pos>\n"); ofl.write("\t\t<scale>1</scale>\n"); ofl.write("\t\t<mesh_name>" + nowSubObj + "</mesh_name>\n"); ofl.write("\t\t<spectrum>\n"); ofl.write("\t\t\t<rgb>\n"); ofl.write("\t\t\t\t<rgb>" + 1000*col.GetRed() + " " + 1000*col.GetGreen() + " " + 1000*col.GetBlue() + "</rgb>\n"); ofl.write("\t\t\t\t<gamma>2.2</gamma>\n");//october 2009 ofl.write("\t\t\t</rgb>\n"); ofl.write("\t\t</spectrum>\n"); ofl.write("\t\t<efficacy_scale>\n"); ofl.write("\t\t\t<power_drawn>" + meshLightPowerDrawn +"</power_drawn>\n"); ofl.write("\t\t\t<overall_luminous_efficacy>" + meshLightLumEff + "</overall_luminous_efficacy>\n"); ofl.write("\t\t</efficacy_scale>\n"); ofl.write("\t</meshlight>\n"); } } } } } } } } else { var nSubObj=Node.SubObjectCount(tmp); if (nSubObj>0)SearchForMeshLight(ofl,tmp,nSubObj); } } } function SearchingForMesh(ofl,scene,nSubObj) { try { guidata = System.CreateDO('Clintons3d Package/Material guid data'); } catch(err) { guidata = false; } // var CurrentnSubObj = nSubObj; for (var i=0;i<CurrentnSubObj;i++) { nowSubObj = Node.SubObject(scene,i); tmp=scene.concat("/"+nowSubObj); if (Node.IsCamera(tmp)); else if (Node.IsLight(tmp)); else if (Node.Exists(tmp + "/AmbientLightShader"));//Nov 2009 else if (Node.IsRenderable(tmp)) { ofl.write("\t<!-- "+nowSubObj+" -->\n"); ofl.write("\t<mesh>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<embedded>\n"); ofl.write("\t\t\t<expose_uv_set>\n"); ofl.write("\t\t\t\t<index>0</index>\n"); ofl.write("\t\t\t\t<name>default</name>\n"); ofl.write("\t\t\t</expose_uv_set>\n"); inMesh = Node.Value(tmp,'Mesh'); dV = inMesh.GetVertices(); nv = inMesh.GetNumVertices(); dNTri = inMesh.GetTrianglesStreamByName('Triangle Normals Stream Data'); dN = inMesh.GetCustStreamByName('Normals Stream Data'); jumdN = dN.GetNumVertexNormals(); System.Trace(jumdN + " " + nv); dUV = inMesh.GetCustStreamByName('UV Coordinate Stream Data'); //dMtx = Node.Value(tmp,"Matrix"); dMtx = Node.Value(tmp,"WldMatrix");//april 2010 smoothStr="false"; //change so all meshes exported with frozen transforms Opoint = System.CreateDO('Math Package/Point Data'); Rpoint = System.CreateDO('Math Package/Point Data'); normalMatrix = System.CreateDO("Math Package/Matrix Float Data"); for (ij=0;ij<nv;ij++) { Opoint.x = dV.x(ij); Opoint.y = dV.y(ij); Opoint.z = dV.z(ij); Rpoint = dMtx.TransformPoint(Opoint); dV.x(ij) = -Rpoint.x ; dV.y(ij) = Rpoint.y; dV.z(ij) = Rpoint.z; } dTUV = inMesh.GetTrianglesStreamByName('UV Triangle Stream Data'); dF = inMesh.GetTriangles(); jumdF = dF.GetNumTripleIndices(); normalMatrix.LoadIdentity(); normalMatrix.SetPitch(dMtx.GetPitch()); normalMatrix.SetRoll(dMtx.GetRoll()); normalMatrix.SetYaw(dMtx.GetYaw()); for(ij=0;ij<jumdN;ij++) { Opoint.x = dN.x(ij); Opoint.y = dN.y(ij); Opoint.z = dN.z(ij); Rpoint = normalMatrix.TransformPoint(Opoint); dN.x(ij) = -Rpoint.x ; dN.y(ij) = Rpoint.y; dN.z(ij) = Rpoint.z; } // for (j=0;j<jumdF;j++) { //october 2009 add tofixed to fix hanging problem ofl.write("\t\t\t<vertex pos=\""+ dV.x(dF.k(j)).toFixed(6)+" "+dV.y(dF.k(j)).toFixed(6)+" "+dV.z(dF.k(j)).toFixed(6)+"\" normal=\""+ dN.x(dNTri.k(j)).toFixed(6)+" "+dN.y(dNTri.k(j)).toFixed(6)+" "+dN.z(dNTri.k(j)).toFixed(6)+"\""); ofl.write(" uv0=\""+ dUV.u(dTUV.k(j)).toFixed(6)+" "+ -dUV.v(dTUV.k(j)).toFixed(6)+"\""); ofl.write(" />\n"); ofl.write("\t\t\t<vertex pos=\""+ dV.x(dF.j(j)).toFixed(6)+" "+dV.y(dF.j(j)).toFixed(6)+" "+dV.z(dF.j(j)).toFixed(6)+"\" normal=\""+ dN.x(dNTri.j(j)).toFixed(6)+" "+dN.y(dNTri.j(j)).toFixed(6)+" "+dN.z(dNTri.j(j)).toFixed(6)+"\""); ofl.write(" uv0=\""+ dUV.u(dTUV.j(j)).toFixed(6)+" "+ -dUV.v(dTUV.j(j)).toFixed(6)+"\""); ofl.write(" />\n"); ofl.write("\t\t\t<vertex pos=\""+ dV.x(dF.i(j)).toFixed(6)+" "+dV.y(dF.i(j)).toFixed(6)+" "+dV.z(dF.i(j)).toFixed(6)+"\" normal=\""+ dN.x(dNTri.i(j)).toFixed(6)+" "+dN.y(dNTri.i(j)).toFixed(6)+" "+dN.z(dNTri.i(j)).toFixed(6)+"\""); ofl.write(" uv0=\""+ dUV.u(dTUV.i(j)).toFixed(6)+" "+ -dUV.v(dTUV.i(j)).toFixed(6)+"\""); ofl.write(" />\n"); } ofl.write("\t\t\t<triangle_set>\n"); IMatListTmp = System.CreateDO('Common Data Package/String Enum Data'); IndigoMaterialName = tmp+'/IndigoMaterialName'; if (Node.Exists(IndigoMaterialName) == 1) { IMatListTmp = Node.Value(IndigoMaterialName,'MaterialsList'); MaterialName = IMatListTmp.GetSelectedString(); if (Node.Value(IndigoMaterialName,'NormalSmooth') == true) smoothStr="true"; } else MaterialName = 'Default'; // //april 2009 - use d3d materials // limit to one material per mesh for now // sceneMaterial = tmp + "/Material List"; if(Node.Exists(sceneMaterial) && guidata) { //material list subobject count is num materials + 1 numMaterials = Node.SubObjectCount(tmp + "/Material List") for(curM=0;curM<numMaterials;curM++) { subObj = Node.SubObject(sceneMaterial, curM); if(Node.ConExists(tmp + "/Material List/" + subObj, "Material Index")) { guidata.SetName(tmp + "/Material List/" + subObj); guid = guidata.GetName(); matCount = Node.SubObjectCount(scene + "/Materials"); for(j=0;j<matCount;j++) { curMat = Node.SubObject(scene + "/Materials", j); matFlav = scene + "/Materials/" + curMat + "/Material Flavor Manager"; matID = Node.Value(matFlav,"Material ID"); if(matID == guid) { //dont assume name oct 2009 ii = 0; contloop = 1; while(contloop==1) { msntest = Node.SubObject(scene + "/Materials/" + curMat,ii); if(Node.ConExists(scene + "/Materials/" + curMat + "/" + msntest,"Material")) { materialSubNode = scene + "/Materials/" + curMat + "/" + msntest; contloop = 0; } ii = ii + 1; } curNodeCount = Node.SubObjectCount(materialSubNode); for(findcnt=0;findcnt<curNodeCount;findcnt++) { tempNodeName = Node.SubObject(materialSubNode, findcnt); if(tempNodeName.substr(0,4) == "IME_") { IndigoMaterialNode = scene + "/Materials/" + curMat + "/" + msntest + "/" + tempNodeName; System.Trace(IndigoMaterialNode); if (Node.Value(IndigoMaterialNode,'NormalSmooth') == true) smoothStr="true"; else smoothStr="false"; MaterialName = curMat.replace(", ", ""); } } } } } } } ofl.write("\t\t\t\t<material_name>"+MaterialName+"</material_name>\n"); iii3 = 0; for (j=0;j<jumdF;j++) ofl.write("\t\t\t\t<tri>"+iii3++ +" "+iii3++ +" "+iii3++ +" "+"</tri>\n"); ofl.write("\t\t\t</triangle_set>\n"); ofl.write("\t\t</embedded>\n"); ofl.write("\t\t<normal_smoothing>"+smoothStr+"</normal_smoothing>\n"); ofl.write("\t</mesh>\n\n"); ofl.write("\t<model>\n"); ofl.write("\t\t<pos>0 0 0</pos>\n"); ofl.write("\t\t<scale>1.0</scale>\n"); ofl.write("\t\t<mesh_name>"+nowSubObj+"</mesh_name>\n"); //do ies profile here //check for existence of indigoIES node inside tmp if(Node.Exists(tmp + "/indigoIES")) { //if exists read path and write the info iesfile = Node.Value(tmp + "/indigoIES","iesFilename"); ofl.write("\t\t<ies_profile>\n"); ofl.write("\t\t\t<material_name>" + MaterialName + "</material_name>\n"); ofl.write("\t\t\t<path>" + iesfile + "</path>\n"); ofl.write("\t\t</ies_profile>\n"); } // ofl.write("\t</model>\n\n"); } else { var nSubObj=Node.SubObjectCount(tmp); if (nSubObj>0)SearchingForMesh(ofl,tmp,nSubObj); } } } function writeRGB(numtabs, r, g, b) { tmpstr = ""; for(wi=0;wi<numtabs;wi++) tmpstr=tmpstr+"\t"; ofl.write(tmpstr); ofl.write("<constant>\n"); ofl.write(tmpstr); ofl.write("\t<rgb>\n"); ofl.write(tmpstr); ofl.write("\t\t<rgb>" + r + " " +g + " " + b + "</rgb>\n"); ofl.write(tmpstr); ofl.write("\t\t<gamma>2.2</gamma>\n"); ofl.write(tmpstr); ofl.write("\t</rgb>\n"); ofl.write(tmpstr); ofl.write("</constant>\n"); } //april 2009 function getSceneMaterials(ofl, scene) { col = System.CreateDO("Common Data Package/Color Data"); absorption = System.CreateDO("Common Data Package/Color Data"); sssCoef = System.CreateDO("Common Data Package/Color Data"); baseEmissionColor = System.CreateDO("Common Data Package/Color Data"); IMEBank = scene + "/Materials"; nMatCount=Node.SubObjectCount(IMEBank); materialsNode = scene + "/Materials"; nMatCount=Node.SubObjectCount(materialsNode); for (i=0;i<nMatCount;i++) { IMEType = ""; materialNode = Node.SubObject(materialsNode,i); //dont assume name oct 2009 ii = 0; contloop = 1; while(contloop==1) { msntest = Node.SubObject(materialsNode + "/" + materialNode,ii); System.Trace(ii + " " +msntest); if(Node.ConExists(materialsNode + "/" + materialNode + "/" + msntest,"Material")) { materialSubNode = materialsNode + "/" + materialNode + "/" + msntest; contloop = 0; } ii = ii + 1; } curNodeCount = Node.SubObjectCount(materialSubNode); for(findcnt=0;findcnt<curNodeCount;findcnt++) { tempNodeName = Node.SubObject(materialSubNode, findcnt); if(tempNodeName.substr(0,15) == "IME_D3D_Diffuse") { IMEType = "Diffuse"; matNodeName = tempNodeName; } if(tempNodeName.substr(0,13) == "IME_D3D_Phong") { IMEType = "Phong"; matNodeName = tempNodeName; } if(tempNodeName.substr(0,16) == "IME_D3D_Specular") { IMEType = "Specular"; matNodeName = tempNodeName; } if(tempNodeName.substr(0,14) == "IME_D3D_Glossy") { IMEType = "Glossy"; matNodeName = tempNodeName; } if(tempNodeName == "IME_D3D_Script") { IMEType = "Script"; matNodeName = tempNodeName; } } if(IMEType == "Diffuse" || IMEType == "Phong" || IMEType == "Specular" || IMEType == "Glossy") { baseEmission = Node.Value(materialSubNode + "/" + matNodeName, "base_emission"); emission = Node.Value(materialSubNode + "/" + matNodeName, "emission"); layer = Node.Value(materialSubNode + "/" + matNodeName, "layer"); if(IMEType == "Phong") nkdata = Node.Value(materialSubNode + "/" + matNodeName, "nkdata"); if(IMEType == "Specular" || IMEType == "Glossy") { if(Node.Exists(materialSubNode + "/SolidColorShader")) absorption = Node.Value(materialSubNode + "/SolidColorShader", "Color"); else absorption = Node.Value(materialSubNode + "/I_Medium","absorption"); cauchyb = Node.Value(materialSubNode + "/I_Medium","cauchyb"); hemoglobin = Node.Value(materialSubNode + "/I_Medium","hemoglobin"); melblend = Node.Value(materialSubNode + "/I_Medium","melanin_blend"); melfract = Node.Value(materialSubNode + "/I_Medium","melanin_fract"); precedence = Node.Value(materialSubNode + "/I_Medium","precedence"); sssFlag = Node.Value(materialSubNode + "/I_Medium","sss"); sssCoef = Node.Value(materialSubNode + "/I_Medium","sss_coeff"); medtype = Node.Value(materialSubNode + "/I_Medium","type"); if(Node.Exists(materialSubNode + "/CookTorranceModelShader")) medior = Node.Value(materialSubNode + "/CookTorranceModelShader", "RefractionIndex"); else medior = Node.Value(materialSubNode + "/Blinn2", "Specular"); alphaFlag = false; if(Node.Exists(materialSubNode + "/constantAlpha")) { if(Node.ConExists(materialSubNode + "/constantAlpha","AlphaStrength")) { alphas = Node.Value(materialSubNode + "/constantAlpha","AlphaStrength"); if(alphas < 1) alphaFlag = true; } } } } if (IMEType == "Diffuse") { MaterialName = materialNode.replace(", ", ""); ofl.write("\t<material>\n"); ofl.write("\t\t<name>" + MaterialName + "</name>\n"); sigma = Node.Value(materialSubNode + "/" + matNodeName, "sigma"); orenNayar = Node.Value(materialSubNode + "/" + matNodeName, "orenNayar"); transmitter = Node.Value(materialSubNode + "/" + matNodeName, "transmitter"); if(orenNayar) ofl.write("\t\t<oren_nayar>\n"); else if(transmitter) ofl.write("\t\t<diffuse_transmitter>\n"); else ofl.write("\t\t<diffuse>\n"); if(Node.Exists(materialSubNode + "/SolidColorShader")) { //read color values normalized to 1 col = Node.Value(materialSubNode + "/SolidColorShader", "Color"); ofl.write("\t\t\t<albedo>\n"); writeRGB(4, col.GetRed(), col.GetGreen(), col.GetBlue()); ofl.write("\t\t\t</albedo>\n"); if(orenNayar) { ofl.write("\t\t\t<sigma>\n"); ofl.write("\t\t\t\t<constant>"+sigma+"</constant>\n"); ofl.write("\t\t\t</sigma>\n"); } if(emission > 0) { baseEmissionColor = Node.Value(materialSubNode + "/ConstantAmbient", "Color"); ofl.write("\t\t\t<base_emission>\n"); //ofl.write("\t\t\t\t<constant>\n"); tempr = col.GetRed()*emission*baseEmissionColor.GetRed();//solid color * emission * constant ambient color tempg = col.GetGreen()*emission*baseEmissionColor.GetGreen(); tempb = col.GetBlue()*emission*baseEmissionColor.GetBlue(); writeRGB(5, tempr, tempg, tempb); //ofl.write("\t\t\t\t</constant>\n"); ofl.write("\t\t\t</base_emission>\n"); ofl.write("\t\t\t<layer>"+layer+"</layer>\n"); } } if(Node.Exists(materialSubNode + "/ImportColorBitmap")) { Albedo = Node.Value(materialSubNode + "/ImportColorBitmap", "FileName"); ofl.write("\t\t\t<texture>\n"); ofl.write("\t\t\t\t<path>"+Albedo+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); ofl.write("\t\t\t</texture>\n"); ofl.write("\t\t\t<albedo>\n"); ofl.write("\t\t\t\t<texture>\n"); ofl.write("\t\t\t\t\t<texture_index>0</texture_index>\n"); ofl.write("\t\t\t\t</texture>\n"); ofl.write("\t\t\t</albedo>\n"); if(orenNayar) { ofl.write("\t\t\t<sigma>\n"); ofl.write("\t\t\t\t<constant>"+sigma+"</constant>\n"); ofl.write("\t\t\t</sigma>\n"); } if(emission > 0) { baseEmissionColor = Node.Value(materialSubNode + "/ConstantAmbient", "Color"); ofl.write("\t\t\t<base_emission>\n"); tempr = emission*baseEmissionColor.GetRed();//emission * constant ambient color tempg = emission*baseEmissionColor.GetGreen(); tempb = emission*baseEmissionColor.GetBlue(); writeRGB(4, tempr, tempg, tempb); ofl.write("\t\t\t</base_emission>\n"); ofl.write("\t\t\t<emission>\n");//can take constant or texture ofl.write("\t\t\t\t<texture>\n"); ofl.write("\t\t\t\t\t<texture_index>0</texture_index>\n"); ofl.write("\t\t\t\t</texture>\n"); ofl.write("\t\t\t</emission>\n"); ofl.write("\t\t\t<layer>" +layer+"</layer>\n"); } if(!fso.FileExists(Albedo)) fileError = fileError + Albedo + "\n";//Nov 2009 } if(Node.Exists(materialSubNode + "/ImportBumpBitmap")) { BumpMap = Node.Value(materialSubNode + "/ImportBumpBitmap", "FileName"); ofl.write("\t\t\t<texture>\n"); ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); ofl.write("\t\t\t</texture>\n"); ofl.write("\t\t\t<bump>\n"); ofl.write("\t\t\t\t<texture>\n"); ofl.write("\t\t\t\t\t<texture_index>1</texture_index>\n"); ofl.write("\t\t\t\t</texture>\n"); ofl.write("\t\t\t</bump>\n"); if(!fso.FileExists(BumpMap)) fileError = fileError + BumpMap + "\n";//Nov 2009 } if(orenNayar) ofl.write("\t\t</oren_nayar>\n"); else if(transmitter) ofl.write("\t\t</diffuse_transmitter>\n"); else ofl.write("\t\t</diffuse>\n"); ofl.write("\t</material>\n\n"); } else if (IMEType == "Phong") { MaterialName = materialNode.replace(", ", ""); ofl.write("\t<material>\n"); ofl.write("\t\t<name>" + MaterialName + "</name>\n"); ofl.write("\t\t<phong>\n"); if(nkdata != "None") { ofl.write("\t\t\t<nk_data>nkdata/"+nkdata+".nk</nk_data>\n"); } if(Node.Exists(materialSubNode + "/SolidColorShader")) { //read color values normalized to 1 col = Node.Value(materialSubNode + "/SolidColorShader", "Color"); ofl.write("\t\t\t<diffuse_albedo>\n"); writeRGB(4, col.GetRed(), col.GetGreen(), col.GetBlue()); ofl.write("\t\t\t</diffuse_albedo>\n"); if(emission > 0) { baseEmissionColor = Node.Value(materialSubNode + "/ConstantAmbient", "Color"); ofl.write("\t\t\t<base_emission>\n"); //ofl.write("\t\t\t\t<constant>\n"); //writeRGB(5, col.GetRed()*baseEmission, col.GetGreen()*baseEmission, col.GetBlue()*baseEmission); //ofl.write("\t\t\t\t</constant>\n"); tempr = col.GetRed()*emission*baseEmissionColor.GetRed();//solid color * emission * constant ambient color tempg = col.GetGreen()*emission*baseEmissionColor.GetGreen(); tempb = col.GetBlue()*emission*baseEmissionColor.GetBlue(); writeRGB(5, tempr, tempg, tempb); ofl.write("\t\t\t</base_emission>\n"); ofl.write("\t\t\t<layer>"+layer+"</layer>\n"); } } if(Node.Exists(materialSubNode + "/Blinn2")) { ior = Node.Value(materialSubNode + "/Blinn2", "Specular"); ofl.write("\t\t\t<ior>" + ior + "</ior>\n"); expn = Node.Value(materialSubNode + "/Blinn2", "Exponent"); ofl.write("\t\t\t<exponent>\n"); ofl.write("\t\t\t\t<constant>" + expn + "</constant>\n"); ofl.write("\t\t\t</exponent>\n"); } else { ofl.write("\t\t\t<ior>3.0</ior>\n"); ofl.write("\t\t\t<exponent>\n"); ofl.write("\t\t\t\t<constant>50.0</constant>\n"); ofl.write("\t\t\t</exponent>\n"); } if(Node.Exists(materialSubNode + "/ImportColorBitmap")) { Albedo = Node.Value(materialSubNode + "/ImportColorBitmap", "FileName"); ofl.write("\t\t\t<texture>\n"); ofl.write("\t\t\t\t<path>"+Albedo+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); ofl.write("\t\t\t</texture>\n"); //ofl.write("\t\t\t<albedo_texture>\n"); //ofl.write("\t\t\t\t<path>"+Albedo+"</path>\n"); //ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); //ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); //ofl.write("\t\t\t</albedo_texture>\n"); ofl.write("\t\t\t<diffuse_albedo>\n"); ofl.write("\t\t\t\t<texture>\n"); ofl.write("\t\t\t\t\t<texture_index>0</texture_index>\n"); ofl.write("\t\t\t\t</texture>\n"); ofl.write("\t\t\t</diffuse_albedo>\n"); if(emission > 0) { baseEmissionColor = Node.Value(materialSubNode + "/ConstantAmbient", "Color"); ofl.write("\t\t\t<base_emission>\n"); tempr = emission*baseEmissionColor.GetRed();//emission * constant ambient color tempg = emission*baseEmissionColor.GetGreen(); tempb = emission*baseEmissionColor.GetBlue(); writeRGB(4, tempr, tempg, tempb); ofl.write("\t\t\t</base_emission>\n"); ofl.write("\t\t\t<emission>\n");//can take constant or texture ofl.write("\t\t\t\t<texture>\n"); ofl.write("\t\t\t\t\t<texture_index>0</texture_index>\n"); ofl.write("\t\t\t\t</texture>\n"); ofl.write("\t\t\t</emission>\n"); ofl.write("\t\t\t<layer>" +layer+"</layer>\n"); } if(!fso.FileExists(Albedo)) fileError = fileError + Albedo + "\n";//Nov 2009 } if(Node.Exists(materialSubNode + "/ImportBumpBitmap")) { BumpMap = Node.Value(materialSubNode + "/ImportBumpBitmap", "FileName"); ofl.write("\t\t\t<texture>\n"); ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); ofl.write("\t\t\t</texture>\n"); ofl.write("\t\t\t<bump>\n"); ofl.write("\t\t\t\t<texture>\n"); ofl.write("\t\t\t\t\t<texture_index>1</texture_index>\n"); ofl.write("\t\t\t\t</texture>\n"); ofl.write("\t\t\t</bump>\n"); if(!fso.FileExists(BumpMap)) fileError = fileError + BumpMap + "\n";//Nov 2009 } ofl.write("\t\t</phong>\n"); ofl.write("\t</material>\n\n"); } else if (IMEType == "nkdata") { ofl.write("\t<material>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<phong>\n"); ofl.write("\t\t\t<nk_data>nkdata/"+Node.Value(tmp,'nkdata')+".nk</nk_data>\n"); ofl.write("\t\t\t<exponent>"+Node.Value(tmp,'Exponent')+"</exponent>\n"); ofl.write("\t\t</phong>\n"); ofl.write("\t</material>\n\n"); } if (IMEType == "Specular") { MaterialName = materialNode.replace(", ", ""); //specular medium ofl.write("\t<medium>\n"); ofl.write("\t\t<name>" + MaterialName + "medium</name>\n"); ofl.write("\t\t<precedence>"+precedence+"</precedence>\n"); ofl.write("\t\t<"+medtype+">\n"); if(medtype=="dermis") { ofl.write("\t\t\t<hemoglobin_fraction>"+hemoglobin+"</hemoglobin_fraction>\n"); } if(medtype=="epidermis") { ofl.write("\t\t\t<melanin_fraction>"+melfract+"</melanin_fraction>\n"); ofl.write("\t\t\t<melanin_type_blend>"+melblend+"</melanin_type_blend>\n"); } if(medtype=="basic") { ofl.write("\t\t\t<ior>"+medior+"</ior>\n"); ofl.write("\t\t\t<cauchy_b_coeff>"+cauchyb+"</cauchy_b_coeff>\n"); ofl.write("\t\t\t<absorption_coefficient_spectrum>\n"); //writeRGB(4, absorption.GetRed(), absorption.GetGreen(), absorption.GetBlue());//spectrum not a dependent material thing ofl.write("\t\t\t\t<rgb>\n"); ofl.write("\t\t\t\t\t<rgb>" + (1-absorption.GetRed()) + " " + (1-absorption.GetGreen()) + " " + (1-absorption.GetBlue()) + "</rgb>\n"); ofl.write("\t\t\t\t\t<gamma>2.2</gamma>\n"); ofl.write("\t\t\t\t</rgb>\n"); ofl.write("\t\t\t</absorption_coefficient_spectrum>\n"); if(sssFlag) { ofl.write("\t\t\t<subsurface_scattering>\n"); ofl.write("\t\t\t\t<scattering_coefficient_spectrum>\n"); //writeRGB(5, sssCoef.GetRed(), sssCoef.GetGreen(), sssCoef.GetBlue());//spectrum not a dependent material thing ofl.write("\t\t\t\t\t<rgb>\n"); ofl.write("\t\t\t\t\t\t<rgb>" + sssCoef.GetRed()*100 + " " +sssCoef.GetGreen()*100 + " " + sssCoef.GetBlue()*100 + "</rgb>\n"); ofl.write("\t\t\t\t\t\t<gamma>2.2</gamma>\n"); ofl.write("\t\t\t\t\t</rgb>\n"); ofl.write("\t\t\t\t</scattering_coefficient_spectrum>\n"); ofl.write("\t\t\t\t<phase_function>\n"); ofl.write("\t\t\t\t\t<uniform/>\n"); ofl.write("\t\t\t\t</phase_function>\n"); ofl.write("\t\t\t</subsurface_scattering>\n"); } } ofl.write("\t\t</"+medtype+">\n"); ofl.write("\t</medium>\n\n"); //specular material ofl.write("\t<material>\n"); ofl.write("\t\t<name>" + MaterialName + "</name>\n"); ofl.write("\t\t<specular>\n"); ofl.write("\t\t\t<internal_medium_name>"+ MaterialName + "medium</internal_medium_name>\n"); if(alphaFlag) ofl.write("\t\t\t<transparent>true</transparent>\n"); else ofl.write("\t\t\t<transparent>false</transparent>\n"); if(Node.Exists(materialSubNode + "/SolidColorShader")) { //read color values normalized to 1 col = Node.Value(materialSubNode + "/SolidColorShader", "Color"); if(emission > 0) { baseEmissionColor = Node.Value(materialSubNode + "/ConstantAmbient", "Color"); ofl.write("\t\t\t<base_emission>\n"); //ofl.write("\t\t\t\t<constant>\n"); //writeRGB(5, col.GetRed()*baseEmission, col.GetGreen()*baseEmission, col.GetBlue()*baseEmission); tempr = col.GetRed()*emission*baseEmissionColor.GetRed();//solid color * emission * constant ambient color tempg = col.GetGreen()*emission*baseEmissionColor.GetGreen(); tempb = col.GetBlue()*emission*baseEmissionColor.GetBlue(); writeRGB(5, tempr, tempg, tempb); //ofl.write("\t\t\t\t</constant>\n"); ofl.write("\t\t\t</base_emission>\n"); ofl.write("\t\t\t<layer>"+layer+"</layer>\n"); } } if(Node.Exists(materialSubNode + "/ImportBumpBitmap")) { BumpMap = Node.Value(materialSubNode + "/ImportBumpBitmap", "FileName"); //ofl.write("\t\t\t<bump_map>\n"); //ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); //ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); //ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); //ofl.write("\t\t\t</bump_map>\n"); ofl.write("\t\t\t<texture>\n"); ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); ofl.write("\t\t\t</texture>\n"); ofl.write("\t\t\t<bump>\n"); ofl.write("\t\t\t\t<texture>\n"); ofl.write("\t\t\t\t\t<texture_index>0</texture_index>\n"); ofl.write("\t\t\t\t</texture>\n"); ofl.write("\t\t\t</bump>\n"); if(!fso.FileExists(BumpMap)) fileError = fileError + BumpMap + "\n";//Nov 2009 } ofl.write("\t\t</specular>\n"); ofl.write("\t</material>\n\n"); } if (IMEType == "Glossy") { MaterialName = materialNode.replace(", ", ""); //glossy medium ofl.write("\t<medium>\n"); ofl.write("\t\t<name>" + MaterialName + "medium</name>\n"); ofl.write("\t\t<precedence>"+precedence+"</precedence>\n"); ofl.write("\t\t<"+medtype+">\n"); if(medtype=="dermis") { ofl.write("\t\t\t<hemoglobin_fraction>"+hemoglobin+"</hemoglobin_fraction>\n"); } if(medtype=="epidermis") { ofl.write("\t\t\t<melanin_fraction>"+melfract+"</melanin_fraction>\n"); ofl.write("\t\t\t<melanin_type_blend>"+melblend+"</melanin_type_blend>\n"); } if(medtype=="basic") { ofl.write("\t\t\t<ior>"+medior+"</ior>\n"); ofl.write("\t\t\t<cauchy_b_coeff>"+cauchyb+"</cauchy_b_coeff>\n"); ofl.write("\t\t\t<absorption_coefficient_spectrum>\n"); //writeRGB(4, absorption.GetRed(), absorption.GetGreen(), absorption.GetBlue()); ofl.write("\t\t\t\t<rgb>\n"); ofl.write("\t\t\t\t\t<rgb>" + (1-absorption.GetRed()) + " " + (1-absorption.GetGreen()) + " " + (1-absorption.GetBlue()) + "</rgb>\n"); ofl.write("\t\t\t\t\t<gamma>2.2</gamma>\n"); ofl.write("\t\t\t\t</rgb>\n"); ofl.write("\t\t\t</absorption_coefficient_spectrum>\n"); if(sssFlag) { ofl.write("\t\t\t<subsurface_scattering>\n"); ofl.write("\t\t\t\t<scattering_coefficient_spectrum>\n"); //writeRGB(5, sssCoef.GetRed(), sssCoef.GetGreen(), sssCoef.GetBlue()); ofl.write("\t\t\t\t\t<rgb>\n"); ofl.write("\t\t\t\t\t\t<rgb>" + sssCoef.GetRed()*100 + " " +sssCoef.GetGreen()*100 + " " + sssCoef.GetBlue()*100 + "</rgb>\n"); ofl.write("\t\t\t\t\t\t<gamma>2.2</gamma>\n"); ofl.write("\t\t\t\t\t</rgb>\n"); ofl.write("\t\t\t\t</scattering_coefficient_spectrum>\n"); ofl.write("\t\t\t\t<phase_function>\n"); ofl.write("\t\t\t\t\t<uniform/>\n"); ofl.write("\t\t\t\t</phase_function>\n"); ofl.write("\t\t\t</subsurface_scattering>\n"); } } ofl.write("\t\t</"+medtype+">\n"); ofl.write("\t</medium>\n\n"); //glossy material ofl.write("\t<material>\n"); ofl.write("\t\t<name>" + MaterialName + "</name>\n"); ofl.write("\t\t<glossy_transparent>\n"); ofl.write("\t\t<internal_medium_name>"+ MaterialName + "medium</internal_medium_name>\n"); if(Node.Exists(materialSubNode + "/SolidColorShader")) { //read color values normalized to 1 col = Node.Value(materialSubNode + "/SolidColorShader", "Color"); //ofl.write("\t\t\t<diffuse_albedo_spectrum>\n"); //writeRGB(4, col.GetRed(), col.GetGreen(), col.GetBlue()); //ofl.write("\t\t\t</diffuse_albedo_spectrum>\n"); if(emission > 0) { baseEmissionColor = Node.Value(materialSubNode + "/ConstantAmbient", "Color"); ofl.write("\t\t\t<base_emission>\n"); //ofl.write("\t\t\t\t<constant>\n"); //writeRGB(5, col.GetRed()*baseEmission, col.GetGreen()*baseEmission, col.GetBlue()*baseEmission); //ofl.write("\t\t\t\t</constant>\n"); tempr = col.GetRed()*emission*baseEmissionColor.GetRed();//solid color * emission * constant ambient color tempg = col.GetGreen()*emission*baseEmissionColor.GetGreen(); tempb = col.GetBlue()*emission*baseEmissionColor.GetBlue(); writeRGB(5, tempr, tempg, tempb); ofl.write("\t\t\t</base_emission>\n"); ofl.write("\t\t\t<layer>"+layer+"</layer>\n"); } } if(Node.Exists(materialSubNode + "/Blinn2")) { expn = Node.Value(materialSubNode + "/Blinn2", "Exponent"); //ofl.write("\t\t\t<exponent>" + expn + "</exponent>\n"); ofl.write("\t\t\t<exponent>\n"); ofl.write("\t\t\t\t<constant>" + expn + "</constant>\n"); ofl.write("\t\t\t</exponent>\n"); } else { //ofl.write("\t\t\t<exponent>50.0</exponent>\n"); ofl.write("\t\t\t<exponent>\n"); ofl.write("\t\t\t\t<constant>50.0</constant>\n"); ofl.write("\t\t\t</exponent>\n"); } //if(Node.Exists(materialSubNode + "/ImportColorBitmap")) //{ //Albedo = Node.Value(materialSubNode + "/ImportColorBitmap", "FileName"); //ofl.write("\t\t\t<albedo_texture>\n"); //ofl.write("\t\t\t\t<path>"+Albedo+"</path>\n"); //ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); //ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); //ofl.write("\t\t\t</albedo_texture>\n"); //if(baseEmission > 1) //{ //ofl.write("\t\t\t<base_emission>\n"); //ofl.write("\t\t\t\t<texture>\n"); //ofl.write("\t\t\t\t\t<index>0</index>\n");// this is a guess //ofl.write("\t\t\t\t</texture>\n"); //ofl.write("\t\t\t</base_emission>\n"); //ofl.write("\t\t\t<layer>" +layer+"</layer>\n"); //} //if(!fso.FileExists(Albedo)) fileError = fileError + Albedo + "\n";//Nov 2009 //} if(Node.Exists(materialSubNode + "/ImportBumpBitmap")) { BumpMap = Node.Value(materialSubNode + "/ImportBumpBitmap", "FileName"); //ofl.write("\t\t\t<bump_map>\n"); //ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); //ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); //ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); //ofl.write("\t\t\t</bump_map>\n"); ofl.write("\t\t\t<texture>\n"); ofl.write("\t\t\t\t<path>"+BumpMap+"</path>\n"); ofl.write("\t\t\t\t<uv_set>default</uv_set>\n"); ofl.write("\t\t\t\t<exponent>2.2</exponent>\n"); ofl.write("\t\t\t</texture>\n"); ofl.write("\t\t\t<bump>\n"); ofl.write("\t\t\t\t<texture>\n"); ofl.write("\t\t\t\t\t<texture_index>0</texture_index>\n"); ofl.write("\t\t\t\t</texture>\n"); ofl.write("\t\t\t</bump>\n"); if(!fso.FileExists(BumpMap)) fileError = fileError + BumpMap + "\n";//Nov 2009 } ofl.write("\t\t</glossy_transparent>\n"); ofl.write("\t</material>\n\n"); } if (IMEType == "SpecularBasic") { ofl.write("\t<medium>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<precedence>"+Node.Value(tmp,'Precedence')+"</precedence>\n"); ofl.write("\t\t<basic>\n"); ofl.write("\t\t\t<ior>"+Node.Value(tmp,'IOR')+"</ior>\n"); ofl.write("\t\t\t<cauchy_b_coeff>"+Node.Value(tmp,'Cauchy_b_Coefficient')+"</cauchy_b_coeff>\n"); ofl.write("\t\t\t<absorption_coefficient_spectrum>\n"); writeRGB(4, Node.Value(tmp,'Red'), Node.Value(tmp,'Green'), Node.Value(tmp,'Blue')); ofl.write("\t\t\t</absorption_coefficient_spectrum>\n"); if (Node.Value(tmp,'SSS') == true) { ofl.write("\t\t\t<subsurface_scattering>\n"); ofl.write("\t\t\t\t<scattering_coefficient_spectrum>\n"); if (Node.Value(tmp,'ScatteringType') == "RGB") { writeRGB(5, Node.Value(tmp,'SSSR'), Node.Value(tmp,'SSSG'), Node.Value(tmp,'SSSB')); } else { ofl.write("\t\t\t\t\t<uniform>\n"); ofl.write("\t\t\t\t\t\t<value>"+Node.Value(tmp,'SSSUniform')+"</value>\n"); ofl.write("\t\t\t\t\t</uniform>\n"); } ofl.write("\t\t\t\t</scattering_coefficient_spectrum>\n"); ofl.write("\t\t\t\t<phase_function>\n"); ofl.write("\t\t\t\t\t<uniform/>\n"); ofl.write("\t\t\t\t</phase_function>\n"); ofl.write("\t\t\t</subsurface_scattering>\n"); } ofl.write("\t\t</basic>\n"); ofl.write("\t</medium>\n\n"); ofl.write("\t<material>\n"); ofl.write("\t\t<name>"+nowSubObj+"</name>\n"); ofl.write("\t\t<specular>\n"); ofl.write("\t\t\t<transparent>false</transparent>\n"); BumpMap = Node.Value(tmp,'BumpMap'); ofl.write("\t\t</specular>\n"); ofl.write("\t</material>\n\n"); } //undefined indigo material set gray if (IMEType == "") { MaterialName = materialNode.replace(", ", ""); ofl.write("\t<material>\n"); ofl.write("\t\t<name>" + MaterialName + "</name>\n"); ofl.write("\t\t<diffuse>\n"); ofl.write("\t\t<albedo_spectrum>\n"); writeRGB(3, 0.5, 0.5, 0.5); ofl.write("\t\t</albedo_spectrum>\n"); ofl.write("\t\t</diffuse>\n"); ofl.write("\t</material>\n\n"); } else if (IMEType == "Script") { MaterialName = materialNode.replace(", ", ""); var forReading = 1, forWriting = 2, forAppending = 8; scriptfilename = Node.Value(materialSubNode + "/" + matNodeName,"igmFilename"); //check that file exists before using it if(fso.FileExists(scriptfilename)) { scrfl = fso.GetFile(scriptfilename); igmpath = scrfl.ParentFolder; igmfullpath = "<path>" + igmpath + "\\"; connToFile = scrfl.OpenAsTextStream( forReading, 0); //get just filename which is the material name defined in the file(hopefully) justFileName = fso.GetFileName(scriptfilename); justFileTok = justFileName.split("."); justName = justFileTok[0]; //read entire file for pre-processing rline = new Array(); var count = 0; while( !connToFile.AtEndOfStream ) { rline[count] = connToFile.ReadLine(); count++; } connToFile.Close(); for(curcount=0;curcount<count;curcount++) { if(rline[curcount].match("<name>")) nameindex = curcount; } //replace contents of name tag var re = /<|>/g; tempstr = rline[nameindex].split(re); rline[nameindex] = tempstr[0] + "<name>" + MaterialName + "</name>"; //copy contents skipping header and final scenedata tag matstart = false; curcount = 0; while(rline[curcount] != "</scenedata>") { if(rline[curcount] =="<scenedata>") { matstart = true; curcount = curcount + 1; } if(matstart) { //if path adjust it if(rline[curcount].match("<path>")) rline[curcount] = rline[curcount].replace("<path>",igmfullpath); //write the line to ofl ofl.write(rline[curcount]); ofl.write("\n"); } curcount = curcount + 1; } } else { fileError = fileError + scriptfilename + "\n";//Nov 2009 } } } } NScript Object Package/jScript language8dF%stringresolution$- A2xOQ\>Common Data Package/Color Databgcolor -n,Njlpg "Ht  intFilmWidthݏiJmHM@numberApertureRadius.-KJ@5UG&8stringWhiteBalance depJ24vX_numberFocusDistance'T1Nw.ɕstring EnvironmentTypeU׍@`꒘!3numberSkyTurbidityW"_C-zstringOutputFile|QhCMJZƝint0SkylightHorizontalDegreiReJ3Ӈp5int,SkylightVerticalDegre0j,vA `y]GJCommon Data Package/String Enum DataCamList :KrbSxEwq^Lp²EתbooleanAutoFocus |/ؚL2booleanBidirectional ΍@m[intHalt_timelsgSF|booleanLogging k\M/Sy[intDisplay_period[ЦEBC^jint$Image_save_periodGGQMT1booleanSave_igi }mC$pѰintNum_threadsEgnGN7booleanMetropolis ۣHyOstringEnvMapTypejt@J8uKH". stringEnvMapFile~xXK[D GnumberEnvMapGain5/@3 oC)VDintEnvMapWidth3{gH،cAbooleanHybrid YKwr}boolean$SaveTonemappedEXR >ePvA e#boolean(SaveUnTonemappedEXR $+=@oBUihstringexeFiler J3fint resXEu?F\5[int resYgfeDfT?int rrx1Il@˨int rry1_P JJmint rrx27Gqu0int rry2EG*UYJE]vbooleanrenderRegion (-UMҠD/booleanfgAlpha 'H/LFiaz@HoMT^RwL~YYT>g'JNjn*pnCB`@0@2|=Bynj|?z@Hoۙ>?(-UMҠD/ lsgSF|W"_C-z@~xXK[D G\C:\trueSpace761\tS\Textures\alfalfa_color.jpgEG*UYJE]vWEgnGN7Il@˨5/@3 oC)VD>A.-KJ@5UG&8Mb`?4W}@O{ۣHyO |QhCMJZƝ$D:\testenvmap.IGS[ЦEBC^j 2AEHM'>g'JNjn*pnBC`@0@2|=Bynj|?z@Hoۙ>?$- A2xOQ\640x480jt@J8uKH". Lat-Long΍@m[ -1OSM n 럆L<_ї˕CDefault Camera Settings*Environment Settings$Renderer Settings Setupn GFʠN=([v 1 }}r J3fZ`Ez]UO#nKSM2 (([v $}}r J3fбZ`Ez]UO1釥GP>a(8([v 0 }}r J3fZ`Ez]UOOˁ CRih[((([v }}WshShell = new ActiveXObject("WScript.Shell"); try { var bKey = WshShell.RegRead ("HKCU\\Software\\Glare Technologies\\Indigo Renderer\\InstallDirectory"); bKey = bKey + "\\indigo.exe"; Node.Value('%THIS_NAME%','exeFile') = bKey; } catch(err) { System.Alert("Could not find a registry key for indigo install directory"); }*Try Windows RegistryZ`Ez]UO B>I`"2%}} "Ht  Z`Ez]UO GFʠN="`2A }}Background color "Ht  Z`Ez]UOnevG4'`"| }}U׍@`꒘!3HBackground Skylight Env_Map NoneZ`Ez]UO GFʠN=`"@ }}EnvironmentTypeU׍@`꒘!3Z`Ez]UO GFʠN=2`B1 }}W"_C-zZ`Ez]UO1釥GP>a`2B0 }}W"_C-zZ`Ez]UOPN AnqH2BB}}W"_C-z@@o:Z`Ez]UO GFʠN=BRJ }}Skylight Horizontal DegreiReJ3Ӈp5Z`Ez]UO1釥GP>aBR0 }}iReJ3Ӈp5Z`Ez]UOPN AnqHBRB}}iReJ3Ӈp5C?Z`Ez]UO GFʠN=RbH }}Skylight Vertical Degre0j,vA `y]GZ`Ez]UO1釥GP>aRb0 }}0j,vA `y]GZ`Ez]UOPN AnqHRbB}}0j,vA `y]G4C?Z`Ez]UO GFʠN=5}}Environment SettingsZ`Ez]UO GFʠN=hpx3}}Env_Map probe typeZ`Ez]UOnevG4'phx\ }}jt@J8uKH". (Lat-Long SphericalZ`Ez]UO GFʠN=x8; }} Probe File~xXK[D GZ`Ez]UO1釥GP>a0 }}~xXK[D GZ`Ez]UO#nKSM2h$}}~xXK[D GZ`Ez]UO GFʠN=p1 }}5/@3 oC)VDZ`Ez]UO1釥GP>ap0 }}5/@3 oC)VDZ`Ez]UOPN AnqHB}}5/@3 oC)VDK #<Z`Ez]UO GFʠN=pD }}Map Spherical Width3{gH،cAZ`Ez]UO1釥GP>ap0 }}3{gH،cAZ`Ez]UOPN AnqHB}}3{gH،cAo:K?Z`Ez]UO GFʠN=}}fNote: If a skylight is added to the scene the horizontal and vertical will come from it's orientation.Z`Ez]UO GFʠN=JhZxw: }} FilmWidthݏiJmHM@Z`Ez]UO1釥GP>ahJZxw0 }}ݏiJmHM@Z`Ez]UO GFʠN=Zhjxw? }}ApertureRadius.-KJ@5UG&8Z`Ez]UO1釥GP>ahZjxw0 }}.-KJ@5UG&8Z`Ez]UOPN AnqHZjxwB}}.-KJ@5UG&8o:?o:Z`Ez]UOPN AnqHJZxwB}}ݏiJmHM@B?Z`Ez]UOnevG4'hzxw }} depJ24vX_dE D50 D55 D65 D75 A B C 9300 F2 F7 F11Z`Ez]UO GFʠN=zhxw= }} WhiteBalance depJ24vX_Z`Ez]UO GFʠN=jhzxw> }} FocusDistance'T1Nw.ɕZ`Ez]UO1釥GP>ahjzxw0 }}'T1Nw.ɕZ`Ez]UOPN AnqHjzxwB}}'T1Nw.ɕB=Z`Ez]UO GFʠN="xw0}}Camera SettingsZ`Ez]UO1釥GP>axw0 }}|QhCMJZƝZ`Ez]UO GFʠN=:PJxw> }} Active CameraEwq^Lp²EתZ`Ez]UOOˁ CRih[":xws}} scene = Space.CurrentScene(); nSubObj=Node.SubObjectCount(scene); CamCount = 0; for (i=0;i<nSubObj;i++) { nowSubObj = Node.SubObject(scene,i); tmp=scene+"/"+nowSubObj; if (Node.IsCamera(tmp)) CamCount++; } CamListTmp = System.CreateDO('Common Data Package/String Enum Data'); if (CamCount >0) { CamListTmp.SetSize(CamCount); CamCount = 0; for (i=0;i<nSubObj;i++) { nowSubObj = Node.SubObject(scene,i); tmp=scene+"/"+nowSubObj; if (Node.IsCamera(tmp)) { CamListTmp.SetStringAt(CamCount,nowSubObj); CamCount++; } } } else { System.alert('Not camera found on scene!'); CamListTmp.SetSize(0); } if (CamCount > 0) CamListTmp.SetSelectedString(CamListTmp.GetStringAt(0)); Node.Value('%THIS_NAME%','CamList') = CamListTmp;2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>ePvA e#Z`Ez]UO GFʠN=pQ'1 }}$+=@oBUihZ`Ez]UOͽ>fdN*5Ւh`pQ', }}>ePvA e#Z`Ez]UOͽ>fdN*5ՒhpQ', }}$+=@oBUihZ`Ez]UO GFʠN=`Q'1 }}Eu?F\5[Z`Ez]UO1釥GP>a`Q'0 }}Eu?F\5[Z`Ez]UO GFʠN=`Q'1 }}gfeDfT?Z`Ez]UO1釥GP>a`Q'0 }}gfeDfT?Z`Ez]UO GFʠN=xQ'1 }}(-UMҠD/Z`Ez]UOͽ>fdN*5ՒhxQ', }}(-UMҠD/Z`Ez]UO GFʠN=`Q'1 }}Il@˨Z`Ez]UO1釥GP>a`Q'0 }}Il@˨Z`Ez]UO GFʠN=` Q'1 }}_P JJmZ`Ez]UO1釥GP>a` Q'0 }}_P JJmZ`Ez]UO GFʠN= `0Q'1 }}7Gqu0Z`Ez]UO1釥GP>a` 0Q'0 }}7Gqu0Z`Ez]UO GFʠN=0`@Q'1 }}EG*UYJE]vZ`Ez]UO1釥GP>a`0@Q'0 }}EG*UYJE]vZ`Ez]UOOˁ CRih[@XQ'}}Xscene = Space.CurrentScene(); CamList = Node.Value('%THIS_NAME%',"CamList"); ActiveCamera = scene+'/'+CamList.GetSelectedString(); Node.Value("/Scripts/CustomCommands/renderRegion/startRectSelect","scenecamera")=ActiveCamera; Activity.Run("/Scripts/CustomCommands/renderRegion/startRectSelect");*select render regionZ`Ez]UO GFʠN=xQ'1 }}'H/LFiaZ`Ez]UOͽ>fdN*5ՒhxQ', }}'H/LFiaZ`Ez]UO GFʠN=XQ'}}Right Click to end the render region tool. The window measure is a little sticky so select the region at least 2 times before exiting the tool.Z`Ez]UOOˁ CRih[8%}}try{ sadata = System.CreateDO('Clintons3d Package/File Save As data'); } catch(err){ sadata = false; } if(sadata) { sadata.SetName("Indigo Scene Files (*.igs)~*.IGS~All Files (*.*)~*.*~~"); safile = sadata.GetName(); if(safile != "") { Node.Value('%THIS_NAME%',"OutputFile") = safile; Activity.Run('%THIS_NAME%'); } } else Activity.Run('%THIS_NAME%');ExportZ`Ez]UOnevG4'X8H }}$- A2xOQ\V160x120 320x240 640x480 800x600 customZ`Ez]UO GFʠN=8XH; }} Resolution$- A2xOQ\Z`Ez]UO1釥GP>a0 }}|QhCMJZƝZ`Ez]UO GFʠN=`Xp> }} Active CameraEwq^Lp²EתZ`Ez]UOOˁ CRih[H`s}} scene = Space.CurrentScene(); nSubObj=Node.SubObjectCount(scene); CamCount = 0; for (i=0;i<nSubObj;i++) { nowSubObj = Node.SubObject(scene,i); tmp=scene+"/"+nowSubObj; if (Node.IsCamera(tmp)) CamCount++; } CamListTmp = System.CreateDO('Common Data Package/String Enum Data'); if (CamCount >0) { CamListTmp.SetSize(CamCount); CamCount = 0; for (i=0;i<nSubObj;i++) { nowSubObj = Node.SubObject(scene,i); tmp=scene+"/"+nowSubObj; if (Node.IsCamera(tmp)) { CamListTmp.SetStringAt(CamCount,nowSubObj); CamCount++; } } } else { System.alert('Not camera found on scene!'); CamListTmp.SetSize(0); } if (CamCount > 0) CamListTmp.SetSelectedString(CamListTmp.GetStringAt(0)); Node.Value('%THIS_NAME%','CamList') = CamListTmp;2Rescan scene for camerasZ`Ez]UOnevG4'X`p4 }}Ewq^Lp²EתZ`Ez]UO GFʠN=H`!}}Z`Ez]UO GFʠN=H`!}}Z`Ez]UO#nKSM2$}}|QhCMJZƝZ`Ez]UO GFʠN=4}}April 2010 Draft3-aZ`Ez]UOOˁ CRih[p}}UserInterface.OpenToolPanelViewEx2("" , "" ,"Scripts/CustomCommands/packageScene", 4, 1, 0);Scene PackagerZ`Ez]UO}}}}}}}}}}YKwr} Ewq^Lp²Eת:KrbSx2Camera1Camera1'T1Nw.ɕ?(XFҦV>g'JNjn*pn@LDAk@ g@2|=Bynj|?z@Hoۙ>?_P JJm0j,vA `y]G}mC$pѰ k\M/Sy[  depJ24vX_D75ݏiJmHM@#r J3f:D:\indigo_v1.1.18\indigo.exeiReJ3Ӈp58ʯȥJH|o7 gH]kDwP `d8pM*#ͺOYD/tfѭ8Lwb"qp\