Commit Graph

207 Commits

Author SHA1 Message Date
b1d758ae6b Cleanup: redundant struct declarations 2015-03-29 03:56:39 +11:00
d28bfb5022 Cleanup: constify view3d/camera 2015-03-21 22:44:13 +11:00
9d9dc06014 Made SimDebugData into a single global instance.
This way it doesn't have to be stored as DNA runtime pointers or passed
down as a function argument. Currently there is now no property or
button to enable debugging, this will be added again later.
2015-01-20 18:32:06 +01:00
4ff68d031d Fix for warnings/errors
Conflicts:
	source/blender/blenkernel/intern/key.c
	source/blender/blenkernel/intern/particle_system.c
	source/blender/makesrna/intern/rna_particle.c
2015-01-20 09:30:05 +01:00
d8cf12fe5a Debug drawing for simulations, to aid in visualizing abstract data such
as forces, velocities, contact points etc.

This uses a hash table to store debug elements (dots, lines, vectors at
this point). The hash table allows continuous display of elements that
are generated only in certain time steps, e.g. contact points, while
avoiding massive memory allocation. In any case, this system is really
a development feature, but very helpful in finding issues with the
internal solver data.
2015-01-20 09:29:56 +01:00
af92f3d325 Tex Paint: hide selected face-mask edges
Internal selected edges were distracting when painting images.

Also remove unused flag.
2014-12-02 17:59:03 +01:00
7df4fc5eaf Spelling 2014-08-13 09:34:37 +10:00
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
cabeb39005 Code cleanup: remove unused callback for depth drawing 2014-06-19 17:36:01 +10:00
374527ab03 Code cleanup: de-duplicate calls wmOrtho, wmFrustum 2014-06-19 17:36:00 +10:00
4e3c9b01a0 View3d: api naming, for setting the view matrix. 2014-04-22 22:01:52 +10:00
bb507e4941 View3D: use smoothview for localview switching 2014-04-18 00:27:16 +10:00
69d127cade Code cleanup: use const for array args 2014-04-18 00:27:16 +10:00
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
aee30184f3 View3D: avoid matrix multiply using ED_view3d_boundbox_clip 2014-03-20 12:20:15 +11:00
50309fcbe8 Vertex Paint: inverted line drawing, white lines were often hard to see 2014-03-20 11:44:48 +11:00
284a352120 Vertex Paint: use solid shading, shadeless in wire (like wpaint) 2014-03-20 11:35:31 +11:00
d56ed8dcd9 Code cleanup: de-duplicate ndof controls for walk/fly mode 2014-02-19 21:19:42 +11:00
dcdb4eaf9c NDOF: Fix for fly/walk mode ignoring axis invert options 2014-02-18 23:55:58 +11:00
6a4f2fd552 Fix T35810: Texture faces display white in 3D view, when used as a Particle Object
This in fact seems some kind of video driver limitation, because it worked fine
on windows but failed on linux here. The guess is that textures doesn't always
work on display lists, or we simply do have some wrong OGL context somewhere.

This is a workaround for until bigger viewport draw refactor is done (as Brecht
mentioned display lists are deprecated in new OGL anyway).
2014-02-05 23:46:01 +06:00
Dalai Felinto
ab49437958 View Navigation: Walk and Fly modes
This is a addtion to the dynamic fly mode.
It behaves as the first person navigation system available in most 3d world  games nowadays.

You can alternate between the old mode (Fly) and the new mode (Walk) in User Preferences > Inputs

Manual:
-------
http://wiki.blender.org/index.php/Doc:2.6/Manual/3D_interaction/Navigating/3D_View#View_Navigation
http://wiki.blender.org/index.php/Doc:2.6/Manual/3D_interaction/Navigating/3D_View/Navigation_Modes

Shortcuts:
----------
WASD (hold)  - Move forward/backward and straft left/right
QE (hold)    - Move up and down
Tab          - Alternate between Walk and Fly modes
Shift (hold) - Speed up movement
Alt (hold)   - Slow down movement
Space or MMB - Teleport
V            - Jump
+/- or mouse wheel - speed increase/decrease speed for this Blender session

