Rama - you probably want to add a call to GetIsVisible (which is being renamed to IsInViewport in 4.6), to limit returned widgets to only the top level viewport widgets, otherwise you'll get all the nested ones too.
Announcement
Collapse
No announcement yet.
(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required!
Collapse
X
-
Originally posted by NickDarnell View PostRama - you probably want to add a call to GetIsVisible (which is being renamed to IsInViewport in 4.6), to limit returned widgets to only the top level viewport widgets, otherwise you'll get all the nested ones too.
I will add a bool option to only retrieve top level widgets.
I actually intended that my node have the power to iterate over internal widgets in case that was something the BP user wanted to do deliberately
But having an optional top level filter is a great idea!
~~~
UMG, Get All Widgets Of Class
Updated!
Now you have an optional bool filter to only return widgets that are at the top level, see Nick Darnell's comment for more information
~~~
My C++ Code For this Node
Code:void UVictoryBPFunctionLibrary::GetAllWidgetsOfClass(UObject* WorldContextObject, TSubclassOf<UUserWidget> WidgetClass, TArray<UUserWidget*>& FoundWidgets,bool TopLevelOnly) { //Prevent possibility of an ever-growing array if user uses this in a loop FoundWidgets.Empty(); //~~~~~~~~~~~~ if(!WidgetClass) return; if(!WorldContextObject) return; UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject); if(!World) return; //~~~~~~~~~~~ for(TObjectIterator<UUserWidget> Itr; Itr; ++Itr) { if(Itr->GetWorld() != World) continue; //~~~~~~~~~~~~~~~~~~~~~ if( ! Itr->IsA(WidgetClass)) continue; //~~~~~~~~~~~~~~~~~~~ //Top Level? if(TopLevelOnly) { //only add top level widgets if(Itr->GetIsVisible()) //IsInViewport in 4.6 { FoundWidgets.Add(*Itr); } } else { //add all internal widgets FoundWidgets.Add(*Itr); } } }
Pic
♥
RamaLast edited by Rama; 11-01-2014, 06:30 PM.UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Hi Rama,
Does your "Get Static Mesh Vertex Locations" node gather vertex information for skeletal meshes? I noticed my scene doesn't work with meshes with morph targets. For example, I have a blanket that has a morph target (before & after burning). I am unable to propagate fire on that. Vertex highlights do not appear over that morph target mesh while appearing on other normal static meshes. Is there a work around this?
Thanks,
CatchPhyre
Comment
-
Originally posted by CatchPhyre View PostHi Rama,
Does your "Get Static Mesh Vertex Locations" node gather vertex information for skeletal meshes? I noticed my scene doesn't work with meshes with morph targets. For example, I have a blanket that has a morph target (before & after burning). I am unable to propagate fire on that. Vertex highlights do not appear over that morph target mesh while appearing on other normal static meshes. Is there a work around this?
Thanks,
CatchPhyre
RamaLast edited by Rama; 11-02-2014, 03:29 AM.UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Originally posted by ChrisTm View PostRama , really need that you become a Epic developer and do it in the official release
I would be not suprised
Get All Widgets of Class Pull Request To Epic
I've submitted my Get All Widgets of Class node to Epic!
Vote for Get All Widgets Of Class On Github!
You can vote for it here!
(you must be logged into your github to access this link)
https://github.com/EpicGames/UnrealEngine/pull/569
RamaUE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Originally posted by RumbleMonk View PostRama, the get all supported screen resolution node is a highly useful one as well that'd be great to be part of the official release... and probably many others.
Big thanks for sharing these!
RamaUE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Jeez Rama.. You're on fireAnd for sure, I'll remind ya!
Speaking of tracing - One of the things that's been bugging me lately is that if you don't want to use physics but still want interaction between actors you have to use overlaps (as event hits don't fire without physics). A shortcoming of that is you end up having to trace between the overlapping actors and as such will end up tracing between the pivot of the actors/components giving you inaccurate overlap point normals (not to mention no impact point).
If you ever come across that problem feel free to write a better overlapper that returns more data. I'm ok-ish with my current hacky solution, it's nasty and restrictive but works well enough. Sort of.
There's gold in dem here parts of the woods anyway. Good luck with Solus!
Comment
-
Originally posted by RumbleMonk View Post(as event hits don't fire without physics). A shortcoming of that is you end up having to trace between the overlapping actors
I actually have had success getting hit events between characters and static mesh actors, using a custom static mesh actor class.
You have to cause an impact, by jumping and then falling, or bumping into the wall, but I can actually get the hit event to fire even without physics involved.
If character is just standing on the floor it wont fire hit events constantly though, you do have to jump and then land.
What is your actual use case for which you are finding non-physics hit events are not firing?
RamaUE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
~~
2 New Nodes For You
Create UObject
Create Primitive Component, Added to Scene at Location!
These two nodes let you create UObjects at runtime!
Please note you absolutely must save off the return value to a variable or UE4 will Garbage Collect your new UObject within a short time!
Please especially note that if you create a Primitive Component, I actually add it to the world for you so it is visible and has collision!
~~~
C++ Code For You
Here's the code!
Code:UObject* UVictoryBPFunctionLibrary::CreateObject(UObject* WorldContextObject,UClass* TheObjectClass, FName Name) { if(!TheObjectClass) return NULL; //~~~~~~~~~~~~~~~~~ //using a context object to get the world! UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject); if(!World) return NULL; //~~~~~~~~~~~ return StaticConstructObject( TheObjectClass, World, Name); }
Code:UPrimitiveComponent* UVictoryBPFunctionLibrary::CreatePrimitiveComponent( UObject* WorldContextObject, TSubclassOf<UPrimitiveComponent> CompClass, FName Name, FVector Location, FRotator Rotation ){ if(!CompClass) return NULL; //~~~~~~~~~~~~~~~~~ //using a context object to get the world! UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject); if(!World) return NULL; //~~~~~~~~~~~ UPrimitiveComponent* NewComp = ConstructObject<UPrimitiveComponent>( CompClass, World, Name); if(!NewComp) return NULL; //~~~~~~~~~~~~~ NewComp->SetWorldLocation(Location); NewComp->SetWorldRotation(Rotation); NewComp->RegisterComponentWithWorld(World); return NewComp; }
RamaUE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
New Node
Get Static Mesh Vertex Locations!
Dear CatchPhyre,
As per your request I have now made a node to get the rotated,scaled,translated positions of all vertices of a static mesh!
This node is live in the current most recent plugin version!
https://wiki.unrealengine.com/File:VictoryPlugin.zip
Please refer carefully to my picture of how to set up this node correctly!
~~~
Pictures
Enjoy!
Rama
PS
You're welcome!
Congrats on your first post, welcome to the forums!
UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin
♥ Rama
Comment
-
Hi Rama,
Thanks for the updated nodes. You did mention earlier about the challenges in returning vertex color information of vertices. Please bear with my ignorance...Still new to a lot of things here. I have made a Master Material with lots of procedural controls to allow material transitioning. But they are not giving me the aesthetic appeal I am trying to achieve.
If you are able to gather vertex positions and transformation information, why do you suggest it is difficult to set & get vertex color information in runtime? You also mentioned dynamic vs static mesh. By making a static mesh "Moveable" doesn't it become dynamic? Also, in the Blueprint Communication content example, there is an Ice Sphere that will melt when player fires fireballs at it. Using World Position Offsets, the ice actually morphs away to little droplets. Isn't that modifying a static mesh dynamically at runtime?
I need to tie in Dynamic Material Instancing to dynamic vertex color info. I am trying to transition material from where I click on the mesh. So for example, if I click on a spot, I will set that vertex color as red and each closest vertex to it will turn red as the fire propagates. This will reveal the underlying material.
If you can clarify my doubts further, I would deeply appreciate it. I am not able to fully understand the technical difficulties here.
Thanks,
CatchPhyre
Comment
Comment