Blender (software): Difference between revisions

 
Line 127: Line 127:
===MVP matrices===
===MVP matrices===
[https://github.com/blender/blender/blob/v2.93.0/doc/python_api/examples/gpu.9.py Example python code]
[https://github.com/blender/blender/blob/v2.93.0/doc/python_api/examples/gpu.9.py Example python code]
<pre>
<syntaxhighlight lang="python">
# Model matrix
# Model matrix
my_object.matrix_world
my_object.matrix_world
Line 137: Line 137:
projection_matrix = bpy.context.scene.camera.calc_matrix_camera(
projection_matrix = bpy.context.scene.camera.calc_matrix_camera(
     bpy.context.evaluated_depsgraph_get(), x=WIDTH, y=HEIGHT)
     bpy.context.evaluated_depsgraph_get(), x=WIDTH, y=HEIGHT)
</pre>
</syntaxhighlight>


===Python Modules===
===Python Modules===