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-06-30Custom Properties: support default values for stringsDemeter Dzadik
Differential Revision: https://developer.blender.org/D8102
2020-06-30Cleanup: LibOverride: Replace raw pointers checks by proper macros.Bastien Montagne
This is cleaner, but also crucial to avoid weird issues when behaviors of those checks are modified...
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-06-20Cleanup: use const args for property name/description accessCampbell Barton
2020-06-05Code Cleanup: fcurve function namingJeroen Bakker
2020-05-22RNA: Make enum properties compatible with raw access.Bastien Montagne
This will allow to use foreach_get/set on enums of RNA collection items, which can save a lot of time in some cases (see incoming FBX updates).
2020-04-17Cleanup: use colon after doxygen parameters, spellingCampbell Barton
2020-04-15Cleanup: remove (unused) RNA update cachePhilipp Oeser
Introduced in 2011 in rB6a392e8cb505, it was disabled again soon after in rBb062056c05a3 and traces to it partly removed in rB21744217cea9. Now remove completely. quote @sergey: We shouldn't be having partially working unused code. If we ever need some sort of update cache it would need to have clear design first, and the code could be resurrected from history if needed. Differential Revision: https://developer.blender.org/D7432
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData API" section. The code in that section has now been split off, and placed into `BKE_anim_data.h` and `anim_data.c`. All files that used to include `BKE_animsys.h` have been adjusted to only include the animation headers they need (sometimes none). No functional changes.
2020-03-19Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.Bastien Montagne
Mpving utils from idcode to idtype proved to be somewhat painful for some reasons, but now all looks good. Had to add a fake/empty shell for the special snowflake too, `ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-11Cleanup: rename 'private' to 'embedded' for sub-data IDs.Bastien Montagne
'Private' can be a rather confusing term, especially when considering its meaning in programming languages. So now root node trees and master collections are 'embedded' IDs instead.
2020-02-26Docs: expand comment on tagging id properties to updateCampbell Barton
Addresses issue from T74000.
2020-02-17Fix many typos and other issues in UI messages.Bastien Montagne
2020-01-24Fix T73336: Several issues (including crashes) with ID pointer IDProps and RNA.Bastien Montagne
`RNA_property_pointer_set()` was just broken when assigning to an ID pointer IDProp, on both debug/checks and actual assignment. That was at least affecting RNA copying and liboverrides area...
2019-12-04UI: support Copy To Selected and Alt-Click for PropertyGroup members.Alexander Gavrilov
Rigify uses a property group to contain options of its rigs, so currently it is impossible to use Alt-Click or Copy To Selected to change a setting for multiple rigs at the same time. The main problem here is that there is no efficient way to find which bone the property group belongs to. To maintain performance, implement this by checking the active bone if it is known. Copy Data Path and related features still don't work, as data path calculation can't use context. Differential Revision: https://developer.blender.org/D6264
2019-11-22Fix T69332: 'Reset to Default Value' on a custom string property crashesPhilipp Oeser
Thx @campbellbarton for the heads up! Maniphest Tasks: T69332 Differential Revision: https://developer.blender.org/D6284
2019-10-04LibOverride: Fix last main issue with overriding custom properties.Bastien Montagne
Now, custom props defined as overriddable can be overridden, saved, reloaded, etc. That fixes the last main issue with them. Note that custom props still have a lot of glitches and weirdness in their overriding behavior, but for now the most important is finally achieved, will let them rest and settle a bit, those have been incredibly painful to tame... :(
2019-09-30Fix RNA's "editable" func regarding IDProps and override.Bastien Montagne
`RNA_property_overridable_get()` need the original RNA property (i.e. the actual IDProp in case it is one), not the 'proxy' type property returned by `rna_ensure_property()` for IDProps. Makes custom properties of library overrides editable at last, now we only have to keep them overridden values!
2019-09-25LibOverride: Fix several issues in handling of overridable status for IDProps.Bastien Montagne
The triple possible status of an PropertyRNA (actual C-defined prop, py-defined IDprop behaving similar ot RNA one, or actual 'pure' custom prop) is really confusing... Not to mention the _RNA_UI ugly thingy on top of that. :/
2019-09-04Fix/cleanup error handling in paths generation for private ID data case.Bastien Montagne
When using new `rna_prepend_real_ID_path()`, caller have to handle the NULL path case and decide whetehr this is a valid case or an error one.
2019-09-02Fix/enhance new RNA path from real ID helpers.Bastien Montagne
Main issue was that `rna_prepend_real_ID_path()` would return nothing in case given path was NULL, when it should actually return the `prefix` computed by `RNA_find_real_ID_and_path()` in that case... Also make return `real_id` pointer optionnal, no reasons to make it mandatory here. And some general naming fixes.
2019-09-02Make Scene Master collection 'Private' ID data, like root nodetrees.Bastien Montagne
Same issue here as with root nodetrees, those are private ID data owned by another ID, and not in Main DB. This requires special handling. there are still quiet a few things to do here, like getting rid of special code for master collection (regular ID copying should handle that just as it already does for root nodetrees), cleanup in ID copying code, etc.
2019-08-28Fix T68971: Copy As New Driver from Material node creates a bad reference.Alexander Gavrilov
NodeTree structures of materials and some other data blocks are effectively node group datablock objects that are contained inside the parent block. Thus, direct references to them are only valid while blender is running, and are lost on save. Fix Copy As New Driver to create a reference that goes through the owner datablock, by adding a new ID flag to mark private pseudo-datablocks. Also fix functions that return full paths to structures and properties, e.g. used in python tooltips. Functions for paths from ID to struct or property can't be changed because of Animation Data related code. Reviewers: mont29 Differential Revision: https://developer.blender.org/D5559
2019-08-23LibOverride: Fixed bug in removing override op operator.Bastien Montagne
In case the property is a RNA pointer, `RNA_path_resolve()` will try to resolve it and return that pointer, instead of returning expected container... That is a bad inconsistency in the rNA path API, but no proper way to solve it for now...
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-08-22Cleanup: Split some code out of rna_access.cBastien Montagne
That file was getting out of control, now comparison/override RNA code is in `rna_access_compare_override.c`. 1K lines of code for now, but that area is likely to grow more in the future... Note that we can probably split more out of `rna_access.c`, but for now that will do.
2019-08-22LibOverride: Cleanup: rename parameters in RNA apply code.Bastien Montagne
We cannot use local/reference here, that is very confusing, since at that stage current local is kind of src of data for the future local ID, that is currently a mere copy of the linked data... ;) So we are much better with src/dst names here.
2019-08-21LibOverride: Fix inverted logic in RNA collection operation application.Bastien Montagne
Note to self: need to recheck the namings of whole override code, currently this is way to confusing and inconsistent.
2019-08-16Fix T68651: LibOverride: Fix bad handling of RNA collections pointers.Bastien Montagne
We were storing the 'item' part in the RNA path of the override op itself, which will not work with IDs because overriding local one might not have the same name as the linked one (when some local ID with same name already exists). Now we are properly handling this using the expected actual override operation, which stores necessary data (names or indices) from both local and linked data.
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-14Custom Properties: allow changing the property UI to color picker.Alexander Gavrilov
To fully support storing colors as a custom property, it is necessary to allow switching the property UI to the standard color picker button. That means in effect supporting custom property subtype values. Change RNA_property_subtype to look for a 'subtype' string field in _RNA_UI and parse it as an enum value. To minimize performance impact, only do it if the property is an array; also, don't use the custom subtype during RNA path parsing. On the python side, allow setting some most useful seeming values from the custom property settings editor. Also, since some color picker code seems to run into a risk of buffer overruns if the array size is wrong, check the size in the UI layout code to be safe. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D5475
2019-08-13Custom Properties: officially support int and float arrays in the UI.Alexander Gavrilov
In some rare cases it is convenient to store a short array value as a custom property, e.g. a vector or color. For example, it may be helpful when importing/exporting certain formats that support custom or nonstandard attributes on objects. The custom property storage already can handle arrays in order to support properties defined via python. The only thing missing is UI support (and some bugs), and this patch fixes that: - Allow editing short array properties via Custom Properties panel. - Fix a UI layout sizing bug triggered by the previous item. - Fix a dependency graph bug with drivers using such properties. - Make RNA_*_get_default_array code robust in case of size mismatch. - Support custom default values for array properties, allowing both an array and a scalar value. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D5457
2019-06-17Fix T65662: Drivers on custom properties doesn't properly updateSergey Sharybin
Happens if custom property is on object data data-block, which doesn't have translation or geometry components. Not for lights and cameras at least.
2019-06-15Cleanup: spellingCampbell Barton
2019-06-15Cleanup: Rename: Static Override -> Library Override.Bastien Montagne
Better to make internal code naming match official/UI naming to some extent, this will reduce confusion in the future. This is 'breaking' scripts and files that would use that feature, but since it is not yet officially supported nor exposed in 2.80, as far as that release is concerned, it is effectively a 'no functional changes' commit.
2019-06-03Cleanup: style, use braces in makesrnaCampbell Barton
2019-05-20Cleanup: reorder report argument for pointer assignmentCampbell Barton
Most code uses ReportList argument last (or at least not first) when an optional report list can be passed in.
2019-05-17Python: Raise an error even NO_MAIN data is assigned to objectSergey Sharybin
The goal is to prevent assignment of temporary or evaluated meshes to objects from the main database. Majority of the change is actually related on passing reports around. On a positive side there are more error prints which can become more visible to scripters. There are still possible further improvements in the related areas. For example, disable user counting for evaluated ID datablocks when assignment happens. But can also happen later on as a separate improvement. Reviewers: brecht, campbellbarton, mont29 Reviewed By: brecht Differential Revision: https://developer.blender.org/D4884
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-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-22Cleanup: style, use braces for makesdna, makesrnaCampbell Barton
2019-04-21Cleanup: comments (long lines) in makesrnaCampbell 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-04-14Cleanup: doxy commentsCampbell Barton
Use doxy references to function and enums, also correct some names which became out of sync.
2019-04-01Fix T62960: Expanding/Closing Constraints/Modifiers causes re-renderSergey Sharybin
Mark specific properties as no-dependency-graph tag. This is needed to avoid a centralized Copy-on-Write tag from RNA pointer update.
2019-03-27Revert "RNA: error on register when classes use invalid identifiers"Campbell Barton
This reverts commit b24a255ca67841ff2d6121327791e933ce8e3602. The warning wasn't being printed, so many add-ons weren't yet updated. Re-enable now warnings are printed to allow addon developers to update.
2019-03-25RNA: error on register when classes use invalid identifiersCampbell Barton
Ensure conventions are met since we're in beta and all instances should be updated before release.
2019-03-19Cleanup: comment blocksCampbell Barton
2019-02-26Cleanup: indentation, trailing spaceCampbell Barton