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-11-07Cleanup: unify struct declaration style for Python types, update namesCampbell Barton
Use struct identifiers in comments before the value. This has some advantages: - The struct identifiers didn't mix well with other code-comments, where other comments were wrapped onto the next line. - Minor changes could re-align all other comments in the struct. - PyVarObject_HEAD_INIT & tp_name are no longer placed on the same line. Remove overly verbose comments copied from PyTypeObject (Python v2.x), these aren't especially helpful and get outdated. Also corrected some outdated names: - PyTypeObject.tp_print -> tp_vectorcall_offset - PyTypeObject.tp_reserved -> tp_as_async
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-02-12PyAPI: remove Python 3.7x compatibility codeCampbell Barton
This removes Python version checks needed to build with 3.8+ and 3.7x. Ref D10381
2021-02-08Cleanup: Remove using-directive from freestyle headersOmar Emara
The header files in freestyle utilize the using-directive at the global file scope. This is a bad practice as it pollutes the global name space causing possible ambiguous reference compilation errors. In particular, the DNA files that are included by freestyle will cause those ambiguous reference errors when the developers adds a DNA member with a type name that also exist in the Freestyle name space, such as Curve and possibly others. This patch does the minimal work needed to resolve that by moving the using-directives from the headers into the corresponding translation units. Reviewed By: Brecht Differential Revision: https://developer.blender.org/D10351
2020-11-11Cleanup: use preprocessor version check for PyTypeObject declarationCampbell Barton
While `tp_print` was deprecated, Python 3.8+ uses this for 'tp_vectorcall_offset' which wasn't stated in the comment from efd71aad4f22ec0073d80b8dd296015d3f395aa8. Instead of suppressing clang-tidy, use preprocessor a check since this properly represents the difference between Python versions.
2020-11-10Cleanup: clang-formatCampbell Barton
2020-11-10Cleanup: clang-tidy suppress warnings for PyTypeObject.tp_printCampbell Barton
Clang-tidy behavior changes from Python 3.7 to 3.8+ so it's simplest to suppress the warning in this instance.
2020-11-09Fix T82520: error building freestyle with Python3.8Campbell Barton
Caused by 16732def37c5a66f3ea28dbe247b09cc6bca6677, This is a 'Py_ssize_t' in Python 3.8, replace with zero as this works in both 3.7 and 3.8.
2020-11-09Cleanup: clang-formatCampbell Barton
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-10-23Pydoc: Fix sphinx compile warnings about freestyleAaron Carlisle
Sphinx expects functions and methods with the same name and different parameters to be written using one directive. See: https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#basic-markup Unfortunately this makes giving different descriptions for each harder. This was already a request for better support for this in sphinx, see: https://github.com/sphinx-doc/sphinx/issues/7787 Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D9170
2020-07-03Clang-Tidy: Fix readability-delete-null-pointer warningsSergey Sharybin
Also enable it in the configuration.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-12-20Cleanup: remove redundant 'char *' castsCampbell Barton
2019-05-31Cleanup: style, use braces in source/Campbell Barton
Automated using clang-tidy.
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-06-17Cleanup: trailing space for freestyleCampbell Barton
2013-03-31remove blender foundation copyright from freestyle files.Campbell Barton
this can be added back on case-by-case basis, but better not assume ownership of another projects work by default.
2013-03-08A big code clean-up patch from Bastien Montagne, many thanks!Tamito Kajiyama
2013-02-24Code clean-up and fix for typos in docstrings.Tamito Kajiyama
2013-02-23Added GNU GPL header blocks.Tamito Kajiyama
2013-02-22Code clean-up: removed empty PyMethodDef.Tamito Kajiyama
2013-02-22Missing code updates in the previous commit.Tamito Kajiyama
Also improved __repr__() so that the .getName() is no longer necessary in user-defined Function0D and Function1D subclasses.
2013-02-22Freestyle Python API improvements - part 6.Tamito Kajiyama
Fix for PyGetSetDef and proper handling of keyword arguments were done in Function0D and Function1D classes. Additional code clean-up was also made.
2010-08-12Python API documentation updates: a description of class hierarchyTamito Kajiyama
was added to the docstrings of most Python extension types.
2010-05-28Documentation updates: Replaced "string" with "str".Tamito Kajiyama
2010-05-23Fixed invalid use of PyUnicode_FromFormat() where PyUnicode_FromString()Tamito Kajiyama
should have been used.
2010-04-18Major documentation updates. The original Freestyle API referenceTamito Kajiyama
(http://freestyle.sourceforge.net/doc/html/index.html) has been incorporated into the Blender/Freestyle Python API implementation in the form of Sphinx-based embedded docstrings. Some C++-specific descriptions of classes and functions were revised so that they are suitable for Python programmers. Missing docstrings were filled, and sparse descriptions were extended. By means of the new documentation system for Blender, an up-to-date Freestyle Python API reference will be part of the Blender 2.5 documentation.
2010-04-08Replaced PyObject_HEAD_INIT(NULL) with PyVarObject_HEAD_INIT(NULL, 0)Tamito Kajiyama
in the definitions of Python wrappers.
2009-09-27Made the Freestyle Python API compatible with Python 3.Tamito Kajiyama
2009-08-03* Fixed uninitialized pointers in "__init__" methods of UnaryFunction1D types.Tamito Kajiyama
There was a known issue for a long time that we occasionally encountered strange "TypeError: an integer is required" and "RuntimeWarning: tp_compare didn't return -1 or -2 for exception", as shown in the following unit test log. The source of the former error was PyInt_AsLong(obj) being used by IntegrationType_from_BPy_IntegrationType(obj), where "obj" was not properly initialized in "__init__" before the converter was called. The TypeError was left unattended for a while and showed up when a comparison occurred and the TypeError was detected, which resulted in the latter warning. > runTest (__main__.UnaryFunction1DDoubleInitTestCase) ... > .\blender:211: RuntimeWarning: tp_compare didn't return -1 or -2 for exception > ERROR > > ====================================================================== > ERROR: runTest (__main__.UnaryFunction1DDoubleInitTestCase) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "init_tests.py", line 211, in runTest > TypeError: an integer is required > > ---------------------------------------------------------------------- * Also removed unnecessary error messages in "__init__" methods of UnaryFunction1D types.
2009-08-01Fixed typoes in error messages.Tamito Kajiyama
2009-07-27Second attempt to fix a null pointer reference in deallocators ofTamito Kajiyama
built-in types (the first was in revision 21877). When an exception has raised within from the __init__ method of a user-defined class derived from a built-in type (e.g., UnaryPredicate0D and BinaryPredicate1D), some member variables of the base type are left uninitialized, leading to a null pointer reference in the "__dealloc__" function in the base type. To avoid this, pointer checking was added in the deallocators of those built-in types that can be used to define a subclass by a user.
2009-07-26Made predicate and function types callable in the sense thatTamito Kajiyama
callable(I, T) returns True when I is an object of a type T or of a subtype of T. Also implemented a measure to avoid an infinite loop when user-defined predicate and function classes do not properly overload the __call__ method (including the cases of directly instantiating the base classes such as UnaryPredicate0D and BinaryPredicate1D).
2009-03-21Improvements in error handling at Python-C++ boundaries.Tamito Kajiyama
2009-03-14Fixed incorrect argument checking.Tamito Kajiyama
2008-08-02soc-2008-mxcurioni: made considerable changes to support cross-language ↵Maxime Curioni
polymorphism for UnaryFunction0D, Interface0D, Interface1D. Add to change UnaryFunction1D<void> to static UnaryFunction1D_void. Resolved namespace collision on the Image class (changed to FrsImage). There is greater support for style modules but somehow, some do not show anything yet (japanese_bigbrush being an example).
2008-07-29soc-2008-mxcurioni: corrected problems in API with UnaryFunction1DVoid ↵Maxime Curioni
subclasses and Curvature2DAngleF1D. Understood that Curve and Noise classes cannot be defined in Freestyle's API because they are already given by Blender's API. Will rename to FrsCurve and FrsNoise and change the corresponding style modules.
2008-07-27soc-2008-mxcurioni: ported ALL 1D unary functions, representing 32 new classes.Maxime Curioni
2008-07-23soc-2008-mxcurioni: renamed all Freestyle API related files with 'BPy_' ↵Maxime Curioni
prefix to avoid library name collision. Included MediumType's initialization at proper time to avoid Blender's crash.