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-08-28Merge newboolean branch into master.Howard Trickey
This is for design task T67744, Boolean Redesign. It adds a choice of solver to the Boolean modifier and the Intersect (Boolean) and Intersect (Knife) tools. The 'Fast' choice is the current Bmesh boolean. The new 'Exact' choice is a more advanced algorithm that supports overlapping geometry and uses more robust calculations, but is slower than the Fast choice. The default with this commit is set to 'Exact'. We can decide before the 2.91 release whether or not this is the right choice, but this choice now will get us more testing and feedback on the new code.
2020-08-21Cleanup: split `BKE_scene_get_depsgraph()` into two functionsSybren A. Stüvel
Split the depsgraph allocation into a separate function `BKE_scene_ensure_depsgraph()`. Parameters are only passed to those functions that actually need them. This removes the the "if that boolean is `false` this pointer is allowed to be `NULL`" logic and more cleanly decouples code. No functional changes.
2020-08-20Cleanup: use const variables where possible in the Python APICampbell Barton
2020-08-18GPUShader: GL backend isolationClément Foucault
2020-08-18Mesh: merge `mesh_create_eval_final_{view,render}` functionsSybren A. Stüvel
Functions `mesh_create_eval_final_view()` and `mesh_create_eval_final_render()` were doing the exact same thing, except for a hack introduced in d3eb9dddd6b4 (2012-10-08, Better fix for T32846: dupligroup messes up particle instancing on rendering) that appears to be no longer necessary. Besides that, these functions had confusing names. Their functionality changed over time, and whether to do for-render or for-viewport evaluation is now actually determined by the depsgraph evaluation mode. This means that the `..._render` function could evaluate a mesh with viewport settings, and vice versa. The functions are now merged into `mesh_create_eval_final()`, and the hack has been removed. The `OB_NO_PSYS_UPDATE` flag has been removed entirely (instead of keeping it around as deprecated flag), because it was always only temporarily set on objects during mesh evaluation and thus not saved to the blend file. No expected functional changes as far as users are concerned.
2020-08-17Fix error in recent bpy_interface.c split (missed moving define)Campbell Barton
Error in 7341ceb674b2f, this missed moving a local-define when splitting.
2020-08-17Cleanup: split BPY_run_string_ex into two functionsCampbell Barton
Using a boolean to select between eval/exec behavior wasn't very readable.
2020-08-17Cleanup: move Python script execution into BPY_extern_run.hCampbell Barton
This commit renames 'execute' to 'run' because: - This follows Python's "PyRun" which these functions wrap. - Execution functions can use either exec/eval modes, making naming awkward (for future API refactoring).
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: split BPY_extern_python into it's own headerCampbell Barton
Currently BPY_extern.h includes too much mixed functionality.
2020-08-17Cleanup: sort CMake path listsCampbell Barton
2020-08-13GPUShader: Change shader state tracking to be part of the GPUContextClément Foucault
This remove the use of batch->program and replace it with batch->shader. This will allow GL abstraction latter.
2020-08-13Cleanup: clang-formatCampbell Barton
2020-08-11Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-11Python: don't remove existing context overrides when calling an operatorJacques Lucke
Reviewers: campbellbarton, brecht Differential Revision: https://developer.blender.org/D8532
2020-08-10Merge branch 'blender-v2.90-release'Germano Cavalcante
2020-08-10Fix T78113: Random explosions of cloth with self collisionGermano Cavalcante
The problem is caused by a lack of prediction in the `isect_line_segment_tri_v3` that incorrectly confirms some intersections of coplanar segments to the triangle. The solution is to use another algorithm to detect intersections. This also resulted in a slight improvement in the performance: - 1min 17sec to 1min 6sec in my test file Differential Revision: https://developer.blender.org/D8500
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
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-08-03Merge branch 'blender-v2.90-release'Bastien Montagne
2020-08-03Fix parameters in bpy.props.StringProperty Python API docsnutti
There is a parameter typo in Python API document about bpy.props.StringProperty. This patch fixes this. Also this patch should apply to 2.90 branch as well. Reviewed By: Grische, mont29 Differential Revision: https://developer.blender.org/D8430
2020-08-02Docs: add translation keyword argument default for msgctxtnutti
2020-08-02Cleanup: localize creator.c definitionsCampbell Barton
As creator.c is used for the 'main' function, avoid obscure declarations being placed so prominently. - Move Blender as a Python module declarations into it's own section. - Move USD declaration to an 'extern' just before it's called.
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-30GPUBatch & GPUImmediate: Use GPUShader instead of using raw OGL handleClément Foucault
2020-07-29Docs: add translation keyword argument default for msgctxtnutti
2020-07-28Merge branch 'blender-v2.90-release'Jacques Lucke
2020-07-28Cleanup: correct usage of extern-C blocks in various placesJacques Lucke
This removes extern-C blocks around other includes and adds such blocks for some headers that need them.
2020-07-27UI: improve errors when evaluating a number button failsCampbell Barton
Showing the Python error without any explanation is often not enough information and doesn't hint that the error was in the user input. The error report from a invalid expression such as '..1' used to be: ('invalid syntax', ('<string>', 1, 1, '..1')) Now reads: Error evaluating number, see Info editor for details: invalid syntax Address issue raised by T78913.
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-27Cleanup: remove workaround for old BLI_dynstr_vappendf bugCampbell Barton
Remove workaround from 1c806f6bb454dca6f682ecd741bd2fe03b9617bb as this doesn't seem to be needed anymore.
2020-07-24Cleanup: use doxy sections, update comments missed from refactorCampbell Barton
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-20T77086 Animation: Passing Dependency Graph to DriversSybren A. Stüvel
Custom driver functions need access to the dependency graph that is triggering the evaluation of the driver. This patch passes the dependency graph pointer through all the animation-related calls. Instead of passing the evaluation time to functions, the code now passes an `AnimationEvalContext` pointer: ``` typedef struct AnimationEvalContext { struct Depsgraph *const depsgraph; const float eval_time; } AnimationEvalContext; ``` These structs are read-only, meaning that the code cannot change the evaluation time. Note that the `depsgraph` pointer itself is const, but it points to a non-const depsgraph. FCurves and Drivers can be evaluated at a different time than the current scene time, for example when evaluating NLA strips. This means that, even though the current time is stored in the dependency graph, we need an explicit evaluation time. There are two functions that allow creation of `AnimationEvalContext` objects: - `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float eval_time)`, which creates a new context object from scratch, and - `BKE_animsys_eval_context_construct_at(AnimationEvalContext *anim_eval_context, float eval_time)`, which can be used to create a `AnimationEvalContext` with the same depsgraph, but at a different time. This makes it possible to later add fields without changing any of the code that just want to change the eval time. This also provides a fix for T75553, although it does require a change to the custom driver function. The driver should call `custom_function(depsgraph)`, and the function should use that depsgraph instead of information from `bpy.context`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D8047
2020-07-19Cleanup: spellingCampbell Barton
2020-07-14PyAPI: support element multiplication for vector, matrix, quaternionsCampbell Barton
This was disabled during 2.8x for smooth porting of 2.7x scripts, Now '@' is used for matrix multiplication, support '*' to multiple vector elements. See T56276.
2020-07-13LibOverride: Cleanup: Remove option to disable library overrides.Bastien Montagne
Code is mature enough now to not need this anymore, people who do not want to use liboverrides can just not create them.
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-07-10Expose override flags to python RNA properties definition.Bastien Montagne
Time will tell whether we need to expose more RNA override flags here. Implements/Fix T78534. Differential Revision: https://developer.blender.org/D8250