Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slate sequencer upgrade pr #445

Open
wants to merge 93 commits into
base: master
Choose a base branch
from

Conversation

ikrima
Copy link
Contributor

@ikrima ikrima commented Jun 22, 2018

Features: Sequencer & Slate widgets/extensions

  • Lots of slate widget extensions, lots of memory corruption fixes
  • Lots of sequencer extensions and editor support
  • Robust support for struct.ref() around native structs

This is a painful PR so to make it easier, I made several merge points from at logical points to chunk the integration and help track changes. This doesn't include the latest merge with the threading refactor because it deadlocks easily (from mainbranch) so couldn't verify my merged changes work correctly. I left it up though here: https://github.com/kitelightning/UnrealEnginePython/tree/buggy-threading

Specific questions/feedback request

UEPySPythonComboBox.cpp: 170
//TODO: ikrimae: #ThirdParty-Python: #BUG: We are on purpose not doing Py_DECREF(values) because we're stealing the reference from _GetIter
//But we never decref values in the dealloc function. We should store a py_ref to the python list
//Ask roberto for the new refactored way for this

UEPySPythonListView.cpp: 155
//TODO: ikrimae: #ThirdParty-Python: #BUG: We are on purpose not doing Py_DECREF(values) because we're stealing the reference from _GetIter
//But we never decref values in the dealloc function. We should store a py_ref to the python list
//Ask roberto for the new refactored way for this

UEPyModule.cpp:2590:
//TODO: ikrimae: #ThirdParty-Python: Not sure if this will auto cleanup when the function parameters are destroyed or if the GWorld owner will force it to keep alive
UEPyModule.cpp:2608:
//TODO: ikrimae: #ThirdParty-Python: Not sure if this will auto cleanup when the function parameters are destroyed or if the GWorld owner will force it to keep alive

PythonHouseKeeper.h:275
//TODO: ikrimae: #ThirdParty-Python: #BUG: This implementation memory leaks. These delegates never get cleaned up

ikrima added 30 commits February 9, 2018 04:25
…iptstructs which are mutable/reference structs

  -Without it, slate argument binding has errors bc it tries to bind delegates to the uscriptstructs
# Conflicts:
#	Source/UnrealEnginePython/Public/UnrealEnginePython.h
FIX: Rename variable used in PY_RETURN_UOBJECT to __ret to avoid name collision
…PyEngine and removed it from UEPyEditor so that it's usable in standalone scripts.

Fix various build ordering/ifdef issues for shipping
Add clear_event function for multicasting
…r, not value. Accidentally making copies and not updating the actual delegate
…that it's enumerable as a USTRUCT

  -Adding py_ue_ftransform_get() helper to retrieve FTransform from ue_PyUScriptStruct as we're not storing it anymore directly
  -Adding new_ftransform_ptr variant that's meant to point to original struct to allow ref struct syntax
  -Adding global support for returning original data ptr for ref struct or not. Can disable it globally now by just changing py_ue_uscriptstruct_get_data()
    to return the new data

NOTE: Had to explicitly specify ue_PyFTransformType.tp_call; was not picking it up from the base ue_PyUScriptStructType.
             Not sure if this means the subclassing wasn't set up properly and that other important things like basae.tp_dealloc won't get called
  -Handles intiailization of ustruct, copying from existing data, and whether to hold on to ref or not
  -Needed to allow other explicit types such as FVector/FRotator/etc to use same code path
…r & FTransform

NOTE: We just wrote out to original pointer block; now we need to update our local shadow copy
             This might be unnecessary
  -Also adding TBaseStructure<FQuat>
…_init() like with ftransform/fvector

FIX: PyFRotator not properly initializing it's member variables when passed in a single parameter
# Conflicts:
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonMultiColumnTableRow.h
#	Source/UnrealEnginePython/Private/UEPyModule.cpp
…id struct by name

Add ability to pass flags when creating new uobject using class name e.g. AnimMetaData('name', packge, outer, RF_PUBLIC|RF_STANDALONE)
# Conflicts:
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonTreeView.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySlate.cpp
#	Source/UnrealEnginePython/Private/UEPyUScriptStruct.cpp
  -Add enum type for native enums mostly used in slate widgets
  -Added codegen to enable quickly adding new ones
  -FIX: Memory corruption with incorrect delete in ListView
  -SPythonCombobox: Allow updating to options source list
  -Move Combobox to use same structure as SPythonListView (ue_PySPythonComboBox owns ref to
   the combobox TArray list)
  -Add ComboBoxStyle
  -Fixing SSplitter's slot's parameters & on_slot_resized
  -Making EUserInterfaceActionType a native enum in python

