Commit Graph

8418 Commits

Author SHA1 Message Date
Campbell Barton
91556cb973 Add "Snap Selection to Active" option in menu
D1963 by @wisaac, re-worked to de-duplicate logic
2016-07-15 17:11:58 +10:00
Campbell Barton
97f894f3fa UI: Remove spaces around '/'
D2093 by @Blendify
2016-07-15 15:50:42 +10:00
Campbell Barton
2aa0569861 Boolean Modifier: Add back BMesh option
There are still issues with overlapping geometry,
however some of the issues reported are are causing problems,
or fail entirely with Carve too.
2016-07-13 19:55:31 +10:00
Joshua Leung
1b45c52734 Fix: Apply Scale to Delta Scale was doubling the effect 2016-07-09 12:00:28 +12:00
Campbell Barton
8bb69b6157 BMesh: add decimate edit-mode tool
Support applying decimate to the mesh selection.
2016-07-08 23:38:52 +10:00
Campbell Barton
c8be112523 RNA: rename sorting -> sort
Shorter and consistent with other RNA.
2016-07-08 00:56:01 +10:00
Campbell Barton
bef034e154 Cleanup: use static sets, remove redundant copy 2016-07-08 00:28:41 +10:00
Joshua Leung
91533b6f34 Revert "ChildOf Constraint: Hide the Loc/Rot/Scale toggles"
This reverts commit 4fd78bb06faa31f265af6a5f247cf4255b5ac479.

After further testing, it turns out that these options are less-broken than
I remember them being (and have been hearing about). Specifically, as long
as you disable all 3-axes of a transform component (i.e. all location, all
rotation, all scale) you're not likely to have problems, whereas if you only
disabled one axis (i.e. y-rotation), you may have problems in some cases.

So, restoring these to the UI.
2016-07-08 01:59:43 +12:00
Joshua Leung
2ba2860e11 Transforms to Delta Transforms
* Added new operators to take the current transform value (loc/rot/scale or all 3)
  and convert/apply that transform to a corresponding delta transform value. By default,
  the transform value will be zeroed out again afterwards, so you don't end up with a
  double transform.

* These operators can be found in the "Apply" menu (Ctrl-A)

* The "Animated Transforms to Deltas" (which does a similar job, except it adjusts all
  existing animation data instead of the current transform) has also been moved to the
  Apply menu (it was in the Transform menu instead)
2016-07-08 01:49:24 +12:00
Joshua Leung
92c9bdbbb9 Animation Editors: Object datablocks are now sorted alphabetically by default
A long requested feature has been to have objects appear in alphabetical order
in the animation editors, so that it is easier to find where they occur. This
commit implements support for this.

