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
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-07-30Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRWClément Foucault
2020-07-30Cleanup: Split gpu_texture_image.c into BKE and IMB modulesClément Foucault
This is in order to disolve GPU_draw.h into more meaningful code blocks. All the Image related function are in `image_gpu.c`. All the MovieClip related function are in `movieclip.c`. The IMB module now has a connection with GPU. This is not strickly necessary and the code could be move to `image_gpu.c` if needed. The Image garbage collection is also ported to `image_gpu.c`.
2020-07-29Fix T79355: switch to texture paint workspace changes image in other workspacesBrecht Van Lommel
Only automatically change image in editor to follow texture paint editors and workspaces that are visible.
2020-06-29Fix T78323: Enable Unified and Secondary colors for Scultp Vertex ColorsPablo Dobarro
The report does not include any file, but probably that file is using the settings for unified colors, which are currently not available in the UI, so it always paints black. This enables unified colors and secondary colors for sculpt vertex colors, so it should solve that issue. Unified color does not make much sense now as the Paint tool is the only one that has paint capabilities, but it will do in the future when sculpt and paint at the same time is enabled and the paint capability is added to more tools. Reviewed By: sergey Maniphest Tasks: T78323 Differential Revision: https://developer.blender.org/D8136
2020-06-04Cleanup: split particle & texture paint mode switching into utility functionsCampbell Barton
2020-06-04Fix error removing the image paint cursorCampbell Barton
Mix up with imapaint.paintcursor & imapaint.paint.paint_cursor Remove imapaint.paintcursor since it wasn't used. Also rename paint_cursor_start_explicit() to paint_cursor_start(), removing the existing paint_cursor_start() since it took the paint struct from the context, a value that's known by all callers.
2020-06-04Cleanup: remove window manager argument for paint cursor APICampbell Barton
This caused an additional argument when exiting object modes and many other low level functions which don't need to access context. This simplifies fixing T77073.
2020-05-19Fix T76859: Cannot switch from editmode to texturepaint modePhilipp Oeser
Caused by 5159b8e1eadb.
2020-04-30Fix T75985: Texture paint brush gradients results in wrong colorPhilipp Oeser
A Colorband's CBData color **is not** considered `PROP_COLOR_GAMMA`. A Brushes color **is** considered `PROP_COLOR_GAMMA`. (PROP_COLOR_GAMMA is used for colors which would be color managed before display, could be renamed to something better once...) This leads to different rgb values in ColorBand.CBData of br->gradient and brush->rgb for seemingly identical colors. (this is because color pickers do differently in case block->is_color_gamma_picker/ ui_but_is_color_gamma) Now it looks like `paint_brush_color_get` is expected to return a color in sRGB (according to @jbakker this is for legacy reasons) so we need to run the colorband colors through linear -> sRGB. It might very well be the case that a much deeper cleanup in this area is needed, this is just a fix to get gradient brush colors consistent again... Maniphest Tasks: T75985 Differential Revision: https://developer.blender.org/D7501
2020-04-27Fix T72476: Crash when drag & drop Color in the Image EditorRobert Guetzkow
2020-04-13Fix T75667: Use of incorrect terminology in the brush_colors_flip operatorWilliam Reynish
- The word 'Flip' is incorrect. 'Swap' or 'Switch' is correct. - In Blender, we use 'primary' & 'secondary' color swatches, not 'foreground' and 'background'
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-04-03Cleanup: Rename bScreen variables from sc/scr to screenJulian Eisel
Part of T74432. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-10Fix T74425: Cannot texture paint an images sequence anymorePhilipp Oeser
Caused by the introduction of UDIM (rBc30d6571bb47). We need to make sure the tiles ImageUser is set up correctly [especially the framenr], otherwise BKE_image_acquire_ibuf() and friends will fail to find the correct ImBuf. Also instead of initializing a minimal BKE_imageuser_default, now use an appropriate ImageUser if avaliable and pass this around (instead of just the tile_number). 2D painting can reuse the Image Editor ImageUser, for 3D painting we still rely on a default ImageUser in most places, but at least set the framenr correctly]. This also fixes crashes when doing image operations such as inverting or resizing on images in a sequence in the Image Editor. This also fixes color sampling (S) from the 3DView going wrong for image sequences (would fallback to OpenGL sampling because an ImBuf could not be found). Maniphest Tasks: T74425 Differential Revision: https://developer.blender.org/D7022
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-02-05T73589: Code Quality: Renaming on BKE_material.hAntonio Vazquez
Old Name New Name ========= ========= init_def_material BKE_materials_init BKE_material_gpencil_default_free BKE_materials_exit test_object_materials BKE_object_materials_test test_all_objects_materials BKE_objects_materials_test_all give_matarar BKE_object_material_array give_totcolp BKE_object_material_num give_current_material_p BKE_object_material_get_p give_current_material BKE_object_material_get assign_material BKE_object_material_assign assign_matarar BKE_object_material_array_assign give_matarar_id BKE_id_material_array give_totcolp_id BKE_id_material_num assign_material_id BKE_id_material_assign clear_matcopybuf BKE_material_copybuf_clear free_matcopybuf BKE_material_copybuf_free copy_matcopybuf BKE_material_copybuf_copy paste_matcopybuf BKE_material_copybuf_paste BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init BKE_material_add_gpencil BKE_gpencil_material_add BKE_material_gpencil_get BKE_gpencil_material BKE_material_gpencil_default_get BKE_gpencil_material_default BKE_material_gpencil_settings_get BKE_gpencil_material_settings
2020-01-20Fix T73162: Modal tools cant be mapped to MMBCampbell Barton
Also rename struct members to 'launch_event', since it's more descriptive and was called this in some places.
2019-12-12Add support for tiled images and the UDIM naming schemeLukas Stockner
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender. With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser. Therefore, code that is not yet aware of tiles will just access the default tile as usual. The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9. Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator. The following features are supported so far: - Automatic detection and loading of all tiles when opening the first tile (1001) - Saving all tiles - Adding and removing tiles - Filling tiles with generated images - Drawing all tiles in the Image Editor - Viewing a tiled grid even if no image is selected - Rendering tiled images in Eevee - Rendering tiled images in Cycles (in SVM mode) - Automatically skipping loading of unused tiles in Cycles - 2D texture painting (also across tiles) - 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders) - Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID) - Different resolutions between tiles There still are some missing features that will be added later (see T72390): - Workbench engine support - Packing/Unpacking support - Baking support - Cycles OSL support - many other Blender features that rely on images Thanks to Brecht for the review and to all who tested the intermediate versions! Differential Revision: https://developer.blender.org/D3509
2019-11-27Sculpt/Paint: Remove Unified SIZE_PRESSURE and ALPHA_PRESSUREPablo Dobarro
The relation between the pressure/size and the pressure/alpha is a fundamental property that defines the behavior of a brush, so it does not make sense to have it unified across all brushes. This applies both for sculpting and painting. Some of the new 2.82 brushes need pressure/size or pressure/alpha to be enabled to work propely, while others don't. Users should not be switching on and off this property manually when changing brushes if they want to use unified size. This is also causing that some users are using the brushes with an incorrect configuration. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6291
2019-10-24Fix crash drawing the paint cursor over the redo regionCampbell Barton
Also fix CTX_wm_region_view3d which didn't check the region type.
2019-10-07Paint: 2D paint brush stroke antialiasingPablo Dobarro
This commit enables antialiasing in 2D painting. It also includes some fixes related to line drawing in the stroke spacing code. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5833
2019-10-01Cleanup: rename image undo_tile to paint_tileCampbell Barton
Clearer because they're no longer the same as undo tiles.
2019-09-29Fix wrong sculpt cursor drawing when using "ignore_background_click"Brecht Van Lommel
Not all the necessary state got restored.
2019-09-26WM: clean up cursors constants and codeBrecht Van Lommel
There was a mix of old and new constants. Now have one list of WM_CURSOR_* cursor types, using GHOST standard cursors when available and otherwise falling back to our custom cursors. Ref D5197
2019-09-18Fix excessive dependency graph evaluation while painting strokesBrecht Van Lommel
Particularly noticeable when vertex painting with a subsurf modifier. In some cases every sculpt or paint stroke step would evaluate the dependency graph. This should only happen for redraws. Now more selectively choose if the dependency graph should be evaluated to initialize the view context. Doing it in the view context evaluation is somewhat hidden, now it's more explicit. Differential Revision: https://developer.blender.org/D5844
2019-07-31Refactor access to dependency graphSergey Sharybin
This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-07-30Fix edit-mode interfering with brush swap colorCampbell Barton
D5353 by @robert-wallis
2019-06-11Fix/Cleanup: I18N: Bad usage of IFACE_ instead of TIP_.Bastien Montagne
Cheap tip: anything that is not "Camel Case" and/or that is more than a few words long should use `TIP_` translation, not `IFACE_` one. Also added several missing strings (including the one reported in D5056 by Jean First (@robbott), thanks).
2019-05-31Cleanup: style, use braces in source/ (include disabled blocks)Campbell Barton
2019-05-14Cleanup: isolate image dirty flag access in functionsBrecht Van Lommel
2019-04-22Cleanup: style, use braces for editorsCampbell Barton
2019-04-21Cleanup: comments (long lines) in editorsCampbell Barton
2019-04-17ClangFormat: format '#if 0' code in source/Campbell 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-04-16Cleanup: trailing commasCampbell Barton
2019-04-16Fix T63619: Fill Tool is misaligned when 'Gradient' is enabledPhilipp Oeser
Reviewers: brecht Maniphest Tasks: T63619 Differential Revision: https://developer.blender.org/D4692
2019-04-09Cleanup: spellingCampbell Barton
2019-03-11Fix T62359: Flip colors for Fill Tool missingPhilipp Oeser
Reviewers: brecht Maniphest Tasks: T62359 Differential Revision: https://developer.blender.org/D4486
2019-03-11UV editor: automatically show image assigned to active face.Brecht Van Lommel
When manually selecting a different image, this image will become pinned and continue to show. The material node is not automatically modified as it was in old Blender versions, only the image displayed in the UV editor. Fixes T61239: confusing behavior when unwrapping non-square images. By showing the relevant image by default it's more clear why it does aspect correction.
2019-03-08Cleanup: use plural names for Main listsCampbell Barton
Convention was not to but after discussion on 918941483f7e we agree its best to change the convention. Names now mostly follow RNA. Some exceptions: - Use 'nodetrees' instead of 'nodegroups' since the struct is called NodeTree. - Use 'gpencils' instead of 'grease_pencil' since 'gpencil' is a common abbreviation in the C code. Other exceptions: - Leave 'wm' as it's a list of one. - Leave 'ipo' as is for versioning.
2019-03-07Fix T62328, T62209: revert recent fix for texture slots updates (T60366).Brecht Van Lommel
This causes other issues, revert for now until a better fix is found. Reverts commit da1323d1c95095feff98e8aa054d73fd323c363d.
2019-03-07Cleanup: remove unused parameter.Brecht Van Lommel
2019-02-28Fix T60366: texture paint slots not updating when editing material.Brecht Van Lommel
Now always refresh when the material changes. Depsgraph tag moved out of the refresh function since that gets called on depsgraph update, which should not trigger a second depsgraph update.
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.