Python Plugin: Add Set Folder Path function
ikrima added 29 commits May 18, 2018 00:19
added actor_get_level_sequence and class_has_any_flags
added class_has_any_flags to check for flags on UClass
added py_ue_static_mesh_get_num_triangles to UEPyStaticMesh
added py_ue_sequencer_get_all_spawnables tp UEPySequencer
added actor_component_set_can_ever_affect_navigation to UEPyActor
  -Added EDataValidationResult shim
  -Exposed py_ue_is_data_valid
# Conflicts:
#	Source/UnrealEnginePython/Private/Slate/UEPyFMenuBuilder.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPyFToolBarBuilder.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySCheckBox.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySDockTab.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonComboBox.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonListView.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonMultiColumnTableRow.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonMultiColumnTableRow.h
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonTreeView.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySSplitter.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySTextBlock.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySWidget.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySlate.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySlate.h
slate memory corruption: ue_PySWidget::weakreflist member was not being initialized to nullptr in py_ue_new_swidget()
add_viewport_widget_content: Pass in the dropped z_order param
widget: re-introduce py_dict; useful to have base python widget be a dictionary as it allows for easy extensions to slate widgets in python with new attributes
py_ue_swindow_set_on_window_closed: Use NewSlateDelegate vs NewStaticSlateDelegate so delegate tracker gets GC'ed
py_ue_sdock_tab_set_on_tab_closed: same as above
…gic of using DeferredSlateDelegate tracker

  -FIX: Added ue_py_slate_track_delegates() macro to manually add deferred delegates to tracker

Other cosmetic code fixes as well (wrapping single line if statements with braces)
# Conflicts:
#	Source/UnrealEnginePython/Private/Fbx/UEPyFbxManager.cpp
#	Source/UnrealEnginePython/Private/Fbx/UEPyFbxObject.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPyFSlateStyleSet.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySDockTab.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonShelf.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySlate.h
#	Source/UnrealEnginePython/Private/Slate/UEPySlateDelegate.h
#	Source/UnrealEnginePython/Private/UEPySubclassing.cpp
#	Source/UnrealEnginePython/Private/UObject/UEPyStaticMesh.cpp
#	Source/UnrealEnginePython/Private/UnrealEnginePythonPrivatePCH.h
#	Source/UnrealEnginePython/Private/Wrappers/UEPyESlateEnums.cpp
#	Source/UnrealEnginePython/Private/Wrappers/UEPyFQuat.cpp
# Conflicts:
#	Source/UnrealEnginePython/Private/Slate/UEPySNumericEntryBox.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonListView.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonListView.h
#	Source/UnrealEnginePython/Private/Slate/UEPySPythonMultiColumnTableRow.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySWidget.h
#	Source/UnrealEnginePython/Private/Slate/UEPySlate.h
#	Source/UnrealEnginePython/Private/UEPyModule.cpp
#	Source/UnrealEnginePython/Private/UEPySubclassing.cpp
#	Source/UnrealEnginePython/Private/Wrappers/UEPyFAssetData.cpp
#	Source/UnrealEnginePython/Private/Wrappers/UEPyFQuat.h
#	Source/UnrealEnginePython/Private/Wrappers/UEPyFVector.h
# Conflicts:
#	Source/UnrealEnginePython/Private/Slate/UEPyIStructureDetailsView.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySlateDelegate.h
#	Source/UnrealEnginePython/Private/UEPyEngine.cpp
#	Source/UnrealEnginePython/Private/Wrappers/UEPyFEditorViewportClient.cpp
# Conflicts:
#	Source/UnrealEnginePython/Private/Slate/UEPySWidget.h
#	Source/UnrealEnginePython/Public/PythonBlueprintFunctionLibrary.h
# Conflicts:
#	Source/UnrealEnginePython/Private/Slate/UEPySHorizontalBox.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySVerticalBox.cpp
#	Source/UnrealEnginePython/Private/Slate/UEPySlate.h
# Conflicts:
#	Source/UnrealEnginePython/Private/UEPyModule.cpp
#	Source/UnrealEnginePython/Private/Wrappers/UEPyESlateEnums.cpp
  -Adding missing includes for standalone builds
  -Moving native enum shims into editor only
  -FVector2D() does not initialize the struct
…criptstructs

  -Extend properties() to allow for EFieldIteratorFlags
# Conflicts:
#	Source/UnrealEnginePython/Private/UnrealEnginePython.cpp
Python bug fixes on slate attribute macro
Add editor_refresh_all_browsers
# Conflicts:
#	Source/UnrealEnginePython/UnrealEnginePython.Build.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant