SourceControlState get source control status of an asset.

Might be a newbie question, but I am trying to get the status of an asset. Looks like this is the way to go.…ceControlState

sourceState = unreal.SourceControlState("/Game/Dev/SM_Move")
<Struct ‘SourceControlState’ (0x000002B60E301868) {filename: "… is_valid: False, … …>
where every thing is set to false.
I have tried this on things that are checked in and not checked in and there is no difference except the name.

Does anyone have example code where this works? Basically want to test if an asset is checked out or not.


The documentation you linked is to the Struct that unreal.SourceControl will return. Running print unreal.SourceControl.query_file_state('/Game/my/asset') returns a unreal.SourceControlState with what I can tell correct values.

@andreas.ranman thanks… I was missing the ‘.query_file_state’ ! knew it had to be something simple. Wish Unreal would add more examples Houdini Vex, and 3ds Max Script have lots of examples in their docs, and really made learning the languages easier. Cheers