Announcement

Collapse
No announcement yet.

How to get Params from a section in Sequencer?

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

    How to get Params from a section in Sequencer?

    Hi, I followed this video to add tracks to Sequencer.


    Then I want to change the animations to others, I tried this to get the current animation:

    Code:
    animation_section.get_editor_property('Params')
    and unreal returned this:
    Code:
    LogPython: Error: Exception: MovieSceneFloatSection: Failed to find property 'Params' for attribute 'Params' on 'MovieSceneFloatSection'
    Any ideas?

    #2
    If you take a look at 'Editor Properties' section of the MovieSceneSkeletalAnimationParams docs (https://docs.unrealengine.com/en-US/...ionParams.html), you'll see that there is no editor property called 'Params', nor for any other class that I can find.

    My guess is that 'Params' is a reserved keyword for setting editor properties that allows you to set all editor properties by passing in a struct.
    Editor properties are stored as structs anyway, so if this is true, then passing 'Params' as the parameter name will allow you to set all of the editor properties for an object by passing in a struct of the same Row Structure (format).

    Your error suggests that this keyword is only applicable for writing properties.
    If you wish to read an editor property from your object, you will need to name a single property.


    I realise it's still early days for the python plugin, but I really hope Epic put more work into its documentation... At the moment, much of our learning how to use it is through guessing like I'm doing here...
    Last edited by jasper.law; 08-30-2019, 12:00 PM.

    Comment


      #3
      You're exception is providing a hint: MovieSceneFloatSection. You're most likely not retrieving the correct section from the correct track (AFAIK every track type has its own section type).

      MovieSceneSkeletalAnimationParams does have a 'params' property:

      https://docs.unrealengine.com/en-US/...imationSection

      Comment

      Working...
      X