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-03-11LibOverride: First stage of detection of 'need resync'.Bastien Montagne
We can fairly easily detect some resync-needed cases when applying the overrides operations on a Pointer RNA property. This should cover all cases where an existing override's ID pointer is changed in its linked data. We still have to add code to detect when a not-yet-overridden linked ID needs to become overridden (because its relations to other data-blocks changed in a way that requires it). Part of T83811 & D10649.
2021-03-05Cleanup: Rename func occurences to _fnSebastián Barschkis
Use _fn as a suffix for callbacks.
2021-02-09Cleanup: spellingCampbell Barton
2021-01-25LibOverride: refactor of relationships handling in library overrides.Bastien Montagne
First step towards a better handling of relationships between IDs in override context, especially when a resync is needed. First, introduce a new flag to override operations, `IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE`, for ID pointers. It keeps track of whether an RNA ID pointer has been kept to its 'natural overriden ID' (in override hierarchy context), or has actually been re-assigned to some other data-block. Second, refactor how we deal with relationships between IDs in override hierarchy code, especially in resync case. This will fixe several cases listed in T83811, especially the case where an ID pointer to an existing override needs to be updated to a new one due to a matching change in linked data.
2021-01-15LibOverride: fix/update/re-enable ID-related debug checks in diffing code.Bastien Montagne
We should now have the tools to ensure consistency of ID pointers diffing in `rna_property_override_diff_propptr`. As a reminder, for most ID pointers we just check the actual pointer value, but this is not possible for embedded IDs like root node trees or master collections, and for fake embedded ones like shapekeys, so those should be handled as mere sub-data of their owner IDs in override context.
2021-01-15Fix T84373: Overrides : shapes keys driven by armature don't work on second ↵Bastien Montagne
instance. Code generating override operations would not deal properly with Pointer RNA properties, trying by default to use and check pointers' names properties like it does with items of a collection. However, using name property in pointer RNA property case makes no sense, so specialize the `no_prop_name` flag for each case (pointer or collection). here, since second override would generate local data-blocks with different names than the linked data ones, name matching would fail and breck handling of override diffing in shapekeys. Note that shape keys are the only one concerned by that problem, since other embedded IDs (root node trees and master collections) are fully real ones, so they always get the same names.
2021-01-11Fix T84516: ID properties have incorrect names in Python dir() listBrecht Van Lommel
Caused by not going through the proper accessor function to access the property identifier.
2020-12-24UI: Cleanup spelling of compound wordsYevgeny Makarov
Approximately 138 changes in the spelling of compound words and proper names like "Light Probe", "Shrink/Fatten", "Face Map". In many cases, hyphens were used where they aren't correct, like "re-fit". Other common changes include: - "Datablock" -> "data-block" - "Floating point" -> "floating-point" - "Ngons" -> "n-gons" These changes help give the language used in the interface a consistent, more professional feel. Differential Revision: https://developer.blender.org/D9923
2020-12-14Cleanup: Fix capitalization in various placesYevgeny Makarov
Approximately 33 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D9796 Reviewed by Julian Eisel
2020-12-10Cleanup: rename BLI_strescape to BLI_str_escapeCampbell Barton
Prepare for `BLI_str_unescape` which doesn't read well without the separator.
2020-12-08LibOverride: Add initial support for adding new NLA tracks.Bastien Montagne
Also makes NLA tracks and strips overridable. User can either edit existing strips in existing NLA tracks (but not add or remove them), and/or add new NLA tracks after those comming from the linked data. Most of the work was as usual checking operators and adding protections against illegal operations in override context. Note that since we can only rely on indices to deal with local added tracks, we forbid any local track being before any linked/original track. Maniphest Tasks: T72629 Differential Revision: https://developer.blender.org/D9611
2020-11-20Fix (unreported) bug in liboverride diffing code for collection item insertion.Bastien Montagne
In case we do not use names, code adding new insert operations in collections was broken. Not a proble in practice so far, since this case was not yet in use, but will be soon with NLA overrides.
2020-11-18Cleanup: remove break after return statementsCampbell Barton
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-29Cleanup: spellingCampbell Barton
2020-09-25LibOverride: Better handling of cleanup of 'insert' operations in collections.Bastien Montagne
Before, it might have been possible in some cases (when there were no items at all anymore in the collection) to miss that cleanup step, leaving ghost useless and invalid operations around.
2020-09-25LibOverride: Fix some cleanup of unused override operations.Bastien Montagne
Handling of pointer replacements in collection items lead to validating all operations for a given property, when some might actually be no more valid and would need to be cleaned up. Related to T81059, found while investigating it.
2020-09-20Cleanup: Correct comment in newly added liboverride code for IDProp collections.Bastien Montagne
2020-09-20LibOverride: support inserting items in py-defined (IDProp-based) collections.Bastien Montagne
Supporting IDProperty-based data storage here in a generic way is fairly simple, unlike actual RNA data (DNA-based), for which getting a proper generic way to duplicate them from within RNA is currently not really possible. Part of T79562.
2020-09-14Fix T80457: Library Override - Custom Property to Drive Child Particles ↵Bastien Montagne
results in Crash. RNA diffing code was not dealing properly valid NULL PointerRNA (like the empty texture slots of a ParticleSettings e.g., which were cause of crash in that report). To be backported to 2.90 and 2.83.
2020-09-10Cleanup: spellingCampbell 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-07-23LibOverride: Store RNA prop type in override properties.Bastien Montagne
Storing this info will help with dealing with reset operations and the like (as we do not want to reset overrides of ID pointers essentially).
2020-07-13RNA code cleanup: Fix wrong usages of `rna_idproperty_check()`.Bastien Montagne
This function is more expansive than the simpler `rna_ensure_property()` one, and should only be used when IDProperty data is actually needed. If one only needs to ensure it has a valid PropertyRNA pointer, `rna_ensure_property()` is much more efficient. Also add compiler warnings when results of those functions are unused, this should never be the case.
2020-07-10Refactor override code to properly deal with runtime rna properties too.Bastien Montagne
The triplet static RNA / runtime RNA / custom properties is a real pain to deal with... Using the new `PropertyRNAOrID` struct helps clarifying and properly dealing with all three cases. Note that this makes override of py-defined RNA properties working (support for that will be committed next). Differential Revision: https://developer.blender.org/D8249
2020-06-30LibOverride: Fix handling of owned ID pointers in diffing process.Bastien Montagne
2020-06-18LibOverride: increase speed of RNA diffing process.Bastien Montagne
By using own path construction instead of handy printf-like functions, we get a 10% improvement on overall diffing process! This remains way to slow on some complex production characters, but always good to have still.
2020-06-10Fix (unreported) disapearance of some overrides after save & reload.Bastien Montagne
The override operations generated from 'do not follow' RNA pointer properties (i.e. pointers to other IDs) were not properly clearing their 'no more used' flag, and hence were incorrectly deleted on second save.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-11CLeanup: clang-formatCampbell Barton
2020-02-10Cleanup: Rename `BKE_library_override_` functions to `BKE_lib_override_library_`Bastien Montagne
pqrt of T72604.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-10-07Fix T70555: Crash when attempting to create an override for an object with a ↵Bastien Montagne
cloth modifier. Was not taking into account the case where pointer RNA prop is valid, but has no data (i.e. is a 'null' pointer)...
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-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-19Fix T68831: use NULL instead of the wrong pointer to read default array.Alexander Gavrilov
The pointer argument is supposed to be the object the property belongs to, not a pointer to the property metadata itself. This only worked before because the argument was never used.
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-02Cleanup: clang-format, also typo fix.Campbell Barton
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-07-10Cleanup: avoid line breaks from trailing commentsCampbell 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 RNACampbell 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-04-22Cleanup: style, use braces for makesdna, makesrnaCampbell Barton
2019-04-21Cleanup: comments (long lines) in makesrnaCampbell Barton
2019-04-17ClangFormat: format '#if 0' codeCampbell Barton
Previous cleanups didn't account for space after '#'.
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.