Commit Graph

2412 Commits

Author SHA1 Message Date
Campbell Barton 4849ca8a56 Fix T39884: Displaying filenames with '|' failing in menus 2014-05-01 12:40:49 +10:00
Campbell Barton 1fcce18dbf Another issue with includes
OSX needs userdef for pixelsize, adjusted header to avoid this happening again.
2014-05-01 07:38:14 +10:00
Campbell Barton 0309a7b9a9 Code cleanup: remove unused header 2014-05-01 05:07:48 +10:00
Tamito Kajiyama 2aa9d33404 Fix T39902: Keyframe insertion by a Keying Set fails in the edit mode when keyframing object data properties.
Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D484
2014-04-28 16:46:06 +09:00
Joshua Leung 4a1b87790d Patch T39855: Icons for Interpolation Types (and Robert Penner easing)
This patch adds icons for each of the keyframe interpolation types (including
the easing equations), as well as icons for the easing type options.


Icons made by: Paulo José Oliveira Amaro (pauloup)
Reviewed by: Joshua Leung, Thomas Beck
2014-04-28 13:49:00 +12:00
Campbell Barton c3d3ae3ee7 Code cleanup: avoid warning about bit-shift outside int range 2014-04-28 03:05:37 +10:00
Campbell Barton 43d695e82e Code cleanup: view2d api naming 2014-04-21 18:47:17 +10:00
Campbell Barton 9ae0e585b0 View2d: API Cleanup for view<->region conversion
View2D had some inconsistencies making it error prone in some cases.

- Inconstant checking for NULL x/y args.
  Disallow NULL args for x/y destination pointers, instead add:
  - UI_view2d_region_to_view_x/y
  - UI_view2d_view_to_region_x/y

- '_no_clip' suffix wasn't always used for non-clipping conversion,
  switch it around and use a '_clip' suffix for all funcs that clip.

- UI_view2d_text_cache_add now clips before adding cache.

- '_clip' funcs return a bool to quickly check if its in the view.

- add conversion for rectangles, since this is a common task:
  - UI_view2d_view_to_region_rcti
  - UI_view2d_region_to_view_rctf
2014-04-21 16:59:40 +10:00
Campbell Barton 3e3efae7e9 Viewport Text Drawing: replace single allocs with a memarena
- pass label strlen since in many cases its already known.
- use single linked list for cached text drawing.
- add BLI_link_utils.h for single linked list macros.

own tests give approx 22% overall speedup.
2014-04-17 16:04:28 +10:00
Campbell Barton 1b9db9911d Code cleanup: use bools
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
2014-04-17 16:04:28 +10:00
Jorge Bernal a5b9f22454 BGE - button for deactivate sensors, controllers and actuators
This change introduces a new checkbox to deactivate the sensors, controllers and/or actuators. It is useful during the development phase to avoid delete sensors, controllers or actuators if you want to test something new.

NOC: The wiki page is being updated (the images mostly), but the feature is already in the 2.71 release log.

{F61628}

Reviewers: moguri, dfelinto, campbellbarton, dingto, #user_interface, billrey

Reviewed By: moguri

CC: billrey

Differential Revision: https://developer.blender.org/D16
2014-04-16 22:40:07 -03:00
Sergey Sharybin 0d38f21cbc Fix the eyedropper not working properly with different scene linear spaces
Either was some residue from the past or somebody didn't implement this in
the right way.

Also fixed memory leak in ED_space_clip_color_sample() caused by missing
image buffer release.
2014-04-14 13:48:20 +06:00
Campbell Barton a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
Campbell Barton b95e826841 Code cleanup: remove unused functions and convert int -> bool 2014-04-07 17:00:08 +10:00
Bastien Montagne 4faef1e10c Add drag-resize to uiTemplatePreview (mat/tex/etc. preview widget).
This is done by adding a new button type, GRIP, similar to other numbuttons
(scroll, slider, ...), which here controls the preview height.

Then, we add a new DNA struct to be able to save that height in Blend files
(note I choose not to use Panel struct for this, because we would then have the
same limitation we used to have with uiLists, only one preview per panel
and no preview outside panel).

