Commit Graph

53792 Commits

Author SHA1 Message Date
Thomas Beck
d6963630dc Implementation of custom python entries in all right click menus
Hi Guys,

as one of my clients needs the possibility to have custom menu entries in the general right click menu (all over Blender: in the node editor, properties, toolbars,..) I talked with Campbell about expanding our hard coded menu a bit. This is the outcome. As I only need those two, I support currently a button_prop and a button_pointer.

{F540397}

I tested the changes with a custom script where I added a custom entry and executed an operator on click - it seems to work exactly how it's intended to. The script: {F540435}

As I'm not too experienced in rna stuff I would really appreciate any review.
Thanks very much Campbell for his open ears & help on this issue!

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: sybren, mont29

Tags: #addons

Differential Revision: https://developer.blender.org/D2612
2017-04-28 23:44:52 +02:00
Campbell Barton
af3f7db4ec Fix T51324: Auto-Depth fails rotating out of camera 2017-04-29 03:21:03 +10:00
Sybren A. Stüvel
aa88796a6c Alembic: use object-oriented approach in ABC_read_mesh()
This is easier to extend than the if/else if/else chain that was in place,
and allows for somewhat more granular error messages.
2017-04-28 15:33:57 +02:00
Sybren A. Stüvel
2e67a20045 Alembic: Construct ISampleSelector once and pass along 2017-04-28 15:33:57 +02:00
brunoT
a85f457195 Fix: T50271: Bilateral/Directional blur's iterations is zero by default
Differential Revision: https://developer.blender.org/D2632
2017-04-27 09:00:11 -04:00
Campbell Barton
e9ccc98877 Revert "Fix T51328: Add note to cmdline help that threads must be first"
The help message already notes that argument order matters,
and this doesn't need to be the first.
2017-04-27 21:48:06 +10:00
Campbell Barton
ed14c15b7a Cleanup: remove unused matrix arg 2017-04-27 21:41:03 +10:00
Aaron Carlisle
a6b9bd023b Fix T51328: Add note to cmdline help that threads must be first 2017-04-26 22:48:18 -04:00
Sergey Sharybin
e6954a5a7c Fix race condition invalidating object data's bounding box 2017-04-26 16:00:02 +02:00
Sergey Sharybin
e61ba39e7c Ensure task scheduler exists before any threading starts in Blender 2017-04-26 16:00:02 +02:00
Sergey Sharybin
e2f8bb56d6 Avoid race condition copying Scene for off-thread OpenGL image save 2017-04-26 16:00:02 +02:00
Sergey Sharybin
146db944e5 Threading: Remove thread lock which seems useless
Render data is never guarded by image drawe lock.
2017-04-26 16:00:02 +02:00
Campbell Barton
449ad35093 Move depth select loop into its own function
Useful for splitting out draw logic in 2.8x
2017-04-27 00:01:23 +10:00
Sybren A. Stüvel
6ed15c5a41 Alembic export: support simple child hairs (Fix T51144)
Simple child hairs don't have a face index number assigned, so the
call to dm->getTessFaceData(dm, num, CD_MFACE) would cause a crash. To
work around this, UV and normal vectors are copied from the parent
hair.

I've also removed an unnecessary call to dm->getTessFaceArray(dm);

Reviewers: kevindietrich

