Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt 3D Studio 2.2 BETA1
-
None
-
30e062458bc5c0e3c904f66cf6f7bcce8f830911 13e3f8f64079eeca95ac6ec961e91f62aeba9993 262dc602b93c6347d45117b600d8466f4f241e60
Description
Renaming material defs has multiple issues:
1) It is possible to have an empty name for materialdef: Enter just slashes "/" to the name field. Those seem to be culled from the name, resulting ".materialdef" for filename.
2) Changing .materialdef name twice in a row without leaving the inspector will not display the correct name in the inspector field, though it does change the file name. Inspector field will always revert to the previous name.
3) some invalid characters are allowed. For example, Name the .materialdef as "&&&". Take it to use in the scene -> an error message box appears:
---------------------------
Studio Import Resource Error
---------------------------
Import resource failed:
c:/dev/qt/NDD/Presentations/BrokenMatNames/materials/&&&.materialdef
Studio was unable to import the resource due to the following reason(s):
Failed to parse XML data.
Line 23: Expected '#' or '[a-zA-Z]', but got '&'.
---------------------------
OK
---------------------------
Since the material def name is directly used as the id, we need to limit the characters allowed to ones accepted there. This may be an issue with international users, though.