LEGO ergo sum
New meta in LDConfig for default category icon in editors
RE: New meta in LDConfig for default category icon in editors
2024-05-14, 14:05 (This post was last modified: 2024-05-14, 23:50 by Orion Pobursky.)
2024-05-14, 14:05 (This post was last modified: 2024-05-14, 23:50 by Orion Pobursky.)
Just to formalize this a bit:
The !MASCOT meta command is intended to allow editor to display a typical example of a part in a given category (as defined by the !CATEGORY meta). It will appear in the LDConfig.ldr for editors to reference. If a !MASCOT statement for a given !CATEGORY is not present, then the mascot may be chosen by the developer
Syntax
!MASCOT CATEGORY "<category>" DESCRIPTION "<description>" PART <rotation maxtrix> <part file>
Where:
<category> is the 1 or 2 word category from the list of approved !CATEGORY categories
<description> is a short (approximately 4 words or less) of the category. This will typically be the pluralized form of the category
<rotation matrix> is the 9 digit rotation matrix as defined by the LDraw File Format Type 1 line definition
<part file> is the part file reference as defined by the LDraw File Format Type 1 line definition
The !MASCOT meta command is intended to allow editor to display a typical example of a part in a given category (as defined by the !CATEGORY meta). It will appear in the LDConfig.ldr for editors to reference. If a !MASCOT statement for a given !CATEGORY is not present, then the mascot may be chosen by the developer
Syntax
!MASCOT CATEGORY "<category>" DESCRIPTION "<description>" PART <rotation maxtrix> <part file>
Where:
<category> is the 1 or 2 word category from the list of approved !CATEGORY categories
<description> is a short (approximately 4 words or less) of the category. This will typically be the pluralized form of the category
<rotation matrix> is the 9 digit rotation matrix as defined by the LDraw File Format Type 1 line definition
<part file> is the part file reference as defined by the LDraw File Format Type 1 line definition
(2024-05-14, 14:05)Orion Pobursky Wrote: Just to formalize this a bit:
The !MASCOT meta command is intended to allow editor to display a typical example of a part in a given category (as defined by the !CATEGORY meta). It will appear in the LDConfig.ldr for editors to reference. If a !MASCOT statement for a given !CATEGORY is not present, then the mascot may be chosen by the developer
Syntax
!MASCOT CATEGORY <category> DESCRIPTION "<description>" PART <rotation maxtrix> <part file>
Where:
<category> is the 1 or 2 word category from the list of approved !CATEGORY categories
<description> is a short (approximately 4 words or less) of the category. This will typically be the pluralized form of the category
<rotation matrix> is the 9 digit rotation matrix as defined by the LDraw File Format Type 1 line definition
<part file> is the part file reference as defined by the LDraw File Format Type 1 line definition
I notice that you removed the quotes around category that Roland suggested. If a program already needs to have quote parsing for description, it seems that having quotes around the category makes sense.
I personally feel that AVATAR is a better name for this than MASCOT. However, I'm ok with MASCOT if others prefer it over AVATAR.
RE: New meta in LDConfig for default category icon in editors
2024-05-14, 23:50 (This post was last modified: 2024-05-14, 23:51 by Orion Pobursky.)
2024-05-14, 23:50 (This post was last modified: 2024-05-14, 23:51 by Orion Pobursky.)
I agree, edited above.
(2024-05-14, 14:05)Orion Pobursky Wrote: !MASCOT CATEGORY "<category>" DESCRIPTION "<description>" PART <rotation maxtrix> <part file>
I'm ok with avatar instead of mascot.
Not sure about loosing the quotes around the part file though. It's true the spec forces whole words but that is the current spec. Also it seems more consistent to use it for all string variables. That said it's not really a show stopper for me so I'm ok ether way just my 2cts.
nitpick:
Quote:If a !MASCOT statement for a given !CATEGORY is not present, then the mascot may be chosen by the developer
This sounds a bit preachy, imho, maybe:
Quote:If a !MASCOT statement for a given !CATEGORY is not present, then the selection of the mascot is entirely up to the developer
Because meta or not the developer can choose not to use them at all, the 'may' suggests it MUST be used.
RE: New meta in LDConfig for default category icon in editors
2024-05-16, 2:35 (This post was last modified: 2024-05-16, 2:35 by Travis Cobbs.)
2024-05-16, 2:35 (This post was last modified: 2024-05-16, 2:35 by Travis Cobbs.)
(2024-05-15, 21:23)Roland Melkert Wrote: I'm ok with avatar instead of mascot.
Not sure about loosing the quotes around the part file though. It's true the spec forces whole words but that is the current spec. Also it seems more consistent to use it for all string variables. That said it's not really a show stopper for me so I'm ok ether way just my 2cts.
nitpick:
This sounds a bit preachy, imho, maybe:
Because meta or not the developer can choose not to use them at all, the 'may' suggests it MUST be used.
Actually, 'may' typically has a very explicit definition in technical specifications:
https://www.ietf.org/rfc/rfc2119.txt
(2024-05-16, 2:35)Travis Cobbs Wrote: Actually, 'may' typically has a very explicit definition in technical specifications:
https://www.ietf.org/rfc/rfc2119.txt
It might be the language barrier but I read it like:
The developer MUSt use the mascots given by the metas, if no meta is present for some category the develop MAY make one up them selves.
(2024-05-16, 20:00)Roland Melkert Wrote: The developer MUSt use the mascots given by the metas, if no meta is present for some category the develop MAY make one up them selves.
That's kind of the intent. Much like the COLOUR meta, if you decide to implement support for the MASCOT meta then you have to honor the ones in LDConfig. Not doing so would cause user confusion when they changed something and it wasn't reflected in the supporting programs.
(2024-05-16, 20:15)Orion Pobursky Wrote: That's kind of the intent. Much like the COLOUR meta, if you decide to implement support for the MASCOT meta then you have to honor the ones in LDConfig. Not doing so would cause user confusion when they changed something and it wasn't reflected in the supporting programs.
Yes but I somehow assumed the developer has no say about if they want the metas at all.
Sorry for the confusion.
Here's a link to the draft spec.
I softened the language at bit. I also put the quite back around the filename since it's not really that big of a deal to me.
https://www.ldraw.org/avatar-spec.html
I softened the language at bit. I also put the quite back around the filename since it's not really that big of a deal to me.
https://www.ldraw.org/avatar-spec.html
(2024-05-16, 21:03)Orion Pobursky Wrote: Here's a link to the draft spec.
I softened the language at bit. I also put the quite back around the filename since it's not really that big of a deal to me.
https://www.ldraw.org/avatar-spec.html
Some suggestions based on what is there now:
- "allow editor" -> "allow an editor"
- "For editor" -> "For an editor"
- "or less) of the category" -> "or less) description of the category"
- "9 digit rotation" -> "9 element rotation"
Note: a digit is a single character 0-9, so the rotation matrix cannot be 9 digit. I'm not sure "element" is the best word here, but think that it works well.
I think we can remove the "1 or 2 word" restriction from category as the quotes make that a non issue. This way we don't have to change this spec if the category spec ever allows more then 2 words.
And maybe restrict the rotation matrix to a pure one (no scaling, skewing, etc).
Meaning it is a sequence of 9 -1.0 .. 1.0 (float?) numbers.
And maybe restrict the rotation matrix to a pure one (no scaling, skewing, etc).
Meaning it is a sequence of 9 -1.0 .. 1.0 (float?) numbers.
(2024-05-17, 2:01)Travis Cobbs Wrote: Some suggestions based on what is there now:
- "allow editor" -> "allow an editor"
- "For editor" -> "For an editor"
- "or less) of the category" -> "or less) description of the category"
- "9 digit rotation" -> "9 element rotation"
Note: a digit is a single character 0-9, so the rotation matrix cannot be 9 digit. I'm not sure "element" is the best word here, but think that it works well.
I added the above corrections. Roland's remarks are technical and therefore your sandbox.
w.
LEGO ergo sum
(2024-05-17, 21:49)Roland Melkert Wrote: I think we can remove the "1 or 2 word" restriction from category as the quotes make that a non issue. This way we don't have to change this spec if the category spec ever allows more then 2 words.
And maybe restrict the rotation matrix to a pure one (no scaling, skewing, etc).
Meaning it is a sequence of 9 -1.0 .. 1.0 (float?) numbers.
I agree that "1 or 2 word" should be removed. Perhaps us this instead:
Quote:<category> is the category name from the list of approved !CATEGORY categories
I don't have a problem with restricting the matrix to be rotations only, but I'm not sure what good wording for that would be. Maybe:
Quote:<rotation matrix> is the 9 element rotation matrix as defined by the LDraw File Format Type 1 line definition. Only rotations are allowed in this matrix, not scale factors or skews.
(2024-05-28, 21:52)Roland Melkert Wrote: Just though about one minor issue:
Must the given part actually be in the same category? If so it must be mentioned somewhere.
I don't think so. This is for users. Let them decide what they want. Same for rotation. Any valid matrix. If it looks weird, that's on you.
(2024-05-30, 14:30)Orion Pobursky Wrote: Just like the color defs, it is user editable. Less restrictions are better IMO.
You mean standard wise?
As forcing it to be something logical for the official LDConfig.ldr seems a must to me.
I'm ok with no restrictions outside library use, but I do think we should at least warn/encourage people to use non scaling/skewing rotation matrices only.
(2024-06-03, 21:52)Roland Melkert Wrote: You mean standard wise?
As forcing it to be something logical for the official LDConfig.ldr seems a must to me.
I'm ok with no restrictions outside library use, but I do think we should at least warn/encourage people to use non scaling/skewing rotation matrices only.
The library standard will always be stricter than the general standard. For the library I intend to restrict to a non-scaling, non-skew matrix.
Many Thanks to the LSB. I updated the specs with your last modifications and published the document.
https://www.ldraw.org/avatar-spec.html
w.
https://www.ldraw.org/avatar-spec.html
w.
LEGO ergo sum
« Next Oldest | Next Newest »
Users browsing this thread: 4 Guest(s)