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-07-14WM: Remove ASCII members from wmEvent & GHOST_TEventKeyDataCampbell Barton
The `ascii` member was only kept for historic reason as some platforms didn't support utf8 when it was first introduced. Remove the `ascii` struct members since many checks used this as a fall-back for utf8_buf not being set which isn't needed. There are a few cases where it's convenient to access the ASCII value of an event (or nil) so a function has been added to do that. *Details* - WM_event_utf8_to_ascii() has been added for the few cases an events ASCII value needs to be accessed, this just avoids having to do multi-byte character checks in-line. - RNA Event.ascii remains, using utf8_buf[0] for single byte characters. - GHOST_TEventKeyData.ascii has been removed. - To avoid regressions non-ASCII Latin1 characters from GHOST are converted into multi-byte UTF8, when building X11 without XInput & X_HAVE_UTF8_STRING it seems like could still occur.
2022-02-25Cleanup: use flags for wmEvent modifier keysCampbell Barton
Using flags makes checking multiple modifiers at once more convenient and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag which have been removed. It also simplifies checking if modifier keys have changed.
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
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-10-18Cleanup: spelling in commentsCampbell Barton
2021-08-23Cleanup: use BLI_str_utf8 prefixCampbell Barton
Rename: - BLI_str_utf8_invalid_byte (was BLI_utf8_invalid_byte) - BLI_str_utf8_invalid_strip (was BLI_utf8_invalid_strip)
2021-08-03UI: building without Python againCampbell Barton
Also quiet some warnings.
2021-04-13PyAPI: support retrieving the exception when running a stringCampbell Barton
- Optionally get the error as a single line. - Support access the error as an allocated string. - PyC_ExceptionBuffer_Simple was always printing to the `stdout` while PyC_ExceptionBuffer didn't, now either print to the output. Without this, callers are unable to do anything with the error string.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2020-09-09Cleanup: Rename public "bUnit" functionsHans Goudey
This commit renames the functions in "BKE_unit.h` to be consistent with the naming in the rest of blenkernel. bUnit_AsString -> BKE_unit_value_as_string_adaptive bUnit_AsString2 -> BKE_unit_value_as_string bUnit_ReplaceString -> BKE_unit_replace_string bUnit_ApplyPreferredUnit -> BKE_unit_apply_preferred_unit bUnit_ToUnitAltName -> BKE_unit_name_to_alt bUnit_ClosestScalar -> BKE_unit_closest_scalar bUnit_BaseScalar -> BKE_unit_base_scalar bUnit_IsValid -> BKE_unit_is_valid bUnit_GetSystem -> BKE_unit_system_get bUnit_GetBaseUnit -> BKE_unit_base_get bUnit_GetBaseUnitOfType -> BKE_unit_base_of_type_get bUnit_GetName -> BKE_unit_name_get bUnit_GetNameDisplay -> BKE_unit_display_name_get bUnit_GetIdentifier -> BKE_unit_identifier_get bUnit_GetScaler -> BKE_unit_scalar_get bUnit_IsSuppressed -> BKE_unit_is_suppressed Differential Revision: https://developer.blender.org/D8828
2020-09-07UI: Add temperature unitsHans Goudey
Based on the original patch by Vaishnav S (@padthai), this adds support for temperature units. Initially supported units are Celsius, Kelvin, and Fahrenheit. The units aren't used anywhere with this commit. Those changes should happen in separate patches by adding PROP_TEMPERATURE to RNA property definitions. But it should be ensured that the various solvers and simulations actually properly use real units. The complexity of some of the changes comes from the fact that these units have offsets from each other as well as coefficients. This also makes the implementation in the current unit system troublesome. For example, entering 0C evaluates correctly to 273K, but 0C + 0C doubles that result, because each unit value is evaluated separately. This is quite hard to solve in the general case with Blender's current unit system, though, so it is not handled in this commit. Differential Revision: https://developer.blender.org/D4401
2020-08-17Cleanup: move Python script execution into BPY_extern_run.hCampbell Barton
This commit renames 'execute' to 'run' because: - This follows Python's "PyRun" which these functions wrap. - Execution functions can use either exec/eval modes, making naming awkward (for future API refactoring).
2020-07-27UI: improve errors when evaluating a number button failsCampbell Barton
Showing the Python error without any explanation is often not enough information and doesn't hint that the error was in the user input. The error report from a invalid expression such as '..1' used to be: ('invalid syntax', ('<string>', 1, 1, '..1')) Now reads: Error evaluating number, see Info editor for details: invalid syntax Address issue raised by T78913.
2020-07-03Cleanup: Editors, 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/editors` module. No functional changes.
2020-03-26Fix T75047: Number input advanced mode is not working in JP keyboardSebastian Parborg
Check for special ascii values for number input first so that we can quickly decide if we should go into advanced mode. Reviewed By: Bastien
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Resolve HKEY conflictRay Molenkamp
Both the MS headers and blender headers define the HKEY which gives all kind of inclusion order issues. This diff renames all *KEY constants to EVT_*KEY to resolve this conflict. Reviewed By: brecht , dfelinto Differential Revision: http://developer.blender.org/D7164
2019-11-25CMake: support building without PythonCampbell Barton
Resolve linking issues, warnings.
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-04-21Cleanup: comments (long lines) in editorsCampbell 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-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 (editors)Campbell Barton
Prevents clang-format wrapping text before comments.
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-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-03Merge branch 'master' into blender2.8Campbell Barton
2018-09-03PyAPI: add optional imports to expression eval APICampbell Barton
Avoids having to use `__import__` to access modules.
2018-07-11Numeric Input: preference to default to advancedCampbell Barton
2018-07-11Revert removal of fake editing for numeric inputCampbell Barton
Revert changes from 785159e6e4dfc5c010baab626667132020e1ddc7 but keep 'ifdef'. @mont29 maintains this area and prefers to keep existing logic. Note that there was misunderstanding that '*' was intended only to be a backup key for '=' for keyboards which require holding a modifier.
2018-07-10Fix for recent numeric input checksCampbell Barton
2018-07-10Numeric Input: remove fake-editing optionCampbell Barton
Numeric input allowed mix of editing and hotkeys which were interpreted as modifiers instead of using as numeric input. This meant entering '1.0*3' needed to be typed as '1.0**3' ('*' to activate, and again to multiply). Pressing '/' gave the reciprocal of the current number which could be useful. Test removing this feature, so only full numeric input is supported.
2018-03-02Fix building w/o PythonCampbell Barton
Also minor cleanup.
2017-12-04Fix T53463: Rotation numerical input shows instable behaviour.Bastien Montagne
Inverting a number in radians when user is in degrees gives rather unexpected results. ;)
2017-05-20CMake: Use GCC7's -Wimplicit-fallthrough=5Campbell Barton
Use to avoid accidental missing break statements, use ATTR_FALLTHROUGH to suppress.
2017-03-18Cleanup: use return args last and 'r_' prefix.Campbell Barton
2016-02-19Fix T47477: Transform allows 'inf' inputCampbell Barton
Numeric input wasn't checking numbers were finite, could crash transforming with skin modifier.
2015-12-31Cleanup: Py API namingCampbell Barton
Use BPY_execute_* prefix for all Python execution commands
2015-08-06Cleanup: whitespace, unused varCampbell Barton
2015-05-05Math Lib: rename fill_*, to copy_*Campbell Barton
matching convention for fixed length api, eg: copy_v3_fl
2014-11-11UI Refactor T41640Campbell Barton
Make the UI API more consistent and reduce confusion with some naming. mainly: - API function calls - enum values some internal static functions have been left for now
2014-08-26Move bUnit_getScaleUnit -> BKE_scene_unit_scaleCampbell Barton
unit.c intentionally doesn't include DNA or BKE headers (except its own)
2014-08-26Fix T41590: When scene scale is not 1.0, and units are "None," Blender ↵Bastien Montagne
assumes translations are in meters. Turned out there were several issues in handling of scale parameter by numinput. Fixed that by factorizing more some code in common with 'usual' numbuttons eval code (new `bUnit_getScaleUnit()` helper will return valid scaled value, depending on given system and type). Now, numinput behaves as expected - using default unit amended by scale in case no unit is given (i.e. entering '20' with a scale of 0.01 will give you 20cm, and '20cm' as well!).
2014-08-25Fix T41534: Bevel practically unusable interactively if set to percent ↵Bastien Montagne
amount type. Turned out to be a clean/fix up of modal bevel tool, percentage mode handling was broken, numinput handling was broken, etc. Also added a way to switch between bevel types (modes) with M key, and tweaked a bit numinput code to return early in case of 'char' event with ctrl modifier.
2014-07-21Fix T40432: Scaling to zero with manipulate center points works precisely on ↵Bastien Montagne
second time Commented out the 'no zero' protection of scaling transforms for numinput. Issue is, once an axis has null scale, you can't regrow it from transform code (you have to directly edit the scale property). This is not ideal, but getting good behavior in this case is hairy... Yet, when using numinput, you type precise values, so if you want to set it to zero, set it to zero. User is assumed responsible, we should avoid too much 'invisible magic' when handling precise inputs. ;) Note: an idea for possible future feature would be to have an 'absolute' mode for numinput (allowing to type in real value, not factors).
2014-07-19Defines: replace ELEM3-16 with ELEM(...), that can take varargsCampbell Barton
2014-06-30Fix T40862: numinput transform did not take into account scale_length.Bastien Montagne