I am wondering if Unreal has a similar functionality to the Find in Blueprints tool where you select a node and see all Blueprints that are using it, but for materials. Would come in extremely handy.
I have also taken a brief look into the python API, but seems like there is no straightforward way to do that there as well.
Unreal Engine does not currently have a built-in tool exactly like âFind in Blueprintsâ specifically for materials. However, there are a few approaches you can take to achieve similar functionality:
Manual Search: You can manually search for materials in Blueprints by using the âFind in Blueprintsâ tool and searching for material references. This can be time-consuming but is a direct way to locate where materials are used.
Python Scripting: While there isnât a straightforward way to do this with the Python API, you can write a custom script to help. You can use the unreal.EditorAssetLibrary to load assets and iterate through them to find material references. Hereâs a basic example to get you started:import unreal
for asset in all_assets:
if asset.asset_class == 'Blueprint':
blueprint = unreal.EditorAssetLibrary.load_asset(asset.object_path)
if blueprint:
nodes = unreal.KismetEditorUtilities.get_all_nodes_for_blueprint(blueprint)
for node in nodes:
if node.get_editor_property('node_title') == material_name:
print(f"Material {material_name} found in {blueprint.get_name()}")
find_material_usage(âYourMaterialNameâ)Community Plugins: Check the Unreal Engine Marketplace or community forums for plugins that might offer this functionality. Sometimes, other developers have created tools that can help with specific needs like this.
Feature Request: Consider submitting a feature request to Epic Games. They often take user feedback into account for future updates and improvements.
Hi Nick, sorry for not being clear, but I am looking to find a way to check which Materials are using certain Material nodes (Texture Sample, Static Switch Parameter, Quality Switch nodes for example).
The blueprint tool was an analogy to the perfect solution, where you search for a BP node and it shows all the BPs that are using that node (found under Tools > Find in Blueprints), except that it works for materials instead of Blueprints.
I understand your need to find which materials are using specific Material nodes in Unreal Engine, similar to the âFind in Blueprintsâ tool. Unfortunately, Unreal Engine doesnât have a built-in tool for this exact purpose. However, here are some approaches you can consider:
Manual Search:
You can manually search for materials by opening each material and checking for the specific nodes. This is time-consuming but straightforward.
Python Scripting:
While the Python API doesnât directly support this, you can write a custom script to help. Hereâs an example to get you started import unreal
for asset in all_assets:
if asset.asset_class == 'Material' or asset.asset_class == 'MaterialInstance':
material = unreal.EditorAssetLibrary.load_asset(asset.object_path)
if material:
nodes = material.get_editor_property('expressions')
for node in nodes:
if node.get_name() == node_name:
print(f"Node {node_name} found in {material.get_name()}")
find_material_node_usage(âTextureSampleâ)
Community Plugins:
Check the Unreal Engine Marketplace or community forums for plugins that might offer this functionality. Other developers might have created tools that can help with specific needs like this.