Differential Revision: https://developer.blender.org/D2638
2017-04-26 15:31:03 +02:00
Sybren A. Stüvel
51e3a184ea Alembic: fixed indentation 2017-04-26 15:19:37 +02:00
Sybren A. Stüvel
ef80164e1c Alembic: fixed memory leaks 2017-04-26 15:19:37 +02:00
Sybren A. Stüvel
20621d46d1 Alembic: fixed refcount issue when duplicating imported objects
Duplicating an imported object didn't increment the cache reader's refcount,
whereas removing the duplicate did decrement it. This caused problems.
2017-04-26 15:19:37 +02:00
Sybren A. Stüvel
ff1f115706 Fix T51280: Alembic: Crash when removing cache modifier
The calls to id_us_plus/min were unnecessary (and caused assertion
failures) as this is already taken care of by transformcache_id_looper().
2017-04-26 15:19:37 +02:00
Campbell Barton
f351cb5479 Avoid platform dependant PATH_MAX 2017-04-26 21:06:00 +10:00
Sybren A. Stüvel
9b3e3d4def Alembic export: also export empties
Exporting an empty creates an Alembic XForm object. The empties can also
be animated.
2017-04-26 12:26:21 +02:00
Sybren A. Stüvel
afe1c25d06 Alembic export: renamed func object_is_shape → object_type_is_exportable
The function doesn't return whether the object is a shape at all, since
it also returns true for camera objects (and soon also for empties). It
returns true when objects of this type can be exported to Alembic at all.
This is now reflected in the name.
2017-04-26 12:25:45 +02:00
Sybren A. Stüvel
edc9f8b766 Alembic: shortened CacheFile.filepath to 1024 bytes again
As per discussion on 3128600a8ab2badd9ea39c80133f15f766794ec6
2017-04-26 10:42:20 +02:00
Sybren A. Stüvel
268cb5fbd3 Alembic: fixed C++98 compatibility 2017-04-26 10:42:20 +02:00
Sybren A. Stüvel
9dadd5ff93 Fix T51292: Alembic import, show notification when trying to load HDF5
HDF5 Alembic files are not officially supported by Blender. With this
commit, the HDF5 format is detected even when Blender is compiled without
HDF5 support, and the user is given an explanatory error message (rather
than the generic "Could not open Alembic archive for reading".
2017-04-25 14:30:09 +02:00
Sybren A. Stüvel
3128600a8a Fix T51262: Blender CRASH with alembic file
Also added a unit test for exporting & importing very long names.
2017-04-25 12:06:03 +02:00
Sybren A. Stüvel
e353cf8705 Revert "Alembic: Construct ISampleSelector once and pass along"
This reverts commit 099816587a0e064fb6a52c82a737ae8814cf21df. It had some
unforseen side-effects that should be investigated first.
2017-04-25 10:45:26 +02:00
Sybren A. Stüvel
573f6d1ec4 Fix T51284: Mesh not skinned 2017-04-25 10:01:34 +02:00
Campbell Barton
7398b3b71b WM: don't search for app-template when its empty
Changing from a loaded app-template back to Default (none set)
would scan paths for a file with no name. Harmless but silly.
2017-04-25 17:15:23 +10:00
Campbell Barton
69a216d343 Cleanup: remove unnecessary texface checks 2017-04-24 22:45:40 +10:00
Campbell Barton
aff30aaf2d Cleanup: style 2017-04-24 22:00:46 +10:00
Bastien Montagne
d67609697e Add C internal version of msgfmt (similar to makesrna/dna binaries).
Fixes performance issues of C++ one with Windows MSVC debug builds...

Merely a translation from msgfmt.cc code by @sergey, using BLI libs intead of C++'s stdlib.

Reviewers: sergey, campbellbarton, LazyDodo

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2605
2017-04-24 10:49:54 +02:00
Bastien Montagne
6d9a223c90 BLI_dynstr: add memarena-based version, and helper to clear without freeing. 2017-04-24 10:42:10 +02:00
Sybren A. Stüvel
349cafac52 Matrix.decompose(): changed terminology, "location" → "translation"
Matrix.decompose() should either return "location, orientation, size" or
"translation, rotation, scale". Since there are constructors for the former,
I've replaced "location" in the documentation with "translation".

The code is still the same, I just changed the documentation.
2017-04-21 15:51:35 +02:00
Sergey Sharybin
e4ab70da86 CMake: Add option to build against system-wide Glog
Similar to previous commit for Gflags.
2017-04-21 14:36:34 +02:00
Sybren A. Stüvel
9c02990ac1 Alembic import: changing cache modifier path no longer discards object paths
This allows, for example, the path of an Alembic file to be changed from
absolute to relative, without having to reconstruct all object paths.
2017-04-21 14:11:49 +02:00
Sybren A. Stüvel
9d819775b7 Alembic: properly initialising cachefile object paths list. 2017-04-21 14:11:49 +02:00
Sybren A. Stüvel
45b9ee525d Alembic: fixed memory leak 2017-04-21 14:11:49 +02:00
Sybren A. Stüvel
099816587a Alembic: Construct ISampleSelector once and pass along
No longer passing time as float and constructing ISampleSelectors all
over the place. Instead, just construct an ISampleSelector once and
pass it along.
2017-04-21 14:11:49 +02:00
Sergey Sharybin
c7a5c48cba CMake: Add option to link against system-wide Gflags library
It is disabled by default, so should not affect existing configurations.

Main benefits of this goes as:

- Linux distros can use that to avoid libraries duplication and link
  blender package against gflags package from the system.

- It it easier to test whether Blender works with updated version of
  Gflags prior to re-bundling the library.
2017-04-21 12:01:27 +02:00
Campbell Barton
55a3d48046 Docs: diagram for reflect_v3_v3v3 2017-04-21 17:27:20 +10:00
Campbell Barton
13ee5ba467 Store edit-font select-box length
A little awkward to calculate when drawing.
2017-04-21 17:12:43 +10:00
Stefan Werner
aeda1a16f3 D2607: Switch eye dropper to use linear color space internally
This switches the internal color representation of the eye dropper from display space to linear. Any time a linear color is requested and the color is picked from a linear object, the result is now precise to the bit as the color gets patched through directly. Color space conversion now only happens when a color is picked from non-linear display space objects or when the color is requested to be returned in non-linear space.

In addition, this patch changes the DifferenceMatte node to interpret a tolerance of 0.0 to accept colors that are identical bit by bit, as apposed to simply refusing all colors.
2017-04-20 22:41:26 +02:00
Stefan Werner
b628f765b0 D2608: Allow HDR picking from Compositor background
Replaced some STREQ(snode->tree_idname, ...) calls with ED_node_is_*() calls for improved readability, fixed one case where the STREQ was used the wrong way
2017-04-20 22:32:00 +02:00
Luca Rood
ca958642fa Fix Surface Deform not unbinding if target is removed 2017-04-20 17:49:45 +02:00
Sybren A. Stüvel
52295dd480 Alembic export: don't show warning for every exported frame
The warning about not having a UV map is now only shown once per hair
system.
2017-04-20 15:30:13 +02:00
Luca Rood
ee3faddfaa Fix T45350: Cache not being recomputed with "Bake All Dynamics" 2017-04-20 15:01:21 +02:00
Sybren A. Stüvel
ae79eb2105 Alembic import: select imported objects
When the Alembic import is finished, all imported objects are selected.
2017-04-20 12:01:31 +02:00
Alexander Romanov
31c644b657 Fix T51198: Crash with new Datablock ID Properties 2017-04-20 11:40:31 +03:00
Campbell Barton
6da53e46c9 Use reflect for calculating second normal 2017-04-20 18:08:05 +10:00
Campbell Barton
9bb8e46460 Docs: move note (was mixed up) 2017-04-20 17:11:12 +10:00