Commit Graph

21 Commits

Author SHA1 Message Date
Chris Santora e145ce1d01 Updated EditorMaterialComponentSlot to support editing property overrides and UV overrides for the material, regardless of whether there is a material override or not.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:56 -07:00
Chris Santora 670dd6c5bc Removed the GetLabelByAssetId function since now we can use the display name that comes with the ModelMaterialSlot.
Updated OpenMaterialExporter() to account for the fact that multiple material slots can have the same default material asset.
Updated the material inspector to sort material slots by name to match the order in the Material Component.
Updated ExportItem to protect its data members, which makes it more clear that assetId and materialSlotName are readonly inputs.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:54 -07:00
Chris Santora e3ceaa477e Added a version converter for MaterialAssignmentId. This allowed me to successfully load the Sponza level in AtomTest.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:53 -07:00
Chris Santora 14d2e38b90 Refactored how model material slots work in preparation to support more flexible material conversion options for the scene asset pipeline. The material slot IDs are based on the MaterialUid that come from SceneAPI. Since these IDs are also used as the AssetId sub-ID for the converted material assets, the system was just checking the material asset sub-ID to determine the material slot ID. But in order to support certain FBX material conversion options, we needed to break this tie, so the slot ID is separate from the AssetId of the material in that slot. This will allow some other material to be used in the slot, instead of being forced to use one that was generated from the FBX.
Here we inttroduce a new struct ModelMaterialSlot which formalizes the concept of material slot, with an ID, display name, and default material assignment. The ID still comes from the MaterialUid like before. The display name is built-in, rather than being parsed out from the asset file name. And the default material assignment can be any material asset, it doesn't have to come from the FBX (or other scene file).

This commit is just the preliminary set of changes. Cursory testing shows that it works pretty well but more testing is needed (and likely some fixes) before merging.

Here is what's left to do...
Add serialization version converters to preserve prior prefab data.
See if we can get rid of GetLabelByAssetId function only rely on the display name inside ModelMaterialSlot.
I'm not sure if the condition for enabling the "Edit Material Instance..." context menu item is correct.
Test actors
Lots more testing in general

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:51 -07:00
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>
2021-07-16 15:25:48 -07:00
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>
2021-06-30 19:51:55 -07:00
guthadam 64186b4ec6 ATOM-15892 fixing material component clear overrides button
The clear material override properties button was not sending the notification to update the entity or undo state.

Signed-off-by: guthadam <guthadam@amazon.com>
2021-06-29 18:45:40 -05:00
Steve Pham 70042fcdcd O3DE Copyright Updates for Linux Foundation (#1504) 2021-06-23 10:55:22 -07:00
guthadam 58d516688f LYN-4251 fix confusing material component menu options 2021-06-16 22:57:20 -05:00
guthadam b10ed227c0 Added version handling for removed fields 2021-06-04 13:54:45 -05:00
guthadam d115eae84a LYN-3871/3872 Added JSON serializer for MaterialAssignment property overrides 2021-06-01 11:43:05 -05:00
mnaumov 7342e62680 Hiding "Open Material" when material asset is assigned 2021-05-11 19:33:46 -07:00
mnaumov 30458bc1be PR feedback 2021-04-23 21:40:27 -07:00
mnaumov b215d1c098 Enlarged thumbnails on hover 2021-04-23 14:56:28 -07:00
AMZN-mnaumov 5ef212624f Merge pull request #53 from aws-lumberyard-dev/Atom/mnaumov/ATOM-5659
[ATOM-5659] Adding "Open Material Editor" action to Material Component slot context
2021-04-16 12:54:31 -07:00
mnaumov a23a2fba65 PR feedback 2021-04-14 17:47:37 -07:00
mnaumov 5050de2604 Adding "Open Material Editor" action to Material Component slot context menu 2021-04-13 15:05:05 -07:00
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 2021-04-09 11:27:37 -07:00
alexpete c2cbd430fe Integrating up through commit 90f050496 2021-04-07 14:03:29 -07:00
alexpete 75dc720198 Integrating latest 47acbe8 2021-03-25 13:57:57 -07:00
alexpete a10351f38d Initial commit 2021-03-08 14:30:57 -08:00