Commit Graph

1619 Commits

Author SHA1 Message Date
Campbell Barton
bbe98b18fb Cleanup: use preferences prefix for Python operators 2019-03-02 00:23:42 +11:00
Campbell Barton
69665bc7f0 RNA: move cursor into own struct
Without this it's impractical to subscribe to any change to the cursor.

Fixes T61969 by having gizmos update on any change to the cursor.
2019-03-01 12:41:40 +11:00
Bastien Montagne
7efc26709c I18n: enable Abkhaz in Blender. 2019-02-25 20:40:31 +01:00
Bastien Montagne
e96445059f Add Abkhaz language to Blender (disabled for until we get some translated content). 2019-02-18 14:36:16 +01:00
Dalai Felinto
caf89c3de1 Fix Object > Animation > Bake Action 2019-02-14 13:54:15 +00:00
Campbell Barton
6c2a0049e4 Fix T61497: Old keymap causes error on startup
When a keymap has an error loading, don't make it active
since it will be partially loaded and not usable.
2019-02-14 11:11:53 +11:00
Howard Trickey
9ca6fc41ae Bevel: Make modal keymap instead of hardcoded.
Also added keys for toggling harden normals,
and cycling through miter types.
Still to do: add some shortcuts for affecting the
spread value for arc miters.
2019-02-10 16:08:25 -05:00
Bastien Montagne
0629359762 I18N: Add Kazakh language.
Disabled for until we get actual first tranlation in SVN repo. ;)

Related to T61102.
2019-02-10 11:04:53 +01:00
Philipp Oeser
6e2da0883f Fix T61309: mesh_utils.triangle_random_points fails with a TypeError
Caused by an error in rBe65784a0519e.
And since we are going over loop triangles anyways, we can remove the
part quecking for quads [remainder of tessface era] entirely.

Reviewers: campbellbarton

Maniphest Tasks: T61309

Differential Revision: https://developer.blender.org/D4324
2019-02-08 13:58:42 +01:00
58a1259469 Fix object.users_collection not including scene collections. 2019-02-07 13:01:01 +01:00
Campbell Barton
40f2afcf1d Cleanup: remove contributors for Python files
Following removal from C source code.

See: 8c68ed6df16d8893
2019-02-05 09:17:00 +11:00
Jacques Lucke
1ceaca7f64 Fix T61017: node_shader_utils did not handle diffuse_color correctly 2019-01-30 14:37:09 +01:00
Campbell Barton
7894d6c6f1 Cleanup: line length 2019-01-30 09:06:44 +11:00
Campbell Barton
6cc5c28d15 Fix UI extension removal
App-templates & keymap names had their extensions removed twice.

Confusing for filenames containing dots.
2019-01-25 13:49:59 +11:00
William Reynish
2b0fb0d7bf Fix keymap preferences UI layout issues for modifier keys. 2019-01-21 17:26:35 +01:00
f351c7bf23 Preferences: tweak themes/addons/keyamps buttons at the top.
Make layouts more consistent between them, give more room for search field.
Addon online resources links were removed as the links are dead.
2019-01-17 11:28:56 +01:00
Bastien Montagne
514e53bb80 Expose batch IDs deletion in python API.
Follow-up to previous commit.
2019-01-16 12:02:37 +01:00
Campbell Barton
0b9a65151d Fix T60410: Crash adjusting torus w/ enter edit-mode preference 2019-01-15 21:36:50 +11:00
Campbell Barton
a6b2ec0bc2 Fix toolbar accelerator w/ user defined keyconfig 2019-01-14 18:59:26 +11:00
a1764cedbd Fix Python errors batch generating preview images. 2019-01-11 17:26:54 +01:00
Campbell Barton
a44ac44c1e Fix anim_utils.bake_action typo
D4172 by @rcorre
2019-01-10 13:11:48 +11:00
Campbell Barton
96f762500e Cleanup: tweak last commit 2019-01-07 11:16:11 +11:00
Campbell Barton
430cf7e15e Fix generated toolbar keymap w/ annotation tool 2019-01-07 11:00:46 +11:00
Severin
a77b63c569 UI: Preferences Redesign Part 2
(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-04 22:18:23 +01:00
Bastien Montagne
6d89337257 Fix/cleanup typos and such in UI messages (and some comments). 2018-12-24 15:03:49 +01:00
Bastien Montagne
1ac311cedc Fix/cleanup another bunch of UI messages issues.
Also (mostly in comments): behaviour -> behavior (we use American English).
2018-12-24 12:32:43 +01:00
Bastien Montagne
59b530ca18 Fix and workaround for i18n messages extraction code. 2018-12-23 22:03:43 +01:00
Bastien Montagne
1158b9f73a Cleanup: First batch of UI messages fixes (typos, final points...).
Also contains some code typo fixes (mostly, adtaptative -> adaptive,
former is nearly innexistant in English, let's stick to simple valid
words ;) ).
2018-12-23 22:03:43 +01:00
Campbell Barton
63fcbfc3a7 RNA: naming, user-preferences -> preferences 2018-12-21 12:55:02 +11:00
Campbell Barton
dc3d9467f2 Fix T58937: Appended menus to VIEW3D_MT_editor_menus are not displayed 2018-12-20 12:00:20 +11:00
Alexander Gavrilov
61c941f040 RNA: support setting default values for custom properties.
NLA requires a usable default value for all properties that
are to be animated via it, without any exceptions. This is
the real cause of T36496: using the default of 0 for a scale
related custom property obviously doesn't work.