The main sticking point has been the performance impact of having this sorting
happening all the time (as the actual list of "bases" cannot be modified, as the
old depsgraph still needs random-looking unsorted order of objects for scheduling
updates). However, it recently occurred to me that perhaps by restricting it to
the one case where the ordering actually matters (i.e. when we're getting the channel
list for drawing all channels, vs operating on them), and adding a toggle to turn the
sorting off in heavy scenes when it might bog down things, that it will probably
be acceptable enough in general.  Furthermore, if things get really bad, we can investigate
putting in place some sort of caching scheme for this too - though hopefully the
new depsgraph will make that unnecessary (i.e. it doesn't sort the bases directly anymore).
2016-07-08 01:49:23 +12:00
Joshua Leung
fab4b907f6 NLA: Indicate position of action-local markers on strips
To make it easier to synchronise timing across multiple strips, if you add
markers locally to an action, these will show up in the NLA strip in the
NLA Editor. These markings can then be used to line up the start/end of
another strip, or even to make sure that the markers from two different
strips end up lining up.

By default, this is turned on, but it can be disabled (via the View menu)
if it adds too much visual noise.
2016-07-08 01:47:32 +12:00
7fcab3324b Render border: make it work together with with cache result / save buffers / full sample.
Differential Revision: https://developer.blender.org/D2080
2016-07-05 21:59:02 +02:00
Alexander Romanov
fe44eacf78 Environment lighting for the GLSL mode
Environment lighting (aka ambient) is a key component of any renderer.
It's implemented like the Environment lighting of BI render for Approximate Gather mode. It support "Sky Color" and "White" Environment lighting modes.

It would be great if the user could see actual lighting conditions right in the Blender viewport instead of waiting for the renderer to complete the final image, exporting for external renderer or for a game engine.

Before:
{F113921}

After:
{F113922}

Example file: {F319013}

Original author: valentin_b4w

Alexander (Blend4Web Team)

Reviewers: valentin_b4w, campbellbarton, merwin, brecht

Reviewed By: brecht

Subscribers: panzergame, youle, duarteframos, AlexKowel, yurikovelenov, dingto, Evgeny_Rodygin

Projects: #rendering, #opengl_gfx

Differential Revision: https://developer.blender.org/D810
2016-07-04 11:01:32 +03:00
Campbell Barton
ff0079b40a UI: move dyntopo button to header
This looks a bit odd, but being able to see if dyntopo is enabled
when the panel is collapsed is handy.
2016-07-01 21:44:31 +10:00
Bastien Montagne
a21549f822 Usual i18n/UI messages cleanup & fixes. 2016-06-28 21:34:18 +02:00
Campbell Barton
3569ea03d8 Cleanup: Python imports 2016-06-28 12:13:16 +10:00
Campbell Barton
6021cc4007 Rename script stub
Was clear from name this is to run external scripts.
2016-06-27 16:04:59 +10:00
Joshua Leung
4fd78bb06f ChildOf Constraint: Hide the Loc/Rot/Scale toggles
The RNA properties are still there (in case you really need them), except now
they will not be shown in the UI anymore, as this constraint really didn't
work well/at all when any of those was disabled. Most people shouldn't really
need to worry about this change.

If anyone wants a matrix-math challenge, they're welcome to try getting those
working for real, so that we can show these toggles again.
2016-06-24 03:18:37 +12:00
Joshua Leung
7e53f9fb1a Dopesheet: Lasso and Circle Select tools work for selecting keyframes
This only works in the Action and Dopesheet modes (which operate on FCurve keyframes).
Support for Grease Pencil and Mask Keyframes though is still pending.
2016-06-24 03:18:35 +12:00
Joshua Leung
58acc184c4 Code Cleanup - Circle/Lasso select in the Graph Editor 2016-06-24 03:18:34 +12:00
Joshua Leung
b6a898b3db GPencil UI: Streamline toolbar options a bit
As suggested by mendiobox:

* Don't show "enable editing" in the 3D view. You can already do this by switching
  into stroke editing mode here, so no need for the duplication. (In other editors
  though, this can't be done yet, so we don't do it)

* Make the "Convert" button into a dropdown so that you don't need to deal with a
  a separate popup menu

* In the 3D view, don't show the selection + transform operators that can be easily
  found in the menus too (as well as having commonly used shortcuts)
2016-06-24 03:18:33 +12:00
Joshua Leung
ec7603d6f1 GPencil: Added a new version of the "delete active frame" operator which deletes on all editable layers
This new operator will delete any GP frame it finds on the current frame, regardless
of whether it's on the active layer or not. It will only remove the frames if the
layer is editable, but otherwise, it will just go for it.

The existing operator is great for use in the panel (where it only applies to the active
frame), but it was not so good for all the other places where tools can be invoked
(e.g. D-X, or Delete) as you're typically thinking about the whole scene more holisticaly
than just caring about a particular layer.
2016-06-24 03:18:33 +12:00
Campbell Barton
68040359d1 Remove module reloading for preview operators
This can be kept on file level but best keep out of operator functions.
2016-06-22 08:47:40 +10:00
Campbell Barton
6fbe6eb033 Fix T48703: Name inconsistency w/ area maximize/fullscreen
Name operator based on default behavior.
2016-06-22 07:47:30 +10:00
Campbell Barton
1abf7dd835 Fix T48697: Brush curve-stroke snaps strangely
Support Snapping screen-space 2d curves, (was applying world-space coords in screen-space).
Also show snap settings in header.
2016-06-21 16:19:45 +10:00
Dalai Felinto
cb5a77253a Text Object: Vertical Alignment
A new option for Font/Text objects vertical alignment:

* Top Base-Line (current mode)
* Top
* Center
* Bottom

The Top is the equivalent as the Top-Baseline with an empty line at the begin of the
text. It's nice to have this option too though, since if we are driving
the alignment via Python we don't want to add extra lines to the text
only to accomodate to the desired vertical alignment.

The Center and Bottom are as intuitive as their name suggest.

When working with text boxes, the vertical alignment only work for
paragraphs that are not vertically full.

Many thanks to Campbell Barton (ideasman42 / @campbellbarton) for the
code review, code comments, and overall suggestions and changes :)

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D2061
2016-06-20 23:21:24 -03:00
Campbell Barton
42e2398ae3 Vertex paint color operations
D2050 by @metaraptor with edits

