View Issue Details

IDProjectCategoryView StatusLast Update
0006030DarkRadiantGUIpublic15.08.2022 12:50
ReporterDragofer Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.0.0 
Target Version3.1.0Fixed in Version3.1.0 
Summary0006030: Material Editor: does not save manual edits to source text
DescriptionThe Material Editor not only shows the Material Source Text, but also allows manually editing it by typing in it. However, such manual edits don't make the "Save material" button become available. Furthermore, if the "Save material" button is clicked after 1) changing an image file path and then 2) manually editing the source text, the manual edits are reverted.
Steps To Reproduce[Creating an editable material]
1) Open the Material Editor and search for "rough_dirty01", select the material "textures/darkmod/metal/flat/tiling_1d/rough_dirty01"
2) Click "Unlock editing" and "Save material", name it test1.mtr
3) Expand the "Material source text" in the bottom right corner

[Manual edits don't unlock "Save material" button]
3) Manually change the "stone" keyword to "metal". The "Save material" button is still greyed out.

[Manual edits aren't saved - trying to change the surface type to "metal"]
4) Make any change to the image file paths, i.e. add another character at the end. This rearranges the material source text into some kind of default configuration (will be part of another bug report), with the "metal" keyword reverted to "stone". The "Save material" button is now available.
5) Manually change the "stone" keyword to "metal" again and click "Save material". As soon as you save, the "metal" is again reverted to "stone".
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

DarkRadiant: master 28108468

2022-08-15 06:23:30

greebo

Details Diff
0006030: Add interface to update a material from a given source text. When the source view contents in the MaterialEditor changes, the material will try to update itself from the source.
Fix a crash when trying to acquire an editable shader layer with the "Global Settings" item selected.
Affected Issues
0006030
mod - include/ishaders.h Diff File
mod - libs/wxutil/sourceview/SourceView.cpp Diff File
mod - radiant/ui/materials/editor/MaterialEditor.cpp Diff File
mod - radiant/ui/materials/editor/MaterialEditor.h Diff File
mod - radiantcore/shaders/CShader.cpp Diff File
mod - radiantcore/shaders/CShader.h Diff File

DarkRadiant: master 1144892e

2022-08-15 07:00:44

greebo

Details Diff
0006030: Set up event handling in the Material Editor, to prevent feedback loops and modification flags being set all the time. Affected Issues
0006030
mod - include/ishaders.h Diff File
mod - radiant/ui/materials/editor/MaterialEditor.cpp Diff File
mod - radiant/ui/materials/editor/MaterialEditor.h Diff File
mod - radiantcore/shaders/CShader.cpp Diff File
mod - radiantcore/shaders/CShader.h Diff File

DarkRadiant: master 7371d9a4

2022-08-15 11:53:53

greebo

Details Diff
0006030: First rough implementation of Material::updateFromSourceText Affected Issues
0006030
mod - include/ishaders.h Diff File
mod - libs/decl/DeclarationBase.h Diff File
mod - radiantcore/shaders/CShader.cpp Diff File
mod - test/Materials.cpp Diff File

DarkRadiant: master 2205cf80

2022-08-15 12:18:12

greebo

Details Diff
0006030: It's now possible to edit the source text of the material. Changes will be propagated in either direction. Affected Issues
0006030
mod - radiant/ui/materials/editor/MaterialEditor.cpp Diff File
mod - radiant/ui/materials/editor/MaterialEditor.h Diff File
mod - radiantcore/shaders/CShader.cpp Diff File

DarkRadiant: master a5a058e4

2022-08-15 12:35:40

greebo

Details Diff
0006030: Add a negative unit test case covering IMaterial::updateFromSourceText Affected Issues
0006030
mod - test/Materials.cpp Diff File

DarkRadiant: master 134d63a5

2022-08-15 12:50:14

greebo

Details Diff
0006030: Remove an assert that fires when parsing an invalid shader expression in material stages. This is user input and can occur rather frequently when manually editing materials. Affected Issues
0006030
mod - radiantcore/shaders/ShaderExpression.cpp Diff File

Issue History

Date Modified Username Field Change
30.07.2022 19:18 Dragofer New Issue
30.07.2022 19:18 Dragofer Description Updated
31.07.2022 08:23 greebo Status new => confirmed
15.08.2022 12:35 greebo Changeset attached => DarkRadiant master 28108468
15.08.2022 12:35 greebo Changeset attached => DarkRadiant master 1144892e
15.08.2022 12:35 greebo Changeset attached => DarkRadiant master 7371d9a4
15.08.2022 12:35 greebo Changeset attached => DarkRadiant master 2205cf80
15.08.2022 12:35 greebo Changeset attached => DarkRadiant master a5a058e4
15.08.2022 12:50 greebo Changeset attached => DarkRadiant master 134d63a5
15.08.2022 12:50 greebo Assigned To => greebo
15.08.2022 12:50 greebo Status confirmed => assigned
15.08.2022 12:50 greebo Target Version => 3.1.0
15.08.2022 12:50 greebo Status assigned => resolved
15.08.2022 12:50 greebo Resolution open => fixed
15.08.2022 12:50 greebo Fixed in Version => 3.1.0