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.66k stars 2.18k forks source link

Animation Editor - Motion Set Management Keeps creating Default and overrides my Motion Set. #12525

Open shawstar opened 1 year ago

shawstar commented 1 year ago

Describe the bug Motion Set Management Keeps creating Default and overrides my Motion Set. Assets required Animation, any type of motion.

Steps to reproduce Steps to reproduce the behavior:

  1. Go to Motion Set Manager and Delete (or use the Default)
  2. Add a Motion
  3. Save Changes close the Animation Editor
  4. Relaunch the editor from the Actor Component
  5. See that Default was added again.

Expected behavior Removing the Default set status removed. I did try and work around this by just working in Default.. But then a new Default was added.. giving me two Defaults.

Actual behavior Default keeps adding itself and breaking my animation graph.

Screenshots/Video

https://user-images.githubusercontent.com/87207603/194951313-2cba5018-4133-4a0e-bd4f-893ceb39efc1.mp4

Found in Branch Nightly 10-10-2022

Desktop/Device (please complete the following information):

Additional context Add any other context about the problem here.

hultonha commented 1 year ago

FYI @pollend if you're interested in taking a look at this one too, feel free to reach out to me or @amzn-rhhong if you have questions. I know you have quite a bit of experience in this area now too and might have an idea. No worries if you're busy but if you fancy taking a look let me know! 👍

pollend commented 1 year ago

I was able to reproduce this will have to spend a bit of time studying the codebase.

pollend commented 1 year ago

here is the relevant backtrace where the default motionset is created. so the default motion set is always added but if the workspace is still open you can just open a different motionset and it added to the list of motions sets in the manager?


