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
2021-05-20Fix T88345: Blender crash on GPUFrameBuffer creationGermano Cavalcante
Misuse of indexes. `color_attachements` has only color ones while `config` has color and depth.
2021-05-20Fix T88365: GPUTexture.read returning a buffer with wrong sizeGermano Cavalcante
The pixel components were not being considered.
2021-04-21Fix wrong flag for 'GPUFrameBuffer.viewport_get'Germano Cavalcante
`GPUFrameBuffer.viewport_get` has no args.
2021-04-01Cleanup: clang formatCampbell Barton
2021-03-31Fix build error on windowsRichard Antalik
Error was caused by using `#if` directive in `PyDoc_STRVAR` macro. This partially reverts 1e4c35d910e18858c41924f9e27ef8e1070cbd0a
2021-03-31PyDoc: correct sphinx syntax for gpu.state.blend_setCampbell Barton
2021-03-24Cleanup: use new BLI_assert_unreachable macroCampbell Barton
2021-03-16Python GPU: Improve the Python GPU API documentationGermano Cavalcante
This fixes some errors of continuity and consistency of formatting on https://docs.blender.org/api/current/gpu.html This also details the description of some parameters. Differential Revision: https://developer.blender.org/D10531
2021-03-08Cleanup: rename offs to offscreenCampbell Barton
2021-03-04Cleanup: use const arraysCampbell Barton
2021-03-04Fix logic for calling PyObject_GC_UnTrackCampbell Barton
All tracked objects need a matching un-track, also remove redundant Py_XDECREF call.
2021-03-01GPU Python: Implement gpu.texture.from_imageGermano Cavalcante
It can be useful to replace `image.bindcode` and `image.gl_load`. Used for example in https://docs.blender.org/api/current/gpu.html#d-image Reviewed By: brecht Differential Revision: https://developer.blender.org/D10458
2021-02-24Cleanup: Move some utilities to 'gpu_py.h'Germano Cavalcante
2021-02-22GPU Python: Use 'PyC_ParseStringEnum' to parse itemsGermano Cavalcante
Currently the GPU module for python has different ways to handle enums. - Organizing items in `PyC_StringEnumItems` arrays and parsing them with `PyC_ParseStringEnum`. - Using dedicated functions for each type of enum (`bpygpu_ParsePrimType`, `pygpu_ParseVertCompType` and `pygpu_ParseVertFetchMode`). Although apparently more efficient (especially `pygpu_ParseVertCompType` which transforms strings into integers for simple comparison), these dedicated functions duplicate functionality, increase the complexity of the code and consequently make it less readable. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D10456
2021-02-18Cleanup: Clang tidy else after returnHans Goudey
2021-02-18Cleanup: clang-formatCampbell Barton
2021-02-18Cleanup: order shape_len after shape argumentCampbell Barton
This matches nearly all other argument ordering in Blender, including Python mathutils API.
2021-02-18Cleanup: spelling, correct doc-string argumentsCampbell Barton
2021-02-17GPU Python: Rename 'uniform_buffer' to 'uniform_block'Germano Cavalcante
From the the opengl wiki: > Buffer objects are associated with a program's uniform block similarly to the way that texture objects are associated with sampler uniforms.
2021-02-17Cleanup: Abbreviate enums with 'UNSIGNED_' in the nameGermano Cavalcante
2021-02-17Python: gpu module: add new submodules and typesGermano Cavalcante
This commit extends the gpu python API with: ``` gpu.types.Buffer #"__init__", "to_list" gpu.types.GPUTexture #"__init__", "clear", "read", "format" gpu.types.GPUFrameBuffer #"__init__", "bind", "clear", "is_bound", "viewport", ("__enter__", "__exit__" with "GPUFrameBufferStackContext") gpu.types.GPUUniformBuf #"__init__", "update" gpu.state #"blend_set", "blend_get", "depth_test_set", "depth_test_get", "depth_mask_set", "depth_mask_get", "viewport_set", "viewport_get", "line_width_set", "line_width_get", "point_size_set", "color_mask_set", "face_culling_set", "front_facing_set", "program_point_size_set" ``` Add these methods to existing objects: ``` gpu.types.GPUShader #"uniform_sample", "uniform_buffer" ``` Maniphest Tasks: T80481 Differential Revision: https://developer.blender.org/D8826
2021-02-17Cleanup: Use 'pygpu_' prefix in the cpython GPU moduleGermano Cavalcante
`py_` prefix can be confused with the Python's own API's.
2021-02-13Fix T85573: Building with Python 3.10a5 failsCampbell Barton
Replace deprecated _PyUnicode_AsString{AndSize} usage. T83626 still needs to be resolved before 3.10 is usable.
2021-02-12PyAPI: use PyModule_AddType utility functionCampbell Barton
2021-02-11Cleanup: Python GPU: Use consistent prefixes for local APIGermano Cavalcante
It was not following the own documentation at the top code that mentions that for local API the prefix is "bpygpu_".
2021-02-10Merge branch 'blender-v2.92-release'Philipp Oeser
2021-02-10Fix T85395: Texture paint external edit wrong projection on reapplyPhilipp Oeser
Caused by rB5b34d11b55e0. Above commit restored the view matrices in ED_view3d_draw_offscreen _before_ they can be stored in the ImBuff (see ED_view3d_draw_offscreen / texture_paint_image_from_view_exec). Now make restoring the view matrices optional and dont do this in case of reprojection, so the used matrices can still be saved in the ImBuff later. Reviewed By: campbellbarton Maniphest Tasks: T85395 Differential Revision: https://developer.blender.org/D10331
2021-02-04Cleanup: replace '_imp' function suffix with '_impl'Campbell Barton
Use the more common abbreviation for `implementation`.
2021-01-31Docs: Remove wrong debug flag infoJulian Eisel
Removed the `--debug-gpu-shaders` argument in bc94036a76b6 but forgot to amend these changes.
2021-01-27Fix T84402: Off-screen rendering works only once from PythonCampbell Barton
Off-screen drawing doesn't work once the 'bgl' workaround is enabled. Disable this for off-screen drawing.
2021-01-11Revert "Fix typo; Documentation; Expose layer for framebuffer attachament; ↵Germano Cavalcantemano-wii
Add framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask" This reverts commit 9db3d1951da15254efbbcf028176facb78118ec1. This was an accidental commit of the patch D8826
2021-01-11Fix typo; Documentation; Expose layer for framebuffer attachament; Add ↵Germano Cavalcantemano-wii
framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask
2020-12-11Fix error in recent commitGermano Cavalcante
Introduced in rBcada56b1f72f537f9ab007cfafd430ac10c292fb
2020-12-11Cleanup: Python GPU: change prefix 'bpygpu_' to 'py_' in static functionsGermano Cavalcante
2020-12-11Cleanup: GPU Python: Use 'PyC_ParseStringEnum' for string enumGermano Cavalcante
2020-11-20Fix add-object tools cursor distorted drawing on saveCampbell Barton
Generating the thumbnail left the view matrices set to values that couldn't be used for cursor drawing. Backup/restore the matrices for off-screen drawing.
2020-11-20Cleanup: remove unused perspective argument to off-screen drawingCampbell Barton
Some callers were passing in dummy values, this can be accessed from `RegionView3D.is_persp` can be used to check this.
2020-11-13Adding 3D_POLYLINE_UNIFORM_COLOR to PyGPU shader APIYimingWu
This would allow python script to access `lineWidth` uniform when drawing lines without using `glLineWidth`. Reviewed By: Jeroen Bakker Differential Revision: https://developer.blender.org/D9518
2020-10-12Pydoc: Move builtin GPU shader information to codeAaron Carlisle
This fixes a compile warning for sphinx. This commit includes some reformating of the information.
2020-10-12Cleanup: Pydoc stringsAaron Carlisle
2020-10-09PyDoc: resolve duplicate module warningsCampbell Barton
Remove submodule listings from the module docstring, as this information already exists in the generator.
2020-09-29API Docs: Fix corrupted document of gpu.select.load_idnutti
The Python API document of gpu.select.load_id does not follow rst format. c.f. https://docs.blender.org/api/current/gpu.select.html This patch fixes it. Reviewed By: Blendify Differential Revision: https://developer.blender.org/D8547
2020-09-12GPUOffscreen: Push the GL state before and after bindingClément Foucault
This avoids wrong viewport and scissor bounds with BGL commands.
2020-09-11Cleanup: spelling, correct commentsCampbell Barton
2020-09-06GPUVertBuf: Make GPUVertBuf private to the GPU moduleClément Foucault
This is just a cleanup to isolate the internals of the vertbuf. This adds some getters to avoid refactor of existing code.
2020-09-06Cleanup: GPU: Rename GPU_element to GPU_index_bufferClément Foucault
Makes it follow the functions names.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
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