20tab / UnrealEnginePython

Embed Python in Unreal Engine 4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can't set start frame and end frame when importing abc(alembic) files.

HanChangHun opened this issue · comments

commented
def import_sampled_asset(file_path, asset_path, start_frame, end_frame):
	factory = AlembicImportFactory()
	factory.bShowOption = True
	factory.ImportSettings.ImportType = EAlembicImportType.Skeletal
	factory.ImportSettings.ConversionSettings.Preset = EAbcConversionPreset.Max
	factory.ImportSettings.ConversionSettings.Rotation = FVector(90, 0, 0)
	factory.ImportSettings.SamplingSettings.FrameStart = start_frame
	factory.ImportSettings.SamplingSettings.FrameEnd = end_frame
	print(type(factory.ImportSettings.SamplingSettings.FrameEnd))

	assets = factory.factory_import_object(file_path, asset_path)

	assets.save_package()

When I ran the code above, I noticed Skeleton and Max changed fine (the other settings also changed fine!). However, the Frame Start and Frame End did not change.
I noticed when importing is running, the value changed default.
In my case, the Alumbic file is heavy so I have to split the frame and import it. Please help me.