o3de / o3de

Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations.
https://o3de.org
Other
7.7k stars 2.19k forks source link

DPE Inspector: Component property labels are inconsistently greyed out for inactive components #15577

Closed jckand closed 7 months ago

jckand commented 1 year ago

Describe the bug Component property labels are inconsistently greyed out for inactive components.

Steps to reproduce

  1. Launch the Editor with the DPE enabled:
    Editor.exe --ed_enableDPE=true
  2. Create a few new entities.
  3. Add various components which are inactive until additional components are added to the various entities (e.g. Perlin Noise Gradient, Image Gradient, etc.)
  4. Observe the component properties on the component widgets.
  5. Deselect/reselect the same entity a few times.

Expected behavior Inactive component property labels are greyed out.

Actual behavior Some inactive component properties appear as though they're enabled (though the actual editable fields are properly disabled). This can also change from selection to selection.

Screenshots/Video component_property_labels

Found in Branch development

Commit ID from o3de/o3de Repository 3a1423a5cecf928aa256acf1c1f9bdf7ea99814c

nick-l-o3de commented 1 year ago

The components in the inactive or pending list are not valid to query for any purpose and their properties should not show up, right?

They are in a list of inactive components, and have not been "initialized" or "activated" - and thus they are not connected to busses, haven't created any internal pointer data they may access if you start talking to them, etc. Trying to show their properties will cause crashes.

I guess if there's already a ton of protection code in every single component to check for whether its data is valid or to ensure its data is valid in every single change callback and every single attribute callback, it could work...

alexmontAmazon commented 1 year ago

Likely fixed by: https://github.com/o3de/o3de/pull/15793

Could you please verify?

jckand commented 1 year ago

Looks to be partially fixed. The labels display consistently now, however they consistently appear as though the disabled properties are editable instead of being grayed out:

image

Tested on development@ 3c74a21e310dbc68d982a9de3cb095f73f727f60.

alexmontAmazon commented 1 year ago

This is just label enabling/disabling which I don't believe we do yet. This should be a quick fix

alexmontAmazon commented 1 year ago

Fixed now, likely by disabling Handler recycling

alexmontAmazon commented 1 year ago

not fixed, I misunderstood the given description. We need to make sure the entire DPE widget is disabled, it is not an individual label problem.

alexmontAmazon commented 1 year ago

please retest!

alexmontAmazon commented 7 months ago

for real fixed.