Patches to Bf Blender for CAD development. https://tornavis.org/
Go to file
Jacques Lucke 8adebaeb7c Modifiers: measure execution time and provide Python access
The goal is to give technical artists the ability to optimize modifier usage
and/or geometry node groups for performance. In the long term, it
would be useful if Blender could provide its own UI to display profiling
information to users. However, right now, there are too many open
design questions making it infeasible to tackle this in the short term.

This commit uses a simpler approach: Instead of adding new ui for
profiling data, it exposes the execution-time of modifiers in the Python
API. This allows technical artists to access the information and to build
their own UI to display the relevant information. In the long term this
will hopefully also help us to integrate a native ui for this in Blender
by observing how users use this information.

Note: The execution time of a modifier highly depends on what other
things the CPU is doing at the same time. For example, in many more
complex files, many objects and therefore modifiers are evaluated at
the same time by multiple threads which makes the measurement
much less reliable. For best results, make sure that only one object
is evaluated at a time (e.g. by changing it in isolation) and that no
other process on the system keeps the CPU busy.

As shown below, the execution time has to be accessed on the
evaluated object, not the original object.

```lang=python
import bpy
depsgraph = bpy.context.view_layer.depsgraph
ob = bpy.context.active_object
ob_eval = ob.evaluated_get(depsgraph)
modifier_eval = ob_eval.modifiers[0]
print(modifier_eval.execution_time, "s")
```

Differential Revision: https://developer.blender.org/D17185
2023-02-06 15:40:15 +01:00
.gitea Gitea: add merge message templates 2023-01-30 23:48:41 +01:00
.github GitHub: add PR template 2021-10-23 10:49:51 +05:30
build_files Vulkan: Fix compilation on Linux. 2023-01-31 09:23:21 +01:00
doc PyDoc: resolve bpy.types & bpy.ops expanding sub-modules inline 2023-01-20 14:04:34 +11:00
extern Cleanup: Change VMA from CRLF to LF. 2023-02-02 08:23:54 +01:00
intern Fix Cycles OneAPI build error after recent changes 2023-02-06 15:36:49 +01:00
release Geometry Nodes: Tweak menu location of sample nodes 2023-02-03 16:26:56 -05:00
source Modifiers: measure execution time and provide Python access 2023-02-06 15:40:15 +01:00
tests Cycles: Tests: Add option to increase SPP for manual comparisons 2023-02-03 21:00:47 +01:00
.arcconfig
.clang-format Cleanup: use compliant YAML for '.clang-format' 2023-01-03 11:53:41 +11:00
.clang-tidy Clang-tidy: Ignore variable name length and .c/.cc include warnings 2022-05-06 15:26:54 +02:00
.editorconfig pyproject: add configuration for autopep8 2022-04-22 10:13:39 +10:00
.git-blame-ignore-revs Cleanup: git-blame-ignore-revs: Update policy & commits 2021-01-29 13:20:32 +05:30
.gitignore Compositor automated testing 2021-03-26 16:15:02 +01:00
.gitmodules
CMakeLists.txt Build: Remove unused `BLENDER_GL_LIBRARIES`. 2023-01-30 12:04:44 +01:00
COPYING
GNUmakefile GNUmakefile: add convenience target 'check_wiki_file_structure' 2023-01-28 16:41:12 +11:00
README.md Docs: change readme.rst to README.md, as Gitea can't render rst 2023-01-16 17:54:11 +01:00
make.bat Cleanup: trailing space 2023-01-31 15:49:04 +11:00
pyproject.toml Cleanup: fix various typos 2022-06-28 15:56:16 +02:00

README.md

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.