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
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
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
2020-10-09Revert "CleanUp: Introduce `eMeshBatchDirtyMode` enum"Jeroen Bakker
This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-07CleanUp: Introduce `eMeshBatchDirtyMode` enumJeroen Bakker
It used to be an `int mode`.
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-03-06Cleanup: MetaBall: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2019-08-23Cleanup: const args, naming, doxy groups, clang-formatCampbell 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-03-263D View: move deselect all logic into an optionCampbell Barton
This removes `VIEW3D_OT_select_or_deselect_all`, adding a deselect_all option to the `VIEW3D_OT_select` operator. - Add utility functions to simplify de-selecting all. - Return true from selection functions when they change the selection to avoid redundant updates. - Use arrays of bases when passing objects between selection utility functions since some users require bases. - Fix logical error in box selection that updated all objects after the first hit.
2019-02-23Cleanup: move variable declarations to headersCampbell Barton
Quiet undeclared variable warning.
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-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-11-08Cleanup: style, use const argsCampbell Barton
2018-11-07Multi-Objects: MBALL_OT_select_similarHabib Gahbiche
Compared to previous implementation, the following has been changed: * Threshold: is now an absolute value. This allows a comparison with e.g. radii that are much larger than selected radius. This is also consistent with `CURVE_OT_select_similar` * Radius in world space is the average of the radius scaled in x, y and z directions * Since MetaBalls are symmetrical, rotation is only considered from 0 to π/2. So for example rotations of 90° and -90° are considered equal. This is also consistent with the way `CURVE_OT_select_similar` works. Fix/changes from committer (Dalai Felinto): * Drawing not updating after changes. (see original patch for details). Reviewers: dfelinto Differential Revision: https://developer.blender.org/D3895
2018-11-07Multi-Objects: MBALL_OT_select_allDalai Felinto
Based on D3893 by Habib Gahbiche.
2018-08-23Fix T56360: metaball viewport checkbox crash.Bastien Montagne
Do same as for other geometry types to compute bbox, instead of blindly returning NULL `ob->bb`...
2018-08-23Rename: *_batch_cache_dirty > *_batch_cache_dirty_tagDalai Felinto
2018-06-06Depsgraph: Remove confusing metaball logicSergey Sharybin
DATA datablock must evaluation must never depend on object it is used for. If there is something what depends on an object, it must be done on object level. At least the actual callback was empty.
2018-05-12EditMBall: multi-object select randomCampbell Barton
D3356 by @Quetzal
2018-05-03Metaball: pointers used in `DRW_shgroup_call_dynamic_add` don't need to hold ↵Germano
the reference.
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
2018-02-16Metalball drawing: rename mball helpers to handlesGermano
and also rename some related functions
2017-11-16Fix T51210: Draw Manager: Support for Metaball DrawingGermano
Differential Revision: D2914
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-08-11Object Apply Transform: option to apply propertiesCampbell Barton
In some cases users may want to disable this option to avoid changing other properties besides vertex locations.
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2016-07-21Refactor/deduplicate even more make_local code (and fix part of T48907).Bastien Montagne
Turns out most BKE_foo_make_local datablock-specific functions are actually doing exactly the same thing, only two currently need special additional operations (object and brush ones). So added a BKE_id_make_local_generic instead of copying same code over and over. Also, changed a bit how make_local works in case we are localizing a whole library. We need to do the 'remap' step (from old linked ID to new local one) in the second loop, otherwise we miss some dependencies. This fixes main part of T48907.
2016-07-14Add option to id_make_local to force localization of datablock, even if not ↵Bastien Montagne
used locally. Will be used by link/append code.
2016-07-10Cleanup/Refactor: pass Main pointer to all ID copy functions.Bastien Montagne
Also allows us to get rid of a few _copy_ex() versions...
2016-07-09Refactor/enhance BKE_mball_make_local(), and add BKE_mball_copy_ex() that ↵Bastien Montagne
takes a Main as parameter. Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-06-22ID-Remap - Step one: core work (cleanup and rework of generic ID datablock ↵Bastien Montagne
handling). This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock was pretty much impossible, except for a few special cases. Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite a few ID usages were missed or wrongly handled that way). One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling by using library_query utils to allow generic handling of those, which is now the case (now, generic ID links handling is only "knwon" from readfile.c and library_query.c). This commit also adds backends to allow live replacement and deletion of datablocks in Blender (so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one, or NULL one in case of unlinking). This will allow nice new features, like ability to easily reload or relocate libraries, real immediate deletion of datablocks in blender, replacement of one datablock by another, etc. Some of those are for next commits. A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core. Though it was tested rather deeply, being totally impossible to check all possible ID usage cases, it's likely there are some remaining issues and bugs in new code... Please report them! ;) Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2015-10-20First step to handle missing libs/datablocks when reading a file.Bastien Montagne
Idea is, instead of ignoring completely missing linked datablocks, to create void placeholders for them. That way, you can work on your file, save it, and find again your missing data once lib becomes available again. Or you can edit missing lib's path (in Outliner), save and reload the file, and you are done. Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon. Future plans are also to be able to relocate missing libs and reload them at runtime. Code notes: - Placeholder ID is just a regular datablock of same type as expected linked one, with 'default' data, and a LIB_MISSING bitflag set. - To allow creation of such datablocks, creation of datablocks in BKE was split in two step: + Allocation of memory itself. + Setting of all internal data to default values. See also the design task (T43351). Reviewed by @campbellbarton, thanks a bunch! Differential Revision: https://developer.blender.org/D1394
2015-05-12Depsgraph: Add evaluation callbacks for granular nodes updateSergey Sharybin
This commit only adds callbacks which then later be used with major dependency graph commit, keeping the upcoming commit more clean to follow. Should be no functional changes so far still.
2015-04-07Metaball tessellation optimization (Octree to BVH)Krzysztof Recko
Speedup is non-linear, 2x-10x faster is quite normal. Patch T43678. - Switched from an Octree to BVH. - Finding first points of surface no longer "wastes" density function evaluation: every result is cached. - Use MemArena instead of using own memory management. - Correct calculation of metaelem bounding box. - Remove mball_count(): mballs are now counted "on the go".
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-03-25use BKE_mball_tessellate.h includeCampbell Barton
also remove unused includes
2014-09-01Support more object types scene-scale (on creation)Campbell Barton
- lamp - camera - font - empty & effector Also fix inconsistency with apply transform (modified shape-keys for meshes but not curve/lattice)
2013-12-26Threaded object update and EvaluationContextSergey Sharybin
Summary: Made objects update happening from multiple threads. It is a task-based scheduling system which uses current dependency graph for spawning new tasks. This means threading happens on object level, but the system is flexible enough for higher granularity. Technical details: - Uses task scheduler which was recently committed to trunk (that one which Brecht ported from Cycles). - Added two utility functions to dependency graph: * DAG_threaded_update_begin, which is called to initialize threaded objects update. It will also schedule root DAG node to the queue, hence starting evaluation process. Initialization will calculate how much parents are to be evaluation before current DAG node can be scheduled. This value is used by task threads for faster detecting which nodes might be scheduled. * DAG_threaded_update_handle_node_updated which is called from task thread function when node was fully handled. This function decreases num_pending_parents of node children and schedules children with zero valency. As it might have become clear, task thread receives DAG nodes and decides which callback to call for it. Currently only BKE_object_handle_update is called for object nodes. In the future it'll call node->callback() from Ali's new DAG. - This required adding some workarounds to the render pipeline. Mainly to stop using get_object_dm() from modifiers' apply callback. Such a call was only a workaround for dependency graph glitch when rendering scene with, say, boolean modifiers before displaying this scene. Such change moves workaround from one place to another, so overall hackentropy remains the same. - Added paradigm of EvaluaitonContext. Currently it's more like just a more reliable replacement for G.is_rendering which fails in some circumstances. Future idea of this context is to also store all the local data needed for objects evaluation such as local time, Copy-on-Write data and so. There're two types of EvaluationContext: * Context used for viewport updated and owned by Main. In the future this context might be easily moved to Window or Screen to allo per-window/per-screen local time. * Context used by render engines to evaluate objects for render purposes. Render engine is an owner of this context. This context is passed to all object update routines. Reviewers: brecht, campbellbarton Reviewed By: brecht CC: lukastoenne Differential Revision: https://developer.blender.org/D94
2013-08-19Merge remained parts of r57520: use use_render argument rather than ↵Sergey Sharybin
G.is_rendering
2013-06-28view-selected didnt work for metaballs in object mode (radius from previous ↵Campbell Barton
commit was 2x too large too).
2013-03-09use 'bool' for BLI_/BKE_ functions.Campbell Barton
2013-02-05Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashesSergey Sharybin
Issue was caused by couple of circumstances: - Normal Map node requires tesselated faces to compute tangent space - All temporary meshes needed for Cycles export were adding to G.main - Undo pushes would temporary set meshes tessfaces to NULL - Moving node will cause undo push and tree re-evaluate fr preview All this leads to threading conflict between preview render and undo system. Solved it in way that all temporary meshes are adding to that exact Main which was passed to Cycles via BlendData. This required couple of mechanic changes like adding extra parameter to *_add() functions and adding some *_ex() functions to make it possible RNA adds objects to Main passed to new() RNA function. This was tricky to pass Main to RNA function and IMO that's not so nice to pass main to function, so ended up with such decision: - Object.to_mesh() will add temp mesh to G.main - Added Main.meshes.new_from_object() which does the same as to_mesh, but adds temporary mesh to specified Main. So now all temporary meshes needed for preview render would be added to preview_main which does not conflict with undo pushes. Viewport render shall not be an issue because object sync happens from main thread in this case. It could be some issues with final render, but that's not so much likely to happen, so shall be fine. Thanks to Brecht for review!
2012-10-06toggle cut through in the knife tool now refreshes (before you had to wave ↵Campbell Barton
the mouse about to see the result). also remove print from last commit.