@@ -15,7 +15,7 @@ Assigning a material to a primitive component
1515Once your material (instanced or non instanced, constant or dynamic) is ready, you want to assign it to a PrimitiveComponent:
1616
1717
18- ``` py
18+ ``` python
1919component = self .uobject.get_actor_component(' Mesh' )
2020material = ue.load_object(Material, ' /Game/Materials/Iron' )
2121component.set_material(index, material);
@@ -24,7 +24,7 @@ component.set_material(index, material);
2424Creating a Material (editor only)
2525---------------------------------
2626
27- ``` py
27+ ``` python
2828from unreal_engine.classes import Material
2929new_material = Material()
3030new_material.set_name(' New Funny Material' )
@@ -38,7 +38,7 @@ You have two ways to create a instanced material:
3838
3939(new_material is a reference to a previously created/loaded material)
4040
41- ``` py
41+ ``` python
4242from unreal_engine.classes import MaterialInstancedConstant
4343
4444material_instance = MaterialInstancedConstant()
@@ -49,7 +49,7 @@ material_instance.save_package('/Game/Materials/instanced')
4949
5050or the shortcut:
5151
52- ``` py
52+ ``` python
5353import unreal_engine as ue
5454# the material instance will get the name of the parent with the _inst suffix
5555material_instance = ue.create_material_instance(new_material)
@@ -60,19 +60,19 @@ Creating a Material Instance Dynamic
6060
6161You can create a MID (Material Instance Dynamic) from a ,aterial instance:
6262
63- ``` py
63+ ``` python
6464mid = self .uobject.create_material_instance_dynamic(material_instance)
6565```
6666
6767
68- Listing, getting and chaning available material properties
69- ----------------------------------------------------------
68+ Listing, getting and changing available material properties
69+ -----------------------------------------------------------
7070
7171To modify a material's property you need to know its name.
7272
7373You cannot access the property list from a material instance, you need to get it from the parent:
7474
75- ``` py
75+ ``` python
7676parent_material = material_instance.Parent
7777
7878for expression in parent_material.Expressions:
0 commit comments