Selecting Camera Target

if i have a vray camera selected

i can do

select $'VRayPhysicalCamera01.Target'

to select the target,
but how do i change the code to select a target of a camera named differently?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
W DIGITAL's picture

ok and the answer for that

ok and the answer for that was
select o.target

:)

Anubis's picture

is this you ask for?

trg = selection[1].target
if trg != undefined do select trg

my recent MAXScripts RSS (archive here)

W DIGITAL's picture

thanks anubis ill try that

thanks anubis ill try that too

W DIGITAL's picture

so the question is rather,

so the question is rather, how i replace the string vrayphysicalcamera01 with a variable that is defined in the script

local theSel = lbx_VcamObjects.selection as array

this is what i use to get all vray cameras in scene,

and this is for example what i do when i want to turn clipping on, in any selected camera

on chk_onClip changed state do
					(
						for o in getSelectedVrayPhysicalCamera() do o.clip_on = state
						updateControls()
					)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.