Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-02Cleanup: use logging for "Found bundled Python" messageCampbell Barton
This was added when Python was initially bundled so any problems finding Python could be investigated. Move this to use logging so we can show this information when needed.
2020-10-14Fix T81688: BPY_thread_save crashes with Python 3.9Campbell Barton
Calling PyEval_ReleaseLock() was crashing with Python 3.9 because it accessed the NULL pointer set by PyThreadState_Swap(). This happened when calling ViewLayer.update() for example. While the existing logic could be fixed by swapping the thread-state back before calling PyEval_ReleaseLock(), this depends on functions which are tagged to be removed by v4.0. Replace use of deprecated functions by calling PyEval_SaveThread(), instead of inlining the logic, using _PyThreadState_UncheckedGet() to prevent Python aborting. The call to PyEval_ThreadsInitialized has been removed as threads are now initialized with Python. This could be replaced with Py_IsInitialized() however it doesn't look like this is necessary. This is compatible with Python 3.7 & 3.9.
2020-10-14Cleanup: multi-line comment blocksCampbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-09Revert "Revert "BGL: Workaround broken bgl usage caused by GPU refactor""Clément Foucault
This reverts commit f23bf4cb109cb8f39f873c4f80acbec3f33b098c.
2020-10-08Revert "BGL: Workaround broken bgl usage caused by GPU refactor"Clément Foucault
This reverts commit f12b0373f322b710b9fa5cebb67bdf363ff90e9f.
2020-10-08BGL: Workaround broken bgl usage caused by GPU refactorClément Foucault
This directly adress the issues caused by rB536c2e0ec916. Since the state tracking is done at a lower level, using the bgl functions needs to be safegarded by the state manager. The current workaround is to bypass `apply_state` when inside a callback that used a `bgl` function. Related to T80730. This fix T81003. Also this fix the default blend equation for callbacks. Fixes T80169 T81289.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-22Fix T78823: Slash in custom property name does not workHans Goudey
Some characters: `'`, `"`, and `\`, can cause problems with RNA paths. Instead of using more complicated handling to deal with those cases, we can just prevent these characters from being used in custom property names. This commit checks for these characters to `idp_try_read_name`, where other checks like length are already done. Differential Revision: https://developer.blender.org/D8839
2020-09-12Cleanup: Remove GLEW dependencies outside of GL moduleClément Foucault
2020-08-20Cleanup: use const variables where possible in the Python APICampbell Barton
2020-08-17Cleanup: Pass 'FILE *' instead of 'void *' for BPY_python_backtraceCampbell Barton
This was committed as a temporary workaround in 82150f5641364 as release builds were failing (only debug builds worked). This adds `stdio.h` to the header which is now split into a file that contains more specialized functionality. Also move function body inside BPY_python_backtrace, removing PyC_StackPrint as we have PyC_StackSpit() for similar functionality that can be called from a debugger.
2020-08-17Cleanup: sort CMake path listsCampbell Barton
2020-08-07Cleanup: PyBGL, Clang-Tidy readability-function-size fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-function-size` rule in the `source/blender/python` module. It's just `BPyInit_bgl()` that's been split up into one or two smaller functions per OpenGL version. No functional changes.
2020-08-07Cleanup: Python, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/python` module. No functional changes.
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-06Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-06Workaround release builds failingCampbell Barton
Issue caused by e9c4325515aed.
2020-08-06Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-06Python: include Python stack trace in the crash logDaniel Bailey
This helps Python developers troubleshoot errors when Python causes a crash.
2020-08-06Cleanup: use doxy sections for py_capi_utils.cCampbell Barton
2020-07-27PyAPI: simplify syntax error reportsCampbell Barton
The result of syntax errors read poorly in reports, resulting in cryptic and unhelpful information. Change PyC_ExceptionBuffer_Simple only to extract the initial text, making syntax errors when entering invalid numeric expressions into buttons easier to follow.
2020-07-23Cleanup: update comments, remove disabled codeCampbell Barton
2020-07-23Cleanup: remove redundant static variable useCampbell Barton
This hasn't been needed since Python 3.7x.
2020-07-22Cleanup: minor changes to doxy sections and namingCampbell Barton
Use py_bl_math prefix instead of M_Math.
2020-07-21Drivers: add lerp and clamp functions to namespace.Alexander Gavrilov
Implementation of lerp without a function requires repeating one of the arguments, which is not ideal. To avoid that, add a new function to the driver namespace. In addition, provide a function for clamping between 0 and 1 to support easy clamped lerp, and a smoothstep function from GLSL that is somewhat related. The function implementations are added to a new bl_math module. As an aside, add the round function and two-argument log to the pylike expression subset. Differential Revision: https://developer.blender.org/D8205
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-04-01Cleanup: use doxy sections for 'idprop' APICampbell Barton
2020-03-25Cleanup: use 'r_' prefix for output argumentsCampbell Barton
Also pass some args as 'const'.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-06Cleanup: Fix forward declaration of headersDalai Felinto
2020-02-20Cleanup: use named unsigned types in the Python APICampbell Barton
2020-01-23CMake: Refactor external dependencies handlingSergey Sharybin
This is a more correct fix to the issue Brecht was fixing in D6600. While the fix in that patch worked fine for linking it broke ASAN runtime under some circumstances. For example, `make full debug developer` would compile, but trying to start blender will cause assert failure in ASAN (related on check that ASAN is not running already). Top-level idea: leave it to CMake to keep track of dependency graph. The root of the issue comes to the fact that target like "blender" is configured to use a lot of static libraries coming from Blender sources and to use external static libraries. There is nothing which ensures order between blender's and external libraries. Only order of blender libraries is guaranteed. It was possible that due to a cycle or other circumstances some of blender libraries would have been passed to linker after libraries it uses, causing linker errors. For example, this order will likely fail: libbf_blenfont.a libfreetype6.a libbf_blenfont.a This change makes it so blender libraries are explicitly provided their dependencies to an external libraries, which allows CMake to ensure they are always linked against them. General rule here: if bf_foo depends on an external library it is to be provided to LIBS for bf_foo. For example, if bf_blenkernel depends on opensubdiv then LIBS in blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES. The change is made based on searching for used include folders such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries to LIBS ion that CMakeLists.txt. Transitive dependencies are not simplified by this approach, but I am not aware of any downside of this: CMake should be smart enough to simplify them on its side. And even if not, this shouldn't affect linking time. Benefit of not relying on transitive dependencies is that build system is more robust towards future changes. For example, if bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES and all such code is moved to bf_blenkernel this will not break linking. The not-so-trivial part is change to blender_add_lib (and its version in Cycles). The complexity is caused by libraries being provided as a single list argument which doesn't allow to use different release and debug libraries on Windows. The idea is: - Have every library prefixed as "optimized" or "debug" if separation is needed (non-prefixed libraries will be considered "generic"). - Loop through libraries passed to function and do simple parsing which will look for "optimized" and "debug" words and specify following library to corresponding category. This isn't something particularly great. Alternative would be to use target_link_libraries() directly, which sounds like more code but which is more explicit and allows to have more flexibility and control comparing to wrapper approach. Tested the following configurations on Linux, macOS and Windows: - make full debug developer - make full release developer - make lite debug developer - make lite release developer NOTE: Linux libraries needs to be compiled with D6641 applied, otherwise, depending on configuration, it's possible to run into duplicated zlib symbols error. Differential Revision: https://developer.blender.org/D6642
2019-12-20Cleanup: remove redundant 'char *' castsCampbell Barton
2019-12-11PyAPI: add utility functions get the size from an evaluated stringCampbell Barton
Allows including null bytes in the resulting string.
2019-10-22Merge branch 'blender-v2.81-release'Campbell Barton
2019-10-22Cleanup: remove BLI_dynstr use in py_capi_utilsCampbell Barton
Needed for standalone mathutils module.
2019-10-16PyAPI: use public API's for module & builtin accessCampbell Barton
D6038 by @Dormouse
2019-10-16Cleanup: define PY_SSIZE_T_CLEAN for PythonCampbell Barton
Silence deprecation warnings running with Python 3.8.
2019-10-16Cleanup: warnings building with Python 3.8Campbell Barton
2019-10-16Fix for building with Python 3.8Campbell Barton
2019-10-01Fix ImBuf.load failure showing filename as garbage bytesColin Basnett
Differential Revision: https://developer.blender.org/D5879
2019-09-30ImBuf Py API: implement resize method argumentCampbell Barton
2019-09-30PyC API: utility to parse a string as an RNA like enumCampbell Barton
More convenient than comparing strings, with the advantage that errors don't need to repeat expected values.
2019-09-30Cleanup: spellingCampbell Barton
2019-09-25LibOverride: Fix 'overridable' flag desapearing when setting IDProp from py ↵Bastien Montagne
code. Do not see any reason not to copy over the flag of the old, existing IDProp to the new one when assigning (e.g. `C.object['prop'] = 0.5` would nuke that IDProp flag).
2019-09-23ImBuf: add planes, channels attributesCampbell Barton
D5857 by @cmbasnett
2019-09-19Fix T70060: Add bgl wrapper for glVertexAttribIPointerJacques Lucke
2019-09-16ImBuf Py API: add filepath accessCampbell Barton
D5804 by @cmbasnett with setter support added.