ScriptSpot

Forum topic · General Scripting

Select Camera and Target at the same time

By MFawzi · 2020-07-30

Description

Hi there,
let say i am using vray camera and it is already selected, how can i + select the target also so i can move them up or forward while i am viewing from camera.

Normally i hit (P) and select the camera (Ctrl) select target and then hit (C) to get back to the camera view to move to accordingly to what i am seeing.

have been searching for along time, all i found is how to select Camera (OR) select target.
Thanks in advance

Comments (6)

MFawzi · 2020-07-30

Thanks jahman it works fine, Thanks A LOT
can it be done without selecting the cam?

.

jahman · 2020-07-30

sure


try
(
  cam = getActiveCamera(); if cam != undefined do
  (
    select (if cam.target != undefined then #( cam, cam.target ) else cam)
  )
)catch()

MFawzi · 2020-07-31

it gives me this:

-- Syntax error: at ), expected
-- In line: )c

.. am i doing it wrong?

.

jahman · 2020-07-31

this code works for me
most likely that one of the parenthesis is missing

MFawzi · 2020-08-03

Never mind my friend, and a THANK YOU for every time i hit this button :)

 

.

jahman · 2020-07-30

try( selectMore $.target )catch()