Commit Graph

75472 Commits

Author SHA1 Message Date
Campbell Barton
8dcdde52b1 Cleanup: warnings (double promote, string format) 2016-04-22 12:22:58 +10:00
Campbell Barton
c0943babdf Cleanup: math lib use w/ walk mode 2016-04-21 12:43:35 +10:00
Lukas Tönne
3632c4997f Merge branch 'master' into temp_remove_particles 2016-04-20 16:25:16 +02:00
Sergey Sharybin
48c9208d56 Fix T46903: Missing Render Border Menu items
While other borders are more like a toggle, it is an intrinsic behavior
of those operators. Render Border is intrinsicly split into two operators
and trying to expose it as a toggle will end up with rather confusing
situation when shortcut listed in the menu changes depending on the
context.
2016-04-20 15:02:03 +02:00
Campbell Barton
81a477f4dc Fix T47891: Edges throw shadow in edit mode 2016-04-20 12:59:00 +10:00
Campbell Barton
dbf1257b14 Minor optimization for scanfill
Replace angle with with cosine calculation.
2016-04-20 09:53:40 +10:00
Campbell Barton
38442ae2dc Fix image-space mask-transform crash w/o an image 2016-04-20 09:37:51 +10:00
Campbell Barton
bde7439816 Minor optimization for limited-dissolve
Use dot product instead of angle.
2016-04-20 07:50:48 +10:00
Bastien Montagne
ccbfbeba74 Fix crash in rB37493fb9f - there is no guaranty CTX_wm_foo() will return a valid pointer! 2016-04-19 22:53:18 +02:00
Bastien Montagne
11c9ff1edd Cleanup unused header includes from previous commit. 2016-04-19 22:53:18 +02:00
Bastien Montagne
52e09ed4f9 Cleanup: move operators & related code of files & append/link to relevant dedicated source files.
This commit adds a new `wm_files_link.c` which contains everything related to append/link code,
moved from `wm_operators.c` (rather small currently, but will expand quite a bit with future reload & asset works).

It also moves all load/save .bland files (and related userpref/startup stuff) from `wm_operators.c`
to `wm_files.c` (some helper funcs were already there).

This also makes `wm_operators.c` significantly lighter.
2016-04-19 22:53:18 +02:00
Julian Eisel
dd423a6818 Fix T48198: Missing plus sign to open the tool shelf in text editor
Did not happen when using screen layout saved in default startup.blend
2016-04-19 21:01:55 +02:00
Julian Eisel
37493fb9fe Toggle to standard cursor when opening menus/popups
Cursor is now set to standard arrow-cursor when opening menu, and reset to previous one when closing it. Previously it just stayed as it was before, e.g. the edit mode cross-cursor stayed active even if a menu was opened.

Fixes T48192.
2016-04-19 16:17:34 +02:00
Campbell Barton
376c8dd95e Fix T48193: Incorrect keyframe_insert docs 2016-04-19 18:25:56 +10:00
Campbell Barton
7cc9f6b6f8 Minor edits to last commit
Avoid redundant tests
2016-04-19 13:07:01 +10:00
Campbell Barton
12b0c03e49 Fix T47998: Limited dissolve fails /w holes
Holes with flat surfaces could have their edges dissolved causing degenerate faces.
Now check that collapsing a vertices isn't creating self-overlapping faces.
2016-04-19 12:18:19 +10:00
Campbell Barton
74b0591d42 Cleanup: pass event args as const 2016-04-19 12:18:19 +10:00
Joshua Leung
c42a796e9f Fix: Make it easier to tell if Color Swatches are greyed out or not
This commit makes disabled/inactive color swatches look more obviously disabled
by halving their alpha values. It is necessary because the results of
ui_widget_color_disabled() (which is usually used when disabling widgets)
get overwritten by the color filling code here.