Thus, to really fix this it is necessary to support configurable
default values for custom properties, which are very frequently
used in rigs for auxiliary settings. For common use it is enough
to support this for scalar float and integer properties.

The default can be set via the custom property configuration
popup, or a right click menu option. In addition, to help in
updating old rigs, an operator that saves current values as
defaults for all object and bone properties is added.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D4084
2018-12-19 14:20:35 +03:00
Campbell Barton
bb4ed5ce39 Fix invalid string comparison 2018-12-19 11:38:20 +11:00
Antonioya
780f0f646d GP: Rename CTX and OB modes
Part of T59335.
2018-12-14 16:52:12 +01:00
Campbell Barton
4357fb63db Keymap: event type filter w/ finding keymap items
Now its possibly to ask for only keyboard/mouse/ndof events
when finding key map items.
2018-12-12 21:43:26 +11:00
Campbell Barton
220ab6290e Fix toolbar key-accelerator w/ LMB select
Tweak events were masking hotkey access.

Reported in T55162
2018-12-12 09:40:37 +11:00
Bastien Montagne
5ad217fe0a Fix own mistake in recent rB74361eebe68c.
One cannot assign to Class.__dict__, that is not a 'real' dictionnary...

Thanks to @JacquesLucke for noting the issue.
2018-12-05 20:54:02 +01:00
Bastien Montagne
74361eebe6 Fix T58772: Stray "forward" and "up" options in 2.8 import addons?
Nice side-effect of using new __annotations__ thingy to store
dynamically-generated fields in a class: __annotations__ dict is not
ensured to exist for a given class, so we may end up modifying on of the
parents' one!
2018-12-05 11:08:57 +01:00
Campbell Barton
9b933ccdf6 Fix error reloading scripts
Operator.is_registered needs to use RNAMeta class.
2018-12-04 17:54:54 +11:00
Campbell Barton
e1b8645c6a Keymap: use strict format for keymap definitions
Ensure we use lists for keymap items and item properties.

This means scripts can access keymap definitions from other layouts,
manipulating them without sometimes encountering a tuple that needs
to be converted into a list.
2018-12-02 14:02:03 +11:00
e03eaf5b81 Fix wrong property name in preview render Python script. 2018-11-29 18:26:48 +01:00
Sergey Sharybin
7c7f3776dd Use collection and instance terminology in Python API
This follows naming convention agreed on in T56648.
2018-11-28 18:22:51 +01:00
Campbell Barton
1b870bce85 Tool System: remove custom tool registration
API is not ready for beta (likely to change).
2018-11-28 10:40:02 +11:00
Campbell Barton
c906cdc197 Cleanup: remove unused code & add comments 2018-11-26 16:07:03 +11:00
Campbell Barton
7493848008 3D View: remove 3D cursor
Use 3D cursor from the scene (was previously used for local-view).
2018-11-26 14:02:09 +11:00
Campbell Barton
48b0695806 Cleanup: unused vars, imports 2018-11-26 09:27:25 +11:00
Campbell Barton
811814b60c Keymap: remove redundant keys from toolbar popup
Adjust the keymap so tools that don't exist wont use keys
from the default keymap.
2018-11-23 15:46:47 +11:00
Campbell Barton
ca5dd63618 Fix toolbar keymap accumulating items
Create a temporary keymap with items from the original.
2018-11-23 15:19:57 +11:00
Campbell Barton
5155572fc7 Keymap: add popup keymap
Allow manually mapping keys for the popup toolbar.

Useful for tools that don't have immediate access,
add transform, annotate & measure.
2018-11-22 16:52:57 +11:00
Campbell Barton
d0ac13d6b1 Cleanup: minor simplification of keyconfig merge 2018-11-22 16:33:57 +11:00
Campbell Barton
d5f1d4f789 Cleanup: utility function to avoid duplicate keys 2018-11-22 11:54:53 +11:00
Campbell Barton
553307bec1 Tool System: auto-assign A-Z keys for toolbar popup
Assign keys based on tool name when they're free, allows:
Space-T for Transform, Space-A for Annotate.
2018-11-22 11:35:46 +11:00
Campbell Barton
120be7740d Fix toolbar popup keymap not allowing 'A' key 2018-11-22 11:33:10 +11:00
Campbell Barton
3b7daa5bf4 Tool System: Updates for keymap stored as string 2018-11-22 11:13:53 +11:00
Campbell Barton
a9bf6a3b3a UI: hide keymap preferences when filter is used 2018-11-22 07:52:34 +11:00
Bastien Montagne
ed1ee89288 I18N: tweak some UI labels and tips. 2018-11-21 12:06:59 +01:00
Bastien Montagne
76d602f38d Add option not to print debug/info in ngon_tessellate.
That func can be called a lot, generating a lot of noise in the
console...
2018-11-20 12:35:05 +01:00
Campbell Barton
9d85cf0d54 Theme: avoid right-shift in XML files
Use 2 space indent for attributes, ~20% smaller files.
2018-11-20 13:15:26 +11:00
Campbell Barton
9a1796797e Keymap: update addon register/unregister utilities
Use the same data format and loader that the default key-maps use.

This supports nested properties (needed for macros)
and fixes modal key-maps which weren't supported.

This format still needs to be documented.
2018-11-20 12:37:04 +11:00
Campbell Barton
916446e83f Cleanup: move keymap hierarchy into own file 2018-11-20 11:38:13 +11:00
Campbell Barton
bb5a96e76e Cleanup: move toolbar keymap generation to bl_keymap_utils
The function is getting complicated, any refactoring
would be best done outside of 'space_toolsystem_common'.
2018-11-20 11:17:36 +11:00
Campbell Barton
f8c16b0175 Cleanup: move bpy_extras.keyconfig_utils to own module
bpy_extras were meant to be useful high-level helper functions for
script authors to perform common operations,
to avoid writing to verbose API's.

bpy_extras.keymap_utils contains some specialized API calls
mainly intended for Blender's own internal use.

Move keymap import export to internal API.
2018-11-20 11:06:01 +11:00
Campbell Barton
5f9de429ac UI: show keyconfig prefs directly under preset
The keyconfig preset and it's preferences were too far apart,
show the preferences under the preset in a collapsible box.
2018-11-20 09:15:53 +11:00
Campbell Barton
3b48620098 Cleanup: naming 2018-11-19 07:04:24 +11:00
Campbell Barton
0f1a63d34c PyAPI: add bpy.utils.execfile
Wraps `importlib.util`, avoids duplicate preset loading calls.
2018-11-18 11:49:03 +11:00
Bastien Montagne
2589263b6e Fix related to T57851: broken normalmap handling in py shader wrapper.
Pretty stupid mistake...
2018-11-16 14:59:30 +01:00
Campbell Barton
c1f5ccb11a Keymap: allow filling in existing key-configs
Needed so we can get the preferences of a key-config
which are sent to a function that generates the contents.
2018-11-16 16:00:37 +11:00
Campbell Barton
0f21b64b1a WM: fix hard coded rename
Currently the filenames are used when setting keymaps.
This hard coded naming meant the preset and setting function
need to be kept in sync.

Prefer to not have hard coded replacements which need to be duplicated.
2018-11-16 09:37:18 +11:00
088be7eb2f Keymaps: replace select / action mouse system
For Blender builtin configurations the option to choose the select mouse remains
and is now also in the splash screen. It works by changing the keymap dynamically
in the script, rather than using special events.

The system of automatic switching of events was not flexible enough to deal with
side effects that require further keymap changes, so it is now under more manual
control in the script.

This breaks compatibility for some scripts and exported key configurations.
These can be fixed by replacing SELECTMOUSE, ACTIONMOUSE, EVT_TWEAK_S and
EVT_TWEAK_A with appropriate LEFTMOUSE, RIGHTMOUSE, EVT_TWEAK_L and
EVT_TWEAK_R events.

Other than that, there should be no functional changes.
2018-11-16 08:31:00 +11:00
Philipp Oeser
cfb6f14616 Fix node_shader_utils: "Specular Tint" is a float (not a color) 2018-11-15 17:52:40 +01:00
Campbell Barton
48c137ad5d UI: remove node tree panels
This duplicates items in the add menu and uses a lot of vertical space.

This should be used for tools or disabled.
2018-11-15 19:36:32 +11:00
Campbell Barton
5ec1d709e7 WM: use Python bytecode cache to run presets
Key-maps can be very large, avoid parsing on every startup.
2018-11-15 18:46:00 +11:00
Campbell Barton
b3d84853ac Keymap: remove keymap export that wrote API calls
Use new keymap format which defines data to be loaded.
2018-11-15 13:51:55 +11:00
Campbell Barton
8734a09379 Tool System: use preset keymap loading logic
The data structures for tool keymaps and presets were different,
use the same structure and expose function publicly.
2018-11-15 13:38:27 +11:00
Jacques Lucke
46ac317a29 Py API Docs: documentation for gpu_extras.presets 2018-11-14 16:43:48 +01:00
7aae28af2d Keymaps: refactor loading of default keymap, fix bugs.
This refactors loading of key configurations to clear and refill existing
ones, rather than adding a new one and then removing the old one.

