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
2020-11-02Revert "Cleanup: store results of function calls in const values."Bastien Montagne
This reverts commit 20c4aa13de7ba403e113df8ec69c632b6815eac8. Wrong buggy commit breaking tests, and not actually adding anything to code quality.
2020-11-02Cleanup: store results of function calls in const values.Bastien Montagne
2020-10-29RNA properties subtypes enum: sync definitions everywherePhilipp Oeser
Some subtypes never made it to all neccessary places when they were introduced. This was throwing warnings when accessing such a properties subtype from python. The sub_type enums were also defined in 4 different places: - RNA_types.h 'PropertySubType' - rna_rna.c 'rna_enum_property_subtype_items' - rna_rna.c 'subtype_items' - bpy_props.c as multiple enums This patch syncs the definitions across all places so that they are the same everywhere. It also looks redundant to define these twice in rna_rna.c, now just use 'rna_enum_property_subtype_items' there (and get rid off 'subtype_items'). Also moved 'POWER' & 'TEMPERATURE' to number enum in bpy_props (these were defined in the array enum). Fixes T82167. Maniphest Tasks: T82167 Differential Revision: https://developer.blender.org/D9371
2020-09-21Add missing new liboverride option to py-defined collections props doc.Bastien Montagne
2020-09-20LibOverride: expose `PROPOVERRIDE_LIBRARY_INSERTION` to py-defined properties.Bastien Montagne
This will allow add-ons to define Collection properties that support item insertion in library override context.
2020-09-19Cleanup: use parenthesis for if statements in macrosCampbell Barton
2020-09-07UI: Add temperature unitsHans Goudey
Based on the original patch by Vaishnav S (@padthai), this adds support for temperature units. Initially supported units are Celsius, Kelvin, and Fahrenheit. The units aren't used anywhere with this commit. Those changes should happen in separate patches by adding PROP_TEMPERATURE to RNA property definitions. But it should be ensured that the various solvers and simulations actually properly use real units. The complexity of some of the changes comes from the fact that these units have offsets from each other as well as coefficients. This also makes the implementation in the current unit system troublesome. For example, entering 0C evaluates correctly to 273K, but 0C + 0C doubles that result, because each unit value is evaluated separately. This is quite hard to solve in the general case with Blender's current unit system, though, so it is not handled in this commit. Differential Revision: https://developer.blender.org/D4401
2020-09-02PY API doc: fix doc for new override option of properties.Bastien Montagne
Reported by Demeter Dzadik (@Mets) on blender.chat, thanks. Candidate to be backported to a potential 2.90.1.
2020-08-20Cleanup: use const variables where possible in the Python APICampbell Barton
2020-08-07Cleanup: Python, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/python` module. No functional changes.
2020-08-03Fix parameters in bpy.props.StringProperty Python API docsnutti
There is a parameter typo in Python API document about bpy.props.StringProperty. This patch fixes this. Also this patch should apply to 2.90 branch as well. Reviewed By: Grische, mont29 Differential Revision: https://developer.blender.org/D8430
2020-07-10Expose override flags to python RNA properties definition.Bastien Montagne
Time will tell whether we need to expose more RNA override flags here. Implements/Fix T78534. Differential Revision: https://developer.blender.org/D8250
2020-06-24Python API: support integer default for bpy.props.EnumPropertyBrecht Van Lommel
This must match the specified number in enum items, and is supported for both static and dynamic enums. Previously dynamic enums did not support a default value at all.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-10-16Cleanup: define PY_SSIZE_T_CLEAN for PythonCampbell Barton
Silence deprecation warnings running with Python 3.8.
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-08-14Cleanup: move trailing comments to avoid wrapping codeCampbell Barton
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
2019-08-05PyRNA: support separators in enum-items listsCampbell Barton
Resolves T68260
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-31Clarify in FloatProperty generated docs: single precision floats.Howard Trickey
At least one script writer was upset that this was not specified, as it is different from "floating point" in Python. Also, docstring for hard and soft min and max for FloatProperty was wrong, using sys.float_info.min and sys.float_info.max.
2019-06-21Cleanup: spelling, grammar, and other correctionsCampbell Barton
D5084 by @nBurn with edits
2019-04-29Cleanup: comments (long lines) in pythonCampbell Barton
2019-04-17ClangFormat: format '#if 0' code in source/Campbell Barton
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-03-29Cleanup: style, use braces for the Python APICampbell Barton
2019-02-27Fix typos related to unitsVaishnav S
2019-02-23Cleanup: quiet undeclared variable warningCampbell Barton
Move bpy_context_module declaration to bpy_rna.h.
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-17Units: add support for light power units in Watt. Use for Eevee lights.Brecht Van Lommel
This affects point, spot and area lights. Sun light strength remains without a unit. This change does not affect .blend file compatibility in any way, as with the rest of the unit system it's purely a display and editing feature. Not used for Cycles yet, that will be done after unifying the settings with Eevee.
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-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
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.
2019-01-19Cleanup: add trailing commasCampbell Barton
Prevents clang-format merging into a single line.
2019-01-11Cleanup: remove tabs after line startCampbell Barton
Allows expanding tabs before running clang-format.
2018-12-20Cleanup: argument wrapping indentationCampbell Barton
2018-10-09Fix misuse of Py_INCREF in module creation.mano-wii
Differential Revision: https://developer.blender.org/D3697
2018-08-31Python: Enable MASS unit in FloatPropertyMonique Dewanchand
MASS unit was already implemented for the C api. Only making sure it is accessible in the python api. Also added 'CAMERA' to the documentation as a valid option.
2018-08-21Python API: expose missing LAYER_MEMBER property type registration.Kenneth Perry
Differential Revision: https://developer.blender.org/D3628
2018-07-02Cleanup: use bool for poll functionsCampbell Barton
2018-07-01RNA: use bool for boolean RNA typesCampbell Barton
We were using int's for bool arguments in BKE, just to avoid having wrapper functions.
2018-06-04Cleanup: strip trailing space in Python moduleCampbell Barton
2017-11-29Cleanup: rename bpy_util -> bpy_capi_utilsCampbell Barton
This is for internal CAPI use only, avoid confusion w/ bpy.utils module.
2017-11-29RNA: Allow structs to define tags for their propertiesJulian Eisel
Adds support for defining a number of tags as part of the rna-struct definition, which its properties can set similar to property-flags. BPY supports setting these tags when defining custom properties too. * To define tags for a struct (which its properties can use then), define the tags in an `EnumPropertyItem` array, and assign them to the struct using `RNA_def_struct_property_tags(...)`. * To set tags for an RNA-property in C, use the new `RNA_def_property_tags(...)`. * To set tags for an RNA-property in Python, use the newly added tags parameter. E.g. `bpy.props.FloatProperty(name="Some Float", tags={'SOME_TAG', 'ANOTHER_TAG'})`.
2017-11-29PyAPI: PyC_Err_PrintWithFunc utility functionCampbell Barton
Move function error printing utility into py_capi_utils.
2017-10-18Cleanup: Use const for RNA EnumPropertyItem argsCampbell Barton
Practically all access to enum data is read-only.
2017-10-15Fix bad 'poll' prop callback API doc.Bastien Montagne
This was added to all prop types, when it is only available for Pointer ones.
2017-10-04PyAPI: fast keyword parsing for bpy.propsCampbell Barton
No functional changes.
2017-08-22Fix error in PointerProperty argument listCampbell Barton
Regression in a7b3047
2017-08-22PyAPI: replace PyC_FromArray with typed functionsCampbell Barton
This was meant to be generic but introduced possible type errors and unnecessary complication. Replace with typed PyC_Tuple_PackArray_* functions. Also add PyC_Tuple_Pack_* macro which replaces some uses of Py_BuildValue, with the advantage of not having to parse a string.
2017-08-20PyAPI: Make use of PyC_LongAs... APICampbell Barton
Avoids setting exceptions inline, also use Matrix_ParseAny for bmesh.ops. Some inline exceptions are kept because they show useful details.