User Preferences Options:
-------------------------
Navigation Mode   - fly/walk navigation systems (fly is the old, walk is the new, next options are for walk mode only)
Gravity           - alternate between free navigation and walk with gravity modes
Mouse Sensitivity - sensitivity factor to mouse influence to look around
Teleport Duration - how long the teleport lasts
Camera Height     - camera height to use in gravity mode
Jump Height       - maximum jump speed in m/s
Move Speed        - base move speed in m/s
Boost Factor      - multiplication factor when running or going slow (1/boost)

Development Notes:
------------------
* The initial code was based on view3d_fly.c.
* The NDoF code was not touched, so it most likely is not working.

Pending Issues:
---------------
* Draw in the UI the shortcut options, and current values (e.g., Mode: Fly/Walk)
  (we need a proper API for that)
* OSX seems to present issues if we re-center the mouse every time. We implemented a workaround for that, but a real fix would be welcome.

Code reviewed and with collaborations from Campbell Barton - @campbellbarton
Differential Revision: http://developer.blender.org/D30
2013-12-03 03:14:09 -02:00
dc3f9b9c3e View3D: split camera controlling parts of fly mode into their own functions 2013-11-28 15:12:56 +11:00
23626e0149 fix [#36444] view3d.viewnumpad operator should not animate
when running viewport operations with exec() rather then invoke(), perform the action immediately rather then using smoothview.
makes viewport operations usable from python scripts.
2013-09-16 04:04:44 +00:00
5c569d227b patch [#35928] View roll operator
from Kevin Mackay (yakca), with my own additions to make it modal (though there are no keys bound to modal roll by default).
2013-08-31 08:18:08 +00:00
e2b7c138f6 patch [#36000] View lock offset (allow panning when the view is locked)
own patch
2013-07-19 10:54:02 +00:00
6321f11f03 tweak to commit r57891, dont draw hidden faces/edges in editmode. 2013-07-01 01:25:21 +00:00
c729c5ab4b fix [#35911] Show weights not working with a weight edit modifier in edit mode 2013-07-01 00:42:44 +00:00
3430068654 Fix #34970: in glsl mode the vertex paint face mask is not visible
Added face selection code to GLSL draw. We do this for Cycles
already, shall behave expected now.

Checked by Ton, thanks!
2013-04-18 10:39:53 +00:00
00e3aa529e patch [#34763] Center the View to the ZDepth Position under the Mouse Cursor
from Ralf Holzemer (cheleb)

use Fkey in object mode (since its a mode-less fly).
2013-03-25 01:11:16 +00:00
8655be437d code cleanup: use bool where values are true/false, for view3d and related functions. 2013-03-20 23:14:18 +00:00
7049bf0598 Fix: Setting cursor to semitransparent objects will fail because of clip
alpha, added option when drawing depth to disable alpha clip override.
We use that in texture paint cursor now. Not too common but may be
useful for people dealing with cloning plugins.

Reported by kgeogeo on irc, thanks.
2013-03-17 20:24:47 +00:00
28b9abe3eb ruler/protractor for 3d viewport (apart of 3d printing features). work-in-progress.
- activate from spacebar search (3D Ruler) 
- ctrl-click adds new rulers
- clicking in the middle of a ruler, turns into protractor, dragging out of view snaps back to ruler.
2013-03-07 11:53:11 +00:00
79e80d8322 code cleanup: ~400 duplicate lines for AO form factor math. 2013-03-03 05:07:58 +00:00
5f9ea0d7eb move draw all edges into the object settings (object panel), makes more sense here since its next to draw extra wire 2013-01-18 19:01:26 +00:00
31933e747f Bug fix #32806
In 2.64, input for using an NDOF device included all 6 DOFs - including panning.
That makes using it for many people (including beginners like me) too hard, you
very quickly lose the 3d view rotation pivot, as if you are in free fly mode.

Fredrik provided an updated patch, which restores the 2.63 method to only
dolly and rotate by default. The new "all dof" operator is hidden in the keymaps
behind modifier keys SHIFT + CTRL. Users can set this in their configs of course.

As usual, we should be careful changing accepted defaults, and provide new
options as additional choice only.

A useful todo is to make user preference "around selection" work well.
Will check on this now too.
2012-12-29 12:33:24 +00:00
7c699a217a define the size of matrix args for both rows/cols. 2012-12-11 14:29:01 +00:00
aeba4950c3 style cleanup 2012-10-27 10:42:28 +00:00
536d9fec80 code cleanup:
- move object_iterators.c --> view3d_iterators. (ED_object.h had to include ED_view3d.h which isn't so nice)
- move projection functions from view3d_view.c --> view3d_project.c (view3d_view was becoming a mishmash of utility functions and operators).
- some some cmake includes as system-includes.
2012-10-17 04:13:03 +00:00
9be4c94204 Cycles: non-camera viewport render border support
This makes it possible to do a border render inside a viewport even
when not looking through the camera.

Render border could be defined by Ctrl-B shortcut (works for both
camera render border and viewport render border).

Camera render border could still be defined using Shift-B (so no
muscule memory would be broken). Currently used a special flag of
operator to do this, otherwise you'll need to either two operators
with different poll callback or it could go into conflict with a
border zoom,

Border render of a viewport could be enabled/disabled in View
panel using "Render Border" option.
2012-10-16 11:57:46 +00:00
e9a61cd29d quiet compiler warnings from recent merge. 2012-10-10 14:28:47 +00:00
cb634b9100 Google Summer of Code project: "Smoke Simulator Improvements & Fire".
Documentation & Test blend files:
------------------
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements

Credits:
------------------
Miika Hamalainen (MiikaH): Student / Main programmer

Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch
Google: For Google Summer of Code 2012
2012-10-10 13:18:07 +00:00
a71b160184 fix for building on msvc2008 (also style cleanup) 2012-09-04 01:23:50 +00:00
adec7cdea2 Patch #32326: NDOF support of rotation and panning the view at the same time
Additional changes:
- Option to the ndof menu letting you pick turntable/trackball independently
  of the mouse viewport navigation style
- Option to change the rotation sensitivity separate from the panning

Holding shift + moving the ndof does just as before locking it to panning
Holding ctrl + moving will lock it to only rotation

Patch by Fredrik Hansson, thanks!

Reviewed by self and Mike Erwin.
2012-08-19 13:52:36 +00:00
9cce2d8645 smooth-view for 2d views, graph editor, sequencer, node view, works with border zoom, view selected, view all. 2012-08-12 01:07:31 +00:00
6ba5650428 code cleanup: rename flag --> dflag (draw flag), since this is overly generic name and was passed about to many functions. 2012-06-10 10:15:49 +00:00
b53b03ac1c pass the object wire color along to drawing functions, too many places would use glGetFloatv(GL_CURRENT_COLOR, curcol), which also become confusing to debug if in some cases the color was set beforehand. 2012-06-06 18:00:08 +00:00
c1570d9f49 code cleanup: missed some min/max use of float[3], also found case of DO_MIN/MAX re-reading same value from array 4 times when it can do once (use minf rather then MIN2, same for maxf) 2012-05-12 22:34:20 +00:00
caba2601ea fix for fix, own fix for [#31368] didnt work right, now move shadeless & wire paint drawing into draw_mesh_paint(). 2012-05-10 06:32:24 +00:00
80a766cbd0 style cleanup: view3d 2012-05-08 15:55:29 +00:00
9b37bf21f4 feature request from VenomGfx- lock to active as an operator since its tedious setting the object and bone manually (especially if you have it right in front of you)
uses keys
- Shift+PadPeriod --- to set
- Alt+PadPeriod --- to clear (also clears cursor and camera locking)
2012-05-05 16:38:23 +00:00