To avoid confusion, the checkerboard background (when the color genuinely has
alpha) will still only show in those cases. That is, when disabled, color swatches
won't show the checkerboard unless the color actually has an alpha component if it
wasn't disabled.
2016-04-19 00:42:59 +12:00
Joshua Leung
2aafadd4ac Fix T48186: Grease Pencil Smooth brush doesn't work properly - "erase" the stroke thickness
As soon as you started trying to smooth a stroke, the thickness of the stroke
would quickly drop right down to near zero, if "affect pressure" was enabled.

This step got accidentally missed when restoring the affect pressure functionality to
the stroke smoothing brush code, following cleanups from the stroke quality patch.
2016-04-19 00:18:46 +12:00
Joshua Leung
facc127e72 "View Frame" now works in the sequencer too 2016-04-17 12:27:12 +12:00
Brecht Van Lommel
1dfbcd88d5 Fix a few compiler warnings with OS X / clang. 2016-04-17 01:05:50 +02:00
Brecht Van Lommel
667a5ef48e Fix T48171: activating spacebar search menu over text button activates it or shows tooltip. 2016-04-17 00:40:01 +02:00
Joshua Leung
b973911fee Anim Editors: "View Frame" Operator - Code Cleanups/Reshuffling + NLA/Timeline Support
* Reshuffled code for existing "View Frame" implementations, and removed leftover
  comment from some of the the copy-and-paste used to build it.
* Added support for this operator in the NLA and Timeline
2016-04-17 03:44:10 +12:00
Joshua Leung
5d6b695f00 Assorted enum tweaks
* Knock out "Python" FModifier entry - It really hasn't been coded yet!
* Add icon for "Match Indices" driver eyedropper mode. It should help provide
  a bit more of a hint of what it does, but it also doesn't look quite as nice now.
2016-04-17 03:29:29 +12:00
Joshua Leung
b49fd60060 Experimental Drivers UI Tweak: Use icons for variable types
This commit aims to streamline the driver variables layout a bit
* Each variable type now has an icon. (The loc diff and rot diff ones are placeholders,
  which could deserve something better/dedicated if we continue to use this)
* Instead of taking up an entire row, the variable type dropdown now only shows
  an icon, and is located before the variable name field.

Feedback wanted: Is this more/less confusing than it was?
2016-04-17 03:29:28 +12:00
Joshua Leung
4572d4d861 Tweaks to Streamline Drivers UI - Don't use uiTemplateAnyID for properties where only objects can be used 2016-04-17 03:29:28 +12:00
Lukas Tönne
ba279efbdb Removed the ND_PARTICLE notifier and outliner particle elements. 2016-04-16 17:27:49 +02:00
Lukas Tönne
9465d3decf Removed the particle context of property buttons space. 2016-04-16 17:17:31 +02:00
Lukas Tönne
ecb695ccc8 Removed tool settings for particle edit mode. 2016-04-16 14:26:09 +02:00
Lukas Tönne
cd0ec340c4 Removed remaining uses of the particle edit mode flag. 2016-04-16 12:39:41 +02:00
Lukas Tönne
15c8d095e5 Removed the Main.particle list, used for ParticleSettings ID blocks.
There were still some type-agnostic uses as well, owing to the generic
ListBase type.
2016-04-16 12:28:29 +02:00
Lukas Tönne
7c57822afa Fixed some minor errors in game engine and player. 2016-04-16 12:11:34 +02:00
Lukas Tönne
c92b6f1de6 Removed the translation context for particle settings. 2016-04-16 11:32:45 +02:00
Lukas Tönne
d30b942f07 Removed the ID_PA code used for ParticleSettings. 2016-04-16 11:29:28 +02:00
Lukas Tönne
df2e543d44 Removed some unused declarations for boids code. 2016-04-16 11:11:39 +02:00
Campbell Barton
34c99fa30a Curve draw fix w/ surface offset + only-first enabled
In this case the initial offset needs to be applied to the rest of the stroke.
2016-04-16 06:47:37 +10:00
Lukas Tönne
fbed29a246 Merge branch 'master' into temp_remove_particles 2016-04-15 17:59:54 +02:00
Bastien Montagne
6bc2ba2111 Fix T48157: 3D view's depth of field isn't displayed correctly with scene units scale.
focus distance is given in BU, no need to scale it at all.
2016-04-15 16:24:19 +02:00
Bastien Montagne
177d051126 UI: copy to selected: add 'single'/'all' options to buttons' menu when relevant.
Same as reset or anim keyframe/driver operators... Inconsistency reported by Leon Cheung
through IRC, thanks.
2016-04-15 15:19:19 +02:00
Joshua Leung
bce4b7c868 Code Cleanup: Fix up various odds and ends 2016-04-16 01:12:50 +12:00
Joshua Leung
88c071fbb5 Code Cleanup: Remove unused define left over from earlier versions of this code 2016-04-16 01:12:50 +12:00
Sergey Sharybin
209cd5db96 Remove a leftover from older code 2016-04-15 15:06:08 +02:00
Bastien Montagne
10320891f0 Fix T48151: Brush texture overlay won't refresh automatically in UV editor when changed in buttons window.
Simple solution is to get rid of this stupid `rna_TextureSlot_brush_update` func, and do what it was doing directly
in BR case of `rna_TextureSlot_update`. That way, all updates to brush texture will invalidate correctly the overlay.

