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-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-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
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-05-17UI: add non-linear slider supportHenrik Dick
This patch introduces non linear sliders. That means, that the movement of the mouse doesn't map linearly to the value of the slider. The following changes have been made. - Free logarithmic sliders with maximum range of (`0 <= x < inf`) - Logarithmic sliders with correct value indication bar. - Free cubic sliders with maximum range of (`-inf < x < inf`) - Cubic sliders with correct value indication bar. Cubic mapping has been added as well, because it's used for brush sizes in other applications (Krita for e.g.). To make a slider have a different scale type use following line in RNA: `RNA_def_property_ui_scale_type(prop, PROP_SCALE_LOGARITHMIC);` or: `RNA_def_property_ui_scale_type(prop, PROP_SCALE_CUBIC);` Test the precision, step size and soft-min if you change the scale type of a property as it will feel very different and may need tweaking. Ref D9074
2021-04-13DNA: support int8_t type in DNA structsJacques Lucke
Differential Revision: https://developer.blender.org/D8908
2021-03-18Cleanup: spellingCampbell Barton
2021-03-16Fix T86332: Error using lambda in annotations in Python 3.10Campbell Barton
Callbacks used in `bpy.props` didn't hold a references to the functions they used. While this has been the case since early 2.5x it didn't cause any problems as long as the class held a reference. With Python 3.10 or when using `from __future__ import annotations`, the annotations are no longer owned by the class once evaluated. Resolve this by holding a reference in the module, which now supports traverse & clear callbacks so the objects are visible to Python's garbage collector. Also refactor storage of Python data, moving from an array into a struct.
2021-03-05Cleanup: Rename func occurences to _fnSebastián Barschkis
Use _fn as a suffix for callbacks.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-27RNA: Add warning to float percentage property definitionHans Goudey
As a followup to rBc71a8e837616159735, add a debug-only check for incorrect range, when the percentage and factor functions were likely confused.
2021-01-17RNA: report an error when the name property is set twiceCampbell Barton
This helps avoid copy-paste errors which have happened a few times, no functional changes.
2020-11-25Cleanup: Typo in `print_default_info` function name.Bastien Montagne
2020-11-19Fix RNA not giving error with invalid identifiers for collection propertiesBrecht Van Lommel
2020-11-17RNA define: check and report invalid usages of ID pointers properties.Bastien Montagne
Some RNA structs, like operators or keymaps, are not allowed to have ID pointer properties. now this check will ignore those, and report an error message in the console. Related to T82597. Notes: While a bit more involved than rBf39fbb3e6046, this commit remains fairly localized and non-intrusive. It relies on some rather obscure and weird behaviors of our RNA code though, a cleaner solution could be e.g. to add a tye to `StructOrFunctionRNA`, so that we could properly 'rebuild' (re-cast) the pointer to either `StructRNA` or `FunctionRNA` when needed in internal code...
2020-11-16Revert "RNA define: check and report invalid usages of ID pointers properties."Bastien Montagne
This reverts commit f39fbb3e604611b63c69661dd22ca987fb1d8791. Code is not valid, `DefRNA.laststruct` does not always point to the proper struct when defined from Python, need to be done differently.
2020-11-16RNA define: check and report invalid usages of ID pointers properties.Bastien Montagne
Some RNA structs, like operators or keymaps, are not allowed to have ID pointer properties. now this check will ignore those, and report an error message in the console. Related to T82597.
2020-11-11Cleanup: Use `NDEBUG` define, `DEBUG` one is not reliable.Bastien Montagne
2020-11-07Cleanup: Clang-tidy else-after-returnAnkit Meel
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-02Fix py-defined pointer properties wrong tag re ID ownership.Bastien Montagne
This fixes critical bug with liboverride when soe add-ons add some RNA ID Pointer properties. ID pointers should **never** have ownership of their ID when defined from python. (As a reminder, RNA properties owning their ID pointers are extremely rare even from C code, only embedded IDs (root node trees, master collections) and the shape keys snowflakes are concerned.)
2020-10-20Cleanup: makesrna, Clang-tidy else-after-return-fixes.Ankit Meel
It got left out of {rBc04088fed1b8faea6b2928bb5e09ab3}. No functional change.
2020-09-29DNA: use better type for SDNA->structsJacques Lucke
The data layout remains exactly the same.. This change just gives all the elements in `SDNA->structs` names, making it more comfortable to work with the data. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8926
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-06-29RNA: Add a way to prevent automatic addition of 'no ownership' flag for ID ↵Bastien Montagne
pointer properties. Since makesrna runs after all properties have been defined, we have to remember with a new internal flag when we explicitely disable the 'PROP_PTR_NO_OWNERSHIP' flag for a property. Otherwise there was no way to do so for ID pointer properties...
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-04LibOverride: Add Pointer properties to 'overridable by default'.Bastien Montagne
There is in fact no reason not to do so, RNA pointers are either to other IDs (which is properly handled by default diffing code), or to sub-structures that should almost always be diffed as well. Exceptions (like backward ID pointers or strictly runtime caches and data) are to be handled with proper 'no comparison' flag in any case.
2020-06-03RNA: add option to enable by default lib overridale flag of defined properties.Bastien Montagne
Similar to the one allowing to deactivate DNA check, etc. Will helps reduce verbosity when making many new properties overridable. Note that pointer properties always remain non-overridable by default, since basically only ID pointers should be. Reviewed By: brecht Maniphest Tasks: T77083 Differential Revision: https://developer.blender.org/D7906
2020-06-02Turn most flags in BlenderDefRNA into proper bool.Bastien Montagne
2020-06-02Cleanup: RNA: use `BlenderDefRNAtruct` named members initialization.Bastien Montagne
2020-04-03Cleanup: Rename ExtensionRNA variables from ext to rna_extJulian Eisel
Makes it more clear that code using this is related to the RNA integration of a type. Part of T74432. Also ran clang-format on affected files.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Fix BPY enum property definiton failing if items contain spacesJulian Eisel
Mistake in 03a4d3c33f82, turns out this actually is called from BPY (which I didn't think it was). So only error out during makesrna, not at runtime.
2020-03-17Cleanup: Fix warnings about function signature of register passRay Molenkamp
RE_engine_register_pass is sometimes in the headers with type as an integer parameter, sometimes as eNodeSocketDatatype. This caused warnings, the root cause was makesrna was not able to generate the proper type for enums and defaulted to int. makesrna has been extended with the RNA_def_property_enum_native_type that allows telling makesrna the native type of an enum, if set it will be used otherwise it will still fall back to int. Differential Revision: https://developer.blender.org/D7117 Reviewed By: brecht
2020-03-04Cleanup: use MEM_recallocN_id utility functionCampbell Barton
2020-03-04RNA: ensure missing calls to RNA_enum_item_end crash in debug modeCampbell Barton
Would have prevented T74227 from slipping through since it didn't crash on some systems.
2020-03-03RNA: support 64 bit boolean bitflags in DNABrecht Van Lommel
This does not affect the RNA access API, since how the boolean is read from DNA abstracted away in the API. Differential Revision: https://developer.blender.org/D7002
2020-02-19RNA: Fail makesrna if enum identifiers contain spacesJulian Eisel
We could of course always add checks for more invalid characters, but I'd say they are more unlikely to happen.
2020-01-16UI: Use same precision in "Move" redo panel as elsewhereJulian Eisel
The floating "Move" redo panel showed transform values with less precision than in other places (e.g. sidebar and properties editor). With Millimeters as unit it would even round to full integers, which may be an issue since you typically work at higher precisions with this unit. Note that this only applies to the visual precision, internally we use full floating point `float`s still. Fixes T70367.
2019-10-27Cleanup: remove redundant NULL checksCampbell Barton
2019-10-01RNA: add check for zero step argumentsCampbell Barton
Avoids errors like T70281 slipping through.
2019-09-12Cleanup: line breaks with commentsCampbell Barton
2019-09-11Cleanup: remove redundant RNA defaultsCampbell Barton
These are now set from DNA defaults.
2019-09-11DNA: defaults for ID typesCampbell Barton
2019-09-11RNA: automatically initialize defaults from DNACampbell Barton
Use defaults from DNA_*_defaults.h headers, this avoids calling RNA_def_property_*_default explicitly & having to repeat values.
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-06-03Cleanup: style, use braces in makesrnaCampbell Barton
2019-05-22RNA: add fallback update functionCampbell Barton
Use so we can have a default update function, that doesn't need to be set for every property.
2019-05-13RNA: disable undo on OperatorProperties and its subclasses.Alexander Gavrilov
Since these are temporary properties, changing them shouldn't cause undo pushes. There already is a flag to disable that, but since each operator inherits its own properties from the base, RNA define code also had to be changed to allow inheriting the flag.