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-08-04Cleanup: inconsistent parameter nameJacques Lucke
2021-08-04Expose Color Management as argument for gpu.types.GPUOffScreen.draw_view3d()Gottfried Hofmann
Fix for https://developer.blender.org/T84227 The problem was that https://developer.blender.org/rBe0ffb911a22bb03755687f45fc1a996870e059a8 turned color management for offscreen rendering off by default, which makes it non-color-managed in some cases. So the idea here is that script authors get the choice wether they want color managed non-color-managed output. Thus this patch introduces a new argument do_color_management as a bool to gpu.types.GPUOffScreen.draw_view3d(). Reviewed By: jbakker Differential Revision: https://developer.blender.org/D11645
2021-08-03Cleanup: use C++ comments or 'if 0' for commented codeCampbell Barton
2021-07-30Cleanup: spelling in commentsCampbell Barton
2021-07-30PyAPI: defer freeing existing properties on registrationCampbell Barton
Registering a property could remove the existing property, then fail to parse one of the arguments of the new property - leaving the struct without a property. Now freeing the existing property is deferred until immediately before the new property is registered.
2021-07-30PyAPI: include the property name & type in registration errorsCampbell Barton
This gives useful context in errors, also remove newline endings from exceptions.
2021-07-30Cleanup: use pyrna_enum_value_parse_string parser for enum argsCampbell Barton
2021-07-30Cleanup: bpy.props variable namesCampbell Barton
- Use `default` instead of `def` abbreviation. - Rename `BPYPropArrayLength` to `BPyPropArrayLength` in keeping with other local structs. - Remove _PyArg_Parser.fname value accidentally left in (harmless as it's not used).
2021-07-30PyAPI: support accessing the original value for RNA enum parsingCampbell Barton
Needed in siturations when the input argument is needed for exception messages.
2021-07-30Cleanup: replace macros with converter callbacks for bpy.propsCampbell Barton
Macros were used for expanding shared logic for some properties. Replace this with Python converters & a funciton that handles deferred registration. Add generic converter functions for RNA enums: - pyrna_enum_value_parse_string - pyrna_enum_bitfield_parse_set
2021-07-29Fix memory leaks in Python gizmo get/set handlersCampbell Barton
2021-07-29Fix gpu.types.GPUTexture crash when the size argument was too bigCampbell Barton
Missing length check on the size argument before copying it into a fixed size buffer.
2021-07-29Cleanup: use PyC_AsArray_FAST function where possibleCampbell Barton
Oversight in 2453dc1b0ecad21a84b45e8c900a16cc42fa12f1.
2021-07-29PyAPI: support multi-dimensional arrays for bpy.props vector typesCampbell Barton
- Multi-dimensional boolean, int and float vector types are supported. - A sequence of int's for the "size" is used to declare dimensions. - Nested sequences are required for default arguments. Now it's possible to define matrix properties, for e.g: bpy.props.FloatVectorProperty(size=(4, 4), subtype='MATRIX')
2021-07-29PyAPI: add multi-dimensional array conversion utility functionsCampbell Barton
Add array conversion functions that take dimension arguments. - PyC_AsArray_Multi (version of PyC_AsArray). - PyC_Tuple_PackArray_Multi_* (version of PyC_Tuple_Pack_*).
2021-07-28Cleanup: reduce indentation in bpy.propsCampbell Barton
Remove unnecessary NULL checks.
2021-07-27Fix memory leak with Python RNA property get callback errorsCampbell Barton
Failure to return a list of the expected size & type wasn't decrementing the value, leaking a reference. Caused by 127b5423d6203d521acb2b96b7de5534e8dbe79a a workaround for the real error that was fixed f5e020a7a6ad6451fcaf075ae14f7014b8a4faea.
2021-07-27PyAPI: support different int sizes for PyC_AsArrayCampbell Barton
2021-07-27Cleanup: pass sizeof array element to PyC_AsArrayCampbell Barton
Replace the is_double argument which was only used for single/double precision floats. This allows supporting different sized int types more easily.
2021-07-23PyDocs: Fix syntax errors resulting in warningsAaron Carlisle
2021-07-23Cleanup: double spaces in stringsCampbell Barton
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-22Fix name used when parsing argumentsGermano Cavalcante
2021-07-22PyGPU: new method 'GPUFrameBuffer.read_depth'Germano Cavalcante
Method requested by users in order to port addons to new API.
2021-07-22Fix T89733: Py API: bpy.data.orphans_purge argument parsingYann Lanthony
On Windows, using `bpy.data.orphans_purge` with some arguments (eg: `do_recursive=True`) does not produce the expected results. This is due to arguments not being parsed correctly on this platform with the current code. The proposed fix is based on how other functions with boolean attributes are exposed to the Python API. Reviewed By: #python_api, mont29 Maniphest Tasks: T89733 Differential Revision: https://developer.blender.org/D11963
2021-07-20Cleanup: use single back-tick quoting in commentsCampbell Barton
While doxygen supports both, conform to our style guide. Note that single back-tick's are already used in a majority of comments.
2021-07-20Cleanup: use '#if 0' for disabling multiple linesCampbell Barton
2021-07-19Cleanup: minor correction to delaunay_2d_cdt doc-stringCampbell Barton
Use more conventional syntax for default arguments.
2021-07-18Update documentation string for mathutils.geometry.delaunay_2d_cdt.Howard Trickey
2021-07-18Make it optional to track input->output mapping in delaunay_2d_calc.Howard Trickey
Some uses of delaunay_2d_calc don't need to know the original verts, edges, and faces that correspond to output elements. This change adds a "need_ids" value to the CDT input spec, default true, which tracks the input ids only when true. The python api mathutils.geometry.delaunay_2d_cdt gets an optional final bool argument that is the value of need_ids. If the argument is not supplied, it is true by default, so this won't break old uses of the API. On a sample text test, not tracking ids save about 30% of the runtime. For most inputs the difference will not be so dramatic: it only really kicks in if there are a lot of holes.
2021-07-16Cleanup: sort struct declarationsCampbell Barton
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-15Library loading: Fix access of out-of-scope memory in py context managerSybren A. Stüvel
The `__enter__` function of the `bpy.data.libraries.load` context manager was storing a pointer to a stack-allocated variable, which was subsequently used in the `__exit__` function, causing a crash. This is now fixed. Thanks @Severin for the patch.
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-14Python API: Add functions to ensure and clear IDPropertiesHans Goudey
This adds id_properties_clear() and id_properties_ensure() functions to RNA structs. This is meant as an initial change based on discussion in review of D9697. However, they may be useful in other situations. The change requires refactoring the internal idproperties callback to return a pointer to the IDProperty pointer, which actually turns out to be quite a nice cleanup. An id_properties attribute could be added in the future potentially. Differential Revision: https://developer.blender.org/D11908
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-07-05BMesh: remove redundant mesh-backups from EDBM_op_* APICampbell Barton
Using BMesh operators through the edit-mesh API created a full copy of the mesh so it was possible to restore the mesh in case one of the operators raised an error. Remove support for automatic backup/restore from the EDBM_op_* API's as it adds significant overhead and was rarely used. Operators that need this can use the BMBackup API to backup & restore the mesh in case of failure. Add warning levels to BMO_error_raise so operators can report problems without it being interpreted as a request to cancel the operation. For high-poly meshes creating and freeing a full copy is an expensive operation, removing this gives a speedup of ~1.77x for most operators except for "connect_verts" / "connect_vert_pair" which still uses this functionality.
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Depsgraph: support flushing parameters without a full COW updateCampbell Barton
Avoid computationally expensive copying operations when only some settings have been modified. This is done by adding support for updating parameters without tagging for copy-on-write. Currently only mesh data blocks are supported, other data-blocks can be added individually. This prepares for changing values such as edit-mesh auto-smooth angle in edit-mode without duplicating all mesh-data. The benefit will only be seen when the user interface no longer tags all ID's for copy on write updates. ID_RECALC_GEOMETRY_ALL_MODES has been added to support situations where non edit-mode geometry is modified in edit-mode. While this isn't something user are likely to do, Python scripts may change the underlying mesh. Reviewed By: sergey Ref D11377
2021-06-24Fix linking code after own recent commit.Bastien Montagne
More stupid mistake in recent enhanced reports for file load code, rB82c17082ba0e left some read-after-free situations.
2021-06-24Cleanup: update clang-format so PyObject_HEAD indents properlyCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23Revert "Revert "Enhanced stats/reports for blendfile reading.""Bastien Montagne
This reverts commit rB3a48147b8ab92, and fixes the issues with linking etc. Change compared to previous buggy commit (rBf8d219dfd4c31) is that new `BlendFileReadReports` reports are now passed to the lowest level function generating the `FileData` (`filedata_new()`), which ensures (and asserts) that all code using it does have a valid non-NULL pointer to a `BlendFileReadReport` data. Sorry for the noise, it's always when you think a change is trivial and do not test it well enough that you end up doing those kind of mistakes...
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-21Docs: improve imbuf.write docstringCampbell Barton
The file path wasn't documented as being optional.
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.