This fixes broken loading of non-default configurations after recent changes,
and prepares for future changes to make it possible to dynamically change
key configurations based on user preferences.
2018-11-13 18:22:07 +01:00
Jacques Lucke
77238819f4 Python GPU API: gpu_extras.presets.draw_texture_2d
Review wasn't finished yet, but I just commit this for now so that I can make some progress..

Differential Revision: https://developer.blender.org/D3901
2018-11-13 16:20:16 +01:00
Jacques Lucke
7f2401532e style fix 2018-11-12 18:04:48 +01:00
Jacques Lucke
bb39e33d25 Fix: draw_circle_2d not using the segment count from parameter list 2018-11-12 17:54:51 +01:00
Bastien Montagne
fd65ebf39a Fix T57776: Error when adding a Torus to the scene.
Not all Object.select_set() cases had been updated to new API... Tsst. ;)
2018-11-11 11:22:38 +01:00
Jacques Lucke
7c227e4740 Py API Docs: Warnings for some properties that are slower to access than expected. 2018-11-09 12:07:10 +01:00
Campbell Barton
04cdf8d040 Keymap: skip loading the keymap preset in background mode
Caused a crash on exit and isn't needed.
2018-11-09 11:43:45 +11:00
3064da1200 Keymap: move builtin keymaps from C to Python
This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.

Notes:

- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/blender_default.py`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907
2018-11-09 11:33:06 +11:00
Jacques Lucke
9a38526be0 Py API Docs: show gpu_extras module 2018-11-07 15:45:28 +01:00
Bastien Montagne
7b38df41ae Fix/cleanup RNA viewlayer API.
RNA's ViewLayer would present 'first level' of layer collection as a
list (collection property), when it is actually now only a single item,
same as the scene's master collection.

Note: did not try to update view_layer python tests, those are already
fully broken for quiet some time I guess (they still assume
view_layer.collections to be mutable e.g.)...
2018-11-06 17:20:49 +01:00
Campbell Barton
10d7ebc469 Merge branch 'master' into blender2.8 2018-11-01 16:20:52 +11:00
Campbell Barton
38f57734ea Cleanup: move progress utility module into bpy_extras
Try avoid having too many toplevel modules with generic names.
2018-11-01 16:19:49 +11:00
Campbell Barton
4c75cc488a Correction for Gizmo.draw_custom_shape utility API 2018-10-26 12:43:40 +11:00
Jacques Lucke
0264c050bf PyAPI: gpu utility module to create new batches
Support the common case of creating batches from python geometry,
a shader and optionally indices.

See D3779
2018-10-26 12:40:43 +11:00
Campbell Barton
0f0eafaa0e Cleanup: minor change to last commit 2018-10-26 11:48:42 +11:00
Campbell Barton
6d2897c7ed Update Gizmo.draw_custom_shape for API changes 2018-10-26 11:26:39 +11:00
Campbell Barton
1d8ba9d618 PyAPI: Make GPUVertFormat() argument optional 2018-10-26 08:06:05 +11:00
Campbell Barton
f606ee7637 PyAPI: initial gpu_extras module (circle drawing utility) 2018-10-25 21:05:47 +11:00
Campbell Barton
901ccfab52 Fix T57366: Mesh.from_pydata invalid loose-edge state 2018-10-24 11:37:44 +11:00
Campbell Barton
3f542312cf Merge branch 'master' into blender2.8 2018-10-19 17:51:40 +11:00
Campbell Barton
0bbc6a903a Fix error disabling all addons 2018-10-19 17:49:48 +11:00
Campbell Barton
108475dc01 PyAPI: Support for custom tool registration
Added a module bpy.utils.toolsystem which only exposes ToolDef,
to avoid scripts referencing bl_ui internals.
2018-10-18 17:13:22 +11:00
Bastien Montagne
65ea9ec948 node_shader_utils: Proper fix for node_normalmap accessor returning ellipsis value.
Ellipsis value is internal ingredient only, to tag hidden _node_normalmap
'real' property as not yet initialized. Public node_normalmap accessor
should never ever have that value, it's either None or a valid node!
2018-10-17 20:18:40 +02:00
Bastien Montagne
5c038a6930 Revert "Fix error on FBX export after material changes"
This reverts commit ce4cfbe108d0641832d86a731ea32f596220b7c5.

Obviously wrong 'fix', please do not touch other dev’s code, especially
in active/WIP area, when you do not fully understand it.
2018-10-17 20:17:02 +02:00
Dalai Felinto
ce4cfbe108 Fix error on FBX export after material changes
Update the addons repository as well.
2018-10-17 17:12:17 +00:00
Bastien Montagne
fb550ca6b9 node_shader_utils: fix bad setting of use_nodes in readonly case.
Also added access to extension property in texture wrapper.
2018-10-16 19:58:50 +02:00
Bastien Montagne
dd6bf3f84a node_shader_utils: several fixes, improvements and cleanups.
Fix broken behavior in case of texcoords mapping (we do need texcoords
node in all cases, then, even for UV coords...).

Use nodes by default when generating new write-allowed wrapper around a
material.

Do not try to find nodes in existing tree all the time, do it only once,
even for lazy-initialized nodes (through accessors).

Fix ugly spacing in property accessors (since it looks like some people
do not like a single 'block' with both getters, setters and prop
definition, at least use one sep line everywhere (and two sep lines to
separate properties)...
2018-10-13 19:36:47 +02:00
78390f7724 Python: change node_shader_utils diffuse RGBA to base_color RGB.
Best to give its actual name so it's clear that the Principled BSDF does
not have a diffuse color exactly, and does not have an alpha component.

Also image textures use UVs by default, so avoid creating a texture
coordinate node for that.
2018-10-12 15:55:09 +02:00
e65784a051 Python API: add loop triangles access, remove tessfaces.
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.

Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.

Details on porting code to loop triangles is in the release notes.

Differential Revision: https://developer.blender.org/D3539
2018-10-10 17:43:44 +02:00
2ac65f6153 UI: new icon set by Andrzej Ambroz.
This is a monochrome icon set, with a more modern look and icons for
various features that did not have a proper icon before.
2018-10-08 19:46:00 +02:00
Campbell Barton
0b98a679bb UI: rename Border Select -> Box Select
See: T56648
2018-10-05 10:29:31 +10:00
Campbell Barton
1c3411ac89 Keymap: expose tool keymaps in the preferences
Currently some modes share tool keymaps, we might want to disable
this since it's confusing editing one thing in multiple places.

However this should be resolved in the tool definitions.
2018-10-03 15:55:57 +10:00
Jacques Lucke
9d104f57b6 Addons: reactivate BVH and PLY format addons
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3758
2018-10-02 17:51:39 +02:00
Campbell Barton
bda7a333a3 Cleanup: use tuple unpacking 2018-10-01 09:20:32 +10:00
Campbell Barton
0256d8b4e2 Cleanup: pep8, unused import 2018-10-01 09:20:32 +10:00
Bastien Montagne
0bb9ebd058 io_utils: remove orientation_helper_factory.
Now we only use orientation_helper decorator.
2018-09-30 17:30:29 +02:00
Bastien Montagne
6f42eb245b Python IO: Initial nodal shader support for import AND export.
That new bpy_extras' node_shader_utils module is remotely based on
existing addons' cycles_shader_compat module. It has some key
differences though:
 - It is based on Principled shader, instead of the noodle combination
   of half a dozen simpler shaders.
 - It does not do any value conversion (like e.g. clamping, which was
   only suited for FBX). Any conversion/adaptation is to be done
   by each IO add-on.
 - It extensively uses accessors to offer:
   - Easy read/write of values, hiding all the hairy noodly nodes
     (principled shader helps a lot here).
   - lazy creation of most nodes on accessing (when generating a
     material), which avoids getting unused nodes in final shader.
 - We only use Principled BSDF so far though, which means some features
   supported by previous system are not yet implemented in new one.

Note that, even though we support 'exporting' side of things, this will
only work for a very specific (and basic) kind of shader. This will have
to be clearly explained in end-user documentation.

Also, that code has had some basic testing, but most certainly needs a
lot more refinement.

As proof-of-concept, OBJ IO script will be updated to use that new
system after that commit.
2018-09-27 23:32:56 +02:00
Jacques Lucke
a27d97d1b7 Addons: reactivate 'STL format' addon
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3735
2018-09-26 17:32:46 +02:00
Bastien Montagne
444711e615 Re-enable OBJ add-on. 2018-09-21 20:06:51 +02:00
Bastien Montagne
0edb2b8de9 Py io_utils: deprecate orientation_helper_factory and add new orientation_helper decorator.
This fixes warning about not using annotations, and a decorator here is
a much cleaner solution anyway.
2018-09-21 19:31:57 +02:00
Bastien Montagne
6a7914b73e Re-enable FBX add-on. 2018-09-21 15:15:08 +02:00
Campbell Barton
5340e9ac1b Merge branch 'master' into blender2.8 2018-09-21 08:18:23 +10:00
Campbell Barton
0a968510bf Cleanup: style, use raw strings 2018-09-21 08:15:46 +10:00
Dalai Felinto
828627a796 Addon Utils: Green light the uv layout addon 2018-09-19 13:58:01 +00:00
Campbell Barton
09aa446100 Merge branch 'master' into blender2.8 2018-09-13 20:15:18 +10:00
Campbell Barton
254067106e PyAPI: remove operator methods that leak memory 2018-09-13 20:10:56 +10:00
Campbell Barton
ff432a410a PyAPI: use brief description for operator repr
Only include description in docstring.

Also avoid using op_get_rna.
2018-09-13 19:59:15 +10:00
Campbell Barton
af1cf00003 Merge branch 'master' into blender2.8 2018-09-13 18:19:24 +10:00
Campbell Barton
a6fc718029 PyAPI: add API call to get an operators type
Getting the instance leaks memory and was only meant to be used for
generating docs.
2018-09-13 18:16:06 +10:00
Bastien Montagne
e9ffe93350 Fix T56766: Bake Action Visual Keying Not Working.
Consequences of new requirement to use named keywords parameters for our
RNA API... Hopefully fixed all other cases in that file as well, but
guess we'll find more of those in comming weeks. :|
2018-09-12 11:52:06 +02:00
Bastien Montagne
defbe14077 Fix object_utils.py's matrix multiplication (use new @ syntax). 2018-09-10 18:03:40 +02:00
Bastien Montagne
fc95efec06 Fix image_utils.py's load_image() helper. 2018-09-10 17:35:50 +02:00
Campbell Barton
66d275f8d3 RNA: update gizmo API for changes in Blender
- gpu module renamed.
- make gizmo.new() take type as a required argument.
2018-09-08 06:50:02 +10:00
Aleksandr Zinovev
600b6f2069 UI: icon keyword argument to popmenu_begin__internal 2018-09-04 20:32:34 +03:00
Bastien Montagne
a43ebc63fa Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/collision.c
2018-09-03 17:44:36 +02:00
4da2acae3a Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3668
2018-09-03 16:55:01 +02:00
Campbell Barton
5bf42ce022 RNA: use required args for internal popup end API 2018-08-28 13:50:11 +10:00
Campbell Barton
d3a72033f6 RNA: UILayout.split(..) 'percentage' to 'factor'
Misleading name since it's between 0..1.

Use as a keyword argument to prepare for keyword only args.

Also document that leaving unset has special behavior.
2018-08-28 12:50:11 +10:00
Campbell Barton
e9fb2feb2e UI: text keyword argument to label
Prepare for keyword only args
2018-08-28 12:34:51 +10:00
Campbell Barton
4b6fa4d897 PyAPI: update scripts for matrix multiply operator
Operators:
- add torus
- align objects
- bake physics
- make dupli faces
- smart project

Templates:
- 3D view ray cast

Other:
- Methods for bones/edit-bones
2018-08-12 15:22:58 +10:00
Bastien Montagne
936d1cef6e Merge branch 'blender2.8' into soc-2018-bevel
Conflicts:
	release/scripts/addons
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
	source/blender/editors/space_outliner/outliner_draw.c
2018-08-01 14:16:41 +02:00
Campbell Barton
c1185f3d0d Cleanup: pep8, windows line endings 2018-07-31 21:31:04 +10:00
Antonioya
66da2f537a New Grease Pencil object for 2D animation
This commit merge the full development done in greasepencil-object branch and include mainly the following features.

- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.

You can get more info here:

https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/

This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.

Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-31 10:50:43 +02:00
31c49493d1 Fix incorrect active object setting in scripts. 2018-07-24 11:27:05 +02:00
Rohan Rathi
4e6bcd10e5 Merge branch 'blender2.8' into soc-2018-bevel 2018-07-21 19:29:15 +05:30
Campbell Barton
9df1e54079 Cleanup: style 2018-07-19 16:06:37 +10:00
Clément Foucault
8cd7828792 GWN: Port to GPU module: Replace GWN prefix by GPU 2018-07-18 11:49:15 +02:00
Vuk Gardašević
84d4037363 UI: Single-column and flow layout for Scene properties
See D3532
2018-07-17 12:17:42 +02:00
Campbell Barton
89299f6620 WM: rename manipulator to gizmo in Python API 2018-07-14 23:55:54 +02:00
Campbell Barton
5ebebcfbff WM: rename manipulator to gizmo internally 2018-07-14 23:49:00 +02:00
Campbell Barton
f9aab3b091 Keymap: reduce right shift in generated keymaps 2018-07-14 11:46:16 +02:00
Campbell Barton
9dbee5ccc2 Merge branch 'master' into blender2.8 2018-07-14 10:27:07 +02:00
Campbell Barton
50e3cd0bb3 Keymap: option to export all keymaps
Useful to store a snapshot of the current keymap state
so changes to the default keymap are ignored.

Also useful for testing keymap export works properly.
2018-07-14 10:15:46 +02:00
Campbell Barton
9d1ad27fdc Merge branch 'master' into blender2.8 2018-07-14 09:31:52 +02:00
Campbell Barton
43973410f3 Cleanup: use f-string for addon_utils 2018-07-14 09:30:59 +02:00
dc00d66c89 UI: only show API defined custom properties when Developer Extras is on.
These are intended to behave just like any other builting property, so
no to always show them in the Custom Properties panels for regular users.
2018-07-13 18:21:58 +02:00
Campbell Barton
d28d202fd1 PyAPI: remove bpy.utils.register_module
Remove bpy.utils.register_module() & logic tracked RNA classes.
2018-07-11 23:13:37 +02:00
Campbell Barton
09aa799e53 PyAPI: Use annotations for RNA definitions
- Logical use of fields since they define type information.
- Avoids using ordered-dict metaclass.

Properties using regular assignments will print a warning and load,
however the order is undefined.
2018-07-11 22:18:09 +02:00
Campbell Barton
b5811bccf8 Correct recent keymap change, writing all keymaps 2018-07-07 20:03:30 +02:00
Campbell Barton
f7bce99e4d Keymap: support for reading/writing keymaps as data
Instead of running code to create a keymap, store them as data.
This allows for keymaps to share content as well as running
transformations at load time.
2018-07-07 19:53:02 +02:00
Campbell Barton
1f539cd7ef Merge branch 'master' into blender2.8 2018-07-07 11:32:40 +02:00
Campbell Barton
97cd8bfae1 Cleanup: isinstance can take multiple types 2018-07-07 11:29:57 +02:00
Campbell Barton
80a31d30a4 Merge branch 'master' into blender2.8 2018-07-07 08:53:00 +02:00
Campbell Barton
4b373ed086 Cleanup: pep8 2018-07-07 08:48:35 +02:00
aed09d4329 Cleanup: remove unused shader node compatibility flag.
No longer needed after Blender Internal removal and Eevee replacing the
Cycles GLSL shading nodes.
2018-07-06 20:22:03 +02:00
74fd17e9d7 UI/Python: rename Lamps to Lights, to follow more standard terminology.
Internally it's still mostly named lamps, though some modules like Cycles
were already calling them lights.
2018-07-06 20:06:09 +02:00
Campbell Barton
dd5c25fab2 Remove print left in by accident 2018-07-06 12:10:30 +02:00
Campbell Barton
6379c7bd47 Addons: silence warnings instead of disabling 2018-07-06 11:03:24 +02:00
dbdafe1209 Shaders: add target setting to material output node.
This makes it possible to have a single shading nodetree that contains
separate Cycles and Eevee shaders. By default the target is set to All
so shaders are shared.
2018-07-05 18:43:48 +02:00
Campbell Barton
49b86bcfec Merge branch 'master' into blender2.8 2018-07-05 07:54:47 +02:00
Campbell Barton
969111f9b5 Cleanup: pep8 2018-07-03 22:35:37 +02:00
Campbell Barton
9e5002aded UI: optional ui-unit-width for popovers
Some popovers don't fit well with the default width,
allow panels to adjust as needed.
2018-07-03 19:55:01 +02:00
Campbell Barton
1ff5cc8c1a addons: disable addons with versions below 2.8 2018-07-03 07:59:08 +02:00
Campbell Barton
105192e5a2 Cleanup: pep8 2018-07-03 07:13:27 +02:00
Campbell Barton
00fc1d70a7 Merge branch 'master' into blender2.8 2018-07-03 06:58:34 +02:00
Campbell Barton
b66aa0b0a6 Cleanup: pep8 2018-07-03 06:48:44 +02:00
Rohan Rathi
31e43d021f Merge branch 'blender2.8' into soc-2018-bevel 2018-07-02 23:31:19 +05:30
Campbell Barton
41a7225794 UI: align header menus to space them closely 2018-07-02 15:47:00 +02:00
Campbell Barton
25b7bdb6a9 Merge branch 'master' into blender2.8 2018-06-30 09:29:38 +02:00
Campbell Barton
5c0d8bcdc7 Cleanup: use f-string 2018-06-30 09:25:23 +02:00
Campbell Barton
9bd0c63382 Merge branch 'master' into blender2.8 2018-06-29 08:05:38 +02:00
Campbell Barton
af36dd4664 Cleanup: trailing newlines 2018-06-29 08:02:49 +02:00
Campbell Barton
4d39da1060 Merge branch 'master' into blender2.8 2018-06-28 23:57:00 +02:00
Campbell Barton
46dceefc35 WM: Remove Screen Cast
This feature is better handled by specialized tools.
2018-06-28 23:40:51 +02:00
Rohan Rathi
c73a6b0d42 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-20 22:29:44 +05:30
7a10cfe7fe UI: preset popover buttons in panel headers.
Moves the preset into a menu for the panel header, so it can be changed
without opening the panel and takes up less space. Two remaining issues:

* For long lists the add new preset button can be scrolled off screen.
* We should support showing the name of the chosen preset in the panel
  header, but the current preset system does not support detecting which
  preset is used.

Differential Revision: https://developer.blender.org/D3366
2018-06-13 15:22:34 +02:00
Rohan Rathi
1255129932 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-11 21:03:07 +05:30
Joshua Leung
cdfa517760 Insert Keyframe: Change default behaviour for how F-Curves get grouped
For many years, animators have been complaining about how keyframing a (transform)
property directly would leave them ungrouped, while keyframing them using a Keying Set
would put them into a group based on the name of the keyingset.

This commit attempts to improve (unify + make consistent) the default behaviour:
* All object transforms now get added to an "Object Transforms" group,
  regardless of whether they were added individually via buttons or keyingset
* All bone transforms now get added to a group corresponding to the name of the bone
  instead of only the ones added via keyingset
2018-05-30 16:46:12 +02:00
Rohan Rathi
5d2d36b068 Applied soc-2017-normal-tools 2018-05-25 22:24:24 +05:30
Campbell Barton
e7895bac07 UI: support for custom keymaps for popovers 2018-05-20 22:39:14 +02:00
Campbell Barton
e7d2a4718d Fix popover args when called from Python 2018-05-18 21:00:16 +02:00
17bd5c9d4b Collections and groups unification
OVERVIEW

* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
  which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
  and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
  for each. For many workflows one view layer can be used, these are more of an
  advanced feature now.

OUTLINER

* The outliner now has a "View Layer" display mode instead of "Collections",
  which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
  These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
  can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
  text gives different results, we'll unify this later.

LINKING AND OVERRIDES

* Collections can now be linked into the scene without creating an instance,
  with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
  but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
  into collections with overrides directly in the scene.

PERFORMANCE

* We tried to make performance not worse than before and improve it in some
  cases. The main thing that's still a bit slower is multiple scenes, we have to
  change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
  updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
  lookups internally and in API functions like visible_get().

VERSIONING

* Compatibility with 2.7 files should be improved due to the new visibility
  controls. Of course users may not want to set up their scenes differently
  now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
  files. There's a few things which are know to be not quite compatible, like
  nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
  #ifdef so it can be removed at the end of the release cycle.

KNOWN ISSUES

* The G-key group operators in the 3D viewport were left mostly as is, they
  need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
  still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
  be done later, we'll have to see how important this is as all objects within
  the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.

Differential Revision: https://developer.blender.org/D3383

https://code.blender.org/2018/05/collections-and-groups/
2018-05-18 13:34:24 +02:00
Campbell Barton
aab5ac25f2 Remove Frame Server
This feature is limited (only byte PPM output, no multi-view),
only works with specific configurations.

This also causes some maintenance overhead
when testing changes to the render pipeline.
2018-05-09 12:50:26 +02:00
2094b45447 3D Viewport: make shading and overlay DNA match UI names.
We should use consistent naming between the internal code and UI whenever
possible, only reason not to is file compatibility.
2018-05-05 15:54:36 +02:00
Campbell Barton
e6d1fb87c6 UI: Initial popover support for panels
- UILayout.popover(.. panel_type ..)
  A single panel
- UILayout.popover_group(.. panel categories ..)
  Expands all panels matching args.

Currently used in the topbar for redo and paint options.
2018-04-22 17:45:14 +02:00
Campbell Barton
1de7a0c0dc Merge branch 'master' into blender2.8 2018-04-22 10:51:23 +02:00
Campbell Barton
420e379e99 Cleanup: de-dup popup/pie menu RNA definition
Also rename pupmenu -> popmenu
2018-04-22 10:49:45 +02:00
Sergey Sharybin
8c269d94f4 Limit updates to active view layer only
This is rather uncommon when operator will operate on a non-active view layer,
so there is no need to do full scene update.

This change solves lag first time using Extrude operator in edit mode.
2018-04-20 10:03:27 +02:00
Dalai Felinto
fad7c065c2 Remove Shift+F2 and other related BGE keymaps
Reported by Pablo Vazquez (venomgfx)
2018-04-17 17:56:06 +02:00
Dalai Felinto
159806140f Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine

This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.

Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
  that we can wait until then to remove this.
2018-04-17 17:51:28 +02:00
Campbell Barton
1c24c04e60 Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
2018-04-05 18:21:14 +02:00
Campbell Barton
61c8ed40f5 WorkSpace: show/hode opt-out support for addons
In some cases it doesn't make sense for add-ons to be listed for hiding.
Especially for import/export which use minimal UI space.

This adds `bl_info["use_owner"]` to add-ons,
currently defaulting to True for all non Import-Export add-ons.
2018-03-01 11:22:46 +11:00
Campbell Barton
d937d06c02 WorkSpace: UI filtering for add-ons
Allows for each workspace to have it's own add-ons on display.

Filtering for: Panels, Menus, Keymaps & Manipulators.
Automatically applies to add-ons at the moment.

Access from workspace, toggled off by default
once enabled, add-ons can be white-listed.

See D3076
2018-03-01 01:31:07 +11:00
Gaia Clary
f228a08d02 merge from master 2018-02-26 22:49:30 +01:00
Campbell Barton
d416e56e70 Fix T54029: Wrong preset name display in win32 2018-02-26 19:05:01 +11:00
Campbell Barton
345c6298e9 Object Mode: move to workspace struct
- Read-only access can often use EvaluationContext.object_mode
- Write access to go to WorkSpace.object_mode.
- Some TODO's remain (marked as "TODO/OBMODE")
- Add-ons will need updating
  (context.active_object.mode -> context.workspace.object_mode)
- There will be small/medium issues that still need resolving
  this does work on a basic level though.

See D3037
2018-02-08 21:14:26 +11:00