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-10-07Cleanup: redundant parenthesisCampbell Barton
2022-09-25Cleanup: use 'u' prefixed integer types for brevity & cast styleCampbell Barton
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
2022-05-23Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-23Fix Eevee blackbody wrong with non-default scene linear color spaceBrecht Van Lommel
* Port over new code tables from Cycles * Convert Rec.709 to scene linear for lookup table. * Move code for wavelength and blackbody to IMB so they can access the required transforms, which are not in blenlib. * Remove clamping from blackbody shader to bypass the texture read. Since it's variable now easiest to just always read from the texture than pass additional parameters. * Fold XYZ to RGB conversion into the wavelength table. Ref T68926
2022-05-17Cleanup: Use `switch` and `BLI_assert_unreachable()` more.Bastien Montagne
Replace some `if/else if` chains by proper `switch` statement. Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
2022-05-04Nodes: Add general Combine/Separate Color nodesHallam Roberts
Inspired by D12936 and D12929, this patch adds general purpose "Combine Color" and "Separate Color" nodes to Geometry, Compositor, Shader and Texture nodes. - Within Geometry Nodes, it replaces the existing "Combine RGB" and "Separate RGB" nodes. - Within Compositor Nodes, it replaces the existing "Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA" nodes. - Within Texture Nodes, it replaces the existing "Combine RGBA" and "Separate RGBA" nodes. - Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and "Separate RGB/HSV" nodes. Python addons have not been updated to the new nodes yet. **New shader code** In node_color.h, color.h and gpu_shader_material_color_util.glsl, missing methods hsl_to_rgb and rgb_to_hsl are added by directly converting existing C code. They always produce the same result. **Old code** As requested by T96219, old nodes still exist but are not displayed in the add menu. This means Python scripts can still create them as usual. Otherwise, versioning replaces the old nodes with the new nodes when opening .blend files. Differential Revision: https://developer.blender.org/D14034
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-09Cleanup: remove "The Original Code is: ..." from code commentsCampbell Barton
This is almost always meaningless as most code has changed since the comment was added. Besides this, version control can be used to check if/when a file was modified. Some cases of this were kept when they contain details about the original copyright holder.
2021-12-09Cleanup: move public doc-strings into headers for 'blenlib'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
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-05-21Cleanup: conversion warningCampbell Barton
2021-05-21Eevee Wavelength Node SupportIyad Ahmed
This patch adds wavelength node support to Eevee, similar to how Eevee Blackbody node works, thus it is a little off from Cycles. Reviewed By: #eevee_viewport, fclem, brecht Differential Revision: https://developer.blender.org/D11326
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
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-01Fix errors ensuring grease pencil paletteCampbell Barton
- Direct assignment caused ID user counts to be invalid. - The first palette would always be used, even when the named palette searched for was found. Also pass 'const' string to `hex_to_rgb`, avoid casting to 'non-const'.
2020-08-07Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenlib` module. Not all warnings are addressed in this commit. No functional changes.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-06-05Cleanup: use 'r_' prefix for return arguments in math_colorCampbell Barton
2020-06-05Cleanup: maybe uninitialized variable warningCampbell Barton
2019-08-26Cleanup: use BLI_assertCampbell Barton
2019-04-21Cleanup: comments (long lines) in blenlibCampbell 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-27Cleanup: style, use braces for blenlibCampbell Barton
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-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-15Cleanup: comment line length (blenlib)Campbell Barton
Prevents clang-format wrapping text before comments.
2018-12-17Fix T59424: color wheel snaps to center, losing hue when value is zero.Sebastian Parborg
Differential Revision: https://developer.blender.org/D4090
2018-12-13Color management: add OCIO aware utility functions for transform to/from XYZ.Brecht Van Lommel
2018-05-07Merge branch 'master' into blender2.8Campbell Barton
2018-05-07Cleanup: rename char/float conversion functionsCampbell Barton
- FTOCHAR -> unit_float_to_uchar_clamp - F3TOCHAR3 -> unit_float_to_uchar_clamp_v3 (swap args) - F4TOCHAR4 -> unit_float_to_uchar_clamp_v4 (swap args) - FTOUSHORT -> unit_float_to_ushort_clamp - USHORTTOUCHAR -> unit_ushort_to_uchar
2018-05-02Merge branch 'master' into blender2.8Campbell Barton
2018-04-30BLI Color: YUV to/from rgb colorspace optionAaron Carlisle
This commit does two things: - Adds an option to do the calculation in different color spaces (BT601 or BT709). - Changes the default caluclation from legacy BT601 to BT709. This affects several areas: - UI areas (mainly scopes) - ViewLevelsNode - Several other nodes that use `COM_ConvertOperation.h`
2018-04-21Cleanup: styleCampbell Barton
2018-02-23Eevee: add blackbody shader node support.Brecht Van Lommel
This replaces the blackbody to RGB code with the simpler and faster one from Cycles. It's a little different but the other placing using this is the legacy volume drawing, so no need to stay compatible with that.
2017-05-04Remove cpackCampbell Barton
Places where it's removed are already replaced by newer logic.
2016-01-09Smoke (fire): Move spectrum code from C++ (intern/) to C code (BLI)Kévin Dietrich
This change is for a few reasons: - it works with color, and (therefore) will need to be color managed, at some point. This will be much easier to do if the code is closer to the actual color management code (in Blender's core, so to speak). - it has nothing to do with the actual fire simulation, as it is just used to create a lookup table - it can be reused for other purposes (i.e. in Blender internal renderer, if people are interrested in a blackbody node à la Cycles) - cleanup: some functions (`contrain_rgb`, `xyz_to_rgb`) already exist in BLI Reviewers: brecht Reviewed By: brecht Subscribers: brecht Differential Revision: https://developer.blender.org/D1719
2015-02-10Remove legacy color transform functions.Troy Sobotka
Differential Revision: https://developer.blender.org/D1095
2014-08-15Cleanup: comment & var nameCampbell Barton
2014-07-30Cleanup: general cleanup in BLI_math code (mostly, use 'const' where ↵Bastien Montagne
possible, true/false for booleans, format for float litterals).
2014-07-21Fix errors in hsv calculation from recent optimization patch.Antony Riakiotakis
Code was different from original here, result was apparent in color picker wedge position.
2014-07-21Optimisation to rgb <-> hsv/l conversionAntony Riakiotakis
Basically avoid redundant computations. Gives ~1-4% speedup in the compositor depending on the use case. For more info see: http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv Reviewers: psy-fi, sergey Subscribers: campbellbarton Differential Revision: https://developer.blender.org/D596
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-03-18Fix T39228 Gamma/lift/gain are burned out in the circular color pickersAntony Riakiotakis
and value/lightness slider stops midway. Issue here is manyfold: Color wheel does not support properties with different soft min/max values than 1.0 (which after experimenting a little I left as is), and also color management is completely destroying the mapping between the value slider and the RNA property value range. To solve this I have disabled color management by setting the property to gamma corrected (only in RNA, Sequence editor coders please check!), otherwise it will just become a big mess of tracking where color comes from and what kind of color transforms it needs in different color pickers (if property has non normalized range etc). HSL is not really meant to represent colors outside a normalized space so I have disabled setting lightness above 1.0 in this model. This will work, however it is hacking a color picker to do something other than what it is supposed to do: pick a color from the screen accurately. Which means normalized values always. The non normalized colors picked for lift/gain/gamma through the pickers do not correspond to any accurate colors; they are rather a user friendly way to 'sort of' choose a color and a gamma with an indication of maximum value. I think that lift/gamma/gain nodes need a dedicated widget for this (besides it is quite clear that some options are written for that use case) -or- a separate gamma multiplier for the picked color (which should itself be in a normalized space)
2014-03-15Code cleanup: use r_ prefix for return argsCampbell Barton