Note that this double definition of texture pointer for brushes looks rather fishy, am really not convinced this helps
keeping things simple and clear at all (what happened here is that texture selector in image paint editor was using
'texture' member of brush itself, which was performing correct RNA update, while context-based brush texture selector
from buttons space was using 'texture' member of the TextureSlot struct, which had default texture update callback
which was not invalidating overlay).
2016-04-15 13:19:41 +02:00
Campbell Barton
8ac662c77a New freehand curve drawing tool
- Access with Shift-LMB or from the 'Create' toolbar tab.
- Uses curve fitting for bezier curves, with error and corner angle options.
- Optional tablet pressure to curve radius mapping.
- Depth can use the cursor or optionally draw onto the surface,
  for the entire stroke or using the stroke start.
- Stroke plane can optionally be perpendicular to, or aligned to the surface normal.
- Optional radius tapering and for start/end points.
- Supports operator redo and calling from Python.
2016-04-15 20:36:38 +10:00
Sergey Sharybin
f951cc36e2 Cycles: Support heat volume attribute
Similar to velocity, it was kind of supported by the mesh manager but
was missing a code in BlenderSession to get actual values.

In Cycles Heat is an attribute which goes from -1 to 1, where -1 is
the coldest ever temperature, 1 is the hottest ever one.
2016-04-15 12:02:31 +02:00
Joshua Leung
69ee6c9866 Drivers Editing: Added "Copy/Paste" buttons beside "Add Variable" for copying all variables from one driver to another
This was a feature request from a few years back (IIRC from ZanQdo?) to make it
easier to reuse one set of driver variables across several different drivers.

Dev Notes:
* Finally it's done! All that trouble for two little buttons.
* Grr... cmake... grrr!
2016-04-15 20:05:09 +12:00
Joshua Leung
c97b0b14e3 NLA Copy/Paste Modifiers: Apply similar fixes as those done in Graph Editor 2016-04-15 20:05:08 +12:00
Joshua Leung
344c17f439 Fix T42148: Copying/Pasting FModifiers copies to all selected FCurves, not just active one 2016-04-15 20:05:08 +12:00
Joshua Leung
26e8798561 FModifiers: Various tweaks for consistency + improved behaviour
* Use an RNA enum callback for NLA FModifier types too
* Cleaned up tooltips for these operators in Graph and NLA editors
* Fix update notifiers after adding FModifiers in the Graph Editor
2016-04-15 20:05:07 +12:00
Joshua Leung
35a089d960 FModifiers: "Add Modifiers" in Graph/NLA Editor buttons now uses a dropdown instead of a button
This brings the UI here more in line with the Constraints and Modifiers UI's.

TODO:
* The tooltips/descriptions on the operators now need fixing, as we can no longer
  use custom tooltips when defining these buttons.
* The operators need to be fixed to only operate on the active data
2016-04-15 20:05:06 +12:00