Adds levels, brightness/contrast, hsv & invert operations.
2016-06-17 01:56:59 +10:00
Dalai Felinto
e0db647d35 Fix region_2d_to_origin_3d not working with ortho view
In some cases when:
* the viewport was in the camera mode
* the camera was ortho
* the view was not fitting (as oppose to use HOME)

region_2d_to_origin_3d would misbehave (and consequently region_2d_to_location_3d).

Sample addon to test it:
```
import bpy

from bpy_extras.view3d_utils import (
    region_2d_to_location_3d,
    )

from mathutils import (
    Vector,
    )

class MoveXYOperator(bpy.types.Operator):
    """Translate the view using mouse events"""
    bl_idname = "view3d.move_xy"
    bl_label = "Move XY"

    @classmethod
    def poll(cls, context):
        return context.object

    def modal(self, context, event):
        if event.type == 'MOUSEMOVE':
            self.move(context, event)

        elif event.type in {'LEFTMOUSE', 'RIGHTMOUSE', 'ESC'}:
            return {'FINISHED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.space_data.type == 'VIEW_3D':
            self.ob = context.object
            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "Active space must be a View3d")
            return {'CANCELLED'}

    def move(self, context, event):
        xy = region_2d_to_location_3d(
                context.region,
                context.space_data.region_3d,
                (event.mouse_region_x, event.mouse_region_y),
                Vector(),
                ).xy

        self.ob.location.xy = xy

def register():
    bpy.utils.register_class(MoveXYOperator)

def unregister():
    bpy.utils.unregister_class(MoveXYOperator)

if __name__ == "__main__":
    register()
```
2016-06-14 18:03:07 -03:00
Campbell Barton
08baf3ea79 Keymap: include 'Dopesheet Generic' 2016-06-13 23:03:00 +10:00
Campbell Barton
421ec97276 Docs: Support out-of-source reference-API builds
This was originally supported, however relative links to examples & templates made it fail.
Now files in the source tree are copied to the build-dir, with ".." replaced with "__"
to avoid having to mirror Blender's source-layout in the Sphinx build-dir.

Also skip uploading the built docs when an SSH user-name isn't passed to sphinx_doc_gen.sh
instead of aborting (so people w/o SSH access to our servers can use the shell-script).
2016-06-12 11:31:28 +10:00
Bastien Montagne
07925b6316 UI Font: Fix bad kerning of Thai font.
Thai font is a complex script that assumes full featured unicode layout engine,
while Blender only knows about basic kerning (offset of a char based on the previous one).

So this commit edits Thai part of our i18n font to fix the very bad spacing of thai chars
we had in Blender so far.

Work done by Hồ Châu, many thanks!
2016-06-11 10:47:53 +02:00
Alexander Romanov
0da13ad1eb World space switch for BI nodes.
At the moment light shading in Blender is produced in viewspace. Apparently, that's why
shader nodes work with normals in camera space. But it is not convenient for artists.
The more convenient approach is implemented in Cycles where normals are represented in world space.
Blend4Web Team designed the engine keeping in mind shader parameters readability,
so normals are interpreted in world space as well. And now our users have to use some tweaks, like
empty node group with the name "Replace", which is replacing one input by another on the engine side
(replacing working configuration in Blender Viewport by the configuration that has the same behavior in the engine).

This patch adds the ability to switch to world space for normals and lamp vector in BI and Viewport.
This patch is very important to us and we crave to see this patch in Blender 2.7 because
it will significantly simplify Blend4Web material creation workflow.

{F315547}

{F315548}

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D2046
2016-06-07 10:42:29 +03:00
Bastien Montagne
ac7feaed3d EditNormal modifier: add some 'maximum angle' limit.
Allows to avoid generating flipped faces when using extreme normal modifications.

Related to T48576.
2016-06-06 21:42:47 +02:00
Campbell Barton
7f57c99be8 Fix T48579: RNA shadows new custom properties 2016-06-06 12:23:01 +10:00
Campbell Barton
a055523899 Theme: 2.4x, correct graph region color 2016-06-03 01:59:53 +10:00
Bastien Montagne
24712b1c0b Usual UI/i18n message cleanup (get rid of last remaining 'addon' too). 2016-06-01 20:38:30 +02:00
Campbell Barton
5186143d2c Theme: 2.4x disabled menu text wasn't greyed out 2016-05-31 14:55:55 +10:00
Campbell Barton
1e7e183787 Fix T48527: Maya keymap fails w/ knife snap 2016-05-30 22:45:46 +10:00
Campbell Barton
f83f7bb988 Add warning to Mesh.from_pydata 2016-05-25 21:35:45 +10:00
Joshua Leung
92a3ac4dd2 GPencil: Add hotkeys for the "Delete Active Frame" operator
Usage:
* D+X     - Works anytime, anywhere
* Shift-X - Works in EditMode only
* Via Delete Menu - EditMode only

