Commit Graph

22 Commits (6ffc2620e4f1a464cd429d6388034879c30a3acd)

Author SHA1 Message Date
Guthrie Adams 26c23d9ec0 Fixed non unity compiler issues and reverted a couple of changes
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 01786b2966 Atom Tools: Saving tool settings, made inspector configurable, moved to ATF
Changed material editor inspector into generic, configurable, document inspector and moved to atom tools framework
Renamed atom tools framework settings registry utility functions
Added more settings registry utility functions to get, set, and save values and objects
Added saving tool settings to atom tools application

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
santorac a4346de658 Code cleanup. New comments. Added some non-const find functions to MaterialTypeSourceData. Fixed places where I forgot to change m_name to GetName().
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Galvan 049b33d2df Merging stabilization/2111RTE -> development, resolved conflicts
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Guthrie Adams f8ca427954
Fixed several material editor bugs related to file paths and hot reload prompts (#6374)
* draft

Signed-off-by: Guthrie Adams <guthadam@amazon.com>

* Removes automatic generation of relative paths for external references for materials
Updated material editor functions for creating new materials, creating or saving model or lighting presets, to save to the project asset folder instead of the material folder which is not included in the new templates
Changed function for getting saved file names to handle case where Qt save file dialog adds double extensions if the extension contains a dot

Signed-off-by: Guthrie Adams <guthadam@amazon.com>

* Fixed problems with material editor hot reloading after documents or dependencies changed.
Triggering message boxes within the tick function, which is executed from the main application timer, caused the tick function to be called a second time recursively.
Switched from using the tick bus to a timer so that the documents re opening and dialogs are triggered outside of the main tick.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 3bca63bb71 Temporary fix for material component losing image overrides with prefabs
The bug reported that overridden texture properties would be lost whenever an entity was created, destroyed, or a prefab was created. Initially, it seemed like there was a problem with the custom JSON serializer for material properties. Debugging proved this to be incorrect because all of the data was converted to JSON values in the serializer on multiple passes. At some point during prefab patching, the data for the asset properties is lost while other values like colors and floats serialize correctly. Converting the asset data values into asset IDs resolves the immediate problem for the material component but the underlying issue is still under investigation by the prefab team. This change is being posted for review in case the underlying issue cannot be resolved in time for the next release.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>

Fixing unittests and moving texture conversion into material component controller

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
santorac cdb38251d8 Fixed an issue that prevented saving child materials with explicitly empty texture properties.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac ebc92c5b08 Restored a bit of error checking that appears to have been removed by mistake, in MaterialPropertyUtil ConvertToExportFormat(). This is important for the missing texture use cases, because this error checking is what will prevent the Material Editor from silently replacing a broken texture reference with no texture reference.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 9f7815fa04 Fixed up a couple incorrectly or incompletely resolved merge conflicts.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Guthrie Adams b3f3a4245b updated image paths to use new function
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams ed4f7965da Created function to get relative paths to referenced files that will fall back to asset folder relative paths under certain conditions
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams f18f838da6 material editor and exporter save source materials with relative paths
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 050de68f7d Merge branch 'development' into Atom/guthadam/material_editor_replace_modified_color_with_indicator
Signed-off-by: Guthrie Adams <guthadam@amazon.com>

# Conflicts:
#	Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp
#	Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.h
#	Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentInspector.cpp
#	Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentInspector.h
4 years ago
Guthrie Adams 7c2464ad15 Changing material inspector to use indicator icons instead of highlighting modified properties
Added a blank placeholder image to account for changes to indention when indicator icons are active
Added parameter to inspector constructor for specifying leaf property indention size

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
santorac c2abd2d74f Updated the naming convention for material property "names" vs "IDs".
A "property name" is the name of the just the property without regard to the group that it's in. A "group name" is the name of the group. And a "property ID" is the full unique name of a property in the form "groupName.propertyName". This is important preparation for upcoming changes where property sets can contain other property sets, and property IDs can be arbitrarily long like "layer1.baseColor.factor" for example.

The naming changes include variables, some code comments, and the .materialtype file format. I was able to make these changes in a backward compatible way so a property or group "id" field has been replaced with a "name" field, but "id" is still supported for compatibility. StandardPBR, EnhancedPBR, StandardMultilayerPBR, and Skin have all been updated. Note that MinimalPBR has not been updated, proving that backward compatibility works. (We can update this one too at some point though).

Testing:
Opened up materials in the material editor.
Ran AtomSampleViewer in dx12 and vulkan with no new failures.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
guthadam 9d0f9e9e3a ATOM-14065 fix problems with material editor details group property descriptions
Moved the code that automatically appended a script variable name to a property description out of the dynamic property class and into the material property conversion utility functions.

Added proper descriptions for the material type and parent material placeholder properties

https://jira.agscollab.com/browse/ATOM-14065
5 years ago
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 5 years ago
alexpete 75dc720198 Integrating latest 47acbe8 5 years ago
alexpete a10351f38d Initial commit 5 years ago