-- Octane toolbox V0.14e - probably will get errors if no octane installed -- noise bump broke -- -- made with 3ds max 2015 renderers.current -- will use to check in the future clearlistener() try destroyDialog oTools catch() LightsFound = #() LightLister_iso_x = getinisetting "$plugcfg\\OguzScripts.ini" "LightLister" "pos_x" as integer LightLister_iso_y = getinisetting "$plugcfg\\OguzScripts.ini" "LightLister" "pos_y" as integer LightLister_size_h = (if (tmp = (getinisetting "$plugcfg\\OguzScripts.ini" "LightLister" "size_h" as integer)) == 0 then 324 else tmp) LightLister_size_w = (if (tmp = (getinisetting "$plugcfg\\OguzScripts.ini" "LightLister" "size_w" as integer)) == 0 then 152 else tmp) numLightsFound = 0 fn updatelightors =( for i in lights do( if i.isTarget == false then( append LightsFound i.name sort LightsFound ) else() ) ) rollout oTools "Octane toolbox" width:821 height:409 ( button btn1 "Octane cam from view" pos:[8,28] width:168 height:40 button btn2 "Octane Daylight" pos:[8,68] width:168 height:22 button btn3 "Live DB" pos:[8,108] width:168 height:40 button btn4 "Material Conversion" pos:[8,149] width:168 height:40 button btn5 "Octane properties" pos:[8,189] width:168 height:20 button btn6 "Octane Viewport" pos:[8,229] width:168 height:40 button btn7 "Renderer to Octane" pos:[8,269] width:168 height:40 button btn8 "Octane lights" pos:[189,28] width:168 height:40 enabled:false button btn9 "Studio backdrop" pos:[189,68] width:168 height:40 button btn10 "Octane properties - by Oguz " pos:[189,108] width:168 height:40 toolTip:"Run external script for octane properties" button btn11 "Lightlister - by Oguz" pos:[188,148] width:168 height:40 enabled:true button btn12 "Render setup" pos:[8,309] width:168 height:40 button diffuseMat "selected to diffuse+wirecolor" pos:[377,28] width:168 height:20 enabled:true toolTip:"switches to diffuse and applies wirecolor" button glossyMat "selected to glossy+wirecolor" pos:[377,47] width:168 height:20 toolTip:"switches to glossy and applies wirecolor" button specularMat "selected to specular+wirecolor" pos:[377,68] width:168 height:20 toolTip:"switches to specular and applies wirecolor to transmission" colorPicker diffuseCP "diffuse:" pos:[383,110] width:111 height:20 color:(color 254.93 144.438 89.8387) modal:false button assignDiffuse "apply" pos:[506,110] width:36 height:20 colorPicker glossyCP "glossy: " pos:[383,135] width:111 height:20 color:(color 84.2248 163.823 172.149) modal:false button assignGlossy "apply" pos:[506,135] width:36 height:20 --create button --create button colorPicker specularCP "spec: " pos:[383,160] width:111 height:20 color:(color 255 255 255) modal:false button assignSpecular "apply" pos:[506,160] width:36 height:20 --create button --create button GroupBox grp1 "selected objects to octane material:" pos:[368,8] width:183 height:255 enabled:true GroupBox grp2 "Interactive Gradient:" pos:[381,184] width:154 height:42 colorPicker cp1 "" pos:[385,203] width:60 height:18 color:(color 104.76 90.5422 156.433) across:2 colorPicker cp2 "" pos:[466,201] width:60 height:18 color:(color 18.4371 173.876 231.616) --[255,255,0] button randomColor "Random color" pos:[377,231] width:72 height:22 toolTip:"Change to random diffuse" edittext BASE_NAME "" pos:[373,306] width:176 height:17 button rename_them "Rename selected obj" pos:[371,324] width:179 height:18 button openMaterialEditor "Open material editor" pos:[371,342] width:179 height:19 button selectSun "Select Sun" pos:[8,91] width:168 height:18 enabled:true button toGlossy_bump "to glossy with>" pos:[557,44] width:100 height:20 toolTip:"convert selected octane material with settings on the right" button select_Instances "Select instances" pos:[371,364] width:179 height:20 toolTip:"select instances of the selected object" button Instance_identical "Identical geometry to instance" pos:[371,384] width:179 height:20 toolTip:"convert all identical geometry to instances (scriptsnip by Anubis)" slider sld1 " interactive bump" pos:[692,111] width:93 height:44 enabled:true range:[0,1,0] type:#float orient:#horizontal ticks:0.1 spinner glossyIndex "glossy index" pos:[722,31] width:58 height:16 range:[1,8,1.45] type:#float scale:0.1 spinner roughnessSpn "roughness" pos:[722,49] width:58 height:16 range:[0,1,0] type:#float scale:0.01 spinner spnEdgeRounding "edge rounding" pos:[722,66] width:55 height:16 range:[0,1,0] type:#float scale:0.001 spinner bumpVal "bump" pos:[726,86] width:50 height:16 range:[0,1,0] type:#float scale:0.1 button random_HSV "HSV randomizer" pos:[450,231] width:83 height:22 toolTip:"Open HSV randomizer" button HDRI "Texture environment to mat slot 1" pos:[189,189] width:168 height:40 enabled:true button Environment "set environment to white" pos:[189,229] width:168 height:19 enabled:true colorPicker enironmentCP "set environment color" pos:[191,250] width:164 height:20 enabled:true color:(color 255 255 255) title:"Choose a color" modal:false button toSpecularWith "to specular with>" pos:[557,66] width:100 height:20 toolTip:"convert selected octane material with settings on the right" GroupBox grp19 "selected to octane material with settings" pos:[554,5] width:232 height:257 enabled:true GroupBox grp4 "object tools" pos:[368,265] width:184 height:141 enabled:true button toDiffuseWith "to diffuse with>" pos:[557,23] width:100 height:20 toolTip:"convert selected octane material with settings on the right" button CenterPivot "Center pivot of object" pos:[371,283] width:179 height:20 toolTip:"centers object pivot" /* Instance Identical Geometry v.2.0 [2010-06-03] by Anubis [project3d.narod.ru] What's new in version 2.0 : [*] proccess multiple (selected) objects at once [*] rollout (with pick button) removed [*] the script rewritten as macros To be instanced nodes need to match this criterions: identical class, face/verts count, scale You could expand it with more... (see the notes in the code) */ /* macroScript Instance_Identical_Geometry * buttonText:"Instance Identical Geometry" * category:"Tools" * internalCategory:"Tools" * tooltip:"Instance Identical Geometry" */ button moveable_proxy "To moveable proxy" pos:[8,210] width:168 height:20 on oTools close do ( if LightLister != undefined do destroyDialog LightLister if ObjectPropsers != undefined do destroyDialog ObjectPropsers gc -- call garbage collecting ) on btn1 pressed do ( (max vpt persp user -- swtich to perspective cameracamera pos:[122.819,127.065,0] response:54 aperture:0 gamma:2.2 isSelected:on target:(Targetobject transform:(matrix3 [1,0,0] [0,1,0] [0,0,1] [63.2738,51.477,0])) ) -- create octane camera macros.run "Lights and Cameras" "Camera_CreateFromView" actionMan.executeAction 0 "40068" -- Views: Camera View ) -- use C - zoom to selected camera on btn2 pressed do ( oSun = Daylightlight pos:[0,50,50] Sun_Size:20 freeze:on target:(Targetobject transform:(matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])) -- create octane daylight object. --selectSun.enabled = true freeze oSun ) on btn3 pressed do ( actionMan.executeAction 982383860 "3289" ) -- Octane: Live DB on btn4 pressed do ( actionMan.executeAction 982383860 "7394" ) -- Octane: Material Conversion on btn5 pressed do ( actionMan.executeAction 982383860 "2398" ) -- Octane: Octane properties on btn6 pressed do ( actionMan.executeAction 982383860 "2642" ) -- Octane: Open Octane Viewport on btn7 pressed do ( renderers.current = Octane3dsmax () ) -- assign renderer to octane3dsmax on btn9 pressed do ( -- stupid chamferbox to studio backdrop - delete extra faces to make a studio drop - note to user manipulate size via chamferbox settings - maybe add additional size change buttons for lazy users studioset = ChamferBox Length_Segments:1 Width_Segments:1 Height_Segments:1 Fillet_Segments:14 rotate:(angleaxis -90 [0,0,1]) length:600 width:600 height:600 Fillet:15 smooth:1 mapcoords:1 pos:[0,0,0] isSelected:on -- chamferbox ep = Edit_Poly() addModifier studioset ep -- edit poly of chamferbox -- modPanel.setCurrentObject ep -- set the Edit_Poly as the current level select studioset max modify mode subObjectLevel = 4 -- switch to poly level studioset.modifiers[#Edit_Poly].Select #Face #{1..855, 857..915, 917..975, 977..1035, 1037..1095, 1097..1155, 1157..1215, 1217..1275, 1277..1335, 1337..1395, 1397..1455, 1457..1515, 1517..1575, 1577..1635, 1637..1695, 1697..1741} -- select faces studioset.modifiers[#Edit_Poly].ButtonOp #DeleteFace -- delete faces max select all studioset.modifiers[#Edit_Poly].ButtonOp #FlipFace -- flipfaces subobjectLevel = 0 -- exit edit poly ) on btn10 pressed do ( -- Oguz obj visibily script pasted - could have done a filein "script.ms" - prefer to run everything from script/* global ObjectPropsers rollout ObjectPropsers "Obj-Vis" width:160 height:90 ( Checkbox renderabled "Renderable" pos:[4,32] Label nammers "- Object Props -" pos:[10,8] color:(color 190 100 100) Checkbox visibletocam "Visible to Cam" pos:[4,50] Checkbox reflections "Visible to Ref" pos:[4,67] Checkbox castshadows "Cast Shadows" pos:[4,85] checkbutton basbas "Movable Proxy" align:#left height:24 width:92 pos:[2,110] highlightColor:(color 155 53 51) HyperLink homepage "www.oguzbir.com" align:#center height:15 address:"http://www.oguzbir.com/illustrations.htm" color:(color 100 100 100) hovercolor:(color 250 100 150) visitedcolor:(color 100 100 100) Label copywrights "© 2013" fn updateRefresher = ( for yy in selection do ( if yy.primaryVisibility==false then visibletocam.state=false else visibletocam.state=true ) for tt in selection do ( if tt.secondaryVisibility==false then reflections.state=false else reflections.state=true ) for yy in selection do ( if yy.primaryVisibility==false then visibletocam.state=false else visibletocam.state=true ) for rr in selection do ( if rr.renderable==false then renderabled.state=false else renderabled.state=true ) for zz in selection do ( if zz.castShadows==false then castshadows.state=false else castshadows.state=true ) for trty in selection do ( if getUserProp trty "octane_movable_proy" == undefined then basbas.checked=false if getUserProp trty "octane_movable_proy" == True then basbas.checked=true if getUserProp trty "octane_movable_proy" == False then basbas.checked=false ) ) on ObjectPropsers open do ( callbacks.removescripts id:#Rollout_Updaters callbacks.addScript #selectionSetChanged "ObjectPropsers.updateRefresher()" id:#Rollout_Updaters updateRefresher() ) on ObjectPropsers close do callbacks.removeScripts id:#Rollout_Updaters on octaneprop pressed do ( actionMan.executeAction 982383860 "2398" ) on castshadows changed theState do ( for hh in selection do (if castshadows.state==false then hh.castShadows=false else hh.castShadows=true) ) on renderabled changed theState do ( for rrr in selection do (if renderabled.state==false then rrr.renderable=false else rrr.renderable=true) ) on visibletocam changed theState do ( for ttt in selection do (if visibletocam.state==false then ttt.primaryVisibility=false else ttt.primaryVisibility=true) ) on reflections changed theState do ( for tyt in selection do (if reflections.state==false then tyt.secondaryVisibility=false else tyt.secondaryVisibility=true) ) on basbas changed status do ( if status == on then (setUserProp selection "octane_movable_proy" true as string) else (setUserProp selection "octane_movable_proy" False as string) ) ) createdialog ObjectPropsers width:95 height:180 ) on btn11 pressed do ( -- Oguz light lister script pasted here try(destroydialog ::LightLister)catch() updatelightors() rollout LightLister "Octane Light Select 1.4" ( checkbutton btn_LightOn "Light On/Off" pos:[5,5] highlightColor:green button btnUpdate "REFRESH" pos:[96,5] width:62 border:true button SetSamplebtn "Samples 10000" pos:[166,5] width:92 listbox lb_lightors "" pos:[-2,30] width:(LightLister_size_w+10) height:(LightLister_size_h/12) items:LightsFound on btnUpdate pressed do( LightsFound = #() updatelightors() lb_lightors.items = LightsFound ) on SetSamplebtn pressed do ( for l in selection where superclassof l==light do l.Samples=10000 ) on btn_LightOn changed theState do ( if theState == true then for l in selection where superclassof l==light do l.enabled=true else for l in selection where superclassof l==light do l.enabled=false ) on lb_lightors selected nameIndex do( try( select (getNodeByName lb_lightors.items[nameIndex]) if (getNodeByName lb_lightors.items[nameIndex]).enabled == true Then btn_LightOn.checked = true else btn_LightOn.checked = false ) catch( temp = lb_lightors.items deleteItem temp nameIndex lb_lightors.items = temp ) ) on LightLister close do ( setinisetting "$plugcfg\\OguzScripts.ini" "LightLister" "pos_x" ((GetDialogPos LightLister).x as string) setinisetting "$plugcfg\\OguzScripts.ini" "LightLister" "pos_y" ((GetDialogPos LightLister).y as string) setinisetting "$plugcfg\\OguzScripts.ini" "LightLister" "size_w" ((GetDialogSize LightLister).x as string) setinisetting "$plugcfg\\OguzScripts.ini" "LightLister" "size_h" ((GetDialogSize LightLister).y as string) ) on LightLister open do( lb_lightors.width = (GetDialogSize LightLister).x + 5 lb_lightors.height = (GetDialogSize LightLister).y - 10 ) on LightLister resized theVal do( lb_lightors.width = theVal.x + 5 lb_lightors.height = (theVal.y) - 10 ) ) createdialog LightLister pos:[LightLister_iso_x,LightLister_iso_y] height:(LightLister_size_h) width:(LightLister_size_w) style:#(#style_resizing,#style_sysmenu,#style_titlebar) ) on btn12 pressed do ( actionMan.executeAction 0 "60010" ) -- Render: Render SetUp( actionMan.executeAction 0 "60010" ) -- Render: Render SetUp on diffuseMat pressed do -- diffuse mat button for i = 1 to selection.count do selection[i].material = Diffuse_Material diffuse_color:selection[i].wirecolor on glossyMat pressed do for i = 1 to selection.count do selection[i].material = Glossy_Material roughness_value:roughnessSpn.value diffuse_color:selection[i].wirecolor -- selection is the same as $ apparently only not on specularMat pressed do ( for i = 1 to selection.count do ( selection[i].material = Specular_Material transmission_input_type:1 transmission_color:selection[i].wirecolor normal_input_type:0 -- octane specular material ) ) on diffuseCP changed new_col do -- diffuse colorpicker interactive switcher ( selection.wirecolor = new_col selection.material = Diffuse_Material diffuse_color:diffuseCP.color -- set material to octane diffuse ) on assignDiffuse pressed do -- the apply button ( selection.material = Diffuse_Material diffuse_color:diffuseCP.color -- set material to octane diffuse selection.wirecolor = diffuseCP.color ) on glossyCP changed new_col do -- glossy colorpicker interactive switcher ( selection.wirecolor = new_col selection.material = Glossy_Material diffuse_color:glossyCP.color -- set material to octane diffuse ) on assignGlossy pressed do -- the apply button ( selection.material = Glossy_Material diffuse_color:glossyCP.color -- set material to octane diffuse selection.wirecolor = glossyCP.color ) on specularCP changed new_col do -- glossy colorpicker interactive switcher ( selection.wirecolor = new_col selection.material = specular_Material transmission_input_type:1 transmission_color:specularCP.color normal_input_type:0 -- set material to octane diffuse ) on assignSpecular pressed do -- the apply button ( selection.material = specular_Material transmission_input_type:1 transmission_color:specularCP.color normal_input_type:0 -- set material to octane diffuse selection.wirecolor = specularCP.color ) on cp1 changed val do ( print (val as point4) -- Point4 is MR Colors print (val as point3) -- Point3 is RGB Colors color_01 = cp1.color color_02 = cp2.color stepsize_r = (color_02.r - color_01.r)/selection.count stepsize_g = (color_02.g - color_01.g)/selection.count stepsize_b = (color_02.b - color_01.b)/selection.count for i = 1 to selection.count do ( newColor = (color ((i*stepsize_r)+ color_01.r-stepsize_r) ((i*stepsize_g)+color_01.g-stepsize_g) ((i*stepsize_b)+color_01.b-stepsize_b)) selection[i].wirecolor = newColor selection[i].material = Diffuse_Material diffuse_color:selection[i].wirecolor ) ) on cp2 changed val do ( print (val as point4) -- Point4 is MR Colors print (val as point3) -- Point3 is RGB Colors color_01 = cp1.color color_02 = cp2.color stepsize_r = (color_02.r - color_01.r)/selection.count stepsize_g = (color_02.g - color_01.g)/selection.count stepsize_b = (color_02.b - color_01.b)/selection.count for i = 1 to selection.count do ( newColor = (color ((i*stepsize_r)+ color_01.r-stepsize_r) ((i*stepsize_g)+color_01.g-stepsize_g) ((i*stepsize_b)+color_01.b-stepsize_b)) selection[i].wirecolor = newColor selection[i].material = Diffuse_Material diffuse_color:selection[i].wirecolor ) ) on randomColor pressed do ( color_01 = cp1.color color_02 = cp2.color stepsize_r = (color_02.r - color_01.r)/selection.count stepsize_g = (color_02.g - color_01.g)/selection.count stepsize_b = (color_02.b - color_01.b)/selection.count for i =1 to selection.count do ( newColor = (color ((i*stepsize_r)+ color_01.r-stepsize_r) ((i*stepsize_g)+color_01.g-stepsize_g) ((i*stepsize_b)+color_01.b-stepsize_b)) tempColor = color 0 0 0 tempColor.v = random cp1.color.v cp2.color.v -- needs this exact same order in order to run properly tempColor.s = random cp1.color.s cp2.color.s tempColor.h = random newColor.h cp2.color.h -- tempColor.h = random cp1.color.h cp2.color.h selection[i].wirecolor = tempcolor selection[i].material = Diffuse_Material diffuse_color:selection[i].wirecolor format "tempcolor.h hue: % \n" tempcolor.h format "newcolor: % \n" newcolor format "stepsize_g % \n" stepsize_g ) ) on rename_them pressed do ( if base_name.text != "" do for i in selection do i.name = uniquename base_name.text )--end on on openMaterialEditor pressed do actionMan.executeAction 0 "50048" -- Tools: Material Editor Toggle on selectSun pressed do ( if not (isvalidnode $OctaneDayLight_001) then -- if no octanedaylight deselect select sun button and send message ( --selectSun.enabled = false messageBox "No octane Sun in scene" beep:false ) else select $OctaneDayLight_001 ) -- select octane daylight object on toGlossy_bump pressed do for ai in selection do ( --print ai.material.bump_input_type --diffuse_color:selection[i].wirecolor roughness_value:roughnessSpn.value index:glossyIndex.value -- selection[i].material = glossy_Material diffuse_color:selection[i].wirecolor roughness_value:roughnessSpn.value index:glossyIndex.value bump_input_type:2 bump_tex:(Marble_Texture power_value:bumpVal.value) showInViewport:true ai.material = glossy_Material diffuse_color:ai.wirecolor bump_input_type:2 edgesRounding:spnEdgeRounding.value roughness_value:roughnessSpn.value index:glossyIndex.value bump_input_type:2 -- bump_tex:Marble_Texture power_value:bumpVal.value showInViewport:true --ai.material.edgesRounding = spnEdgeRounding.value --ai.material.bump_input_type = 2 -- ai.material.bump_tex = Marble_Texture sld1.value = bumpVal.value ) on select_Instances pressed do ( escapeEnable = true ss = selection as array ss2 = selection as array exclud = #(0) for i=1 to ss.count do ( if findItem exclud i != 0 do continue InstanceMgr.GetInstances ss[i] &instances for j in instances do ( k = findItem ss j if k != 0 do ( appendIfUnique exclud k continue ) if findItem ss2 j != 0 do continue if j.isHiddenInVpt==false do ( ss2 = ss2 + j ) ) ) select ss2 print "Sel.Inst. Done" ) on Instance_identical pressed do ( /* Instance Identical Geometry v.1.0 [2010-02-27] by Anubis [project3d.narod.ru] To be instanced nodes need to match this criterions: identical class, face/verts count, scale You could expand it with more... (see the notes in the code) */ if ro_InstanceIdenticalGeometry != undefined do if classOf ro_InstanceIdenticalGeometry == RolloutClass do destroyDialog ro_InstanceIdenticalGeometry rollout ro_InstanceIdenticalGeometry "Instance Identical Geometry" ( local identical = #() --filter all geometry objects fn geo_filt obj = ((getPolygonCount obj) as string != "#(0, 0)") group "Pick Source Object" ( pickButton pbt_srcObj "None" width:180 filter:geo_filt autoDisplay:true ) label lbl_found "Identical Objects Found: 0" button btn_do "Make Them Instance" width:180 on pbt_srcObj picked obj do ( if obj != undefined do ( -- array of properties to be compared // you could expand it with more... srcData = #( classOf obj, (getPolygonCount obj) as string, obj.scale ) -- collect identical identical = for i in geometry where \ not areNodesInstances obj i and \ classOf i == srcData[1] and \ (getPolygonCount i) as string == srcData[2] and \ i.scale == srcData[3] collect i if identical.count > 0 do lbl_found.text = "Identical Objects Found: " + (identical.count as string) --// BEDUG: for i in identical do print i ) ) on btn_do pressed do ( srcObj = pbt_srcObj.object if identical.count > 0 and isValidNode srcObj do instanceReplace identical srcObj -- mapped ) ) createDialog ro_InstanceIdenticalGeometry 230 100 ) on sld1 changed buttonup do ( for i in selection do ( i.material = glossy_Material diffuse_color:i.wirecolor roughness_value:roughnessSpn.value index:glossyIndex.value normal_input_type:0 bump_input_type:2 -- bump_tex:Turbulence_texture power_value:sld1.value showInViewport:true bumpVal.value = sld1.value --i.material.bump_tex = Turbulence_texture ) ) on random_HSV pressed do ( clearlistener() try (destroydialog RandomWirecolorHSV) catch() rollout RandomWirecolorHSV "Random Wirecolor HSV" ( label huelabel "Hue Range" align:#left across:3 spinner spn_huelow range:[0,255,0] type:#integer width:40 align:#right spinner spn_huehigh range:[0,255,255] type:#integer width:40 align:#right label satlabel "Sat Range" align:#left across:3 spinner spn_satlow range:[0,255,0] type:#integer width:40 align:#right spinner spn_sathigh range:[0,255,255] type:#integer width:40 align:#right label vallabel "Val Range" align:#left across:3 spinner spn_vallow range:[0,255,0] type:#integer width:40 align:#right spinner spn_valhigh range:[0,255,255] type:#integer width:40 align:#right button btn_randomise "Randomise selected to diffusemap" fn checkLow &lowVal &highVal = ( if lowVal > highVal do ( highval = lowval ) ) fn checkHigh &lowVal &highVal = ( if lowVal > highVal do ( lowval = highval ) ) on spn_huelow changed huelowval do ( checkLow &spn_huelow.value &spn_huehigh.value ) on spn_huehigh changed huehighval do ( checkHigh &spn_huelow.value &spn_huehigh.value ) on spn_satlow changed satlowval do ( checkLow &spn_satlow.value &spn_sathigh.value ) on spn_sathigh changed sathighval do ( checkHigh &spn_satlow.value &spn_sathigh.value ) on spn_vallow changed vallowval do ( checkLow &spn_vallow.value &spn_valhigh.value ) on spn_valhigh changed valhighval do ( checkHigh &spn_vallow.value &spn_valhigh.value ) on btn_randomise pressed do ( for i in selection do ( hue = (random spn_huelow.value spn_huehigh.value) sat = (random spn_satlow.value spn_sathigh.value) val = (random spn_vallow.value spn_valhigh.value) tempColor = color 0 0 0 tempColor.v = val tempColor.s = sat tempColor.h = hue i.wirecolor = tempColor i.material = Diffuse_Material diffuse_color:i.wirecolor ) ) ) createdialog RandomWirecolorHSV 185 92 ) on HDRI pressed do ( actionMan.executeAction 0 "40029" a = Texture_Environment texture_input_type: 2 --texture_tex: (RGB_Image) environmentMap = a meditMaterials[1] = a ) on Environment pressed do backgroundColor = white on enironmentCP changed new_col do -- diffuse colorpicker interactive switcher ( selection.wirecolor = new_col backgroundColor = enironmentCP.color -- set material to octane diffuse ) on toSpecularWith pressed do for ai in selection do ( ai.material = Specular_Material transmission_input_type:1 transmission_color:ai.wirecolor bump_input_type:2 edgesRounding:spnEdgeRounding.value roughness_value:roughnessSpn.value index:glossyIndex.value bump_input_type:2 --bump_tex:Marble_Texture -- power_value:bumpVal.value showInViewport:true --ai.material.edgesRounding = spnEdgeRounding.value --ai.material.bump_input_type = 2 -- ai.material.bump_tex = Marble_Texture sld1.value = bumpVal.value ) on toDiffuseWith pressed do for ai in selection do ( --print ai.material.bump_input_type --diffuse_color:selection[i].wirecolor roughness_value:roughnessSpn.value index:glossyIndex.value -- selection[i].material = glossy_Material diffuse_color:selection[i].wirecolor roughness_value:roughnessSpn.value index:glossyIndex.value bump_input_type:2 bump_tex:(Marble_Texture power_value:bumpVal.value) showInViewport:true ai.material = diffuse_Material diffuse_color:ai.wirecolor roughness_value:roughnessSpn.value bump_input_type:2 edgesRounding:spnEdgeRounding.value index:glossyIndex.value bump_input_type:2 --bump_tex:Marble_Texture -- power_value:bumpVal.value showInViewport:true -- ai.material.edgesRounding = spnEdgeRounding.value -- ai.material.bump_input_type = 2 -- ai.material.bump_tex = Marble_Texture sld1.value = bumpVal.value ) on CenterPivot pressed do $.pivot = $.center on moveable_proxy pressed do ( setUserProp selection "octane_movable_proy" true as string ) -- set movable proxy to on ) CreateDialog oTools