Where are the default light controls?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-16
12:51 AM
- last edited on
2021-09-14
09:07 AM
by
Noemi Balogh
Now I'm trying to write a new lamp, similar to the old one, but these controls do not show up.
I know I could write an UI script, but the default behavior of the old object is fine enough to me and I'd rather not having to go through the UI scripting, as I would have to code all other parameters.
Is there a way to make the basic controls show up without writing an UI script?
- Labels:
-
Library (GDL)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-16 03:03 AM
Durval wrote:
A long time ago I have scripted some simple lamp objects in which the basic light control are shown in the settings dialog box (attached image). The UI script of this object is blank; the controls show up by default, simply because it is classified as light subtype.
The UI script in your object may be blank, but is it CALLing a macro in the Master script.
If that macro has a UI script, that would cause the UI to show (I am pretty sure).
Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-16 04:35 AM
It’s a simple object with a pair of REVOLVEs and a LIGHT command in the 3D script.
But there are some old parameters added by default, such as C, D, E, F and G for setting the light switch, RGB color and light intensity.
If I start a new light object, these parameters have different names such as ac_light_switch etc, and these names cannot be changed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-16 04:55 AM
This way you should have the interface the way you want and you just need to modify the 2D/3D scripts.
Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-16 05:19 AM
It is not a user interface as such but seems to be some sort of special parameters.
When I open the old object I see this.
The 'Type' is a special symbol and not part of the standard set of types.
At the same time with the 'Light' subtype, it creates these new parameters with the same symbols - but it is not possible to change these 'Type' to anything else.
So it seems these new parameters have replaced the old ones.
With a new lamp object, the new parameters are used in the user interface - called by a macro ("lightMacro_m").
I don't see any way of using the old parameters or the new ones without the user interface.
Other than doing a 'Save As' to the old object - that keeps the old features.
Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-16 04:33 PM
Strangely enough, my old lamp object has both sets of light parameters, the old ones AND the new ones...
Maybe I should start anew and simply CALL the lightMacro_m, so that my new object does not rely on deprecated features.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-16 06:02 PM
- Created new object (attached) and classified as Light subtype;
- Added a very simple 3D solid with an sphere;
- Copied the Macro Call from
https://gdl.graphisoft.com/tips-and-tricks/how-to-make-a-light-object and pasted to the top of 3D script;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-17 04:09 AM
I have a hard time following Graphisoft objects though!
It looks like that macro does more than just the simple settings in your object.
I think I would just 'Save As' your original object and edit that.
It will have the new parameters and I assume you just ignore them.
I have no idea how the old controls show up in the parameter list.
Delete C,D E F & G and that interface part in the parameter list disappears - but you can not re-create it, as you can't create the old parameters with the old types again.
And it doesn't work with the new 'gs_...'parameters.
So 'Save As' an old light seems to be the only way to keep them.
You can't delete the new parameters because they are part of the light sub-type, but you can hide them - although I am not sure if that is necessary.
The object (the interface part in the parameter list) still seems to be using the old parameters.
Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-19 04:41 PM
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-06-21 04:29 AM