* thread #1, name = 'Editor', stop reason = breakpoint 1.1
  * frame #0: 0x00007ffecc688eb4 libEMotionFX.Editor.so`CommandSystem::CreateDefaultMotionSet(forceCreate=false, commandGroup=0x0000000000000000) at MotionSetCommands.cpp:1249:13
    frame #1: 0x00007ffecc39d4b8 libEMotionFX.Editor.so`EMStudio::MotionSetsWindowPlugin::Init(this=0x00005555615f7ea0) at MotionSetsWindowPlugin.cpp:98:9
    frame #2: 0x00007ffecbe43e67 libEMotionFX.Editor.so`EMStudio::PluginManager::CreateWindowOfType(this=0x0000555560550510, pluginType="Motion Sets", objectName="PLUGIN1258882829961") at PluginManager.cpp:120:20
    frame #3: 0x00007ffecbe85846 libEMotionFX.Editor.so`EMStudio::LayoutManager::LoadLayout(this=0x00007ffe044805f0, filename="/home/michaelpollind/projects/o3de/Gems/EMotionFX/Assets/Editor/Layouts/AnimGraph.layout") at LayoutManager.cpp:280:46
    frame #4: 0x00007ffecbe8d5c6 libEMotionFX.Editor.so`EMStudio::MainWindow::ApplicationModeChanged(this=0x00007ffe14b8fca0, text=0x00007fffffffae50) at MainWindow.cpp:1887:33
    frame #5: 0x00007ffecbe885a8 libEMotionFX.Editor.so`EMStudio::MainWindow::ApplicationModeChanged(this=0x00007ffe14b8fca0, index=0) at MainWindow.cpp:1865:9
    frame #6: 0x00007ffecbf02b62 libEMotionFX.Editor.so`QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (EMStudio::MainWindow::*)(int)>::call(f=60 85 e8 cb fe 7f 00 00 00 00 00 00 00 00 00 00, o=0x00007ffe14b8fca0, arg=0x00007fffffffb090)(int), EMStudio::MainWindow*, void**) at qobjectdefs_impl.h:152:13
    frame #7: 0x00007ffecbf02aaa libEMotionFX.Editor.so`void QtPrivate::FunctionPointer<void (EMStudio::MainWindow::*)(int)>::call<QtPrivate::List<int>, void>(f=60 85 e8 cb fe 7f 00 00 00 00 00 00 00 00 00 00, o=0x00007ffe14b8fca0, arg=0x00007fffffffb090)(int), EMStudio::MainWindow*, void**) at qobjectdefs_impl.h:185:13
    frame #8: 0x00007ffecbf0298f libEMotionFX.Editor.so`QtPrivate::QSlotObject<void (EMStudio::MainWindow::*)(int), QtPrivate::List<int>, void>::impl(which=1, this_=0x0000555568725da0, r=0x00007ffe14b8fca0, a=0x00007fffffffb090, ret=0x0000000000000000) at qobjectdefs_impl.h:418:17
    frame #9: 0x00007ffff7c82b1e libQt5Core.so.5`void doActivate<false>(QObject*, int, void**) [inlined] QtPrivate::QSlotObjectBase::call(a=<unavailable>, r=<unavailable>, this=<unavailable>) at qobjectdefs_impl.h:398:57
    frame #10: 0x00007ffff7c82b0c libQt5Core.so.5`void doActivate<false>(sender=0x000055555dc0f6f0, signal_index=12, argv=0x00007fffffffb090) at qobject.cpp:3886:21
    frame #11: 0x00007ffff7c7bee7 libQt5Core.so.5`QMetaObject::activate(sender=<unavailable>, m=<unavailable>, local_signal_index=<unavailable>, argv=<unavailable>) at qobject.cpp:3946:26 [artificial]
    frame #12: 0x00007fffe044eb55 libQt5Widgets.so.5`QComboBox::currentIndexChanged(this=<unavailable>, _t1=<unavailable>) at moc_qcombobox.cpp:538:26
    frame #13: 0x00007fffe0451046 libQt5Widgets.so.5`QComboBoxPrivate::_q_emitCurrentIndexChanged(this=<unavailable>, index=0x0000555566574f70) at qcombobox.cpp:1472:32
    frame #14: 0x00007fffe0453abd libQt5Widgets.so.5`QComboBoxPrivate::setCurrentIndex(this=0x00005555680b82f0, mi=0x00007fffffffb1d0) at qcombobox.cpp:2326:35
    frame #15: 0x00007fffe0453e13 libQt5Widgets.so.5`QComboBox::setCurrentIndex(this=<unavailable>, index=0) at qcombobox.cpp:2288:23
    frame #16: 0x00007ffecbe8ef88 libEMotionFX.Editor.so`EMStudio::MainWindow::LoadDefaultLayout(this=0x00007ffe14b8fca0) at MainWindow.cpp:2358:28
    frame #17: 0x00007ffecbe8ecee libEMotionFX.Editor.so`EMStudio::MainWindow::LoadLayoutAfterShow(this=0x00007ffe14b8fca0) at MainWindow.cpp:2289:13
    frame #18: 0x00007ffecc0a9dbe libEMotionFX.Editor.so`EMotionFX::Integration::EditorAnimGraphComponent::LaunchAnimationEditor(this=0x0000555560db1f00, assetId=0x00007fffffffb540, assetType=0x000055555a2d9650) at EditorAnimGraphComponent.cpp:136:33
    frame #19: 0x00007ffecc2e01f4 libEMotionFX.Editor.so`AZ::AttributeMemberFunction<void (EMotionFX::Integration::EditorAnimGraphComponent::*)(AZ::Data::AssetId const&, AZ::Uuid const&)>::Invoke(this=0x000055555c4e7fd0, instance=0x0000555560db1f00, args=0x00007fffffffb540, args=0x000055555a2d9650) at ReflectContext.h:519:20
    frame #20: 0x00007fffef02a6c1 libEditorLib.so`AzToolsFramework::PropertyAssetCtrl::OnEditButtonClicked(this=0x000055555a2d9540) at PropertyAssetCtrl.cpp:759:35
    frame #21: 0x00007fffef0f87f8 libEditorLib.so`QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (AzToolsFramework::PropertyAssetCtrl::*)()>::call(f=11 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00, o=0x000055555a2d9540, arg=0x00007fffffffb7a0)(), AzToolsFramework::PropertyAssetCtrl*, void**) at qobjectdefs_impl.h:152:13
    frame #22: 0x00007fffef0f874a libEditorLib.so`void QtPrivate::FunctionPointer<void (AzToolsFramework::PropertyAssetCtrl::*)()>::call<QtPrivate::List<>, void>(f=11 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00, o=0x000055555a2d9540, arg=0x00007fffffffb7a0)(), AzToolsFramework::PropertyAssetCtrl*, void**) at qobjectdefs_impl.h:185:13
    frame #23: 0x00007fffef0f862f libEditorLib.so`QtPrivate::QSlotObject<void (AzToolsFramework::PropertyAssetCtrl::*)(), QtPrivate::List<>, void>::impl(which=1, this_=0x000055556466fd00, r=0x000055555a2d9540, a=0x00007fffffffb7a0, ret=0x0000000000000000) at qobjectdefs_impl.h:418:17
    frame #24: 0x00007ffff7c82b1e libQt5Core.so.5`void doActivate<false>(QObject*, int, void**) [inlined] QtPrivate::QSlotObjectBase::call(a=<unavailable>, r=<unavailable>, this=<unavailable>) at qobjectdefs_impl.h:398:57
    frame #25: 0x00007ffff7c82b0c libQt5Core.so.5`void doActivate<false>(sender=0x00005555650d40d0, signal_index=9, argv=0x00007fffffffb7a0) at qobject.cpp:3886:21
    frame #26: 0x00007ffff7c7bee7 libQt5Core.so.5`QMetaObject::activate(sender=<unavailable>, m=<unavailable>, local_signal_index=<unavailable>, argv=<unavailable>) at qobject.cpp:3946:26 [artificial]
    frame #27: 0x00007fffe043c7e6 libQt5Widgets.so.5`QAbstractButton::clicked(this=<unavailable>, _t1=<unavailable>) at moc_qabstractbutton.cpp:308:26
    frame #28: 0x00007fffe043ca0e libQt5Widgets.so.5`QAbstractButtonPrivate::emitClicked(this=<unavailable>) at qabstractbutton.cpp:415:20
    frame #29: 0x00007fffe043dee3 libQt5Widgets.so.5`QAbstractButtonPrivate::click(this=0x0000555568ee8ec0) at qabstractbutton.cpp:408:20
    frame #30: 0x00007fffe043e0a5 libQt5Widgets.so.5`QAbstractButton::mouseReleaseEvent(this=0x00005555650d40d0, e=0x00007fffffffbd50) at qabstractbutton.cpp:1044:17
    frame #31: 0x00007fffe053525e libQt5Widgets.so.5`QToolButton::mouseReleaseEvent(this=<unavailable>, e=<unavailable>) at qtoolbutton.cpp:622:39
    frame #32: 0x00007fffe0386fd6 libQt5Widgets.so.5`QWidget::event(this=0x00005555650d40d0, event=0x00007fffffffbd50) at qwidget.cpp:9053:20
    frame #33: 0x00007fffe043f2d3 libQt5Widgets.so.5`QAbstractButton::event(this=<unavailable>, e=<unavailable>) at qabstractbutton.cpp:1001:26 [artificial]
    frame #34: 0x00007fffe0535308 libQt5Widgets.so.5`QToolButton::event(this=0x00005555650d40d0, event=0x00007fffffffbd50) at qtoolbutton.cpp:1012:34
    frame #35: 0x00007fffe0343e03 libQt5Widgets.so.5`QApplicationPrivate::notify_helper(this=<unavailable>, receiver=0x00005555650d40d0, e=0x00007fffffffbd50) at qapplication.cpp:3630:31
    frame #36: 0x00007fffe034cf17 libQt5Widgets.so.5`QApplication::notify(this=<unavailable>, receiver=0x0000555566780b70, e=0x00007fffffffbd50) at qapplication.cpp:3074:43
hultonha commented 1 year ago

Thank you very much for the update @pollend, @amzn-rhhong is likely the best person to ask about this and get their take. I'll try and take a closer look later too. Thanks again for your help zeroing in on this, much appreciated!

shawstar commented 1 year ago

I just had this issue happen. Its now the year 9 - 2023.