This implies a change to template_preview UI RNA/py API (each preview needs an ID),
but this is backward compatible, as by default datablock type will be used if no ID is
given (which means e.g. all material previews with no ID will have same height).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D342
2014-04-02 13:03:11 +02:00
Sergey Sharybin 11ee2d8b97 implement cache line for image editor
It works exactly the same as a cache line in movie clip editor.
2014-04-02 16:54:30 +06:00
Campbell Barton def5999f9b UI: support for dragging popups title area 2014-04-02 18:43:53 +11:00
Campbell Barton 617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
Campbell Barton 097a3756c0 Code cleanup: use bool 2014-03-31 23:39:08 +11:00
Sergey Sharybin 5e4f789173 Code cleanup: use false/true/bool for masking 2014-03-31 15:23:27 +06:00
Campbell Barton 4e7872ce46 Add normal option to ED_transverts 2014-03-31 14:55:55 +11:00
Campbell Barton c24c34324c Code cleanup: remove unused members of TransVert 2014-03-31 09:58:17 +11:00
Campbell Barton f1962f187f Refactor: Add generic poll ED_transverts_poll 2014-03-31 09:58:17 +11:00
Campbell Barton bd57ec686c Fix T39397: Leaving leaving camera from quadview set ortho 2014-03-25 15:14:34 +11:00
Bastien Montagne 3bad243cb8 Further tweaking to numinput - enhance 'Reset' behavior.
Ways how it was resetting its values (backspace) was far from satisfaying. Now, e.g. when scaling, it will reset at 1 (or whatever mouse-value it was before entering numinput), instead of some ugly 0.0 value.

Implementation details:
* Values passed to applyNumInput() are stored as default ones (val_org), if it is not EDITED.
* applyNumInput() returns a boolean saying whether it actually set values or not.
* When backspace hits its ultimate step (where it clears all EDITED flags and reset all default values),
  it sets a temp FAKE_EDITED flag that will be used to apply one last time values of numinput
  (so that default values actually get applied!).

There are important things to note here for code using numinput:
* Values passed to applyNumInput() should be valid and are stored as default ones (val_org), if it is not EDITED.
* bool returned by applyNumInput should be used to decide whether to apply numinput-specific post-process to data.
* *Once applyNumInput has been called*, hasNumInput returns a valid value to decide whether to use numinput as drawstr source or not.

Those two steps have to be separated (so do not use a common call to hasNumInput() to do both in the same time!).
2014-03-23 09:29:04 +01:00
Joshua Leung daccaa713b Patch T22084: Robert Penner Easing Equations for FCurves
This commit introduces support for a number of new interpolation types
which are useful for motion-graphics work. These define a number of
"easing equations" (basically, equations which define some preset
ways that one keyframe transitions to another) which reduce the amount
of manual work (inserting and tweaking keyframes) to achieve certain
common effects. For example, snappy movements, and fake-physics such
as bouncing/springing effects.

The additional interpolation types introduced in this commit can be found
in many packages and toolkits (notably Qt and all modern web browsers).
For more info and a few live demos, see [1] and [2].


Credits:
* Dan Eicher (dna)              - Original patch
* Thomas Beck (plasmasolutions) - Porting/updating patch to 2.70 codebase
* Joshua Leung (aligorith)      - Code review and a few polishing tweaks

Additional Resources:
[1] http://easings.net
[2] http://www.robertpenner.com/easing/
2014-03-22 03:00:27 +13:00
Campbell Barton e5f1c0bd63 View3D: remove orbit snapping LUT, allow to snap axis but not roll 2014-03-20 15:19:02 +11:00
Campbell Barton a861e5572a UI: Add theme color for viewport overlay
Was using wire or black in many places, this color is used for cursor,
camera guides, transform helper lines. So its possible to have a dark
background with light overlay color.

Patch D331 by Brita, with some edits.
2014-03-18 05:40:18 +11:00
Campbell Barton 37dd7360d6 Code cleanup: naming conventions 2014-03-16 22:11:14 +11:00
Campbell Barton 2097e621ed Code cleanup: use r_ prefix for return args 2014-03-16 03:26:23 +11:00
Antonis Ryakiotakis 93684d5b5e Fix T39156 part 2: Add support for image paint operations in undo
history operator (Ctrl + Alt + Z).

This will only show paint operations now while in an image paint mode.
The caveat is that user can delete previous paint operations too (even
on images not on the canvas currently) so it needs some care. This is
consistent with regular undo behaviour though.

