New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special Characters in Material Names, cause any text behind said characters to be ignored. #370

Closed
DarthCainRor opened this Issue Aug 9, 2015 · 10 comments

Comments

Projects
None yet
5 participants
@DarthCainRor

DarthCainRor commented Aug 9, 2015

Ok, So I didn't see any bug reports for this..

If you have Special characters, such as an Apostrophe ' in your material name it causes RoR to ignore any text after said mark. for example one of my Texture names is "20'MickeyVanbody-tex" But all the parser is reading is "20" so it ignores the material as it is not defined as that and moves on.

System Config:
Windows 8.1 64bit
DirectX 9

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Aug 9, 2015

Contributor

It should stay this way to ensure cross-platform compatibility.

Contributor

Hiradur commented Aug 9, 2015

It should stay this way to ensure cross-platform compatibility.

@DirtGamer301

This comment has been minimized.

Show comment
Hide comment
@DirtGamer301

DirtGamer301 Aug 9, 2015

I agree with Hiradur using a most likely less important argument:
You don't usually need those characters. In a material/texture name it doesn't matter of there's a " ' " or not, a " , " or not and so on. Reading over it won't make any difference.

Do you btw mean a material name in managedmaterials or just as, well, material in a material file? As if in a material file I think this would be nothing RoR related, more Ogre related.

DirtGamer301 commented Aug 9, 2015

I agree with Hiradur using a most likely less important argument:
You don't usually need those characters. In a material/texture name it doesn't matter of there's a " ' " or not, a " , " or not and so on. Reading over it won't make any difference.

Do you btw mean a material name in managedmaterials or just as, well, material in a material file? As if in a material file I think this would be nothing RoR related, more Ogre related.

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Aug 9, 2015

Contributor

Add: It should show an appropriate error message.

Contributor

Hiradur commented Aug 9, 2015

Add: It should show an appropriate error message.

@DarthCainRor

This comment has been minimized.

Show comment
Hide comment
@DarthCainRor

DarthCainRor Aug 10, 2015

Ok, I mean I suppose that's fine as I understand the need for it. I'll just have to rename a whole lot of materials on all of my things lol

DarthCainRor commented Aug 10, 2015

Ok, I mean I suppose that's fine as I understand the need for it. I'll just have to rename a whole lot of materials on all of my things lol

@Hiradur Hiradur added this to the 0.4.6.0 milestone Oct 24, 2015

@DarthCainRor

This comment has been minimized.

Show comment
Hide comment
@DarthCainRor

DarthCainRor Oct 25, 2015

Ok so I know it's rather random, but I'm curious as to why it ignores them in the material names, but no where else really. I have a few meshes, and image files that also use apostrophe to denote feet, and they spawn fine, the only error I've encountered using it is in the material names themselves.

DarthCainRor commented Oct 25, 2015

Ok so I know it's rather random, but I'm curious as to why it ignores them in the material names, but no where else really. I have a few meshes, and image files that also use apostrophe to denote feet, and they spawn fine, the only error I've encountered using it is in the material names themselves.

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Nov 6, 2015

Member

@DarthCainRor Which file are you reffering to? A truckfile / OGRE .material file / something else? If a truckfile, which section - managedmaterials? Wheels? Flares? Something else. Be specific.

Also post RoR.log please.

If it's OGRE .material, then it's strange, AFAIK it should accept all special chars.
If it's a truckfile, then it's probably a bug caused by fault-tolerance: A lot of truckfiles have invalid text after definitions, and the parser must ignore that.

Anyway, NOT using special chars in mat-names is a safe bet. As Hiradur said, even if it's a bug and we find it, it still can't be fixed because older content may rely on it. But at least I could document it.

Member

only-a-ptr commented Nov 6, 2015

@DarthCainRor Which file are you reffering to? A truckfile / OGRE .material file / something else? If a truckfile, which section - managedmaterials? Wheels? Flares? Something else. Be specific.

Also post RoR.log please.

If it's OGRE .material, then it's strange, AFAIK it should accept all special chars.
If it's a truckfile, then it's probably a bug caused by fault-tolerance: A lot of truckfiles have invalid text after definitions, and the parser must ignore that.

Anyway, NOT using special chars in mat-names is a safe bet. As Hiradur said, even if it's a bug and we find it, it still can't be fixed because older content may rely on it. But at least I could document it.

@DarthCainRor

This comment has been minimized.

Show comment
Hide comment
@DarthCainRor

DarthCainRor Nov 7, 2015

It's inside the managed_materials where they are ignored. Apostophes work fine in the image names in the managed materials, as well as the prop names, only the managed_material material name is where they are ignored.
Error is around line 2662.
http://pastebin.com/U4mU66rT
11a35611635b7da27f0014ded9410b59

DarthCainRor commented Nov 7, 2015

It's inside the managed_materials where they are ignored. Apostophes work fine in the image names in the managed materials, as well as the prop names, only the managed_material material name is where they are ignored.
Error is around line 2662.
http://pastebin.com/U4mU66rT
11a35611635b7da27f0014ded9410b59

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Oct 26, 2016

Member

@DarthCainRor Can you re-test this please?

Member

only-a-ptr commented Oct 26, 2016

@DarthCainRor Can you re-test this please?

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Oct 26, 2016

Member

Tested by @Michael10055 in Gitter chat - works fine in current upstream 😀

Member

only-a-ptr commented Oct 26, 2016

Tested by @Michael10055 in Gitter chat - works fine in current upstream 😀

@only-a-ptr only-a-ptr closed this Oct 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment