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
2019-09-09Fix T69633: weird behavior of operator_menu_enum tooltips.Alexander Gavrilov
For operators with dynamic tooltips the tooltip calculation is deferred until the moment it is actually shown for performance reasons, with the tooltip field left blank for the time being. Enum menu code shouldn't jump in and assign a tooltip either. The menu button itself can't show a dynamic tooltip because it does not actually call the operator, and has no reference to it. As a side change, allow returning None from the python callback as the most natural way to fall back to the default tooltip.
2019-09-06Cleanup: use doxy sectionsCampbell Barton
2019-08-25Cleanup: clang-formatCampbell Barton
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-08-21UI: Don't left align operator buttons in toolbarsJulian Eisel
This hack would make operator (push down) buttons without icons align their text to the left in toolbars. Everywhere else in Blender, we center it by default. We barely use operator buttons in toolbars anymore. Even if we do and there's a good reason to make text left aligned, it's better to use `uiLayout.alignment = 'LEFT'` to achieve the same effect, but without lowish-level hacks for a specific region type. Differential Revision: https://developer.blender.org/D5527
2019-08-14Custom Properties: allow changing the property UI to color picker.Alexander Gavrilov
To fully support storing colors as a custom property, it is necessary to allow switching the property UI to the standard color picker button. That means in effect supporting custom property subtype values. Change RNA_property_subtype to look for a 'subtype' string field in _RNA_UI and parse it as an enum value. To minimize performance impact, only do it if the property is an array; also, don't use the custom subtype during RNA path parsing. On the python side, allow setting some most useful seeming values from the custom property settings editor. Also, since some color picker code seems to run into a risk of buffer overruns if the array size is wrong, check the size in the UI layout code to be safe. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D5475
2019-08-13Custom Properties: officially support int and float arrays in the UI.Alexander Gavrilov
In some rare cases it is convenient to store a short array value as a custom property, e.g. a vector or color. For example, it may be helpful when importing/exporting certain formats that support custom or nonstandard attributes on objects. The custom property storage already can handle arrays in order to support properties defined via python. The only thing missing is UI support (and some bugs), and this patch fixes that: - Allow editing short array properties via Custom Properties panel. - Fix a UI layout sizing bug triggered by the previous item. - Fix a dependency graph bug with drivers using such properties. - Make RNA_*_get_default_array code robust in case of size mismatch. - Support custom default values for array properties, allowing both an array and a scalar value. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D5457
2019-08-02Fix most (if not all) untranslated Panel-labels reported in T66731.Bastien Montagne
2019-06-17Cleanup: comment spellingCampbell Barton
2019-06-04Fix status bar and keymap editor showing Call Menu instead of menu nameBrecht Van Lommel
2019-05-27Mitigate T64346: Quick Favorites items cant be removedCampbell Barton
For now don't show missing quick favorite menu items which are missing. Once menu editing is supported they could be displayed.
2019-05-21UI: support drawing booleans with icons as check-boxesCampbell Barton
Previously, if a boolean happened to use an icon there was no way to make it display as a check-box from Python scripts. The previous logic meant we ended up having to edit the RNA. Since booleans with icons don't work well with the split-property layout (now used for most of the interface). Icons were being removed from RNA then added back using awkward Python ternary expressions in the interface scripts. The toggle argument now has an unset state (-1). - toggle=True: no checkbox (emboss). - toggle=False: always use a checkbox (no icon). - toggle=(unset/-1): depends on the icon status, default as before. Since toggle=False was default, this isn't used in existing UI logic.
2019-05-21Cleanup: const assignments to simplify codeCampbell Barton
Also avoids using uninitialized vars.
2019-05-20UI: add Visibility panel for objectsDalai Felinto
The outliner should not be the only way for users to change these settings. The Python API was extended to keep these properties positive and keyframable. Differential Revision: https://developer.blender.org/D4889
2019-05-16Refactor: Simplify ID Property freeingJacques Lucke
This also makes `IDP_CopyProperty` the "opposite" of `IDP_FreeProperty`, which is what I'd expect. Two refactoring steps: * rename IDP_FreeProperty to IDP_FreePropertyContent * new IDP_FreeProperty function that actually frees the property Reviewers: brecht Differential Revision: https://developer.blender.org/D4872
2019-05-11Fix (unreported) annoying UI assert for expanded enums.Bastien Montagne
All buttons will get their own block's `func` by default, this cannot be considered an error, do not assert in that case either. Fixes bunch of very annoying asserts e.g. when using FBX exporter...
2019-05-03Fix width of compact buttons with icons, e.g. layout.menu().Alexander Gavrilov
As mentioned in the comment, the icon width computation relies on big enough margins; however in compact mode they aren't big enough and the label gets truncated.
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-25UI: hide redundant menu separators automaticallyHarley Acheson
Differential Revision: https://developer.blender.org/D4682
2019-04-18Cleanup: comments, wrappingCampbell Barton
2019-04-18UI: Expand Enum Items Over Multiple RowsJeroen Bakker
Expanding enum items in a small area would render the names with dots, what is a bad solution. When you use expand directly on a `grid_flow` or `column_flow`, it will render the items on multiple lines, giving more control to the developer. Reviewers: campbellbarton, brecht, mont29 Differential Revision: https://developer.blender.org/D4698
2019-04-17Cleanup: replace comments with meaningful variable namesCampbell Barton
2019-04-17Cleanup: comment length in interfaceCampbell 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-03-27UI: support an 'active default' button for pop-upsCampbell Barton
Use this for the save confirmation dialog so it has a default action when pressing enter which draws with a highlight so it's clear what the default action is (the dialog was just closing before). Resolves T57686
2019-03-26Cleanup: style, use braces for editor/interfaceCampbell Barton
2019-03-25RNA: add UILayout.prop_with_menu functionCampbell Barton
Matches prop_with_popover, supporting menu types, useful if we want to control behavior of enum switching.
2019-03-25RNA: rename prop_popover_enum to prop_with_popoverCampbell Barton
A version for menu's is going to be added next and we already have UILayout.prop_menu_enum. This name indicates the popover is added behavior instead of a different kind of widget.
2019-03-25Error in last commitCampbell Barton
2019-03-25UI: add UILayout.prop_popover_enum functionCampbell Barton
Support for RNA enum buttons that activate popovers when clicked. This means we get useful tooltips, shortcuts and Ctrl-Wheel cycling over enum items. It also avoids inconvenient & slow access of enum values currently done via RNA type lookups on the type to get the name & icon to use for a regular popover button. Resolves T57738
2019-03-25Cleanup: return argument namingCampbell Barton
2019-03-25Cleanup: use braces for interface codeCampbell Barton
2019-03-24Fix uninitialized variable use for right aligned checkboxCampbell Barton
2019-03-22Fix warning for uninitialized icon_onlyDalai Felinto
Warning/issue introduced on rBcaa357dae70322e.
2019-03-22Fix checkboxes being right aligned when property split is disabledCampbell Barton
2019-03-22Cleanup: typo in variable nameCampbell Barton
2019-03-22UI: use checkbox text for property split layoutCampbell Barton
Use right aligned checkboxes when 'use_property_split' is enabled instead of a separate label.
2019-03-20Fix T60815: drag & drop crash when search menu is opened immediately after.Brecht Van Lommel
Patch by matc, some further refactoring by me. Differential Revision: https://developer.blender.org/D4250
2019-03-20UI: support for popups starting with buttons activatedCampbell Barton
While this could already be done from C, this is now exposed to Python
2019-03-19Cleanup: comment blocksCampbell Barton
2019-02-21UI: better widget drawing with thick line width.Harley Acheson
When the line width was larger than the UI scale, there was not enough space for thicker widget outlines to draw properly. Now widgets are made a little larger to accommodate the thicker outlines. Differential Revision: https://developer.blender.org/D4368
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-05UI: Preferences Redesign Part 2Severin
(Part 1 was 00963afc14978b) Does the following changes visible to users: * Use panels and sub-panels for more structured & logical grouping * Re-organized options more logically than before (see images in D4148) * Use flow layout (single column by default). * New layout uses horizontal margin if there's enough space. * Change size of Preferences window to suit new layout. * Move keymap related options from "Input" into own section. * Own, left-bottom aligned region for Save Preferences button. * Adjustments of names, tooltips & icons. * Move buttons from header into the main region (except editor switch). * Hide Preferences header when opened in temporary window. * Use full area width for header. * Don't use slider but regular number widget for UI scale. * Gray out animation player path option if player isn't "Custom" Internal changes: * Rearrange RNA properties to match changed UI structure. * Introduces new "EXECUTE" region type, see reasoning in D3982. * Changes to panel layout and AZone code for dynamic panel region. * Bumps subversion and does versioning for new regions. RNA changes are documented in the release notes: https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Preferences_API Design & implementation mostly done by @billreynish and myself. I recommend checking out the screenshots posted by William: https://developer.blender.org/D4148#93787 Reviewed By: brecht Maniphest Tasks: T54115 Differential Revision: https://developer.blender.org/D4148
2019-01-04UI: fix incorrect collapse menu button alignment.Harley Acheson
Differential Revision: https://developer.blender.org/D4151
2019-01-04UI: fix display of menu buttons without text and icon, and only a down arrow.Harley Acheson
Differential Revision: https://developer.blender.org/D4123