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-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-08-27Refactor IDProperty UI data storageHans Goudey
The storage of IDProperty UI data (min, max, default value, etc) is quite complicated. For every property, retrieving a single one of these values involves three string lookups. First for the "_RNA_UI" group property, then another for a group with the property's name, then for the data value name. Not only is this inefficient, it's hard to reason about, unintuitive, and not at all self-explanatory. This commit replaces that system with a UI data struct directly in the IDProperty. If it's not used, the only cost is of a NULL pointer. Beyond storing the description, name, and RNA subtype, derived structs are used to store type specific UI data like min and max. Note that this means that addons using (abusing) the `_RNA_UI` custom property will have to be changed. A few places in the addons repository will be changed after this commit with D9919. **Before** Before, first the _RNA_UI subgroup is retrieved the _RNA_UI group, then the subgroup for the original property, then specific UI data is accessed like any other IDProperty. ``` prop = rna_idprop_ui_prop_get(idproperties_owner, "prop_name", create=True) prop["min"] = 1.0 ``` **After** After, the `id_properties_ui` function for RNA structs returns a python object specifically for managing an IDProperty's UI data. ``` ui_data = idproperties_owner.id_properties_ui("prop_name") ui_data.update(min=1.0) ``` In addition to `update`, there are now other functions: - `as_dict`: Returns a dictionary of the property's UI data. - `clear`: Removes the property's UI data. - `update_from`: Copy UI data between properties, even if they have different owners. Differential Revision: https://developer.blender.org/D9697
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-10-28Cleanup: Remove unused IDProperty functionHans Goudey
This function from 2017 came with a comment: "TODO Nuke this once its only user has been correctly converted to use generic IDmanagement" Since it is unused after rB91462fbb31ba, now is time to remove it. Differential Revision: https://developer.blender.org/D9368
2020-09-30Cleanup: sort struct declarationsCampbell Barton
2020-09-20IDProperties: Add utils to duplicate content of one IDProp into another.Bastien Montagne
2020-08-28Cleanup: improve function namesJacques Lucke
With this change, the three .blend read operations: data reading, lib reading and expanding are more grouped together.
2020-08-21Blenloader: move IDProperty read/write code to blenkernelJacques Lucke
This is part of T76372.
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-06-20Cleanup: use const args for property name/description accessCampbell Barton
2020-04-28IDProperties: add a foreach looper and use it in libquery code.Bastien Montagne
Note: part of fix for T75279. Differential Revision: https://developer.blender.org/D7550
2020-01-24IDProps: add utility to set an ID pointer IDProp value.Bastien Montagne
2019-11-04Fix T71250: ID user decrement error with ID properties in ViewLayerLukas Stockner
Credit for the original patch goes to @scorpion81.
2019-05-16Cleanup: rename IDP_FreeProperty_ex to IDP_FreePropertyContent_exJacques Lucke
This was missing from rBdb5120603f.
2019-05-16Refactor: Simplify ID Property freeingJacques Lucke
This also makes `IDP_CopyProperty` the "opposite" of `IDP_FreeProperty`, which is what I'd expect. Two refactoring steps: * rename IDP_FreeProperty to IDP_FreePropertyContent * new IDP_FreeProperty function that actually frees the property Reviewers: brecht Differential Revision: https://developer.blender.org/D4872
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-02Cleanup: remove author/date info from doxy headersCampbell Barton
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-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-05-05Merge branch 'master' into blender2.8Campbell Barton
2018-05-05IDProp API: add native C repr functionCampbell Barton
Was using Python which wasn't very efficient (even for logging).
2018-05-04Merge branch 'master' into blender2.8Campbell Barton
2018-05-04IDProp API: expose repr utility functionCampbell Barton
Useful for logging properties passed to operators.
2018-01-24Add utility function to reset ID property value to a given oneSergey Sharybin
This is similar to idproperty_reset() defined in layer.c, but it does not re-alloc property itself. We should replace idproperty_reset() with IDP_Reset() now.
2017-08-15Bring new IDP_MergeGroup() on par with other copying logic.Bastien Montagne
We now have to support more complex copying types, which are controlled by flags, so all copying logic will need to take those at some point (at least, all potentially dealing with IDs).
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-05-03Make IDP_MergeGroup recursiveDalai Felinto
With this we also do not need IDP_MergeGroupValues anymore. If this causes problems in the future we can always make recursion an option (like overwrite is).
2017-04-20IDProperty: New util function to merge groups recursivelyDalai Felinto
2017-04-13Datablock ID PropertiesAlexander Romanov
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks. This functionality is implemented for `PointerProperty` and now such properties can be created with Python. In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch. Original author: @artfunkel Alexander (Blend4Web Team) Reviewers: brecht, artfunkel, mont29, campbellbarton Reviewed By: mont29, campbellbarton Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne Maniphest Tasks: T37754 Differential Revision: https://developer.blender.org/D113
2015-01-01cleanup: redundant casts & const cast correctnessCampbell Barton
2014-12-12Fix T42883: ID-Prop arrays longer than 'shot' failCampbell Barton
2014-11-10Fix/workaround T37073: Crash updating custom props visible in the UICampbell Barton
2014-11-03Cleanup: remove rarely used IDProp iteratorCampbell Barton
2014-08-11Fix compilation error with debug sconsSergey Sharybin
The issue is that we've got hell with DEBUG and _DEBUG, theu're defined really inconsistent acros CMake and SCons. Used more reliable NDEBUG definition for IDP_spit.
2014-08-04Tweaks to macrosCampbell Barton
2014-08-01Prevent macros hiding casts from `const` pointersCampbell Barton
2013-12-12Fix T37595: Switching modal transform broke with trackball rotation.Campbell Barton
Id properties may have different sized "values" array depending on the transform operator
2013-12-12Code Cleanup: use const's and bools for idpropsCampbell Barton
2013-10-16add IDP_FreeFromGroup(), replaces IDP_RemFromGroup(), IDP_FreeProperty(), ↵Campbell Barton
MEM_freeN().
2013-09-01Move GCC attributes into a centraized definesSergey Sharybin
Instead of having ifdef __GNUC__ all over the headers to use special compiler's hints use a special file where all things like this are concentrated. Makes code easier to follow and allows to manage special attributes in more efficient way. Thanks Campbell for review!
2013-07-02remove nan copyrights from code added since blender become opensource (copy ↵Campbell Barton
paste errors), also remove BKE_script.h
2013-03-24code cleanup: move doxy docs from headers into source. also replace ↵Campbell Barton
strncpy();str[len]=0 with BLI_strncpy() in BLI_stringdec().
2013-01-03add id property clear function (matching the same python function for ↵Campbell Barton
dicts/lists)