Commit Graph

63803 Commits

Author SHA1 Message Date
Campbell Barton
de81607efc Fix error in ghash/gset_ensure_p_ex
The key is needed in the case the ghash resizes.
Caused regression T47984.
2016-03-30 03:04:47 +11:00
Bastien Montagne
201d393862 Fix T47902: Particle grid not using modifier stack, Take II.
Now only fix correct handling of use_modifier_stack for grid distribution,
fixing it globally breaks all existing edited hair systems. :/
2016-03-29 17:45:56 +02:00
Bastien Montagne
a959771626 Revert "Fix T47902: Particle grid not using modifier stack."
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.
2016-03-29 17:33:08 +02:00
Joshua Leung
24d931ea58 GPencil New Stroke Smoothing: Don't perform smoothing on pressure values
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".
2016-03-30 03:21:59 +13:00
Joshua Leung
3bdd7ba34f Driver Mapping Types: Added temporary icons to break up the two types of mapping behaviours (modal vs manual) 2016-03-30 03:21:58 +13:00
Joshua Leung
d29b32ae36 RMB Menu: Add icons for delineating each cluster of options in this menu
From T33052 by Harley Acheson (harley)
2016-03-30 03:21:58 +13:00
Joshua Leung
deffd4352b Drivers Setup: Expose all mapping types for creating drivers
* 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.
2016-03-30 03:21:57 +13:00
Sergey Sharybin
3237ae2855 Add license text for OCIO configuration 2016-03-29 12:54:29 +02:00
Sergey Sharybin
003f908f0d Fix T47987: Blender Cycles standalone does not properly read UV coordinates from XML 2016-03-29 10:02:17 +02:00
Campbell Barton
2fae1719f8 Fix T47986: OBJ Import fails w/ imagepath encoding 2016-03-29 18:30:08 +11:00
Bastien Montagne
b1f918bcc5 Fix T47958: Crash in Walk or Fly Navigation in Camera mode when invoking from non-3DView region 2016-03-28 18:19:43 +02:00
Julian Eisel
37b7b3a935 T47532: Pop-ups drop fast mouse clicks
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).
2016-03-28 16:45:12 +02:00
Campbell Barton
28ca3ebc5f Fix T47969: Select Random always uses same seed
Increment the seed on each use,
otherwise calling again selects the same order, unless you manually adjust the seed.
2016-03-29 01:24:57 +11:00
Bastien Montagne
d336bb0765 Fix T47972: Blender crash showing particle system.
Do same as with faces - if no orcodata is available, fill orco with current location...
2016-03-28 15:52:59 +02:00
Campbell Barton
240adb90a5 Fix T47973: Render stamp ignores font alpha 2016-03-29 00:26:55 +11:00
Campbell Barton
6a099b0c45 BLF: alpha support for drawing to buffer 2016-03-29 00:26:55 +11:00
Sergey Sharybin
e2e72a20ec Fix T47931: Missed world shader update when having object dependency 2016-03-28 10:45:29 +02:00
Sergey Sharybin
8a9dd6f6fb Fix T47898: Error adding mask node with "Add Mask Node" operator
This operator is intended to be used by drag-n-drop, no user invocation
is expected to happen here. Use Add->Search to quickly add nodes instead.
2016-03-28 10:09:11 +02:00
Sergey Sharybin
b7dfef325d Cleanup: Unused variable 2016-03-28 09:36:41 +02:00
Joshua Leung
ca935abc18 Graph Editor UI: Experimental Tweak - Use tabs for properties region, to make it easier to navigate 2016-03-28 14:46:29 +13:00
Joshua Leung
96f8bfec2d GPencil: Note that clicking outside the active area also exits draw mode 2016-03-28 14:46:28 +13:00
Bastien Montagne
211b539644 Fix T47959: make tip for 'individual origins' pivot point in UV editor more accurate.
Based on D1877 from Philipp Oeser (lichtwerk), thanks.
2016-03-27 17:18:17 +02:00
Joshua Leung
c65950dbb4 GPencil: Remove the old UserPrefs-based On/Off Stroke Smoothing method
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.
2016-03-28 03:39:26 +13:00
Joshua Leung
2bb956f6c9 GPencil: Smooth and Subdivision variable/setting naming
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)
2016-03-28 03:21:31 +13:00
Joshua Leung
fd8f51da08 GPencil: Removed the restriction of not subdividing strokes further if it exceeds GP_STROKE_BUFFER_MAX
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.
2016-03-28 03:21:30 +13:00
Joshua Leung
e78a929d68 GPencil: Code Cleanup - Simplify and clarify the code for subdividing a stroke 2016-03-28 03:21:29 +13:00
Joshua Leung
a7538b19c6 GPencil: Restore ability for Smooth brush to affect pressure values of strokes 2016-03-28 03:21:29 +13:00
Joshua Leung
00cfbeef11 Code Cleanup - Style tweaks 2016-03-28 03:21:28 +13:00
Antonio Vazquez
bfbbc8ec40 Improve grease pencil stroke quality
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
2016-03-28 03:21:28 +13:00
Joshua Leung
71107208dd More tooltip tweaks
The "UI_OT_eyedropper_id" operator only actually works in the 3D view,
so change the tooltip to match that
2016-03-28 03:21:27 +13:00
Julian Eisel
9adf4cba7d Fix T45075: "Error, region type 2 missing in - name:"File", id:5"
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.
2016-03-27 13:45:10 +02:00
Sergey Sharybin
7bce3dd3ad Fix T47697: Smoke simulation doesn't work in viewport
Seems to be a division by zero error.

