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-07-08Docs: Fix minor incorrect syntax errorsnutti
This patch fixes the incorrect syntax in documentations. Reviewed By: Blendify Differential Revision: https://developer.blender.org/D11822
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: update clang-format so PyObject_HEAD indents properlyCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-17Revert "Fix T89204: slow repeated rendering with GPUOffscreen.draw_view3d"Brecht Van Lommel
This reverts commit d03b26edbdc3a9fe87fde44bd8db8c4a67a36757. There is some refresh issue that needs to be solved before this can be enabled.
2021-06-16Fix T89204: slow repeated rendering with GPUOffscreen.draw_view3dBrecht Van Lommel
Cache the GPUViewport so the framebuffers and associated textures are not reallocated each time.
2021-06-08PyAPI: use keyword only argumentsCampbell Barton
Use keyword only arguments for the following functions. - addon_utils.module_bl_info 2nd arg `info_basis`. - addon_utils.modules 1st `module_cache`, 2nd arg `refresh`. - addon_utils.modules_refresh 1st arg `module_cache`. - bl_app_template_utils.activate 1nd arg `template_id`. - bl_app_template_utils.import_from_id 2nd arg `ignore_not_found`. - bl_app_template_utils.import_from_path 2nd arg `ignore_not_found`. - bl_keymap_utils.keymap_from_toolbar.generate 2nd & 3rd args `use_fallback_keys` & `use_reset`. - bl_keymap_utils.platform_helpers.keyconfig_data_oskey_from_ctrl 2nd arg `filter_fn`. - bl_ui_utils.bug_report_url.url_prefill_from_blender 1st arg `addon_info`. - bmesh.types.BMFace.copy 1st & 2nd args `verts`, `edges`. - bmesh.types.BMesh.calc_volume 1st arg `signed`. - bmesh.types.BMesh.from_mesh 2nd..4th args `face_normals`, `use_shape_key`, `shape_key_index`. - bmesh.types.BMesh.from_object 3rd & 4th args `cage`, `face_normals`. - bmesh.types.BMesh.transform 2nd arg `filter`. - bmesh.types.BMesh.update_edit_mesh 2nd & 3rd args `loop_triangles`, `destructive`. - bmesh.types.{BMVertSeq,BMEdgeSeq,BMFaceSeq}.sort 1st & 2nd arg `key`, `reverse`. - bmesh.utils.face_split 4th..6th args `coords`, `use_exist`, `example`. - bpy.data.libraries.load 2nd..4th args `link`, `relative`, `assets_only`. - bpy.data.user_map 1st..3rd args `subset`, `key_types, `value_types`. - bpy.msgbus.subscribe_rna 5th arg `options`. - bpy.path.abspath 2nd & 3rd args `start` & `library`. - bpy.path.clean_name 2nd arg `replace`. - bpy.path.ensure_ext 3rd arg `case_sensitive`. - bpy.path.module_names 2nd arg `recursive`. - bpy.path.relpath 2nd arg `start`. - bpy.types.EditBone.transform 2nd & 3rd arg `scale`, `roll`. - bpy.types.Operator.as_keywords 1st arg `ignore`. - bpy.types.Struct.{keyframe_insert,keyframe_delete} 2nd..5th args `index`, `frame`, `group`, `options`. - bpy.types.WindowManager.popup_menu 2nd & 3rd arg `title`, `icon`. - bpy.types.WindowManager.popup_menu_pie 3rd & 4th arg `title`, `icon`. - bpy.utils.app_template_paths 1st arg `subdir`. - bpy.utils.app_template_paths 1st arg `subdir`. - bpy.utils.blend_paths 1st..3rd args `absolute`, `packed`, `local`. - bpy.utils.execfile 2nd arg `mod`. - bpy.utils.keyconfig_set 2nd arg `report`. - bpy.utils.load_scripts 1st & 2nd `reload_scripts` & `refresh_scripts`. - bpy.utils.preset_find 3rd & 4th args `display_name`, `ext`. - bpy.utils.resource_path 2nd & 3rd arg `major`, `minor`. - bpy.utils.script_paths 1st..4th args `subdir`, `user_pref`, `check_all`, `use_user`. - bpy.utils.smpte_from_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.smpte_from_seconds 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.system_resource 2nd arg `subdir`. - bpy.utils.time_from_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.time_to_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.units.to_string 4th..6th `precision`, `split_unit`, `compatible_unit`. - bpy.utils.units.to_value 4th arg `str_ref_unit`. - bpy.utils.user_resource 2nd & 3rd args `subdir`, `create` - bpy_extras.view3d_utils.location_3d_to_region_2d 4th arg `default`. - bpy_extras.view3d_utils.region_2d_to_origin_3d 4th arg `clamp`. - gpu.offscreen.unbind 1st arg `restore`. - gpu_extras.batch.batch_for_shader 4th arg `indices`. - gpu_extras.batch.presets.draw_circle_2d 4th arg `segments`. - gpu_extras.presets.draw_circle_2d 4th arg `segments`. - imbuf.types.ImBuf.resize 2nd arg `resize`. - imbuf.write 2nd arg `filepath`. - mathutils.kdtree.KDTree.find 2nd arg `filter`. - nodeitems_utils.NodeCategory 3rd & 4th arg `descriptions`, `items`. - nodeitems_utils.NodeItem 2nd..4th args `label`, `settings`, `poll`. - nodeitems_utils.NodeItemCustom 1st & 2nd arg `poll`, `draw`. - rna_prop_ui.draw 5th arg `use_edit`. - rna_prop_ui.rna_idprop_ui_get 2nd arg `create`. - rna_prop_ui.rna_idprop_ui_prop_clear 3rd arg `remove`. - rna_prop_ui.rna_idprop_ui_prop_get 3rd arg `create`. - rna_xml.xml2rna 2nd arg `root_rna`. - rna_xml.xml_file_write 4th arg `skip_typemap`.
2021-05-18Fix T88365: GPUTexture.read returning a buffer with wrong sizeGermano Cavalcante
The pixel components were not being considered.
2021-05-18Fix T88345: Blender crash on GPUFrameBuffer creationGermano Cavalcante
Misuse of indexes. `color_attachements` has only color ones while `config` has color and depth.
2021-05-15Cleanup: silence unused parameter warningsGermano Cavalcante
Introduced in rB48fa029dd11b.
2021-05-14Python GPU: New 'platform' moduleGermano Cavalcante
This module exposes the platform utils defined in the GPU module in C. This will be useful for porting existing code with `bgl` to `gpu`. Reviewed By: fclem, brecht, campbellbarton Maniphest Tasks: T80730 Part of D11147
2021-05-14Python GPU: New 'capabilities' moduleGermano Cavalcante
This module exposes the capabilities defined in the GPU module in C. This will be useful for porting existing code in `bgl` to `gpu`. Reviewed By: fclem, brecht, campbellbarton Maniphest Tasks: T80730 Part of D11147
2021-05-13Cleanup: inconsistent parameter nameJacques Lucke
2021-04-30Cleanup: compiler warningsCampbell Barton
2021-04-30Cleanup: Rename `#if GPU_USE_PY_REFERENCES` to `#ifndef ↵Germano Cavalcante
GPU_NO_USE_PY_REFERENCES` This is safer for incremental build. And there was already a macro `GPU_USE_PY_REFERENCES` used elsewhere.
2021-04-30Fix accidental lines removed in the last commitGermano Cavalcante
2021-04-30Fix gross errors in previous commitGermano Cavalcante
2021-04-30Python GPU: Add new methods to port the code templates in the manualGermano Cavalcante
This commit adds a new API tha allow to replace the bgl API in the exemples on: https://docs.blender.org/api/current/gpu.html **Overview (New API):** ``` gpu.state: active_framebuffer_get GPUFramebuffer: read_color GPUOffscreen: texture_color ``` Reviewed By: brecht Differential Revision: https://developer.blender.org/D11031
2021-04-30Python GPU: Add reference of PyObject GPU object to the GPU object itselfGermano Cavalcante
Instead of creating different python wrappers for the same GPU object, return the same `PyObject` created earlier. This also allows for more secure access to existing GPU objects. Reviewed By: brecht Differential Revision: https://developer.blender.org/D11044
2021-04-22Fix errors in Buffer.dimensions `setter`Campbell Barton
- Error accessing the length from a sequence. - Error comparing a boolean to -1. Issues introduced in 19360c2c1cf50c80b9720137b88db2c2f3626ddc
2021-04-21Merge branch 'blender-v2.93-release'Germano Cavalcante
2021-04-21Fix wrong flag for 'GPUFrameBuffer.viewport_get'Germano Cavalcante
`GPUFrameBuffer.viewport_get` has no args.
2021-04-21Python GPU Buffer: Add a 'setter' to Buffer.dimensionsGermano Cavalcante
The attribute `Buffer.dimensions` does not need to be readonly.
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.