Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Inline Attributes

runxel
Mentor
Is there any way, how to have inline attributes not polluting the project?
The manual has a cryptic phrasing (as always), so I can't figure out, what's up with that.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
6 REPLIES 6

Barry Kelly
Moderator
By in-line do you mean those automatically generated by GDL scripts?
The only way to stop those that I know of is to track down the GDL script (Master_GDL), remove/edit it and then remove the attributes.


Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

runxel
Mentor
Hi Barry,
inline Attributes are those that can be "DEFINE"-d in the script and in my case it's not auto, but deliberately done by myself.

It's a common misconception that these attributes are only set inside a MASTER_GDL. In fact to quote the manual:
Attribute definition in library parts. The materials and textures defined this way can be used in the script and its second generation scripts. Fills and line types defined and used in the master or 2D script have the same behavior as if they were defined in the MASTER_GDL script, but only if used by name or index (not through a parameter).
So in my case I have a fill defined but I think it is bad style to have it pollute the project's attribute list.

It would be great if there is a solution for this.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Barry Kelly
Moderator
Not 100% sure, but attributes defined in a MASTER_GDL will actually be added to the attributes as a permanent attribute (until you delete the attribute and the MASTER-GDL that makes it).

Those defined in an object are only available to that object (and its parent objects if it is a CALLed macro)?
They are not actually an attribute available to other objects or the main file?
I may be wrong about that.
If I am wrong about that then still the only way to remove them is to edit your objects and delete the definition.


Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

runxel
Mentor
Yes, sadly you're wrong about that.
Doesn't matter if MASTER_GDL or not, e.g. defining a fill will result in having that attribute mirrored to the project, as visualised by the dreaded italic text.

What put me off was the wording in the manual. So it kinda looks like you can somehow define an attribute to be truly inline. My questions aims at if and how this is the case.
Otherwise this is rather silly. Why would you need a MASTER_GDL if just defining inside the script has the same effect.

Maybe someone from GS can enlighten us here.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Barry Kelly
Moderator
I just defined a fill in an object and yes, it does add as an attribute as well.
But not until you place that object in the model.
If you don't place the object you don't get the attribute.
Where as the Master_GDL adds the attribute as soon as you re-load the library (not need to place any objects).

Delete the object and the new attributes stay.
Even after saving, closing and re-opening the file.
It is now an attribute (and has the underline when looking in the Attribute Manager).


I think what the quote from the manual is saying, is that if you define a fill in an object, you can not use it (I think it should say "should not use it") as a parameter - because it doesn't exist until you place the object.
Once you place the object it creates the attribute, and then you will be able to see it as a parameter, but in that file only.
It won't exist in a new file until you place the object.

Where as in the Master_GDL, it is created when the library is loaded, so is available straight away as a parameter.


Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

runxel
Mentor
Okay, now this cryptic wording begins to make sense. A bit, at least.

That being said, it's a shame we can't properly have "real" inline attributes. Sometimes you just need to have the ability in that specific object to have attributes that you don't need anywhere else....

In other news: I made a wish.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!