PDA

View Full Version : Different monitor resolutions change UI panels



ernpchan
06-22-2015, 10:41 PM
I notice that my ui panel items will change as they get used on different monitor resolutions. I'm not talking about small harmless changes like a control item being off slightly. I'm talking about control items drawing on top of others or the data fields being too small.

Is this a bug in LW ui panels?

Sensei
06-23-2015, 06:23 AM
I guess so you're talking about LWPanels, not LWXPanels?

You need to layout UI by yourself properly, not hardcode controls positions..

ernpchan
06-23-2015, 09:17 AM
OK, can you go into more detail when you say "properly"? Do you mean like grouping and aligning the controls? I do that with my AE scripts.

Sensei
06-23-2015, 09:20 AM
Make control at y,
take its height, add to y, add spacing,
now you know new row control y below 1st control.
etc.

Manual layout..

ernpchan
06-23-2015, 10:19 AM
Ah yes, I've done that before. I'll see if that fixed the moving control item issue.

iain_r
06-24-2015, 04:31 AM
Have you tried the align_controls_vertical function as in.

ui = lwsdk.LWPanels()
panel = ui.create('Scene Information')
c1 = panel.str_ctl('Camera name', 50)
c2 = panel.str_ctl('Camera type', 50)
c3 = panel.str_ctl('Light name',50)
c4 = panel.str_ctl('Light type',50)
panel.align_controls_vertical([c1, c2, c3,c4])

Regards,

Iain

ernpchan
06-24-2015, 08:05 AM
Thanks iain_r!

ernpchan
06-24-2015, 01:43 PM
panel.align_controls_vertical([c1, c2, c3,c4])


Where did you find this bit of code to do this? I see it in the lscript dox...but the usage is different. The lscript version expects integer arguments for offsetting from the first control.

I didn't find any reference to the 'align_controls' code in the C sdk.

Sensei
06-24-2015, 02:07 PM
I didn't find any reference to the 'align_controls' code in the C sdk.

There is no such function in LWSDK C/C++.

ernpchan
06-24-2015, 06:39 PM
Where did you find this bit of code to do this? I see it in the lscript dox...but the usage is different. The lscript version expects integer arguments for offsetting from the first control.

I didn't find any reference to the 'align_controls' code in the C sdk.

I found mention of it here.
http://www.lawson3d.com/lwpywiki/index.php?title=Panel

So I guess there are 4 places to look for sdk documentation.
Two here:
https://www.lightwave3d.com/lightwave_sdk/
Here:
http://www.mikegreen.name/Lscript/Lscript%20Index.html
And now here:
http://www.lawson3d.com/lwpywiki/index.php?title=Main_Page (Last updated was 08-2013)

Lovely.

iain_r
06-25-2015, 04:00 AM
I found it by looking through the sample scripts. There are lots of little bits of information in them, just not well documented. The python sdk is lacking in so much detail as to what you can do, and it's not always possible to find the things that you would think should be included.

Regards

Iain

ernpchan
06-25-2015, 09:56 AM
Thanks Iain. Going through the sample scripts is something I always forget to consider. So I guess that makes it 5 places to look for sdk help. Lol

oliverhotz
06-25-2015, 12:27 PM
I think I posted this before.. but.. its all in the pcore.pyc file... pretty much any command thats possible.. if its not in that, then it doesnt exist.

ernpchan
06-25-2015, 01:36 PM
I think I posted this before.. but.. its all in the pcore.pyc file... pretty much any command thats possible.. if its not in that, then it doesnt exist.

Thanks Oliver!