Should be safe for an upcoming 'a' release.
2016-03-27 13:21:33 +02:00
Julian Eisel
9c2704c169 Fix changing view in default video editing layout broken
Own mistake in 802bb422671
Apparently we only store one preview region for all views, didn't know that (makes sense though).
2016-03-27 13:20:30 +02:00
Bastien Montagne
ce71e2e789 Fix T47962: It's possible to set a Sound strip as a modifier Mask. 2016-03-27 13:02:43 +02:00
Sergey Sharybin
fb9315ce2a Cleanup: Silence some compiler warnings 2016-03-27 12:36:49 +02:00
Joshua Leung
e12650bdd1 Driver Eyedropper: Auto detection/correction magic for rotation properties
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.
2016-03-27 18:05:35 +13:00
Joshua Leung
4b279815d5 Drivers: Add a "none" mode for use when adding drivers
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)
2016-03-27 18:05:35 +13:00
Joshua Leung
6caad32c12 Code Cleanup - Split out the property-button-finding code so that it can be used for other eyedroppers 2016-03-27 18:05:34 +13:00
52f3f6ffa4 Fix crash opening some .blend files after recent fix for hidden preview regions. 2016-03-27 01:55:51 +01:00
e14324daa7 Fix T47758: rigidbody bug with constraint breaking and disable collisions.
This is a regression in Bullet, reverted the problematic change for now with
a custom patch.
2016-03-27 01:32:28 +01:00
273740006e Fix T47668: Cycles OpenCL glass not rendering correctly on AMD.
Work around what appears to be a compiler bug.
2016-03-26 23:45:18 +01:00
Bastien Montagne
9317f9c055 Fix T47939, take II: Check clang package version, not llvm-devel one.
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*
2016-03-26 21:07:04 +01:00
Bastien Montagne
8fcf774167 Fix T47935: Hair particles; The display percentage parameter breaks after a render is done.
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...).
2016-03-26 17:41:56 +01:00
Bastien Montagne
112f431c3b Fix T47951: UserId problem on reload.
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!
2016-03-26 16:22:17 +01:00
Bastien Montagne
6483c3c280 Fix own regression in rBc08924bf94f2dff - foreach ID looper was broken due to missing initialization.
Quite unbelievable this could slip in... tons of shame on me :/
2016-03-26 16:11:12 +01:00
Joshua Leung
6a0c187653 Revert "Fix T47896: Scripted Expression string length limit is too short for some autogenerated expressions"
This reverts commit 322f86d6b330ebeb1da5c1f527714745dc901460.
2016-03-26 23:00:20 +13:00
Joshua Leung
5759e335c3 Driver Variable Name Validation: Added missing check for zero-length (i.e. "blank") names 2016-03-26 18:02:02 +13:00
Joshua Leung
0512e20ae9 Driver Setup Workflow Improvement: Property Eyedropper
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.
2016-03-26 18:02:02 +13:00
Joshua Leung
ee9898e0fa Drivers Workflow: Change hotkey for "Add Drivers" to Ctrl-D (it was previously just DKEY)
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.
2016-03-26 18:02:01 +13:00
Bastien Montagne
eac770a33a Fix T47939: Install Deps OSL 1.7.1 and clang-3.5
Until we officially support llvm3.5 or more, only allow for 3.4 llvm packages,
and build own stuff otherwise...
2016-03-26 00:31:41 +01:00