This reverts commit 2bd3acf7cd27c0c3ee77b10d56b91c3b03226d39.
Commit is valid in theory - but in practice, it means nearly all edited hair systems
would need to be re-created from scratch... Not nice, so better revert and note in code
that particle distribution is ugly and does not respect 'use modifier stack' option in most cases.
As noted by Antonio and Daniel, performing smoothing on the pressure values
for new strokes doesn't work that great. From an artist POV, it is apparently
"very strange that line thickness shrink suddenly after drawing it".
* This includes the "manually create" modes, which correspond to the previous behaviour
for setting up drivers. This is necessary when the current screen layout is not
well suited to having multiple property editors open (e.g. small screen or heavily
subdivided screen).
* Only the modes relevant for the current property type (i.e. array vs single)
will be shown
* The "Add Driver" entries in the RMB context menu have now been replaced by a
submenu which will list all the available mapping types.
* NOTE: The code for the ANIM_OT_button_driver_add() operator is perhaps a bit hairy.
However, it currently allows us to have the desired behaviour. It can always get
cleaned up later though.
Caused by rBc24be7ec6e5.
Before rBc24be7ec6e5, wm_handlers_do always called handlers a second time with event value KM_PRESS in case of a double click. After it, this was only the case for non-LEFTMOUSE events.
Since ui_popup_handler (almost) always returned WM_UI_HANDLER_BREAK, the second handler iteration with KM_PRESS wouldn't run. This fix just makes sure we return WM_UI_HANDLER_CONTINUE for double click events instead (causing second iteration to run).
This never really worked that well, and often ended up being far too strong
to be of practical use. The new options do similar things, but with greater
control, so removing this old method now.
On second thought, these might be better names for these... I'm still not 100%
happy with these, but they will do for now.
(Best results currently seem to be with smooth 0.7, and subdivision steps 1 or 2)
Assuming that this subdivision + smoothing mostly only happens at the end of a stroke
anyway, enforcing this max-points limit in some cases was resulting in strokes that
weren't quite getting subdivided properly as the others.
Improve the quality of current grease pencil strokes adding a new dynamic smooth and subdivision. The level of smooth and subdivide can be adjusted using UI parameters. These options are disabled by default in order to keep the grease pencil stroke compatible with any existing add-on.
Both parameters are defined at layer level.
Reviewers: aligorith
Differential Revision: https://developer.blender.org/D1866
Unexpectedly found out what was going wrong here. If a file was saved with a filebrowser open, we searched for the channel region in the wrong list (see 'ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;').
Minor annoyance is that I had to move the loookup to the 2.77.1 version patch now.
When linking a rotation property to a non-rotation property (going in either
direction - i.e. rot -> normal, normal -> rot), the driver expression will
now be set so that the new drivers behave as expected (i.e. you get the values
you see, instead of "weird" values that seem several orders of magnitude off).
This may not be that great for everyone (i.e. the rare users out there who
actually like to look at their rotations in radians), but they usually know
what they're doing anyway, so this will be easy to correct.
Although it isn't currently exposed, this allows for the old behaviour,
where an "empty" driver was added (without any target assigned yet).
For this reason, it's also referred to as the "Manual" mode.
There are also some attempts at improving the tooltips + names for the
other modes (again, not shown anywhere yet)
Looks like some distro still provide llvm-3.4-devel, while no more clang-3.4.
Since clang depends on llvm of same version, check clang only should ensure
us we also have matvhing llvm... *sigh*
Follow same logic in `psys_render_restore` as in `psys_render_set` - if hair and
display percentage is not 100%, we have to recompute particles...
With regular 'emitter' particles just hiding some is fine (though using random here
will not give a precise proportion...).
readfile.c would increment object usercount in three places, where it should not.
Remember kids: Objects are **only** refcounted by Scene's bases, and Object->proxy!
This commit brings some long requested improvements to the workflow for setting up
drivers, which should make it easier and faster to set up new drivers in a more
interactive fashion.
The new workflow is as follows:
1) Hover over the property (e.g. "Lamp Energy" or "Y Location") or properties ("Rotation")
you wish to add drivers to. We'll refer to this as the "destination"
2) Ctrl-D to active the new "Add Drivers" eyedropper
3) Click on the property you want to use as the source/target. The property under the
mouse will be used to drive the property you invoked Ctrl-D on.
For example, to drive the X, Y, and Z location of the Cube using the Y Location of the Lamp,
hover over any of the X/Y/Z location buttons, hit Ctrl-D, then click on the Y-Location
button of the Lamp object. Drivers will be added to the X, Y, and Z Location properties
of the Cube; each driver will have a single variable, which uses the Y-Location Transform
Channel of the Lamp.
Tips:
- Transform properties will automatically create "Transform Channel" driver variables.
Everything else will use "Single Property" ones
- Due to the way that Blender's UI Context works, you'll need two Properties Panel instances
open (and to have pinned one of the two to show the properties for the unselected
object). It's slightly clunky, but necessary for implementing a workflow like this,
as the UI cannot be manipulated while using eyedroppers to pick data.
- The eyedropper operator implemented here actually has three modes of operation.
1) The "1-N" (one to many) mode is the default used for Ctrl-D, and "Add Driver to All"
in the RMB Menu. This is the behaviour described above.
2) There's also a "1-1" (one to one) mode that is used for the "Add Single Driver" in the
RMB Menu.
3) Finally, there's the "N-N" mode (many to many), which isn't currently exposed.
The point of this is to allow mapping XYZ to XYZ elementwise (i.e. direct copying)
which is useful for things like locations, rotations, scaling, and colours.
Implementation Notes:
- The bulk of the driver adding logic is in editors/animation/drivers.c, where most of
the Driver UI operators and tools are defined
- The property eyedropper code is in interface_eyedropper.c along with all the other
eyedroppers (even though they don't share much actual code in common). However, this
turns out to be necessary, as we can't get access to many of the low-level buttons API's
otherwise.
Todo:
- It may be necessary to restore a way to access the old behaviour (i.e. "manual setup")
in case it is not practical to immediately pick a property.
- Other things to investigate here include extra hotkeys (e.g. Ctrl-Shift-D for Add Single?),
and to expose the N-N mode.
- Other things we could try include interactively applying scaling factors, picking
multiple targets (e.g. for location difference and rotation difference drivers),
and/or other ways of using these property picking methods.
Just using DKEY for this was resulting in too many drivers being accidentally created
by users drawing using Grease Pencil. This change also works better with the following
workflow changes to the driver setup process.