aqui lo tienes!!!
sub cubo(in_obj)
fselect in_obj, "cubo"
end sub
sub cono(in_obj)
fselect in_obj, "cono"
end sub
function checkCollision(inObj)
dim sel, elem
set sel = GetValue("SelectionList")
SelectChildNodes
for each elem in Selection
if elem = inObj then
checkCollision = True
SelectObj sel
exit function
end if
next
checkCollision = False
SelectObj sel
end function
function fselect(in_obj, inName)
set oRoot = Application.ActiveProject.ActiveScene.Root
set myObj = oRoot.FindChild(in_obj)
GetKeyboardState , modKey
select case CByte(modKey)
case 0 ' "Nothing Selected"
SelectObj myObj.model & "." & inName
case 1 logmessage "Shift"
'check the object isn't already selected
if checkCollision(myObj.model.FindChild(inName)) = False then
AddToSelection myObj.model & "." & inName
end if
case 2 ' "Ctrl"
ToggleSelection myObj.model & "." & inName
case 3 ' "Shift/Ctrl"
RemoveFromSelection myObj.model & "." & inName
case 4 ' "Alt"
SelectObj myObj.model & "." & inName, "BRANCH", True
case 5 ' "Alt/Shift"
'check the object isn't already selected
if checkCollision(myObj.model.FindChild(inName)) = False then
AddToSelection myObj.model & "." & inName, "BRANCH", True
end if
case 6 ' "Alt/Ctrl"
ToggleSelection myObj.model & "." & inName, "BRANCH", True
case 7 ' "Alt/Shift/Ctrl"
RemoveFromSelection myObj.model & "." & inName
end select
end function