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-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Objects: add Volume object type, and prototypes for Hair and PointCloudBrecht Van Lommel
Only the volume object is exposed in the user interface. It is based on OpenVDB internally. Drawing and rendering code will follow in another commit. https://wiki.blender.org/wiki/Source/Objects/Volume https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES build option. These are unfinished, and included only to make it easier to cooperate on development in the future and avoid tricky merges. https://wiki.blender.org/wiki/Source/Objects/New_Object_Types Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6945
2020-03-17GPencil: Fix Parent layer not workingAntonio Vazquez
The parenting was using the old logic, but with new engine the draw is done using eval data. Fixed the depsgraph relationship missing with bones to get an update when the bone is transformed. Also fixed Snap cursor to Selected
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-03-06Fix T73254: Drivers with the object.dimension variable are not updatedSybren A. Stüvel
This fixes an issue where drivers using `object.dimension` only add a dependency on `GEOMETRY` to the depsgraph, whereas they should also depend on `TRANSFORM`. This patch adds a new no-op operation that depends on the geometry and transform components to the Parameters component. An alternative implementation would be to have `RNANodeQuery::construct_node_identifier` return multiple node identifiers. However, this would spread throughout the depsgraph code and unnecessarily force many other functions to either return or handle multiple nodes where in 99.999% of the time a single node would suffice. The new `DIMENSIONS` node is added for each object. An upcoming patch will go over all no-op operation nodes and remove them from the depsgraph. Since this is a more dangerous operation, it'll be reviewed separately. Differential Revision: https://developer.blender.org/D7031
2020-03-05Cleanup: Move std::deque to depsgraph_type.hSybren A. Stüvel
Since `std::deque` is used in a few areas of the Depsgraph, and an upcoming patch adds one more, it's time it's considered as "commonly used type". No functional changes.
2020-03-05Cleanup: material API namingCampbell Barton
- Use 'BKE_object_material_*', 'BKE_id_material_*' prefix for functions that operate on Object and ID types. - Use '_len' suffix for length (matching BLI naming). - Use '_p' suffix for functions that return a pointer to values where the value would typically be returned. Functions renamed: - BKE_object_material_resize was BKE_material_resize_object - BKE_object_material_remap was BKE_material_remap_object - BKE_object_material_remap_calc was BKE_material_remap_object_calc - BKE_object_material_array_p was BKE_object_material_array - BKE_object_material_len_p was BKE_object_material_num - BKE_id_material_array_p was BKE_id_material_array - BKE_id_material_len_p was BKE_id_material_num - BKE_id_material_resize was BKE_material_resize_id - BKE_id_material_append was BKE_material_append_id - BKE_id_material_pop was BKE_material_pop_id - BKE_id_material_clear was BKE_material_clear_id
2020-02-21Fix T73593: Drivers on hide_viewport and hide_render are unreliableSybren A. Stüvel
This fixes a threading issue (T73593) between drivers that write to the same memory address. Driver nodes in the depsgraph now get relations to each other in order to ensure serialisation. These relations are only added between drivers that target the same struct in RNA, which is determined by removing everything after the last period. For example, a driver with data path `pose.bones["Arm_L"].rotation_euler[2]` will be grouped with all other drivers on that datablock with a data path that starts with `pose.bones["Arm_L"]` to form a 'driver group'. To find a suitable relation within such a driver group, say the relation (from → to), a depth-first search is performed (turned out to be marginally faster than a breadth-first in my test case) to see whether this will create a cycle, and to see whether there already is such a connection (direct or transitive). This is done by recursively inspecting the incoming connections of the 'to' node and thereby walking from it towards the 'from' node. This is an order of magnitde faster than inspecting the outgoing connections of the 'from' node. This approach generalises the special case for array properties, so the code to support that special case has been removed from `DepsgraphRelationBuilder::build_animdata_drivers()`. A test on the Spring rig [1] shows that this process adds approximately 8% to the build time of the dependency graph. In my test case, it takes 28 ms for this process on a total 329 ms construction time. However, since it also made some code obsolete, it only adds 24 ms (=8%) to the construction time. I have experimented with a simple cache to keep track of known-connected (from, to) node pairs, but this did not significantly improve the timing. Note that animation data and drivers are already connected by a relation, which means that animating a field and also changing it with a driver will not cause conflicts. [1] https://cloud.blender.org/p/spring/5d30a1076249366fa1939cf1 Differential Revision: https://developer.blender.org/D6905 Reviewed By: sergey, mont29
2020-02-21Fix: Drivers on hide_viewport and hide_render throw warningsSybren A. Stüvel
This partially fixes T73593. The `add_relation(driver_key, property_entry_key, ...);` call can fail in the following situation: - A collection is linked, and instanced into the scene by an Empty. - The collection contains an object with a driver on its `hide_render` or `hide_viewport` property. As the object doesn't exist as a real object in the scene, it's added with `base_index=-1` to the depsgraph (see `DepsgraphNodeBuilder::build_collection()`). As a result the node for syncing the restrictflags back to the base isn't present in the depsgraph, and the `add_relation()` call failed. This commit fixes the warning, simply by not attempting to add the offending relation.
2020-02-19Fix T73932: modifying keyframes in nodes fails when there is an image sequenceBrecht Van Lommel
Image animation should not be an depsgraph node of type ANIMATION, there is no need for it to be affected by the special casing for that.
2020-02-05T73589: Code Quality: Renaming on BKE_material.hAntonio Vazquez
Old Name New Name ========= ========= init_def_material BKE_materials_init BKE_material_gpencil_default_free BKE_materials_exit test_object_materials BKE_object_materials_test test_all_objects_materials BKE_objects_materials_test_all give_matarar BKE_object_material_array give_totcolp BKE_object_material_num give_current_material_p BKE_object_material_get_p give_current_material BKE_object_material_get assign_material BKE_object_material_assign assign_matarar BKE_object_material_array_assign give_matarar_id BKE_id_material_array give_totcolp_id BKE_id_material_num assign_material_id BKE_id_material_assign clear_matcopybuf BKE_material_copybuf_clear free_matcopybuf BKE_material_copybuf_free copy_matcopybuf BKE_material_copybuf_copy paste_matcopybuf BKE_material_copybuf_paste BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init BKE_material_add_gpencil BKE_gpencil_material_add BKE_material_gpencil_get BKE_gpencil_material BKE_material_gpencil_default_get BKE_gpencil_material_default BKE_material_gpencil_settings_get BKE_gpencil_material_settings
2020-01-28Merge remote-tracking branch 'origin/blender-v2.82-release'Sybren A. Stüvel
2020-01-28Alembic depsgraph: explicitly add ANIMATION -> CACHE dependencySybren A. Stüvel
This dependency was removed in fd0bc7e002ced8ffd85e9aa3edcae173dbd13392, as there already were dependencies ANIMATION -> PARAMETERS and PARAMETERS -> CACHE, making ANIMATION -> CACHE unnecessary. Upon subsequent inspection, the ANIMATION -> PARAMETERS dependency was there due to the fallback behaviour in `RNANodeQuery::construct_node_identifier()`. Now this is no longer relied upon, and the required relation is made explicit again.
2020-01-28Fix T72143: editing image frame start/offset does not update in EeveeBrecht Van Lommel
2020-01-28Merge remote-tracking branch 'origin/blender-v2.82-release'Sybren A. Stüvel
2020-01-28Fix T72660: Alembic caches are not properly updated by driversSybren A. Stüvel
Drivers were not considered when building the dependency graph for `CacheFile` datablocks.
2020-01-28Cleanup: reformatted after NULL -> nullptr in depsgraph C++ codeSybren A. Stüvel
No functional changes.
2020-01-28Cleanup: changed NULL to nullptr in depsgraph C++ codeSybren A. Stüvel
No functional changes.
2020-01-24Merge branch 'blender-v2.82-release'Alexander Gavrilov
2020-01-24Depsgraph: fix false positive time dependencies for simple drivers.Alexander Gavrilov
The dependency graph has to know whether a driver must be re-evaluated every frame due to a dependency on the current frame number. For python drivers it was using a heuristic based on searching for certain sub- strings in the expression, notably including '('. When the expression is actually evaluated using Python, this can't be easily improved; however if the Simple Expression evaluator is used, this check can be done precisely by accessing the parsed data. Differential Revision: https://developer.blender.org/D6624
2020-01-24Depsgrapg: Refactor, move Relation to own fileSergey Sharybin
2020-01-21Merge remote-tracking branch 'origin/blender-v2.82-release'Sybren A. Stüvel
2020-01-21Fix T72213: F-Curve animation does not update FreeStyle propertiesSybren A. Stüvel
FreeStyle line styles were not part of the dependency graph, and blacklisted from the Copy-on-Write system. As a result, animated FreeStyle properties would not be updated by the animation system, resulting in T72213. There was an explicit call to run the animation system on the original datablocks, but that was (for good reasons) removed in D5394. This commit adds the FreeStyleLineStyle datablocks to the dependency graph and allows them to be handled by the CoW system. As a result - the UI now updates properly when properties are animated, and - animated property values are actually used when rendering. This commit includes @Sergey's patch P1222, which unifies two bits of code that did the same thing: check whether datablock type is covered by copy-on-write. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D6609
2020-01-13Fix T73029: Crash transforming objectSergey Sharybin
Was caused by recent animation backup added to depsgraph as a part of another bugfix. This commit effectively disables the animation backup, restoring bug related on handlers, but makes it possible to interact with objects again. Will re-iterate over handlers+animated properties.
2020-01-13Depsgraph: Guarantee order of backup of action and ID using itSergey Sharybin
It was possible to have object copy-on-write happening during action's copy-on-write, which was causing access to a freed memory from animation backup. Solves crash reported in T73029.
2019-11-22Depsgraph: Ignore action time dependency if it's not neededSergey Sharybin
It is possible to have action which is not nullptr but which have no f-curves in it (for example, animate cube's location, then delete all f-curves). Such situation should not add time dependency as it could slow down scene evaluation on frame change.
2019-11-06Fix crash when adding Scene variable to a driverSybren A. Stüvel
When a Scene variable is added to a driver, and the RNA path is still NULL, it no longer crashes Blender.
2019-10-30Fix T71212: Drivers using scene.frame_current don't refresh on playbackSergey Sharybin
Need to make such drivers explicitly dependent on time.
2019-10-30Depsgraph: Cleanup, use anonymous nsamespaceSergey Sharybin
Jeeps overall line lengths with function definition shorter.
2019-09-25Depsgraph: Move proxy group and from building to own functionSergey Sharybin
Currently no functional changes, but allows to make it more clear to implement depsgraph construction from a given subset of scene.
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-09-03Fix T69326: Parent type ARMATURE doesn't workSergey Sharybin
2019-09-03Depsgraph: Cleanup, more clear variable nameSergey Sharybin
2019-09-03Depsgraph: Cleanup commentSergey Sharybin
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-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-08-11Cleanup: spellingCampbell Barton
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-17Fix T66919: Force field does not affect particlesSergey Sharybin
Reviewers: brecht Reviewed By: brecht Maniphest Tasks: T66919 Differential Revision: https://developer.blender.org/D5275
2019-07-15Fix compositor ignoring mask parentingSergey Sharybin
There are two aspects to the problem: - Dependency graph update for compositor preview was missing updates flush. Apparently, update for new frame style of update will take care of flushing, but not the update tagged style of update. This goes to a legacy dependency graph and is to be changed at some point, but not so close to the release. - Movie clips were missing from the compositor dependency graph. This fixes part of T66519. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D5256
2019-07-03Fix T66234: Issue on switching material mode between Object and DataSergey Sharybin
The root of the issue comes to the fact that part of dependency graph is being removed, without doing any further remapping. This was happening because only materials used by objects were pulled in, so when material mode is changed some material became unused and removed from the dependency graph and freed, causing object or its data to point to a freed memory in its materials array. Simplest and safest way to solve this is to pull materials referenced by both object and object data. This causes somewhat higher memory usage but keeps evaluated state of scene in an always consistent state, without any need to tag/update object's data on material mode change. Don't think it is a problem in practice. Reviewers: brecht, fclem Reviewed By: brecht, fclem Differential Revision: https://developer.blender.org/D5172
2019-07-03Fix T66370: add_relation Message in Console with certain shadersSergey Sharybin
2019-07-03Fix T66366: Multi object edit makes blender crashSergey Sharybin
Two issues here: - Evaluated object data is to only be updated for selection only after modifier stack is done its job. Otherwise it's possible to have selection batch update called on an input data, at the same time as original object data is being evaluated. - If object's modifier stack did not create its own evaluated mesh (in case when there is no effective modifiers, for example) can not update selection on object's data, as it might cause threading issues between objects sharing same data.
2019-07-02Fix T65778: Missing selection update with linked objects in edit modeSergey Sharybin
2019-06-28Fix T66105: Changing force field does not update simulationSergey Sharybin
2019-06-26Fix missing volume update via scene strip's settingsSergey Sharybin
This is a part of T66117. The entire sequencer+3d sound was never reliable, so this is as much as i can fix currently.
2019-06-26Fix T66132: Unable to move bone in special configurationSergey Sharybin
Animation needs to wait for the sub-data datablock copy-on-write, but tagging that copy-on-write should not enforce animation evaluation.
2019-06-17Cleanup: comment, RNA spellingCampbell Barton
2019-06-12Fix T57489: Texture coordinate object reference not updating in EeveeSergey Sharybin
2019-06-12Cleanup: spelling in commentsCampbell Barton