sub BindAOICE2OBJ( oObj ) set compound = Dictionary.GetObject( oObj & ".ICETree.Ambient_Occlusion_with_Light", false ) if typename(compound) = "Nothing" then set iceOp = ApplyOp("ICETree", oObj, siNode, null, null, 0) AddICECompoundNode "Ambient Occlusion with Light", iceOp ConnectICENodes iceOp & ".port1", iceOp &".Ambient_Occlusion_with_Light.Execute" end if end sub sub BindGroupToAOICE2OBJ( obj ) if typename( obj ) <> "Group" then logmessage "You must select Group." exit sub end if set oGrp = obj for i=0 to oGrp.Members.Count - 1 set oObj = oGrp.Members.Item( i ) BindAOICE2OBJ oObj next end sub sub BindSelectionAOICE2OBJ( ) for i=0 to Selection.Count - 1 set oObj = Selection.Item( i ) BindAOICE2OBJ oObj next end sub ' BindGroupToAOICE2OBJ( Selection(0) ) BindSelectionAOICE2OBJ