Is there a "Select by Type"-Option for the Components Tab?

I have a lot of Scene Components and wish to select all Static Mesh Components grouped in them.

My goal is to set those SMC to cast Hidden Shadow. Because there is no “Set Hidden Shadow” Node, only a “Get Hidden Shadow” Node, do i need to do this manually?

I was hoping to spawn an Actor and set all SMCs inside the Actor to Cast Hidden Shadow… Is it possible to do this with C++ ?

Hey!

If I got your problem correctly you have one particular actor, which has a lot of scene components and SMC’s that attached to those scene components?


If so, I would add a same tag to all of your SMC’s and access them (for instance) in BeginPlay() function.
Here are few useful links from previous threads how to work with tags:


Let me know if it solved your problem :)

With regards

Hey, thx for your idea, but this is not quite i was looking for.
I was hoping to “select by Type” the SMC’s in the BP Editor, so like this:

I could loop over the SMC’s of my Actor with the “Get Components by Class” Node (so Tags are not needed for this if you want to select all of them), but there is unfortunately only a getter for the “Hidden Shadow” flag and no setter…

Well I will do it manually now, but this is a bit of annoying. But I will check the C++ possibilities on that, because the future goal is to set this “Hidden Shadow” flag on Procedural Mesh Components i will create at Runtime. Hopefully there is a way to make this work…

Hey!

It seems I completely misunderstood you. If you need to do this in C++, I checked the documentation of UPrimitiveComponent which fortunately has a public boolean variable bCastHiddenShadow. So in c++ it should be possible to access that variable through SMC and set it for each SMC easily.



I also tried to do this using blueprints and when you uncheck the “Context Sensitive” boolean in the upper corner of the box where you type in the node name, you could find a function “SetCastShadow”. It worked for me when I recreated the issue.



Let me know if it works out for you. :slight_smile:

I think SetCastShadow is one Level above, so you need to have this activated, otherwise there will be no “CastHidden”-Shadow at all, even if you activate it… So SetCastShadow is by default active when i create my Procedural Mesh Component, no problem here. I tested the possibility of PMC’s having the feature “CastHiddenShadow” in general (With Eject and then activate it) and it’s working.

Your suggestion, to edit the public boolean variable bCastHiddenShadow is the right (and easiest) way. That worked, big thanks for that!

But the main question (“Select by Type”-Option for the Components Tab) is sadly still open… it’s certainly possible (with the new knowledge here) to write a function doing this at Runtime, but for the Editor I’m not sure how to find a workaround (without writing some kind of Plug-in).

After checking the documentation of UPrimitiveComponent, I found that bCastHiddenShadow is BlueprintReadOnly, which means that only getter for that variable is generated.

UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow", DisplayName = "Hidden Shadow"))
        	uint32 bCastHiddenShadow:1;

So I can only confirm that you can only get this variable via Blueprint Editor and not set it. Sadly I don’t know workaround to its value in Blueprint Editor. One way to do it is to modify the source code, but I’m not sure if it’s the best way to solve the problem.



With regards.