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-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
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-07Refactor: Remove `BKE_XXX_localize()`, in favor of using regular ID copying ↵Bastien Montagne
code. Besides the NodeTree case (which remains unchanged), the localize code is only used in one place (to generate previews of shading data-blocks). This commit introduces a new `LIB_ID_CREATE_LOCAL` option for ID creation/copying, which essentially implements the behavior of the removed `BKE_XXX_localize()` functions into regular mainstream ID copy code. When this option is set: - new ID is tagged with `LIB_TAG_LOCALIZED`; - Some ID copying callbacks have specific behaviors, mainly the root nodetree of shading IDs gets duplicated with specialized `ntreeLocalize()` function. Note that I would not consider getting rid of `ntreeLocalize` for now, this function is recursive, which should ideally never happen within ID management copying code (this introduces all kind of complications). No behavioral change expected from this commit.
2020-09-28Fix T80657: Not freed memory blocks with Batch-Generate Previews.Bastien Montagne
`ED_preview_icon_render()` owns the `id_copy` localized ID, so it has to free it itself.
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-07-26Cleanup: GPU: Remove glew headers part2Clément Foucault
2020-07-26GPU: Remove GL constant from BIF_glutilClément Foucault
2020-06-10Fix T77356: Texture Preview not taking alpha into accountPhilipp Oeser
Since rB329b4c3363e4 a texture preview is not rendered through the preview.blend and a renderengine anymore [unlike materials etc.] Alpha wasnt handled in that commit, take that into account now. sidenote: not sure if we should be looking into drawing alpha with a checkerboard in the background for texture previews (see texture previews elsewhere)? sidenote 2: might also be good to document where the "calculate" and "invert" alpha options are still used? [looks a bit inconsistent: compositor uses it, Image Editor as well as Render Engines dont?] Maniphest Tasks: T77356 Differential Revision: https://developer.blender.org/D7929
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 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-04-03Cleanup: use abbreviated names for unsigned types in editorsCampbell Barton
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-03-06Cleanup: move camera, lights, world to IDTypeInfoBrecht Van Lommel
2020-03-05Cleanup: material API namingCampbell Barton
- Use 'BKE_object_material_*', 'BKE_id_material_*' prefix for functions that operate on Object and ID types. - Use '_len' suffix for length (matching BLI naming). - Use '_p' suffix for functions that return a pointer to values where the value would typically be returned. Functions renamed: - BKE_object_material_resize was BKE_material_resize_object - BKE_object_material_remap was BKE_material_remap_object - BKE_object_material_remap_calc was BKE_material_remap_object_calc - BKE_object_material_array_p was BKE_object_material_array - BKE_object_material_len_p was BKE_object_material_num - BKE_id_material_array_p was BKE_id_material_array - BKE_id_material_len_p was BKE_id_material_num - BKE_id_material_resize was BKE_material_resize_id - BKE_id_material_append was BKE_material_append_id - BKE_id_material_pop was BKE_material_pop_id - BKE_id_material_clear was BKE_material_clear_id
2020-02-28Preview Render: Disable Unneeded Render PassesJeroen Bakker
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2020-02-07Cleanup: `make format`Dalai Felinto
Dear developers remember to set your coding environment to use clang-format.
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
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-27Cleanup: Remove BIF_gl.hJeroen Bakker
BIF_gl.h included hacks like redefining glew functions and a constant. The named constant `GLA_PIXEL_OFS` has been moved to `GPU_viewport.h` Reviewed By: brecht Differential Revision: https://developer.blender.org/D5860
2019-10-09Local Collections: Allow users to show hidden collectionsDalai Felinto
Users now can turn on in a viewport collections that are temporarily hidden (eye) in the view layer. Design task: T61327 As for the implementation, I had to decouple the visibility in the depsgraph from the visibility in the view layer. Also there is a "bug" that in a way was there before which is some operators (e.g., writing a text inside of a text object, tab into edit mode) run regardless of the visibility of the active object. The bug was present already (with object type visibility restriction) in 2.80 so if we decide to tackle it, can be done separately (I have a patch for it though P1132). Reviewed by: brecht (thank you) Differential Revision: D5992
2019-10-04Fix expanding paths ignoring data-block librariesCampbell Barton
- Image views. - Sequencer text strip font. - Text check for modified/reload. - Collada image export. - Brush icons.
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-08-06Fix T66671: Memory Leak Material PreviewJeroen Bakker
During generating of a material preview with world lighting only the copy world was being freed. The material was removed from the main, but was not freed. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5224
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-26Cleanup: Remove unused depsgraph pointerSergey Sharybin
2019-07-01Fix T66262: slow preview icon loadingBrecht Van Lommel
2019-06-29Fix T66230: delay in the material preview panel after recent changesBrecht Van Lommel
2019-06-28Previews: delay icon preview renders a bit for smoother interactionBrecht Van Lommel
With Eevee the user interface, 3D viewport and small icon materials previews are rendered on the same GPU. This can lead to some choppy interaction when dragging sliders. Delaying the icon preview render until the user is done with that helps a bit, though it's no guarantee.
2019-05-16Cleanup: rename IDP_FreeProperty_ex to IDP_FreePropertyContent_exJacques Lucke
This was missing from rBdb5120603f.
2019-05-14Fix T64514: wrong grease pencil icon preview rendersBrecht Van Lommel
This broken when the new Cycles/Eevee preview scene was added, make it work the same as before for Grease Pencil now.
2019-05-02Workbench,EEVEE: Viewport Render SamplesJeroen Bakker
- Add `render_aa` and `viewport_aa` sampling setting for workbench. 0 samples means no AA, 1 sample uses FXAA and more samples will use TAA. The viewport `gpu_viewport_quality` can still limit viewport anti-aliasing method. - Use TAA when rendering images. (this used to be CPU based FSAA) - Removed `R_OSA` related settings. Reviewers: fclem, brecht Maniphest Tasks: T60847 Differential Revision: https://developer.blender.org/D4773
2019-05-02Fix T64059: Crash in shader when using other object's texture spaceSergey Sharybin
Can not use evaluated datablock to localize since that could point to another evaluated datablock, which can not become part of another dependency graph. The original code needed to have unkeyed changes preserved, but now we do have a flush of animation to an active dependency graph, so this code is not needed anymore.
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-14Render: new material previewWilliam Reynish
* EEVEE support through irradiance volume and light probe. * New shader ball shape (designed by Robin Marin). * New cloth and liquid shapes, removed monkey. * Replace world sphere by toggle to use world for any shape. * Slight bevel on cube. * More subdivision for displacement preview. * Fixed and improved UV mapping for all shapes. * Material icon / asset preview now uses specified shape instead of always a sphere. So for example hair material can be displayed as hair. Ref T57683
2019-03-18Fix T62643: ID user decrement error, likely related to custom material ↵Bastien Montagne
PointerProperty. We are in a totally out-of-main context here, so no refcounting of any ID... Note that this whole 'render preview' area could use some refactor with modern ID management API, but that would go way beyond a mere bugfix, and it is not the time to do such things.
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-02-27Cleanup: file rename lamp -> lightCampbell Barton
2019-02-27Cleanup: rename lamp -> lightCampbell Barton
2019-02-27DNA: rename Lamp -> LightCampbell Barton
- BKE_lamp -> BKE_light - Main.lamp -> light
2019-02-19DNA: rename Object.col -> colorCampbell Barton
Was confusing, unrelated to: colbits, col_mask, col_group, actcol & totcol.
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-16DNA: rename SpaceButs -> SpacePropertiesCampbell Barton
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-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-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton