Announcement

Collapse
No announcement yet.

Is is possible return reference to folder selected in content browser with Python?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is is possible return reference to folder selected in content browser with Python?

    Hi, to return selected asset I use

    Code:
     
     selected = unreal.GlobalEditorUtilityBase.get_default_object().get_selected_assets()
    But when I try to get reference to folder, returned array empty.
    Please help me, how can I return reference to folder selected in content browser with Python?

    #2
    Are you looking to get which folder the selected assets are in?

    Code:
    selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
    asset = selected_assets[0]
    directory_for_asset = unreal.Paths.get_path(asset.get_path_name())

    Comment


      #3
      Thank You andreas.ranman for reply.
      No, I am looking for method that return me selected folder as path (string or any other type), without selecting any assets just folder.

      Comment


        #4
        I made a post asking this same question over 4 months ago:
        https://forums.unrealengine.com/deve...er#post1592835

        Sadly, no answer yet.

        Comment

        Working...
        X