Page 1 of 2

camera list?

Posted: Mon Aug 29, 2016 11:32 am
by Jorgensen
hi

i used to use a simple script to list all cameras - but it does not work anymore - and i really miss this feature.

does anyone know of a similar script that works?

how do you switch between, turn on / off - cameras and lights?

thanks
jorgensen

Re: camera list?

Posted: Mon Aug 29, 2016 11:38 am
by oguzbir
There you go.

I can confirm that these work in max 2016.

I did a little update on my lightlister script. Hope that it works on your system.

cheers,

Re: camera list?

Posted: Mon Aug 29, 2016 11:51 am
by Jorgensen
hi oguzbir

i'm not sure what i do wrong - but something :-/

i use the scripts at home - and they work - but here at work - nothing happens....

i use (here at work, not sure at home)
3ds max 2016 sp3 (have not cheked at home)
octane render 3.03.3 - 4.16 for 3ds max
standalone version 3.03.3
windows 7 pro

i have tried to open the maxscript listner window when running the scripts - but nothing happens.
if i run your octane_shotcuts_v4.3 the shortcuts window opens and it states that "Good!! Renderer already set as Octane!" in the maxscript listner window.

edit
and your scripts "create daylight" and "create oct. cam" works fine.

do you know what i have messed up?

thanks
jorgensen

Re: camera list?

Posted: Mon Aug 29, 2016 11:57 am
by oguzbir
I'm as well at sp3 2016
win 10 - Just made the move.

Lets go over them one by one..
So the lightlister does it work the one I just sent?
So does the cam lister? (Not working?)

About my script. it doesnot open?
You edited that you can create dayligght etc. What doesnt work about that script?
open octane viewport.? Does the "Select HDRI" list work are there any hdr names listed there?

Re: camera list?

