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-02-10Rebase on mastertemp-license-header-spdxCampbell Barton
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-02-26Cleanup: use early exitCampbell Barton
2021-02-26Fix particle-edit crash on undo/redoCampbell Barton
Undo/redo was crashing & asserting. There ware two bugs: - Entering particle system edit-mode requires an evaluated depsgraph. - The active object could get out of sync when undo/redo moves between different modes. The new test 'view3d_mesh_particle_edit_mode_simple' in `tests/ui_simulate/test_undo.py` exposes both issues.
2021-02-05Cleanup/refactor: Undosys: Get rid of the magic values for undo direction.Bastien Montagne
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values everywhere. Note that this also introduce the `STEP_INVALID` value in that enum. Finally, kept the matching struct members in some lower-level readfile code as an `int` to avoid having to include `BKE_undo_system.h` in a lot of unrelated files.
2021-01-06UndoType: Refactor: replace `use_context` boolean by a bitflag.Bastien Montagne
We will soon need more options here, sinmpler and cleaner to use a bitflag then.
2021-01-06Cleanup/refactor: UndoType: Clarify `use_context` variable.Bastien Montagne
Rename it to mark it is only for `encode` callbacks, fix `encode` callback of text undo to early fail in case it gets a NULL context, add an assert to `BKE_undosys_step_push_with_type` that context is not NULL when undotype requires a valid one. Note that in practice this should not change anything, currently it seems that we always get a valid context in `BKE_undosys_step_push_with_type`?
2020-11-19Fix T82769: remove thread local data from PTCacheMemJacques Lucke
The issue was that the same point cache was read by multiple threads at the same time (the same object was evaluated for render and for the viewport). Both threads incremented PTCacheMem->cur which lead to the crash. The fix is to remove the PTCacheMem->cur and store it on the stack instead. This way every thread has its own cur. Reviewers: brecht Differential Revision: https://developer.blender.org/D9606
2020-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-06-03Object: refactor mode switchingCampbell Barton
Functionality here has become confusing over time, this removes duplicate, similar functions, preferring to set the mode instead of toggle, enter, exit. Mode switching utility function behaved differently regarding undo, 'ED_object_mode_toggle' for example didn't skip the undo push where 'ED_object_mode_set' did. Some callers chose these functions based on the intended undo behavior, even when toggling didn't make sense. There was also ED_object_mode_generic_enter which was similar to ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit. Simplify object mode switching internals: - Replace ED_object_mode_generic_enter with ED_object_mode_set. - Remove ED_object_mode_toggle as nearly all callers needed to check the current mode so toggling would set the mode argument correctly. - Use ED_object_mode_set for the object mode switching operator to simplify logic. - Add ED_object_mode_set_ex which has an argument to disable undo, needed when loading undo data needs to set the mode. - Remove unused ED_object_mode_exit.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-12-19Fix particle editmode undo not doing proper updates when child particlesPhilipp Oeser
are visible Not freeing PTCacheEdit and tagging batch cache dirty on undo will have a couple of consequences. This patch fixes: - crash deleting a particle, then undo - basically any edit (combing, ...), then undo will leave child hairs untouched - adding hairs (through mirror, add tool, ...), then undo will leave 'orphaned' child hairs See also D5755 for a related discussion Fixes the crasher mentioned in T69000 Might move this to a utility function later [since it is used in more places], but that is for after going over some more reports... Reviewers: sergey Differential Revision: https://developer.blender.org/D5912
2019-09-26Cleanup: clang format for particle loop macrosPhilipp Oeser
See https://developer.blender.org/D5903 Reviewers: JacquesLucke
2019-09-26Fix T69488: Hair particles: rekey disolves the hair then crashesPhilipp Oeser
Caused by rB914427afd512. Since above commit 'pe_get_current' checks for an active depsgraph. This caused the skipping of handling `PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL`for everything calling `PE_get_current` (this passes a NULL depsgraph as opposed to `PE_create_current`). So we now pass a depsgraph here as well... Note there are two RNA cases where we pass NULL, namely - rna_ParticleEdit_editable_get - rna_ParticleEdit_hair_get I guess these should be fine though (no functional change to current master) Reviewers: sergey Maniphest Tasks: T69488 Differential Revision: https://developer.blender.org/D5752
2019-07-11Undo System: add is_final argument (no functional changes)Campbell Barton
This is needed step out of undo steps which accumulate changes, larger changes could be made to handle this but better not make them at this point.
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-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-06Undo System: remove accumulate/store modesCampbell Barton
This complicated handling of undo steps in a generic way especially switching between undo systems that stored data to ones that accumulated changes. Now each undo system must treat it's steps as check-point, internally it can apply/rewind changes. This commit also fixes projection paint where the object mode wasn't following the undo steps.
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-31Undo System: add Main argument to encode/decodeCampbell Barton
Needed since we don't always have the context, and avoids adding G_MAIN into undo callbacks.
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2018-12-07Depsgraph: Remove duplicated sets of recalc/update flagsSergey Sharybin
There were at least three copies of those: - OB_RECALC* family of flags, which are rudiment of an old dependency graph system. - PSYS_RECALC* which were used by old dependency graph system as a separate set since the graph itself did not handle particle systems. - DEG_TAG_* which was used to tag IDs. Now there is a single set, which defines what can be tagged and queried for an update. It also has some aggregate flags to make queries simpler. Lets once and for all solve the madness of those flags, stick to a single set, which will not overlap with anything or require any extra conversion. Technically, shouldn't be measurable user difference, but some of the agregate flags for few dependency graph components did change. Fixes T58632: Particle don't update rotation settings
2018-08-14Merge branch 'master' into blender2.8Campbell Barton
2018-08-14Cleanup: styleCampbell Barton
2018-06-13Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/BKE_pointcache.h source/blender/blenkernel/intern/object.c source/blender/blenkernel/intern/pointcache.c source/blender/editors/include/ED_particle.h source/blender/editors/physics/particle_edit.c source/blender/editors/physics/particle_edit_undo.c source/blender/editors/physics/particle_object.c source/blender/editors/physics/physics_intern.h source/blender/editors/physics/physics_pointcache.c source/blender/editors/space_time/space_time.c source/blender/editors/space_view3d/drawobject.c source/blender/editors/space_view3d/view3d_edit.c source/blender/editors/transform/transform_conversions.c source/blender/editors/transform/transform_generics.c source/blender/editors/transform/transform_manipulator.c source/blender/makesrna/intern/rna_object.c source/blender/makesrna/intern/rna_object_force.c source/blender/makesrna/intern/rna_sculpt_paint.c source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-13Cleanup: moar ugly G.main removal...Bastien Montagne
Note that due to RNA get/setters issue, that one may actually add some G.main usages to the total... But at least it's not hidden anymore in a very low-level, dark corner of BKE pointcache code!
2018-06-04Merge branch 'master' into blender2.8Campbell Barton
2018-04-03Merge branch 'master' into blender2.8Campbell Barton
2018-04-03Undo: remove particle undo pushCampbell Barton
Was only called on copy particle system which is already doing an undo push.
2018-04-03Undo: replace global access w/ ED_undo_stack_getCampbell Barton
While I'd like to avoid using this too much since the operator system should handle. It's less trouble than accessing it inline each time.
2018-04-01Merge branch 'master' into blender2.8Campbell Barton
- Undo that changes modes currently asserts, since undo is now screen data. Most likely we will change how object mode and workspaces work since it's not practical/maintainable at the moment. - Removed view_layer from particle settings (wasn't needed and complicated undo).
2018-03-31Undo: unified undo system w/ linear historyCampbell Barton
- Use a single undo history for all operations. - UndoType's are registered and poll the context to check if they should be used when performing an undo push. - Mode switching is used to ensure the state is correct before undo data is restored. - Some undo types accumulate changes (image & text editing) others store the state multiple times (with de-duplication). This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`. - Each undo step stores ID datablocks they use with utilities to help manage restoring correct ID's. Needed since global undo is now mixed with other modes undo. - Currently performs each undo step when going up/down history Previously this wasn't done, making history fail in some cases. This can be optimized to skip some combinations of undo steps. grease-pencil is an exception which has not been updated since it integrates undo into the draw-session. See D3113
2018-03-19Merge branch 'master' into blender2.8Campbell Barton
2018-03-19Cleanup: use utility header for particle loopingCampbell Barton
2018-03-19Merge branch 'master' into blender2.8Campbell Barton
2018-03-19Cleanup: move particle undo into own fileCampbell Barton
Also avoid extern declarations which can get out of sync.