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-08-13GPencil: Remove unused parameter and fix warningAntonio Vazquez
2020-08-12GPencil: Remove unused parameter in convert curveAntonio Vazquez
The only_stroke parameter is not used
2020-08-12GPencil: Add Sample parameter to Convert curveAntonio Vazquez
This allows to resample the stroke to avoid too dense geometry.
2020-08-12GPencil: Add parameters to scale thickness when convert CurvesAntonio Vazquez
This parameter allows to scale the thickness.
2020-05-27Merge branch 'blender-v2.83-release'Nathan Craddock
2020-05-27Fix: A few missing outliner selection sync tagsNathan Craddock
Add selection syncing for object add named (e.g. drag and drop from outliner to 3D view), outliner right click (a sync when the context menu is cancelled), and for object selection from Python.
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-05-06GPencil: Split Curve geometry functions to new fileAntonio Vazquez
This prepare the code for future curve editors
2020-04-03Cleanup: Rename bScreen variables from sc/scr to screenJulian Eisel
Part of T74432. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-04-03Cleanup: split `BKE_anim.h` and `anim.c` into smaller piecesSybren A. Stüvel
The files are now split up into the following sections: - `BKE_anim_path.h` and `anim_path.c` for path/curve functions. - `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for animation visualization (mostly motion paths). - `BKE_duplilist.h` for DupliList function declarations. These were already implemented in `object_dupli.c`, so they were rather out of place being declared in `BKE_anim.h` in the first place. No functional changes.
2020-03-19GPencil: Cleanup - Split BKE_gpencil.h geometry functions into ↵Antonio Vazquez
BKE_gpencil_geom.h This split prepare the code for future geometry functions.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09Revert "Constraints: remove special meaning of Local Space for parentless ↵Sybren A. Stüvel
Objects." This reverts commit 7728bfd4c45c634ba6b62e149176425ec5779945. Although this brings back an inconsistency in the behaviour of constraints on objects and bones, people were relying on the old behaviour, and the new behaviour broke their files. It is still desired to remove this inconsistency, but it will happen more gradually.
2020-02-28Objects: make evaluated data runtime storage usable for types other than meshBrecht Van Lommel
This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. This previously caused a bug in T74283, that should be fixed now. Differential Revision: https://developer.blender.org/D6695
2020-02-28Revert "Objects: make evaluated data runtime storage usable for types other ↵Brecht Van Lommel
than mesh" This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a. Fix T74283: modifier display lost when moving object in edit mode. The cause is not immediately obvious so better to revert and look at this carefully.
2020-02-27Objects: make evaluated data runtime storage usable for types other than meshBrecht Van Lommel
This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. Differential Revision: https://developer.blender.org/D6695
2020-02-18Cleanup: compiler warningsBrecht Van Lommel
2020-02-17MSVC: Fix obscure RNA related build errorRay Molenkamp
When you switch between debug/release mode a lot, you could end up in a situation where the generated RNA code was out of sync between the two configurations. There was one function optionally defined with an `#ifndef NDEBUG` guard, this patch adds a stub implementation for the other configurations to prevent build errors. Differential Revision: https://developer.blender.org/D6855 Reviewers: brecht
2020-02-17Fix many typos and other issues in UI messages.Bastien Montagne
2019-11-06Constraints: remove special meaning of Local Space for parentless Objects.Alexander Gavrilov
In 2011 special handling was introduced, apparently for no other reason than to address a complaint in T25707 that World and Local space are equivalent for objects without parent. This causes issues and confusion, as mentioned in rB599c8a2c8e4. This special meaning of Local Space is not documented in the manual, and is not known to experienced riggers, so removing it should not be a problem. Differential Revision: https://developer.blender.org/D6095
2019-10-15Fix T70670: Hidden collections are still rendered by Cycles in the ViewportDalai Felinto
Now local collections are fully working with cycles preview, while the collection visibility bug is fixed. Local collections were not working with cycles viewport even before the recent commit to allow users to show collections that are hidden in the view layer. It just got worse with said commit (0812949bbc3d). Differential Revision: https://developer.blender.org/D6034
2019-09-12Cycles: Fix Show Instanced Local View ObjectsJeroen Bakker
The local view check in the RNA didn't support instanced objects. Every object has a copy of the local_view_bits from the base. This patch changes the check to look at the local stored bits. This patch removes the check if the object is part of the view_layer. In the cases we are using it this check is not relevant. The `mesh_tissue` add-on also uses it, and is not effected by this change. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5773
2019-09-12Cycles: Initial Support For Local ViewJeroen Bakker
This diff will add support for local view to Cycles rendered preview mode. Currently the implementation shows same results as EEVEE does. This entails a difference with Blender 2.79, where lights were automatically added to the local view. {T69780} describes this should be solved before the next release. This patch also solves missing `owner_id` issues when using the RNA CPP Api from Cycles. Cycles didn't provide the `owner_id` making some functionality fail, what then was worked around in Blender. It also fixes an issue in `makesrna` where incorrect CPP code was generated when only `PARM_RNAPTR` was provided. An optional `view_layer` parameter is added to the `Object.local_view_get` method to reduce lookups. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5753
2019-08-31Fix T66452: Convert Curve to Grease Pencil StrokesAntonio Vazquez
This commit adds support to convert curves to Grease Pencil strokes and create the materials too. Also, there is a new python API. This API is required by the modified SVG import addon to create strokes( see T67065). All curves selected in one operation are converted in the same Grease Pencil object.
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-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-31Refactor access to dependency graphSergey Sharybin
This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-07-22fix unreported: typo in python documentationGaia Clary
Fix as approved by dr.sybren in blender chat
2019-07-17Fix T67075: make object.visible_get() and similar APIs more forgivingBrecht Van Lommel
When objects are not in the view layer, just return false rather than throwing an error. As far as the script is concerned the object is not visible or selected when it's not in the current view layer.
2019-06-03Cleanup: style, use braces in RNACampbell Barton
2019-05-27Python API: Tag for update on object.update_from_editmode()Sergey Sharybin
This call modifies geometry but does not inform anyone about changes. After this change it's possible to load edit mesh, then request evaluated dependency graph and do some interesting things with the updated object. This is part of T63244: object.to_mesh ignores object.update_from_editmode
2019-05-27Depsgraph API: Allow preserving custom data layersSergey Sharybin
This commit extends dependency graph API with an argument which denotes that all custom data layers are to be preserved. This forces modifier stack re-evaluation with more inclusive mask. Far from ideal, since this might fail in certain configurations with indirectly used objects which might be missing layers needed for the current object evaluation. But this is how it worked for a long time, so should be good enough for until more sophisticated solution is found. In order to use this new behavior two things are to be passed: - Pass keep_all_data_layers=True - Pass a valid dependency graph. The dependency graph is only needed if keep_all_data_layers=True and is NOT to be passed if keep_all_data_layers=False. If keep_all_data_layers=True the dependency graph MUST be passed. Reviewers: mont29, brecht Reviewed By: mont29 Maniphest Tasks: T64994, T64794 Differential Revision: https://developer.blender.org/D4940
2019-05-17Depsgraph: State behavior details more explicitlySergey Sharybin
2019-05-16Tweak API to support adding evaluated meshes to main databaseSergey Sharybin
One of the usecases is to create mesh from an object is a manner similar to how Apply Modifiers does it, and have it in the bmain so it can be referenced by other objects. This usecase is something what went unnoticed in the previous API changes, so here is a followup. Summary of changes: * bpy.meshes.new_from_object() behaves almost the same as before this change. The difference now is that it now ensures all referenced data-blocks are original (for example, materials referenced by the mesh). * object.to_mesh() now creates free-standing Mesh data-block which is outside of any bmain. The object owns it, which guarantees the memory never leaks. It is possible to force free memory by calling object.to_mesh_clear(). Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D4875
2019-05-16Dependency graph API changesSergey Sharybin
Main goal here is to make it obvious and predictable about what is going on. Summary of changes. - Access to dependency graph is now only possible to a fully evaluated graph. This is now done via context.evaluated_depsgraph_get(). The call will ensure both relations and datablocks are updated. This way we don't allow access to some known bad state of the graph, and also making explicit that getting update dependency graph is not cheap. - Access to evaluated ID is now possible via id.evaluated_get(). It was already possible to get evaluated ID via dependency graph, but that was a bit confusing why access to original is done via ID and to evaluated via depsgraph. If datablock is not covered by dependency graph it will be returned as-is. - Similarly, request for original from an ID which is not evaluated will return ID as-is. - Removed scene.update(). This is very expensive to update all the view layers. - Added depsgraph.update(). Now when temporary changes to objects are to be done, this is to happen on original object and then dependency graph is to be updated. - Changed object.to_mesh() to behave the following way: * When is used for original object modifiers are ignored. For meshes this acts similar to mesh-copy, not very useful but allows to keep code paths similar (i.e. for exporter which has Apply Modifiers option it's only matter choosing between original and evaluated object, the to_mesh() part can stay the same). For curves this gives a mesh which is constructed from displist without taking own modifiers and modifiers of bevel/taper objects into account. For metaballs this gives empty mesh. Polygonization of metaball is not possible from a single object. * When is used for evaluated object modifiers are always applied. In fact, no evaluation is happening, the mesh is either copied as-is, or constructed from current state of curve cache. Arguments to apply modifiers and calculate original coordinates (ORCO, aka undeformed coordinates) are removed. The ORCO is to be calculated as part of dependency graph evaluation. File used to regression-test (a packed Python script into .blend): {F7033464} Patch to make addons tests to pass: {F7033466} NOTE: I've included changes to FBX exporter, and those are addressing report T63689. NOTE: All the enabled-by-default addons are to be ported still, but first want to have agreement on this part of changes. NOTE: Also need to work on documentation for Python API, but, again, better be done after having agreement on this work. Reviewers: brecht, campbellbarton, mont29 Differential Revision: https://developer.blender.org/D4834
2019-05-14Fix T63542: Imported FBX doesn't show keyframes in Shape Key editor.Bastien Montagne
While shapekeys RNA path handling does support keyblocks (ShapeKeys) with an `id_data` wrongly set to the geometry instead of the shapkey, this is really not something to promote. ideally it should be removed at some point. At least, let's not generate such RNA pointer if we can avoid it. Here it was breaking proper showing of animated shapekeys in the UI, since this expects animated datablocks to have their own animation data (and 'rooting' keyblocks to their mesh instead of their shapekey ended up defining their animation in the mesh, not in the shapekey).
2019-05-05RNA: add an Object method to clear all shape keys for completeness.Alexander Gavrilov
This matches bpy.ops.object.shape_key_remove(all=True) in behavior.
2019-04-30Refactor: Use object select API - ED_object_base_selectDalai Felinto
We had a mix of BKE_view_layer_base_select (harmless), and places where we simply set the BASE_SELECTED flag with no regard to its selectable state.
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-04-14Explain the Local With Parent coordinate space better.Alexander Gavrilov
Just saying "parent transformation added" doesn't really explain what this coordinate space does. Thus it seems almost nobody used it and serious bugs like T61981 went unnoticed.
2019-03-24Cleanup: redundant use of string formatting functionsCampbell Barton
2019-03-13Fix T62436: New added Torus won't appear in Local ViewCampbell Barton
Add Object.local_view_get/set Alternate fix which supports removing from local view & checking if an object is in local view. Also avoids redundant refresh. Matches 2.7x Object.layer_local_view capabilities more closely, without exposing the flag directly.
2019-03-12Python/ViewLayers: add object.hide_get/set(), and optional view layer ↵Brecht Van Lommel
parameters. These new functions control the per view layer object hiding state, similar to the selection state. All these object state checking functions now also optionally take a view layer to use instead of the active view layer. Fixes T62062.
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-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
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.