This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Julian Eisel 280dac323c Blenlib: Add BLI_assert_msg() for printing an extra string if the assert fails
It always bothered me that we'd do the `BLI_assert(... || !"message")` trick to
print a message alongside the assert, while it should be trivial to have a way
to pass an extra string as additional argument.

This adds `BLI_assert_msg()` with a second argument for a message. E.g.:
```
BLI_assert_msg(
    params->rename_id == NULL,
    "File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile.");
```

On failure this will print like this:
```
0   Blender                             0x00000001140647a3 BLI_system_backtrace + 291
[...]
13  Blender                             0x00000001092647a6 main + 3814
14  libdyld.dylib                       0x00007fff203d8f5d start + 1
BLI_assert failed: source/blender/editors/space_file/file_ops.c:2352, file_directory_new_exec(), at 'params->rename_id == ((void*)0)'
  File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile.
```

Reviewed by: Sybren Stüvel, Jacques Lucke, Sergey Sharybin, Campbell Barton

Differential Revision: https://developer.blender.org/D11827
2021-07-12 11:46:24 +02:00
2021-07-06 12:05:27 +10:00
2021-03-26 16:15:02 +01:00
2010-10-13 14:44:22 +00:00

Sphinx Warnings

Traceback (most recent call last):
  File "/var/lib/gitea/custom/sphinx/venv/bin/sphinx-build", line 5, in <module>
    from sphinx.cmd.build import main
ModuleNotFoundError: No module named 'sphinx'

Note the preview is not accurate and warnings may not indicate real issues.

S
Description
Archive of Blender with old branches
Readme
823 MiB
Languages
C 67.4%
C++ 23.4%
Python 6.1%
CMake 1.5%
GLSL 1.1%
Other 0.4%