Hey all,
I am working on a tool that will get some details from an actor in unreal using python. I am specifically looking for the shadow cache invalidation behavior which is under the lighting tab of the actor in unreal.
Currently I have access to the actor in python as well as I am able to get the mesh data using the actor.get_components_by_class(unreal.StaticMeshComponent). By this logic I would think the data I was looking for would be under the LightComponent class but this returns blank even tho there is lighting settings associated with the actor.
I have been going through the unreal python docs to try and find the answer but coming up with nothing other than unreal.ShadowCacheInvalidationBehaviour exists.
The tabs are categories for the UProperties, see the source in PrimitiveComponent.h,
/** Control shadow invalidation behavior, in particular with respect to Virtual Shadow Maps and material effects like World Position Offset. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, meta=(EditCondition="CastShadow"))
EShadowCacheInvalidationBehavior ShadowCacheInvalidationBehavior;
It is also defined for other types like PrimitiveSceneProxy, FoliageType, LandscapeGrasType, LandscapeProxy.
As StaticMeshComponent inherits from PrimitiveComponent you should have this property available already in your StaticMeshComponent.
You can find it in the docs searching for shadow_cache_invalidation_behavior
1 Like