Sculpting also suffers from lack of Undo history support, this will be
added in a separate commit.
2014-03-13 22:36:16 +02:00
Antonis Ryakiotakis bce924b43c HSL color wheel implementation.
This is a standard Hue - Saturation - Lightness model
(see for instance entry on wikipedia here: https://en.wikipedia.org/wiki/HSL_and_HSV)
Note though the difference between HSV and HSL saturation, which are not the same.

The advantage of having this color selection scheme is that artists can select
shades and tints of a color easily by using the lightness slider. Also colors
are arranged on (approximated) perceived lightness on the color wheel.

Beware, Old files opened with this preference saved will crash!

Reviewers: sergey, brecht, campbellbarton

Differential Revision: https://developer.blender.org/D385
2014-03-12 18:58:50 +02:00
Campbell Barton 35ed7486c7 Mesh API: rename 'octree' to 'spatial' since internally its using kdtree 2014-03-13 01:49:47 +11:00
Campbell Barton 5bceb00a61 Mesh API: replace octree mirror with kdtree 2014-03-13 01:49:47 +11:00
Campbell Barton e5e0888a8f UI: allow passing "" for icon only enum buttons and still get an icon
Enum icon-only buttons were getting their strings set,
then truncated with blenders string shortening methods, then not drawn
because there was no room (since buttons are icon width).

Modify UI code so icon-only buttons don't get names and passing "" to a
button won't have its text set later on.
2014-03-12 22:56:10 +11:00
Campbell Barton 4cfd14644b 3D Text: textbox selection while in editmode
D395 from Henrik Aarnio with some improvements.
2014-03-11 17:16:08 +11:00
Campbell Barton 57dba73917 View3d: take pixelsize into account for selection distance 2014-03-11 15:34:19 +11:00
Campbell Barton fa24ad1fd5 Graph Editor: add lasso select for fcurves 2014-03-09 16:20:04 +11:00
Campbell Barton 46682d8812 Icon for LineStyle
patch T37008 from Michael P.
2014-03-04 04:22:32 +11:00
Campbell Barton 771b0e354c Fix Crazyspace with proportional editing 2014-02-28 21:26:19 +11:00
Bastien Montagne 2e0a33745d Revert editbone roll correction changes.
This reverts commit f72acc38d 65c5be967 eff6b385e 3fe487217
2014-02-28 10:35:11 +01:00
Campbell Barton f72acc38dd Transform: remove recently added ival2, use editbones temp data 2014-02-27 09:47:37 +11:00
Campbell Barton ece755ffe6 Fix for sequencer add operators showing up in spacebar search. 2014-02-26 13:30:25 +11:00
Campbell Barton 021b07e87c NDOF: various fixes for view3d
- allow zooming when in ortho+user mode
- fix for using VIEW3D_OT_ndof_orbit_zoom when the camera is locked.
- fix for locked camera changing the dist value when used with ndof.
- de-duplicate ndof_pan_zoom and ndof_all operators
2014-02-24 15:17:47 +11:00
Campbell Barton 543b57fbeb Fix T38348: Panel remains scrolled when switching tabs 2014-02-22 13:07:02 +11:00
Bastien Montagne 32d6f853f3 Transform: revert to 2.69 numeric input behavior by default
This allows to get the same "quickies" as in previous (2.69) code, (XYZ, -/, etc.), yet keeping nice non-conflicting new stuff like cursor navigation or copy/paste.

You can switch to full mode hitting '=', and back to simple mode hitting 'ctrl ='.
2014-02-20 16:11:36 +11:00
Campbell Barton ea58918171 NDOF: define 2 default navigation modes: free & orbit
After some discussion it seems both are valid defaults but useful for
very different purposes.

- 'free' lets you explore the scene with full 6dof (like fly mode)
- 'orbit' is closer to typical mouse view orbit, constraining to orbiting about a central location.

This doesn't effect orbit/pan which are available with modifier keys.
2014-02-20 12:02:59 +11:00
Brecht Van Lommel 3f769776fe Splash screen: use a retina resolution image for Mac OS X. 2014-02-18 19:38:44 +01:00
Campbell Barton 01d9bbaa5e Code cleanup: remove more string encoded menu functions 2014-02-15 11:37:33 +11:00
Campbell Barton 7731a940d1 View3d: add utility function to get the quat from a view axis 2014-02-12 14:16:02 +11:00