Commit Graph

1214 Commits

Author SHA1 Message Date
Bastien Montagne
a22af1a84b Fix i18n messages extraction script, and a few more UI messages... 2017-10-04 12:39:06 +02:00
Bastien Montagne
ad22d29dac Some UI/messages fixes. 2017-10-03 21:32:46 +02:00
Joshua Leung
fde45132de Fix T52861: Keymap editor filter doesn't show shortcuts using "+" 2017-09-21 16:35:47 +12:00
Gaia Clary
a3b8f98913 revert commit c0a7e9b631 because it did not work as expected 2017-09-21 00:04:10 +02:00
Gaia Clary
c0a7e9b631 D2777: allow blank lines and lines with spaces/tabs in cut/paste 2017-09-20 22:48:38 +02:00
Bastien Montagne
f54f680a26 Fix T52842: Incorrect description for bpy.types.MeshTextureFace.uv
Tweak rna_info module to generate valid info also for multi-dimensional arrays.
2017-09-20 16:40:11 +02:00
Bastien Montagne
c4bbf1e4b0 Fix rna_info.py module, broken by recent changes in bpy.types presumably.
Hope fix is OK, seems to work with API generation script at least.
2017-09-20 16:40:11 +02:00
Campbell Barton
2aa2bec43a Fix T52442: bl_app_templates_system not working
Portable builds LOCAL files need to be
treated as system instead of using as a fallback to USER templates.
2017-09-15 05:57:37 +10:00
Campbell Barton
bd1f946413 Recent action-bake used Py3.6 syntax 2017-09-14 17:04:41 +10:00
Campbell Barton
6d2cd1719b Bake Action: operate on selected objects
Previously only the active object was used.

Use coroutines to support baking frames for multiple objects at once,
without having to playback the animation multiple times.
2017-09-10 17:16:47 +10:00
Campbell Barton
a4a59d578c PyAPI: Add object argument to bake_action
Avoids having to set the scene's active object first.
2017-09-10 14:30:03 +10:00
Campbell Barton
11a9434c2d Resolve T52687: Add node label shows as 'Unknown'
Add type access method, need to extend to other types
for now just get node UI working properly again.
2017-09-09 22:56:58 +10:00
Campbell Barton
daf7aed849 PyAPI: use bl_rna_get_subclass for node API
Returns a default value instead of an error when the type isn't defined.
2017-09-08 00:03:01 +10:00
Campbell Barton
5d65aee07a Workaround node types not being exposed
We might want to have a utility function for this,
for now just keep it working.
2017-09-07 05:17:02 +10:00
Campbell Barton
b07e983b61 PyAPI: Add bpy.utils.register_classes_factory
Avoids having boiler plate register/unregister functions.
2017-09-05 00:24:29 +10:00
Campbell Barton
3789ab4166 PyAPI: fix rna_info for changes in type access 2017-09-04 16:39:13 +10:00
Campbell Barton
4003409430 Fix factory setup using user scripts path still 2017-07-27 22:22:26 +10:00
Campbell Barton
edc6bec9d6 PyAPI: Skip user scripts w/ factory-startup
Adds bpy.app.factory_startup,
used to check if user scripts should be loaded.
2017-07-25 20:52:08 +10:00
Campbell Barton
d1dc5e0a53 PyAPI: utility for creating register, unregister
This simplifies creation of register, unregister functions that
simply forward calls submodules.
2017-07-25 17:34:34 +10:00
Campbell Barton
7260a693e1 Cleanup: trailing space 2017-07-25 01:28:15 +10:00
Bastien Montagne
b5696f2799 Fix node UI not using translation context correctly.
Now that some node types may have custom context, we need to handle that
in the (convoluted :| ) UI code of nodes as well.

Reported in T43295 by Gabriel Gazzán (@gab3d), thanks.
2017-06-28 20:50:21 +02:00
Campbell Barton
00c4f49a6d Cleanup: indentation, long lines 2017-06-12 13:38:21 +10:00
Sergey Sharybin
5489b40a5a Report OpenSubdiv version Blender is compiled against 2017-06-07 12:16:48 +02:00
Bastien Montagne
8051f2412e Usual i18n/message tweaks & fixes. 2017-05-28 21:47:16 +02:00
Campbell Barton
b5b72a3f29 PyAPI: don't re-register add-ons on 'New File'
Some add-ons have bugs with re-registration,
they should be fixed, but no need to exacerbate the problem.
2017-05-15 15:33:01 +10:00
Bastien Montagne
5a232039d5 Usual i18n/UI messages fixes and cleanup. 2017-04-24 09:33:49 +02:00
Bastien Montagne
42c8d93c5f Fix 'API defined' ID properties still having 'remove' button in UI.
We could not edit them, but still could delete them, which makes no
sense, API-defined properties are similar to class members, removing
them from single instances is pure garbage. And it was broken anyway.