Often doing video tutorials or perhaps during dailies/shot review you want to
quickly get rid of a quick scribble you made for making a point, without having
to undo (i.e. maybe you edited some objects in between) and/or without having
to use the eraser (i.e. it'd take too long to cover the entire area).
2016-05-21 18:34:06 +12:00
Lukas Stockner
75a31c3670 Add Peak Memory as render stamp option
This commit adds Peak Memory to the stamp options, the value is the same one that is already shown in the image viewer.

Requested by @nutel.

Reviewers: campbellbarton

Subscribers: campbellbarton, nutel

Differential Revision: https://developer.blender.org/D1989
2016-05-19 22:57:38 +02:00
Sergey Sharybin
cbe7f9dd03 Cycles: Pole merging for spherical stereo
The idea of pole merge is to fade interocular distance after a certain
altitude to zero when altitude goes closer to a pole. This should prevent
annoyances looking up in the sky or down to the bottom.

Works for both panorama and perspective cameras when Spherical Stereo
is enabled.

Reviewers: dfelinto, brecht

Reviewed By: brecht

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1998
2016-05-18 10:56:57 +02:00
Joshua Leung
1139e51be6 Fix: "Whole Character" Keying Set should not include Location on bones with "connected" joint 2016-05-18 16:29:18 +12:00
Thomas Beck
df8097ea2a Bendy Bones: Small ui tweak
Change the order of the bending controls ("Curve XY Offsets") so the user can activate both InX and OutX by holding down the left mouse button. This way, it's easy to bend symmetrically on X or Y.
2016-05-17 18:08:04 +02:00
Joshua Leung
49aeee5a3d Bendy Bones: Advanced B-Bones for Easier + Simple Rigging
This commit/patch/branch brings a bunch of powerful new options for B-Bones and
for working with B-Bones, making it easier for animators to create their own
rigs, using fewer bones (which also means hopefully lighter + faster rigs ;)
This functionality was first demoed by Daniel at BConf15

Some highlights from this patch include:
* You can now directly control the shape of B-Bones using a series of properties
  instead of being restricted to trying to indirectly control them through the
  neighbouring bones.  See the "Bendy Bones" panel...

* B-Bones can be shaped in EditMode to define a "curved rest pose" for the bone.
  This is useful for things like eyebrows and mouths/eyelids

* You can now make B-Bones use custom bones as their reference bone handles,
  instead of only using the parent/child bones. To do so, enable the
  "Use Custom Reference Handles" toggle. If none are specified, then the BBone will
  only use the Bendy Bone properties.

* Constraints Head/Tail option can now slide along the B-Bone shape, instead of
  just linearly interpolating between the endpoints of the bone.

For more details, see:
* http://aligorith.blogspot.co.nz/2016/05/bendy-bones-dev-update.html
* http://aligorith.blogspot.co.nz/2016/05/an-in-depth-look-at-how-b-bones-work.html



-- Credits --
Original Idea: Daniel M Lara (pepeland)
Original Patch/Research: Jose Molina
Additional Development + Polish: Joshua Leung (aligorith)
Testing/Feedback: Daniel M Lara (pepeland), Juan Pablo Bouza (jpbouza)
2016-05-18 03:19:06 +12:00
Campbell Barton
24e887cd93 Fix script_paths(check_all=True) missing script paths
BLENDER_SYSTEM_SCRIPTS wasn't included in bpy.utils.script_paths()
2016-05-14 03:27:35 +10:00
Joshua Leung
dc4c3ce592 GPencil: Added operators to select first and last points of strokes
These are useful for removing overshoots at the end of closed strokes (for fills)
2016-05-09 17:23:36 +12:00
Aaron Carlisle
5fe1bea2da Info Header / URLs: Fix community link + https'ification. 2016-05-08 23:38:41 +02:00
Joshua Leung
491ad6664e Tweak to GPencil layers UI layout
I'm still not happy with this layout as it is now, but it seems a bit less unbalanced
than what I'd been trying before. So, let's leave this as-is for now.
2016-05-09 02:04:28 +12:00
Joshua Leung
81c302bbff Action Editor: Initial support for a Properties Region
This commit adds some of the initial support for a properties region in the
Action Editor. There are currently no panels to display, as there is still
a lot of work required to port over the required internal architecture to
support the panels seen in the Graph Editor.
2016-05-09 00:53:52 +12:00