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-12-07Cleanup: replace int with bool typeCampbell Barton
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-02-02Force Fields: implement early filtering by the Affect flags.Alexander Gavrilov
Most fields have Affect Location and Rotation options that switch off their effect, but they are only checked as the last step after the force is already computed. It is more efficient to check it when building the list of field objects, just like zero weight. It is also possible to check the strength-related fields for 0. As an aside, this adds Location to Texture fields (they don't handle rotation) and both Location & Rotation checkboxes to Fluid Flow. Boid and Curve Guide remain without options for now as they are completely different from others. Differential Revision: https://developer.blender.org/D10087
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-06-19Cloth: allow forces to act parallel to cloth.Alexander Gavrilov
Currently all force effectors can only act on cloth when the force is perpendicular to the surface. This makes sense for wind, but not for other forces; and the user may want even wind to have some friction. This changes effector code to output two force vectors - although you of course can pass the same pointer for both. The force is split between the two outputs based on a new per-effector setting. Differential Revision: https://developer.blender.org/D8017
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2020-02-15Cleanup: remove various unused definesCampbell Barton
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell 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-02-18Fix T61473: Crash particle system is updatingSergey Sharybin
Original and localized particle settings were sharing some of the runtime pointers.
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-02Cleanup: remove author/date info from doxy headersCampbell Barton
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.
2019-01-31Depsgraph: remove features incompatible with new system.Brecht Van Lommel
Some features are incompatible with multithreading and reliable evaluation of dependencies. We are now removing them as part of a bigger cleanup to fix bugs in keyframing and invalid animation evaluations. * Dupliframes have been removed. This was a hack added before there were more powerful features like the array modifier. * Slow parent has been removed, never worked in 2.8. It was always unreliable for use in production due to depending on whatever frame was previously evaluated, which was not always the previous frame. * Particle instanced objects used to have their transform evaluated at the particle time. Now it always gets the current time transform. * Boids can no longer do predictive avoidance of force field objects, but still for other particles. Differential Revision: https://developer.blender.org/D4274
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-12-02Merge branch 'master' into blender2.8Campbell Barton
2018-12-02Cleanup: BKE_effect.h namingCampbell Barton
2018-06-29Merge branch 'master' into blender2.8Campbell Barton
2018-06-29Cleanup: trailing newlinesCampbell Barton
2018-06-25Depsgraph: cache collision relations, for performance and stability.Brecht Van Lommel
Same reasoning as effector relations in earlier commit.
2018-06-22Depsgraph: cache effector relations, for performance and stability.Brecht Van Lommel
To find all effectors in the scene, we need to loop over all objects. Doing this during depsgraph evaluation caused crashes because not all objects are guaranteed to be evaluated yet. To fix this, we now cache the relations as part of the dependency graph build. As a bonus this also makes evaluation faster for big scenes, since looping over all objects for each particle system is slow. Fixes T55156.
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-05-18Collections and groups unificationBrecht Van Lommel
OVERVIEW * In 2.7 terminology, all layers and groups are now collection datablocks. * These collections are nestable, linkable, instanceable, overrideable, .. which opens up new ways to set up scenes and link + override data. * Viewport/render visibility and selectability are now a part of the collection and shared across all view layers and linkable. * View layers define which subset of the scene collection hierarchy is excluded for each. For many workflows one view layer can be used, these are more of an advanced feature now. OUTLINER * The outliner now has a "View Layer" display mode instead of "Collections", which can display the collections and/or objects in the view layer. * In this display mode, collections can be excluded with the right click menu. These will then be greyed out and their objects will be excluded. * To view collections not linked to any scene, the "Blender File" display mode can be used, with the new filtering option to just see Colleciton datablocks. * The outliner right click menus for collections and objects were reorganized. * Drag and drop still needs to be improved. Like before, dragging the icon or text gives different results, we'll unify this later. LINKING AND OVERRIDES * Collections can now be linked into the scene without creating an instance, with the link/append operator or from the collections view in the outliner. * Collections can get static overrides with the right click menu in the outliner, but this is rather unreliable and not clearly communicated at the moment. * We still need to improve the make override operator to turn collection instances into collections with overrides directly in the scene. PERFORMANCE * We tried to make performance not worse than before and improve it in some cases. The main thing that's still a bit slower is multiple scenes, we have to change the layer syncing to only updated affected scenes. * Collections keep a list of their parent collections for faster incremental updates in syncing and caching. * View layer bases are now in a object -> base hash to avoid quadratic time lookups internally and in API functions like visible_get(). VERSIONING * Compatibility with 2.7 files should be improved due to the new visibility controls. Of course users may not want to set up their scenes differently now to avoid having separate layers and groups. * Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero files. There's a few things which are know to be not quite compatible, like nested layer collections inside groups. * The versioning code for 2.8 files is quite complicated, and isolated behind #ifdef so it can be removed at the end of the release cycle. KNOWN ISSUES * The G-key group operators in the 3D viewport were left mostly as is, they need to be modified still to fit better. * Same for the groups panel in the object properties. This needs to be updated still, or perhaps replaced by something better. * Collections must all have a unique name. Less restrictive namespacing is to be done later, we'll have to see how important this is as all objects within the collections must also have a unique name anyway. * Full scene copy and delete scene are exactly doing the right thing yet. Differential Revision: https://developer.blender.org/D3383 https://code.blender.org/2018/05/collections-and-groups/
2018-04-16Depsgraph: remove EvaluationContext, pass Depsgraph instead.Brecht Van Lommel
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
2017-08-16Pass EvaluationContext instead of bContextCampbell Barton
2.8x branch added bContext arg in many places, pass eval-context instead since its not simple to reason about what what nested functions do when they can access and change almost anything. Also use const to prevent unexpected modifications. This fixes crash loading files with shadows, since off-screen buffers use a NULL context for rendering.
2017-07-21Pass EvaluationContext argument everywhereLuca Rood
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.
2016-12-28Revert particle system and point cache removal in blender2.8 branch.Lukas Tönne
This reverts commit 5aa19be91263a249ffae75573e3b32f24269d890 and b4a721af694817fa921b119df83d33ede7d7fed0. Due to postponement of particle system rewrite it was decided to put particle code back into the 2.8 branch for the time being.
2016-12-23Merge remote-tracking branch 'origin/master' into blender2.8Dalai Felinto
2016-12-20String drawing function for the "simdebug" utilities.Lukas Tönne
Simple string drawing API for debug drawing, in addition to basic primitives.
2016-08-21Merge branch 'master' into blender2.8Bastien Montagne
In addition to pack of conflicts listed below, also had to comment out particle part of new Alembic code... :/ Conflicts: intern/ghost/intern/GHOST_WindowWin32.cpp source/blender/blenkernel/BKE_effect.h source/blender/blenkernel/BKE_pointcache.h source/blender/blenkernel/intern/cloth.c source/blender/blenkernel/intern/depsgraph.c source/blender/blenkernel/intern/dynamicpaint.c source/blender/blenkernel/intern/effect.c source/blender/blenkernel/intern/particle_system.c source/blender/blenkernel/intern/pointcache.c source/blender/blenkernel/intern/rigidbody.c source/blender/blenkernel/intern/smoke.c source/blender/blenkernel/intern/softbody.c source/blender/depsgraph/intern/builder/deg_builder_relations.cc source/blender/gpu/intern/gpu_debug.c source/blender/makesdna/DNA_object_types.h source/blender/makesrna/intern/rna_particle.c
2016-08-16Fix depsgraph to compute more accurate links for collision & force.Alexander Gavrilov
Current implementation more or less indiscriminately links physics objects to colliders and forces, ignoring precise details of layer checks and collider groups. The new depsgraph seemed to lack some such links at all. The relevant code in modifiers suffers from a lot of duplication. Different physics simulations use independent implementations of collision and similar things, which results in a lot of variance: * Cloth collides with objects on same or visible layer with dupli. * Softbody collides with objects on same layer without dupli. * Non-hair particles collide on same layer with dupli. * Smoke uses same code as cloth, but needs different modifier. * Dynamic paint "collides" with brushes on any layer without dupli. Force fields with absorption also imply dependency on colliders: * For most systems, colliders are selected from same layer as field. * For non-hair particles, it uses the same exact set as the particles. As a special quirk, smoke ignores smoke flow force fields; on the other hand dependency on such field implies dependency on the smoke domain. This introduces two utility functions each for old and new depsgraph that are flexible enough to handle all these variations, and uses them to handle particles, cloth, smoke, softbody and dynpaint. One thing to watch out for is that depsgraph code shouldn't rely on any properties that don't cause a graph rebuild when changed. This was violated in the original code that was building force field links, while taking zero field weights into account. This change may cause new dependency cycles in cases where necessary dependencies were missing, but may also remove cycles in situations where unnecessary links were previously created. It's also now possible to solve some cycles by switching to explicit groups, since they are now properly taken into account for dependencies. Differential Revision: https://developer.blender.org/D2141
2016-04-16Removed some unused declarations for boids code.Lukas Tönne
2016-04-13Removed remaining use of pointers to particle types as well as boids headers.Lukas Tönne
2016-04-13Removed particle DNA.Lukas Tönne
2016-04-13Removed blenkernel particle code.Lukas Tönne
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-01-20Made SimDebugData into a single global instance.Lukas Tönne
This way it doesn't have to be stored as DNA runtime pointers or passed down as a function argument. Currently there is now no property or button to enable debugging, this will be added again later.
2015-01-20Nicer hashing functionality for sim debugging using a variadic macroLukas Tönne
to support multiple hash identifiers. Using explicit hashing functions for every sim debug call defeats the purpose of having a quick feedback system. Now this can be done simply by passing an arbitrary number of hash inputs (integers) at the end of the function calls, which are then combined by a system of variadic macros (based on the ELEM feature). Up to 8 identifiers are supported currently, but more could be added easily if needed. Conflicts: source/blender/blenkernel/intern/particle_system.c source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20New debug element "circle" for simulations, which is quite useful forLukas Tönne
visualizing scalar fields.
2015-01-20Hair debugging: use "categories" (strings) for grouping debug elementsLukas Tönne
and support clearing for categories.
2015-01-20Partial response force for hair collisions.Lukas Tönne
This implements a penalty force as well as a repulsion force to avoid further penetration, as suggested in "Simulating Complex Hair with Robust Collision Handling" (http://graphics.snu.ac.kr/publications/2005-choe-HairSim/Choe_2005_SCA.pdf) Friction forces are still missing. More problematic is handling of moving colliders, when face swap places with the hair vertex and a collision is missed, putting the vertex inside the mesh volume. Larger margins might help, but ultimately using Bullet collision detection is probably more reliable and failsafe.
2015-01-20Debug drawing for simulations, to aid in visualizing abstract data suchLukas Tönne
as forces, velocities, contact points etc. This uses a hash table to store debug elements (dots, lines, vectors at this point). The hash table allows continuous display of elements that are generated only in certain time steps, e.g. contact points, while avoiding massive memory allocation. In any case, this system is really a development feature, but very helpful in finding issues with the internal solver data.
2014-02-14Fix for crash caused by effectors doing precalculation //during// DAGLukas Tönne
updates. This file crashes on loading with NULL pointer access to curve_cache: {F77132} The pdInitEffectors function was amalgamating the simple collection of effector objects with an automatic precalculation for curve guides and the like. This precalculation requires object data that may not be available until the DAG has finished. Since for DAG dependencies only the list of effectors is required, added an argument to disable precalculation when collecting effectors.
2013-03-26style cleanup:Campbell Barton
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-02-29Code Cleanup: remove non existing function declarations.Campbell Barton
added some missing functions too - which are not used yep but should be there for api completeness. * CDDM_set_mloop * CDDM_set_mpoly * BLI_mempool_count