Posted: Mon Aug 29, 2016 12:10 pm
by Jorgensen
So the lightlister does it work the one I just sent?
if i select Scripting > Run script > OctaneLightLister_v1.4.mcr > open - nothing happens :-(
So does the cam lister? (Not working?)
the same result when i run the camlister.ms
About my script. it doesnot open?
you script opens fine when i open it the same way
You edited that you can create dayligght etc. What doesnt work about that script?
when i press the create daylist button in your shortcut window - it works just fine
open octane viewport.? Does the "Select HDRI" list work are there any hdr names listed there?
it opens fine - and the different hdri's are listed and i can select them hdri's.

jorgensen

Re: camera list?

Posted: Mon Aug 29, 2016 12:20 pm
by oguzbir
Ok.
Solution for the Cam lister and my light lister script. Which is based on the camlister script.

Since all the scripts are macroscripts meaning they are bound to start with a toolbar button or a shortcut key or menu item. That when you first run the script it loads it self in max. Every time you run the script like you do as you say..
it loads the script permamently but nothing seems to happen. but it does.

You have to first create a Toolbar---via-- top menu Customize-----
- Select Customize user interface.
- at Toolbars tab press new give it a name say "Jorgensen"
- Now. On the left panel group ----main ui- Category: Racoonscripts.
- you'll see the cam lister script listed below.
- Drag and drop that to the new toolbar you've created.
- next Find Oguz Birgoren in Category.
- You'll hopefully see Octane shortcuts v4.3 and LightLister
- Drag and drop those script names to the toolbar as well.
- close the customize user interface dialog.
Now You have a toolbar with 3 buttons.
Clicking the buttons will run the scripts.

You do not need to repeat those steps every time.
Let me know if it helps.

Re: camera list?

Posted: Mon Aug 29, 2016 12:30 pm
by Jorgensen
hi ogzubir

i should have said that - that's how i have allways done it.

i have created a toolbar where your script, camlist, lightlist, camlock, lightlock is added - and they all work fint - just not camlist, and lightlist :-/

jorgensen

Re: camera list?

Posted: Mon Aug 29, 2016 12:35 pm
by oguzbir
Jorgensen wrote:hi ogzubir
i should have said that - that's how i have allways done it.
i have created a toolbar where your script, camlist, lightlist, camlock, lightlock is added - and they all work fint - just not camlist, and lightlist :-/
jorgensen
Ok. if you already have a toolbar with buttons.. Right-Click on the button and press edit macroscript.
See if you can access the script.

you can also edit any of the script
And delete
the line macroScript CamLister
and the line category: "RacoonScripts"

So that it can run when you run the script via run script option. or just drag and drop to the viewport.

Re: camera list?

Posted: Mon Aug 29, 2016 1:04 pm
by Jorgensen
hi oguzbir

i have tried that, and also tried to remove scripts from here
C:\Users\brj\AppData\Local\Autodesk\3dsMax\2016 - 64bit\ENU\usermacros
to see if there is somekind of conflict.

if i rightclick the camlist button > edit macro script this pops up

macroScript CamLister
category: "RacoonScripts"
(
try(destroydialog ::CamLister)catch()
CamsFound = #()
CamLister_iso_x = getinisetting "$plugcfg\\RacoonScripts.ini" "CamLister" "pos_x" as integer
CamLister_iso_y = getinisetting "$plugcfg\\RacoonScripts.ini" "CamLister" "pos_y" as integer
CamLister_size_h = (if (tmp = (getinisetting "$plugcfg\\RacoonScripts.ini" "CamLister" "size_h" as integer)) == 0 then 324 else tmp)
CamLister_size_w = (if (tmp = (getinisetting "$plugcfg\\RacoonScripts.ini" "CamLister" "size_w" as integer)) == 0 then 152 else tmp)
numCamsFound = 0

fn updateCams =(
for i in cameras do(
if i.isTarget == false then(
append CamsFound i.name
sort CamsFound
)
else()
)
)

updateCams()

rollout CamLister "Cameras"
(
button btnUpdate "refresh" pos:[-2,-2] width:(CamLister_size_w+10) height:15 border:false
listbox lb_cams "" pos:[-2,13] width:(CamLister_size_w+10) height:(CamLister_size_h/12) items:CamsFound

on btnUpdate pressed do(
CamsFound = #()
updateCams()
lb_cams.items = CamsFound
)

on lb_cams rightclick nameIndex do(
try(
lb_cams.selection = nameIndex
viewport.setCamera (getNodeByName lb_cams.items[nameIndex])
)
catch(
temp = lb_cams.items
deleteItem temp nameIndex
lb_cams.items = temp
)
)

on lb_cams selected nameIndex do(
try(
select (getNodeByName lb_cams.items[nameIndex])
)
catch(
temp = lb_cams.items
deleteItem temp nameIndex
lb_cams.items = temp
)
)

on CamLister close do (
setinisetting "$plugcfg\\RacoonScripts.ini" "CamLister" "pos_x" ((GetDialogPos CamLister).x as string)
setinisetting "$plugcfg\\RacoonScripts.ini" "CamLister" "pos_y" ((GetDialogPos CamLister).y as string)
setinisetting "$plugcfg\\RacoonScripts.ini" "CamLister" "size_w" ((GetDialogSize CamLister).x as string)
setinisetting "$plugcfg\\RacoonScripts.ini" "CamLister" "size_h" ((GetDialogSize CamLister).y as string)
)

on CamLister open do(
lb_cams.width = (GetDialogSize CamLister).x + 5
lb_cams.height = (GetDialogSize CamLister).y - 10
)

on CamLister resized theVal do(
lb_cams.width = theVal.x + 5
lb_cams.height = (theVal.y) - 10
)
)

createdialog CamLister pos:[CamLister_iso_x,CamLister_iso_y] height:(CamLister_size_h) width:(CamLister_size_w) style:#(#style_resizing,#style_sysmenu,#style_titlebar)
)

Re: camera list?

Posted: Mon Aug 29, 2016 1:16 pm
by oguzbir
There might be a conflict.As you say. Hard to know what's going on.
Do this as I said in the last post.
Edit the Camlister script in notepad.
delete these lines.

Code: Select all

macroScript CamLister
category: "RacoonScripts"
( 
And last bracket in the bottom line.

Code: Select all

)
Save the script as .ms file
From now on you can drag and drop the script to the viewport. And it will run immediately.
if you do so it should run right away. But won be able to assign it to a button or shortcut.

Same goes for the lightlister script