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
2022-04-13Docs: correct RST syntax for GPU documentationCampbell Barton
2022-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-13gpy.types.GPUUniformBuf: support any object exposing buffer interfaceGermano Cavalcante
Since uniform buffers are generally structs and not sequences, `BPyGPU_BufferType` objects are not suitable for filling the buffer.
2022-04-13gpu.types.Buffer: fill buffer interface with just what is requestedGermano Cavalcante
Use the `flags` parameter to avoid unnecessary allocations.
2022-04-13Fix size of MAT3 and MAT4 in GPUShaderCreateInfo.push_constantGermano Cavalcante
It was being wrongly multiplied by 2.
2022-04-13Fix cases where 'Py_buffer' might not be releasedGermano Cavalcante
2022-04-13Fix possible pointer being freed without being allocated in pygpu moduleGermano Cavalcante
The `clear` method can be called before dealloc, which can mislead buffer ownership.
2022-04-13pyGPU: Port 'StageInterfaceInfo' and 'ShaderCreateInfo' typesGermano Cavalcante
In order to allow GLSL Cross Compilation across platforms, expose in Python the `GPUShaderCreateInfo` strategy as detailed in https://wiki.blender.org/wiki/EEVEE_%26_Viewport/GPU_Module/GLSL_Cross_Compilation The new features can be listed as follows: ``` >>> gpu.types.GPUShaderCreateInfo. define( fragment_out( fragment_source( push_constant( sampler( typedef_source( uniform_buf( vertex_in( vertex_out( vertex_source( >>> gpu.types.GPUStageInterfaceInfo. flat( name no_perspective( smooth( >>> gpu.shader.create_from_info( ``` Reviewed By: fclem, campbellbarton Differential Revision: https://developer.blender.org/D14497
2022-04-12Fix: BMesh Python API errors after vertex_normals additionHans Goudey
64cd927519748bbd50 didn't update the argument parsing strings, and updated the docstring of `from_object` incorrectly. Fixes T97025, T97213
2022-04-11PyGPU: make sure the UniformBuffer is padded to 16 bytesGermano Cavalcante
Alignment with `vec4` is a requirement in C++, so it should be a requirement in Python as well.
2022-04-11Fix crash when creating a 'gpu.types.Buffer'Germano Cavalcante
Buffer creation may crash when passed a PyBuffer with no `shape` defined. (Which is common for strucs).
2022-04-11BMesh Python API: add access to vertex crease layerKévin Dietrich
This simply adds access to the vertex crease layer from Python code. Documentation was modified to remove "Edge" as it is shared between edges and vertices, similarly to bevel weights. Differential Revision: https://developer.blender.org/D14605
2022-04-11Cleanup: malformed C-style comment blocks, spellingCampbell Barton
- Missing star prefix. - Unnecessary indentation. - Blank line after dot-points (otherwise doxygen merges with the previous dot-point). - Use back-slash for doxygen commands. - Correct spelling.
2022-04-08PyAPI: use keyword only arguments for Text.region_{from/to} stringCampbell Barton
This is the convention for most parts of Blender Python API.
2022-04-08Cleanup: separate format-units for Python argument parsingCampbell Barton
With the increased use of multi-character format units and keyword-only arguments these are increasingly difficult to make sense of. Split the string onto multiple lines, one per argument. While verbose it's easier to understand and add new arguments.
2022-04-07Cleanup: add clarifying comment to `bpy_app_getsets`Sybren A. Stüvel
No functional changes.
2022-04-07Cleanup: pass the buffer length into `txt_insert_buf`Campbell Barton
Also remove redundant NULL check.
2022-04-07Text Editor: Get/Set region text APIMatheus Santos
Add the ability to get/set the selected text. **Calling the new methods:** - `bpy.data.texts["Text"].region_as_string()` - `bpy.data.texts["Text"].region_from_string("Replacement")`
2022-04-06Cleanup: spelling & poor wording in code & commentsCampbell Barton
2022-04-06Fix: T78228 Send all python errors to info editorCampbell Barton
Python exceptions are now shown in the info editor, this also resolves an old bug where errors were printed twice. This was originally based on D9752 by @ShadowChaser although many changes have been made from the original patch. Details: - BPy_errors_to_report no longer prints additional output. - BKE_report_print_test was added so it's possible to check if calling BKE_report also printed to the stdout. - Callers to BPy_errors_to_report are responsible for ensuring output is printed to the stdout/stderr. - Python exceptions no longer add a trailing newline, needed to avoid blank-space when displayed in the info-editor.
2022-04-06Fix off by one error placing the text cursor from a Python exceptionCampbell Barton
Off by one error placing text from an error.
2022-04-06Fix accessing an empty context succeeding when it shouldn'tCampbell Barton
Internally an empty string is used to access context member `__dir__`, which caused `getattr(context, "")` to succeed returning None.
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-03-28Cleanup: return success from python_script_error_jumpCampbell Barton
Relying on checks for the assignment of return arguments isn't so clear especially when there are multiple return arguments.
2022-03-28Python: select the start-end range of syntax errorsCampbell Barton
Python 3.10's syntax errors can specify a range. Use this for text editor error selection.
2022-03-28Cleanup: variable/argument naming for Python exception accessCampbell Barton
Names filename/filepath/fn were used interchangeably.
2022-03-28Fix text editor failure to move the cursor for syntax errorsCampbell Barton
This broke between 3.0 and 3.1, upgrading to Python 3.10 seems the likely cause as this code didn't change.
2022-03-28Cleanup: early exit when there is no exceptionCampbell Barton
Reduces noise in D9752, no functional change as PyErr_NormalizeException doesn't do anything when there is no exception set.
2022-03-28Cleanup: use "num" as a suffix in: source/blender/pythonCampbell Barton
See T85728
2022-03-25Cleanup: spelling in comments, stringsCampbell Barton
2022-03-25ImBuf: Add support for WebP image formatAaron Carlisle
Currently only supports single image frames (no animation possible). If quality slider is set to 100 then lossless compression will be used, otherwise lossy compression is used. Gives about 35% reduction of filesize save when re-saving splash screens with lossless compression. Also saves much faster, up to 15x faster than PNG with a better compression ratio as a plus. Note, this is currently left disabled until we have WebP libs (see T95206) For testing precompiled libs can be downloaded from Google: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html Differential Revision: https://developer.blender.org/D1598
2022-03-24Cleanup: use "filepath" instead of "filename" for full pathsCampbell Barton
Reserve "filename" when only the name component is used.
2022-03-23Cleanup: use ifdef to disable enum string allocationCampbell Barton
Restore variable removed in [0], using an ifdef to avoid the warning. [0]: c3ecfdf40b02f7d12775f1ded2f039d40f1470bb
2022-03-22Fix T96308: Mesh to BMesh conversion doesn't calculate vertex normalsHans Goudey
Currently there is a "calc_face_normal" argument to mesh to bmesh conversion, but vertex normals had always implicitly inherited whatever dirty state the mesh input's vertex normals were in. Probably they were most often assumed to not be dirty, but this was never really correct in the general case. Ever since the refactor to move vertex normals out of mesh vertices, cfa53e0fbeed7178c7, the copying logic has been explicit: copy the normals when they are not dirty. But it turns out that more control is needed, and sometimes normals should be calculated for the resulting BMesh. This commit adds an option to the conversion to calculate vertex normals, true by default. In almost all places except the decimate and edge split modifiers, I just copied the value of the "calc_face_normals" argument. Differential Revision: https://developer.blender.org/D14406
2022-03-18Cleanup: Compilation warningsSergey Sharybin
Mainly -Wset-but-unused-variable. Makes default compilation on macOS way less noisy. Differential Revision: https://developer.blender.org/D14357
2022-03-15Docs: correct doc-string for BPY_driver_resetCampbell Barton
Remove outdated reference to "pydrivers.py", also document BPY_DECREF.
2022-03-15Cleanup: comments in bpy_driver.c, minor correctionsCampbell Barton
2022-03-15Cleanup: de-duplicate Py_DECREF when evaluating PyDriversCampbell Barton
2022-03-15Fix memory leak when there is an error evaluating a PyDriverCampbell Barton
In practice users are unlikely to ever run into this error.
2022-03-14Fix gpu.types.GPUTexture not passing data buffer to 3D texturesIyad Ahmed
Missed in rB4430e8a00810ca8df2fa20029c4cb8078e8cdbe6 Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D14333
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-03-14RNA: Generate property declerations header, solving msg-bus C++ incompatibilityJulian Eisel
Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all RNA properties. This can be included in regular source files when needing to reference RNA properties statically. This solves an issue on MSVC with adding such declarations in functions, like we used to do. See 800fc1736748. Removes any such declarations and the related FIXME comments. Reviewed By: campbellbarton, LazyDodo, brecht Differential Revision: https://developer.blender.org/D13837
2022-03-14Cleanup: use size_t for BLF text API functionsCampbell Barton
Also minor cleanup to txt_sel_to_buf: - Use memcpy instead of strncpy as the strings don't contain nil bytes. - Replace while loops with for loops.
2022-03-11Fix out of order event handling when calling operators from gizmosCampbell Barton
Activating a gizmo used the windows eventstate which may have values newer than the event used to activate the gizmo. This meant transforms check for the key that activated transform could be incorrect. Support passing an event when calling operators to avoid this problem.
2022-03-11Correct error in 1032f111d087e7ba77c16a4af78704019714bd6aCampbell Barton
Thanks to Jacques Lucke for spotting.
2022-03-11Text: use simplified logic for txt_to_bufCampbell Barton
This function was copied from txt_sel_to_buf, including unnecessary complexity to support selection as well as checks for the cursor which don't make sense when copying the whole buffer. Use a simple loop to copy all text into the destination buffer.
2022-03-11RNA: support functions returning allocated stringsCampbell Barton
Now it's possible for a C/RNA function to return a dynamic string, The PROP_NEVER_NULL flag is also supported so a NULL string returns None in Python.
2022-03-11Cleanup: remove unused variableCampbell Barton
2022-03-11Fix T94121: PyAPI: ID property group returns wrong type with iter()Campbell Barton
Regression in 265d97556aa0f0f2a0e4dd7584e3b8573bbddd54. Where iterating directly on a property group failed, e.g.: `iter(group)`, tests missed this since only `group.keys()` was checked.
2022-03-10Cleanup: spelling in comments & some minor clarificationsCampbell Barton