Skip to content

Commit 7df2823

Browse files
author
rdeioris
authored
Update Material_API.md
1 parent 5cd39e8 commit 7df2823

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/Material_API.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Assigning a material to a primitive component
1515
Once 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
1919
component = self.uobject.get_actor_component('Mesh')
2020
material = ue.load_object(Material, '/Game/Materials/Iron')
2121
component.set_material(index, material);
@@ -24,7 +24,7 @@ component.set_material(index, material);
2424
Creating a Material (editor only)
2525
---------------------------------
2626

27-
```py
27+
```python
2828
from unreal_engine.classes import Material
2929
new_material = Material()
3030
new_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
4242
from unreal_engine.classes import MaterialInstancedConstant
4343

4444
material_instance = MaterialInstancedConstant()
@@ -49,7 +49,7 @@ material_instance.save_package('/Game/Materials/instanced')
4949

5050
or the shortcut:
5151

52-
```py
52+
```python
5353
import unreal_engine as ue
5454
# the material instance will get the name of the parent with the _inst suffix
5555
material_instance = ue.create_material_instance(new_material)
@@ -60,19 +60,19 @@ Creating a Material Instance Dynamic
6060

6161
You can create a MID (Material Instance Dynamic) from a ,aterial instance:
6262

63-
```py
63+
```python
6464
mid = 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

7171
To modify a material's property you need to know its name.
7272

7373
You cannot access the property list from a material instance, you need to get it from the parent:
7474

75-
```py
75+
```python
7676
parent_material = material_instance.Parent
7777

7878
for expression in parent_material.Expressions:

0 commit comments

Comments
 (0)