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: Blenkernel, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
2020-08-04Fix: Remove debug print added mistakenlyHans Goudey
This print whenever units are evaluated in number input was added in 45dbc38a8b15 mistakenly.
2020-06-05Cleanup: spellingCampbell Barton
2020-06-03Cleanup: Use ELEM MacroHans Goudey
2020-06-03Fix T77289: Crash when typing negative numbersHans Goudey
This was caused by an oversight in rB45dbc38a8b15. When the next operation character is found the offset is shifted in the original string. The remaining length has to be recalculated with that offset before shifting the remaining characters to make room for the ")".
2020-06-01Fix T74552: Distribute negatives in number inputHans Goudey
This applies a relatively simple solution for fixing some unintuitive cases in unit handling. Currently entering -1m50cm evaluates to -0.5m, and similarly 1'6" evaulates to just half a foot. So effectively there's an implied + just between the numbers, which is quite confusing. This works by adding parentheses so the negative distributes to the block of values before the next operator. For example: | Before | After | | `-1m50cm + 1m -2m50cm` | `-(1m50cm) + 1m -(2m50cm)` | | `-4m + 0.5 / -1.1` | `-(4m) + 0.5 / -(1.1)` | | `-1'6"` | `-(1'6")` | | `-1e-2cm` | `-(1e-2cm) ` | Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D7813
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-08-24Cleanup: correct use of term 'split'Campbell Barton
2019-08-14Cleanup: move trailing comments to avoid wrapping codeCampbell Barton
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
2019-07-31UI: Correct Spacing for Short Unit NamesHarley Acheson
This adds a space between a value and its short unit name except for foot, inch, degree, arcminute, arcsecond Differential Revision: https://developer.blender.org/D5051 Reviewed by Brecht Van Lommel
2019-06-12Unit System: remove 'm' as an alternate name for mileCampbell Barton
Now when using imperial dimensions, using 'm' suffix is treated as meters instead of miles (use 'mi' or 'mile' instead). Resolves T65731
2019-05-03Cleanup: warningsCampbell Barton
Quiet extra-semi-stmt & missing-variable-declarations
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-22Cleanup: style, use braces for blenkernelCampbell 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-17ClangFormat: disable for most of sobol.cppCampbell Barton
2019-04-16ClangFormat: add comments to ignore formattingCampbell Barton
2019-04-16ClangFormat: add comments to ignore formattingCampbell Barton
2019-02-27Fix typos related to unitsVaishnav S
2019-02-25Units: Typo "Square/Cubic Thous" -> "Square/Cubic Thou"Vaishnav S
2019-02-18Fix T61666: missing NULL_UNIT that stops iteration over unitsJacques Lucke
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-17Units: allow short unit names be case sensitive when needed.Brecht Van Lommel
To distinguish mW and MW without having to deviate from the standard SI unit abbreviation. For all other units there are no changes.
2019-02-17Units: add support for light power units in Watt. Use for Eevee lights.Brecht Van Lommel
This affects point, spot and area lights. Sun light strength remains without a unit. This change does not affect .blend file compatibility in any way, as with the rest of the unit system it's purely a display and editing feature. Not used for Cycles yet, that will be done after unifying the settings with Eevee.
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-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
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-14Cleanup: move comments above definitionsCampbell Barton
For clang-format not to wrap definitions.
2019-01-11Cleanup: remove tabs after line startCampbell Barton
Allows expanding tabs before running clang-format.
2019-01-09Fix T60338: Allow user to input units of another systemJacques Lucke
2019-01-08Fix T60327: Value input with adaptive imperial units not working properlyJacques Lucke
2018-11-15Fix strict compiler warnings/errorsSergey Sharybin
2018-11-15Units: Identifiers in PythonJacques Lucke
I only specified the identifiers for the units that are actually accessible for now. This way we can postpone some decisions for now. E.g. if it should be `METER_SQUARE`, `SQUARE_METER`, `METER_SQ`, ... Reviewers: brecht Differential Revision: https://developer.blender.org/D3945
2018-10-18Cleanup: Remove more #if 0 blocksJacques Lucke
Continuation of https://developer.blender.org/D3802 Reviewers: brecht Differential Revision: https://developer.blender.org/D3808
2018-10-04Units: Change '1000 Kilograms' to 'Tonnes'Jacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D3766
2018-10-04Cleanup: styleCampbell Barton
2018-10-03Units: Support for fixed unitsJacques Lucke
Users can select the main unit they want to use now. Previously the displayed unit always depended on the magnitude of the value. The old behavior can be restored by switching to the "Adaptive" mode for length, mass and time units. Meters, kilograms and seconds are the default units for new and old scenes. The selected unit is also the default unit for user input. E.g. if cm is selected, whenever the user inputs a unitless number into a field of type length, it will be interpreted as cm. Reviewer: brecht Differential: https://developer.blender.org/D3740
2018-09-24Spelling fixes in comments and descriptions, patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3719
2017-08-01Fix multi-units drawing re precision handling.Bastien Montagne
This is still far from prefect, but yet much better than what we had so far (more consistent with inheritent precision available in floats). Note that this fixes some (currently commented out) units unittests, and requires adjusting some others, will be done in next commit.
2017-07-31Fix two issues with recent changes to number display while editing them.Bastien Montagne
* Numbers with units (especially, angles) where not handled correctly regarding number of significant digits (spotted by @brecht in T52222 comment, thanks). * Zero value has no valid log, need to take that into account!
2016-05-03Cleanup: use const for units APICampbell Barton
Also make return args explicit.
2016-03-09Cleanup: style, spellingCampbell Barton
2016-03-02Correction to own previous rB9c0de0084bfe.Bastien Montagne
'1mm+1m' would fail with original fix, now consuming all alpha chars before checking unit again...
2016-03-02Fix T47661: cm (centimeter) unit breaks m (meter) unit in Metric.Bastien Montagne
`m` unit when used after `cm`/`mm`/etc. ones would get ignored, and the alt version of miles would be used instead. The root of the issue is that, in `unit_find_str`, once we get a 'hit' for a unit, we check it's actual unit (since 'm' would also hit on 'cm', 'mm', etc.). In case that hit is not a valid unit one, we would just return NULL, breaking the cycle of checks over that unit, and hence missing all later usages of it. So now, in case we have an 'invalid unit hit', we immediately retry to find it within remaining string.
2015-11-19Cleanup: redundant 'break', minor editsCampbell Barton
2015-10-05Fix T46379: Bad behavior of bUnit_ToUnitAltName() with default units.Bastien Montagne
It would simply remove default units (in most case), cannot see any good reason for such behavior? Might work in case default unit is the only one present, but breaks consistency (and it may not be always obvious for user which unit it is). Comes from original patch from five years ago, rB7d8f0fce. This will break keyboard-setting of values, e.g. '2m 33.4cm' would become '2 33.4cm', totally useless and invalid entry!
2015-07-16Fix T45459: Edge Length with Separate Units Displayed As 1m 100cm.Bastien Montagne
Our 'unit epsilon' was too small, given the fact we only display up to four digits usually...
2015-07-14Cleanup: use ascii as suffix (as with utf8)Campbell Barton
2015-04-21BLI_string: add BLI_snprintf_rlenCampbell Barton
use when the length of the destination string is needed.
2014-08-26Move bUnit_getScaleUnit -> BKE_scene_unit_scaleCampbell Barton
unit.c intentionally doesn't include DNA or BKE headers (except its own)