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-08-24Fix T90715: Remove correct particle modifier through Python APIRobert Guetzkow
Before this patch attempting to remove a particle modifier programmatically through Python would fail, because it deleted the modifier associated with the currently active particle system instead of the one passed as an argument to `bpy.types.ObjectModifiers.remove()`. This fix adds an additional argument for the particle system to `object_remove_particle_system`. This allows to specify which particle system and its associated modifier shall be removed. In case of `particle_system_remove_exec` it will remain the currently active particle system, whereas `object_remove_particle_system` passes the particle system of the modifier. Hence, the correct modifier will be removed. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D12234
2021-08-21Cleanup: spelling in comments & minor cleanupCampbell Barton
Also hyphenate 'mouse-move' use doxy sections in render_update.c & move function comment from the header to the source.
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-07-28Fix particle system duplication duplicates all systemsPhilipp Oeser
Followup to rB3834dc2f7b38 (where getting the proper particle system was fixed for the Adjust Last Operation panel in the Properties Editor). But since this operator can also be called from the 3DView, get a current particle system there as well. Without this, _all_ particle systems would be copied when executing from the 3DView (which was never really intended [operator description uses singular] -- it just happens to use `copy_particle_systems_to_object` internally as well -- same as the `Copy Active/All to Selected Objects` operators)). ref. T83317 Maniphest Tasks: T83317 Differential Revision: https://developer.blender.org/D12033
2021-07-20Cleanup: reserve C++ comments for disabled codeCampbell Barton
Use C comments for plain text.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-02Cleanup: Further use of const when accessing evaluated meshHans Goudey
Also resolve a warning from the previous commit. The next blocker to using const is `BKE_mesh_wrapper_ensure_mdata`.
2021-06-26Cleanup: remove redundant/outdated commentsCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23Cleanup: reformat trailing comments that caused line wrappingCampbell Barton
2021-06-22Cleanup: deduplicate free codeGermano Cavalcante
It is more appropriate that `depths` is freed in `ED_view3d_depths_free`.
2021-06-21Refactor: Do not keep a copy of depth buffer in RegionView3DGermano Cavalcante
The depth cache (located in `RegionView3D::depths`) is used for quick and simple occlusion testing in: - particle selection, - "Draw Curve" operator and - "Interactive Light Track to Cursor" operator, However, keeping a texture buffer in cache is not a recommended practice. For displays with high resolution like 8k this represents something around 132MB. Also, currently, each call to `ED_view3d_depth_override` invalidates the depth cache. So that depth is never reused in multiple calls from an operator (this was not the case in blender 2.79). This commit allows to create a depth cache and release it in the same operator. Thus, the buffer is kept in cache for a short time, freeing up space. No functional changes.
2021-06-01GPU: add 2D projection functionCampbell Barton
When projecting into screen space Z value isn't always needed. Add 2D projection functions, renaming them to avoid accidents happening again. - Add GPU_matrix_project_2fv - Add ED_view3d_project_v2 - Rename ED_view3d_project to ED_view3d_project_v3 - Use the 2D versions of these functions when the Z value isn't used.
2021-05-15RigidBodies: Clarify usage of the custom density in the calculate massPhilipp Oeser
operator This is only used when the preset is set to 'Custom', make that clear in the tooltip and disable editing the value if another preset is used. Issue came up in T88155. Maniphest Tasks: T88155 Differential Revision: https://developer.blender.org/D11210
2021-05-07Fix inconsistency setting particle edit-modeCampbell Barton
The check to include particle edit mode in the object-mode drop-down didn't match the poll function to edit particle edit mode. Share the check between both functions.
2021-03-30Cleanup/Refactor: Unify functions that redraw the depth bufferGermano Cavalcante
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and `ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`. This new function replaces `ED_view3d_autodist_init`. Also, since `ED_view3d_depth_update` depends on the render context, and changing the context is a slow operation, that function also was removed, and the depth buffer cached is now updated inside the new unified drawing function when the "bool update_cache" parameter is true. Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to `runtime.flag`. Differential revision: https://developer.blender.org/D10678
2021-03-18Cleanup: spellingCampbell Barton
2021-02-26Cleanup: use early exitCampbell Barton
2021-02-26Cleanup: use boolean argumentsCampbell 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-24UI: Clean up "Dupli" to "Instance"Yevgeny Makarov
Following the naming conventions defined in T56648, where in this instance there were still a few remaining uses of the old term. Differential Revision: https://developer.blender.org/D9817
2021-02-14Cleanup: use doxy sectionsCampbell Barton
2021-02-10Cleanup: remove redundant headers in source/blender/editors/Campbell Barton
Remove redundant headers using `./source/tools/utils_maintenance/code_clean.py` Reviewed By: jmonteath Ref D10364
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
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-02-02Cleanup: Use bool instead of intJulian Eisel
2021-01-27UI: Fix incorrect RNA percentage property definitionsHans Goudey
In two cases the percentage property was actually used incorrectly, as pointed out in T82070. The range was [0, 1], but the properties were still displayed as percentages. There is a preference to control whether to display factors or percentages, so it usually doesn't make sense to manually define properties as percentages. Resolves T82070 Differential Revision: https://developer.blender.org/D9344
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2021-01-07Fix T84142: crash when mirroring hair emitted from verticesJacques Lucke
The hair mirroring code seems to expect that hair is emitted from faces. The PE_mirror_x contains the following expression: mirrorfaces[pa->num * 2]. This only makes sense when pa->num is a face index. The simplest short term solution is to disable the mirror operator when the particles haven't been emitted from faces. Diffferential Revision: https://developer.blender.org/D10002
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-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-12-11Fix T83640: No immediate updates when changing the settings of a just-Philipp Oeser
duplicated particle system When particle settings are duplicated along with the particle system, this means a change in relations, was missing 'DEG_relations_tag_update'. Maniphest Tasks: T83640 Differential Revision: https://developer.blender.org/D9823
2020-11-20Merge branch 'blender-v2.91-release'Jeroen Bakker
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-11-19Cleanup: Grammar: "Allow to" vs gerundHans Goudey
In cases where "Allow" is followed by an infinitive, a noun needs to directly follow it. But it makes more sense to follow it with a gerund instead.
2020-11-17LibOverride: PointCache: Add UI feedback about need to enable Disk Cache.Bastien Montagne
Note that I chose to modify the label of the main `Bake` button instead of adding an extra label line, as that would disturb the UI in a annoying way.
2020-11-13LibOverride: Adjust PointCache operators to properly handle overrides.Bastien Montagne
LibOverrides only support a small sub-set of PointCache features for now (one cannot add new caches, baking in memory is not supported...). Part of first step of T82503: support disk cache in liboverrides.
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-10-24UI: Capitalization CorrectionsYevgeny Makarov
Approximately 141 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D8392 Reviewed by Julian Eisel
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-08Hair: Remove warning about undo when Delete EditDalai Felinto
Deleting the particle editmode is fully supported by undo now. No need to warn the user about that anymore.
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-07Refactor `BKE_id_copy_ex` to return the new ID pointer.Bastien Montagne
Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219.
2020-10-07UI: Fix capitalization in various placesYevgeny Makarov
Follow the MLA style, agreed upon in T79589. This means "from" within UI labels should be lowercase. Differential Revision: https://developer.blender.org/D8345
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-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718