Found by @a.romanov while checking on T51198, thanks.
2017-04-19 09:54:47 +02:00
Bastien Montagne
1cd54ec225 Add helpers in bpy_extras.keyconfig_utils for addons to (un)register their keymaps.
Doing this in a fully 'clean' way is far from obvious, especially
unregister, you often end up leaving nasty 'orphanned' keymap items
referring to unregistered operators...
2017-04-08 11:09:11 +02:00
Campbell Barton
4c7f4e4662 PyAPI: minor path init simplification 2017-03-29 15:07:41 +11:00
Campbell Barton
4f69dca547 Fix 'bl_app_override' wrapping multiple times.
Calling `SomeClass.draw(self, context)` instead of `self.draw()`
would try to wrap the argument `self` multiple times, causing an error.
2017-03-29 14:31:14 +11:00
Campbell Barton
2a05292efa Correct for Py3.5 2017-03-27 21:34:21 +11:00
Campbell Barton
2830f687aa Cleanup: line length, assignment 2017-03-26 21:52:25 +11:00
Campbell Barton
15143a7464 Cleanup: simplify script path assignment 2017-03-26 11:31:39 +11:00
Campbell Barton
f8e02c75ba PyAPI: debug-python check for missing class register
Moving to manual class registration means its easier to accidentally
miss registering classes.

Now detect missing class registration
and warn when running with `--debug-python`
2017-03-26 11:28:10 +11:00
Campbell Barton
f68145011f WM: Application Templates
This adds the ability to switch between different application-configurations
without interfering with Blender's normal operation.

This commit doesn't include any templates,
so its mostly to allow collaboration for the Blender 101 project
and other custom configurations.

Application templates can be installed & selected from the file menu.

Other details:

- The `bl_app_template_utils` module handles template activation
  (similar to `addon_utils`).
- The `bl_app_override` module is a general module
  to assist scripts overriding parts of Blender in reversible way.

See docs:
https://docs.blender.org/manual/en/dev/advanced/app_templates.html

See patch: D2565
2017-03-25 10:04:04 +11:00
Campbell Barton
096602d3a8 bpy.path.display_name: strip spaces
Useful for Python module paths that can't start with numbers.
2017-03-24 06:55:44 +11:00
Campbell Barton
9af6f40e4d addon_utils: add disable_all function 2017-03-24 05:20:26 +11:00
Campbell Barton
1600b93fb8 UI: allow to extend camera as a menu
Needed for T46853
2017-03-23 20:45:02 +11:00
Campbell Barton
db04980678 PyAPI: Menu.path_menu: Add path filter callback
Needed if we want to filter based on filenames (not just extension).
2017-03-17 05:20:50 +11:00
Campbell Barton
4c5374d46a PyAPI: extend Menu.path_menu
- Add optional 'display_name' callback
  so callers can construct own names.
- Add optional 'prop_filepath' argument
  (for operators that don't use "filepath").
- Add doc-string.
- Use keyword only arguments.
2017-03-14 21:00:55 +11:00
raa
17b3097205 Adjust kmi header 2017-03-10 15:10:40 +03:00
Campbell Barton
112e4de885 Improve add-on UI error message
Show the paths of the duplicate addons

D791 by @gregzaal
2017-02-27 03:57:11 +11:00
Bastien Montagne
d210755f85 Usual UI messages/i18n fixes/tweaks. 2016-12-14 10:56:21 +01:00
Campbell Barton
b8710e1468 Fix UV layer bug in object_utils.object_data_add()
Adding a torus in edit-mode, with 'Generate UVs'
for example would either create another UV layer with the default name or
switch to the default UV layer name if it exists.

Now use the existing UV layer if present.
2016-11-19 06:57:55 +11:00
Bastien Montagne
8f0dc3cef6 Fix T50052: bpy.utils.unregister_module doesn't unregister classes of submodules in reload scenario.
reload case would clear TypeMap before unregistering addons, which made
all calls to unregister_module() to do absolutely nothing.
2016-11-18 15:15:46 +01:00
Bastien Montagne
216a3a3826 Fix T49743: Adding torus in edit mode local mode shows error
The 'local' layers were not correctly set when redoing 'add object'
addons using object_utils.py helper (we always want to restore layers
from view in local view, even if we set 'real' layers from operator
afterwards).
2016-10-27 13:23:29 +02:00
Bastien Montagne
35fde5ff7d System info: make it more resiliant to errors.
Using context manager for output file itself, and whole try/except block
to at least catch and print error in file.

Also some minor tweaks to previous 'list add-ons' commit.
2016-10-23 13:12:58 +02:00
Bastien Montagne
5d2620e9c2 System info: also report enabled add-ons.
Based on idea & patch by @lijenstina over IRC (iirc :/ ).
2016-10-23 13:05:47 +02:00
Bastien Montagne
6027550e83 Usual UI/i18n tweaks & fixes. 2016-10-13 16:20:51 +02:00
Sergey Sharybin
17603b9f01 Fix objects added via py being on the wrong layer when viewport is decoupled from scene 2016-10-11 15:35:14 +02:00