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-04-01Cleanup: Move object_dupli.cc to C++Hans Goudey
This will hopefully allow more refactoring in the future to improve the instancing system, especially how it relates to geometry nodes instances.
2021-02-12Fix T84899: instance ids are not unique in common casesJacques Lucke
Ids stored in the `id` attribute cannot be assumed to be unique. While they might be unique in some cases, this is not something that can be guaranteed in general. For some use cases (e.g. generating "stable randomness" on points) uniqueness is not important. To support features like motion blur, unique ids are important though. This patch implements a simple algorithm that turns non-unique ids into unique ones. It might fail to do so under very unlikely circumstances, in which it returns non-unique ids instead of possibly going into an endless loop. Here are some requirements I set for the algorithm: * Ids that are unique already, must not be changed. * The same input should generate the same output. * Handle cases when all ids are different and when all ids are the same equally well (in expected linear time). * Small changes in the input id array should ideally only have a small impact on the output id array. The reported bug happened because cycles found multiple objects with the same id and thought that it was a single object that moved on every check. Differential Revision: https://developer.blender.org/D10402
2021-01-26Fix T85049: Geometry Nodes: How to handle instances with shear?Sebastian Parborg
Use transform matrices instead of loc, rot, scale variables to store instance transforms. Reviewed By: JacquesLucke Differential Revision: http://developer.blender.org/D10211
2021-01-07Fix T84326: No ID for geometry nodes instances after scatteringHans Goudey
Instances are created with an "index" parameter used for persistence over time through animation. Currently the geometry nodes instancer passes the index in the array for this value, but the arrays created by the "Point Distribution" node aren't necessarily stable in this way when the input mesh is deformed. In D9832 we already mostly solved this problem with an `id` attribute. The solution here is to create instances with this attribute as well. It's important to note that deforming the instanced points *after* distribution will usually be a better solution for this problem. This solution is likely still important though. Differential Revision: https://developer.blender.org/D10024
2020-12-11Geometry Nodes: support instancing collectionsJacques Lucke
The Point Instance node can instance entire collections now. Before, only individual collections were supported. Randomly selecting objects from the collection on a per point basis is not support, yet. Last part of D9739. Ref T82372.
2020-12-10Geometry Nodes: fix recursive instance transformsJacques Lucke
Previously, the transformation of recursive instances did not work as on would expect. Second-level instances would detach from first-level instances when the object was moved.
2020-12-02Geometry Nodes: initial scattering and geometry nodesJacques Lucke
This is the initial merge from the geometry-nodes branch. Nodes: * Attribute Math * Boolean * Edge Split * Float Compare * Object Info * Point Distribute * Point Instance * Random Attribute * Random Float * Subdivision Surface * Transform * Triangulate It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier. Notes on the Generic attribute access API The API adds an indirection for attribute access. That has the following benefits: * Most code does not have to care about how an attribute is stored internally. This is mainly necessary, because we have to deal with "legacy" attributes such as vertex weights and attributes that are embedded into other structs such as vertex positions. * When reading from an attribute, we generally don't care what domain the attribute is stored on. So we want to abstract away the interpolation that that adapts attributes from one domain to another domain (this is not actually implemented yet). Other possible improvements for later iterations include: * Actually implement interpolation between domains. * Don't use inheritance for the different attribute types. A single class for read access and one for write access might be enough, because we know all the ways in which attributes are stored internally. We don't want more different internal structures in the future. On the contrary, ideally we can consolidate the different storage formats in the future to reduce the need for this indirection. * Remove the need for heap allocations when creating attribute accessors. It includes commits from: * Dalai Felinto * Hans Goudey * Jacques Lucke * Léo Depoix
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-09-22Object: check for negative index access with duplicator reading UV'sCampbell Barton
2020-09-14Fix T73590: collection instance offset is not applied correctlyJacques Lucke
The instance offset should be applied before scaling. This way the scaling is done from the "collection origin". Reviewers: zeddb, brecht Differential Revision: https://developer.blender.org/D8889
2020-08-13Merge branch 'blender-v2.90-release'Philipp Oeser
2020-08-13Cleanup: incorrect comment wrappingCampbell Barton
Missed this comment when updating fix for T77409.
2020-08-13Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-13Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-13Fix T77409: Crash showing vertex/face duplicators in edit-modeCampbell Barton
This was a regression in deaff945d0b9 which skips copying a mesh. Dupli-verts/faces were not updated to account for this. This supports iterating over edit-mesh vertices & faces, since falling back to a full copy (as we do in some places) will be slow while transforming geometry. This commit looks as if it would change behavior with orcos, since any edit-mesh deformation causes them to be assigned. However in practice there is no functional change, details in comments.
2020-08-13Cleanup: remove two sided face checkCampbell Barton
Two sided faces aren't supported and would cause many issues elsewhere.
2020-08-13Cleanup: use 'inst_ob' variable name for consistencyCampbell Barton
Dupli verts/faces named these arguments differently.
2020-08-13Cleanup: remove unused struct members from dupli-face/vertCampbell Barton
Replace the evaluated mesh with VertexDupliData.mvert since only vertices are used. This makes dupli-vert similar to how dupli-face was already working.
2020-08-13Cleanup: move mesh access for dupli vert/face into shared functionCampbell Barton
De-duplicate mesh access & comments.
2020-08-13Cleanup: pass normal as a float to dupli-vert functionCampbell Barton
Needed for supporting edit-mode dupli-verts. Currently the un-scaled short values are used to avoid changing behavior (noted in comments).
2020-08-13Cleanup: spelling, use full sentences for object_dupli.cCampbell Barton
2020-08-13Cleanup: use const for dupli vert/face, 'r_' prefix for return valueCampbell Barton
Make it obvious which values are used read-only, which are written to.
2020-08-11Merge remote-tracking branch 'origin/blender-v2.90-release'Sybren A. Stüvel
2020-08-11Revert "Fix T77409: Crash showing vertex/face duplicators in edit-mode"Sybren A. Stüvel
This reverts commit 9adedb26055f03263fefba380980ee2abcb5327e. It changes how duplis work, and by that altered how Alembic and USD files are written. This was signalled by a failing Alembic unit test.
2020-08-11Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-11Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-11Fix T77409: Crash showing vertex/face duplicators in edit-modeCampbell Barton
Support duplicators in edit-mode without creating a mesh copy.
2020-08-11Cleanup: use doxy sections for object_dupli.cCampbell Barton
2020-08-10Cleanup: use doxy sections for object_dupli.cCampbell Barton
2020-08-07Cleanup: pass arrays const where possibleCampbell Barton
2020-08-07Cleanup: Blenkernel, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
2020-08-04Point Clouds: basic support for instancing objects on pointsBrecht Van Lommel
Same exact system as instancing on vertices for a mesh. More powerful ways of instancing will be added at some later point, but this makes the basics works and is consistent with other geometry types.
2020-07-23Cleanup: rename Curve.len_wchar to len_char32Campbell Barton
The name was misleading as the length is for char32_t, not wchar_t.
2020-07-06Reduce `DupliObject::persistent_id` from 16 to 8 itemsSybren A. Stüvel
For historical reasons, `DupliObject::persistent_id` was of size `2*MAX_DUPLI_RECUR`. These reasons are now gone, and the persistent ID always gets exactly one array element for every dupli-recursion. Differential Revision: https://developer.blender.org/D8222 Reviewed by: brecht
2020-06-13Cleanup: naming for lattice deform functionsCampbell Barton
- BKE_lattice_deform_data_create was init_latt_deform. - BKE_lattice_deform_data_destroy was end_latt_deform. - BKE_lattice_deform_data_eval_co was calc_latt_deform.
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-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-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
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-03Fix T73045 Crash entering edit mode for "Object Font" instance meshClément Foucault
Font duplicator was not outputing dupli-objects using evaluated object pointers, leading to crash because original object are not supposed to be drawable.
2019-11-22Fix T71273: Bad encoding of utf-8 for Text objectsmano-wii
`BLI_strncpy_wchar_from_utf8` internally assumes `wchar_t` is 32 bits which is not the case on windows. The solution is to replace `wchar_t` with `char32_t`. Thanks to @robbott for compatibility on macOS. Differential Revision: https://developer.blender.org/D6198
2019-09-19Fix T69993: vertex instancing only works on original verticesBrecht Van Lommel
This behavior was accidentally changed in 3e6f37b9, now it works compatible with 2.79 again.
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-09-10Fix T69702: crash using particles rendered as whole collectionPhilipp Oeser
This happened when the 'Whole Collection' option was enabled next to the 'Use Count' option. These two are exclusive but some code paths only checked for 'Use Count'. Reviewers: brecht Maniphest Tasks: T69702 Differential Revision: https://developer.blender.org/D5741
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-05-15Outliner Restriction: Naming sanitization and iconDalai Felinto
No major API change here, only in the outliner restriction column variables (e.g., show_restrict_column_selectable > show_restrict_column_select). * Get rid of _INSTANCE (introduced on b1af68200159). * Differentiate (everywhere but the API) between HIDE (temporary) and VIEWPORT (global). * Use the expected icon for restrict viewport (same as objects and modifiers). * selectable > select
2019-05-11Outliner Visibility UpdateDalai Felinto
See T61578 for discussions and mockups. Visibility Options ================== We are adding more granular control over restriction columns in the outliner, exposing "indirect only" and "holdout" as options, and change the way users enable/disable collections in a viewlayer. We also rename the object viewport restriction to hide instance. So the options we have are: Collection ---------- * Render Visibility * Instance Visibility * Selectable (View) Layer Collection ----------------------- * Enable * Holdout * Indirect Only * Viewport Shortcuts ========= Isolate Collection ------------------ * Ctr + click isolates the collection. It turns all its parents and children "visible", and all the other collections "invisible". If ALL the collections were already properly set, we re-set the collections to their default value. Set Collection Inside Collections and Objects --------------------------------------------- * Shift + click: Set/unset inside collections and objects. We only set objects values as well when we are in View Layer mode and (obviously) when the objects have a matching property. Icons ===== Little reminder that we will need better icons for holdout, indirect only, and probably instanced (nothing wrong with the current, but it differs from the proposal when it is turned off). Also, we need to decide where do we want the modifier/bones/... icons to be (in which column) and ideally make sure their icons match the ones we use for collections/objects. At the moment those are using the screen icon, which is not being used by collections. Reviewers: brecht, billrey Subscribers: pablovazquez Differential Revision: https://developer.blender.org/D4823
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton