Commit Graph

140 Commits

Author SHA1 Message Date
Campbell Barton 32f3771d0b hidden wireframe option for mesh editmode, important for retopology mode (can be used with xray). 2013-07-20 03:51:49 +00:00
Campbell Barton e2b7c138f6 patch [#36000] View lock offset (allow panning when the view is locked)
own patch
2013-07-19 10:54:02 +00:00
Campbell Barton 902e3ddd11 fix [#35488] Toggle "Show All Layers" 2013-05-23 21:24:56 +00:00
Campbell Barton ab2cfd87e0 remove v3d.modeselect, reduce size of other vars in v3d. 2013-05-23 21:14:17 +00:00
Campbell Barton 13ddfa921e fix [#30862] "Lock" and "Box" Quad View options won't stay put when toggling 2013-05-08 13:01:05 +00:00
Brecht Van Lommel 2d21e6521f Fix: multisample viewport drawing didn't work well with selection or particle
brushes, due to issues with color coded drawing or slow/buggy reading from such
a buffer on some systems.

In case multisample is enabled now, it uses an offscreen buffer for such drawing,
which is not multisampled and so should not cause issues. This does mean there is
some extra GPU memory usage when multisample is enabled, and we could optimize
triple buffer to work together here somehow to share buffers, but it's better than
having selection not working.
2013-03-15 19:56:33 +00:00
Campbell Barton abd1748e48 code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use. 2013-03-09 11:40:42 +00:00
Ton Roosendaal e11d22a6b7 Matcap support in 3D Viewport.
Full log is here:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability#Matcap_in_3D_viewport

Implementation notes:

- Matcaps are an extension of Solid draw mode, and don't show in other drawmodes.
  (It's mostly intended to aid modeling/sculpt)

- By design, Matcaps are a UI feature, and only stored locally for the UI itself, and
  won't affect rendering or materials.

- Currently a set of 16 (GPL licensed) Matcaps have been compiled into Blender. 
  It doesn't take memory or cpu time, until you use it.

- Brush Icons and Matcaps use same code now, and only get generated/allocated on
  actually using it (instead of on startup).

- The current set might get new or different images still, based on user feedback.

- Matcap images are 512x512 pixels, so each image takes 1 Mb memory. Unused matcaps get 
  freed immediately. The Matcap icon previews (128x128 pixels) stay in memory.

- Loading own matcap image files will be added later. That needs design and code work 
  to get it stable and memory-friendly.

- The GLSL code uses the ID PreviewImage for matcaps. I tested it using the existing
  Material previews, which has its limits... especially for textured previews the
  normal-mapped matcap won't look good.
2013-01-22 11:18:41 +00:00
Campbell Barton f9ec10688a fix [#33501] Grease pencil in OpenGL render
With the view3d 'Render Only' option, grease pencil wouldn't draw, but for OpenGL render it did.

Since grease pencil can be very useful in opengl renders, enable grease pencil drawing with 'Render Only' option in the viewport,
and add a checkbox in the grease pencil header not to draw (unchecking each layer is annoying and applies to all spaces).
2012-12-17 02:34:53 +00:00
Sergey Sharybin 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
Campbell Barton 4cb6d5d214 code cleanup: reduce calls to CTX_ functions inline, add some docs to mask rasterizer. 2012-09-13 01:50:21 +00:00
Campbell Barton 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
Campbell Barton 91781c76c4 framing options for camera background image: stretch/fit/crop 2012-06-13 12:58:01 +00:00
Brecht Van Lommel 19dd66cf3b 3D View: add Backface Culling option, to hide faces when seen from the back side,
found in the Display panel.

Patch by Simon Kirk and Irie Shinsuke, refactored to also work for non-mesh objects
and avoid globals.
2012-05-25 09:26:47 +00:00
Sergey Sharybin 4795f4b9ac mango request: option to draw background in front of all objects in the viewport.
Should be really handy for painting clean plates.
2012-04-10 14:59:06 +00:00
Campbell Barton 5ebe91ca1f change camera zoom from short to float. 2012-03-07 19:42:22 +00:00
Campbell Barton 2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Sergey Sharybin 51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
Campbell Barton ca629d5ccc minor dna header cleanup 2011-12-30 07:25:49 +00:00
Campbell Barton 31ff21d735 add define for deprecated DNA struct members: DNA_DEPRECATED,
this means use of deprecated struct members gives a warning.

- makesdna.c preprocessor skips this.
- DNA_DEPRECATED_ALLOW is used so readfile.c can do versioning without warnings.
- this exposes some use of deprecated struct members, will deal with this after.
2011-12-04 06:05:48 +00:00
Dalai Felinto 5763e6ce85 option to disable/enable individual background images
*** use-case:
"I have 10 reference images that overlap each other and every time I want to see one, I need to change the transparency of all the others.
therefore it would be nice to have a little button by each menu to allow enable/disabling individual background images"

To avoid subversioning bump I created a define that is negative (DISABLED) and of course a rna that is a boolean_negative.
Talked with Campbell and he actually prefers this way over do_version, so there it goes.
2011-11-29 21:05:18 +00:00
Sergey Sharybin 27d42c63d9 Camera tracking integration
===========================

Commiting camera tracking integration gsoc project into trunk.

This commit includes:

- Bundled version of libmv library (with some changes against official repo,
  re-sync with libmv repo a bit later)
- New datatype ID called MovieClip which is optimized to work with movie
  clips (both of movie files and image sequences) and doing camera/motion
  tracking operations.
- New editor called Clip Editor which is currently used for motion/tracking
  stuff only, but which can be easily extended to work with masks too.

  This editor supports:
  * Loading movie files/image sequences
  * Build proxies with different size for loaded movie clip, also supports
    building undistorted proxies to increase speed of playback in
    undistorted mode.
  * Manual lens distortion mode calibration using grid and grease pencil
  * Supervised 2D tracking using two different algorithms KLT and SAD.
  * Basic algorithm for feature detection
  * Camera motion solving. scene orientation

- New constraints to "link" scene objects with solved motions from clip:

  * Follow Track (make object follow 2D motion of track with given name
    or parent object to reconstructed 3D position of track)
  * Camera Solver to make camera moving in the same way as reconstructed camera

This commit NOT includes changes from tomato branch:

- New nodes (they'll be commited as separated patch)
- Automatic image offset guessing for image input node and image editor
  (need to do more tests and gather more feedback)
- Code cleanup in libmv-capi. It's not so critical cleanup, just increasing
  readability and understanadability of code. Better to make this chaneg when
  Keir will finish his current patch.

More details about this project can be found on this page:
    http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011

Further development of small features would be done in trunk, bigger/experimental
features would first be implemented in tomato branch.
2011-11-07 12:55:18 +00:00
Brecht Van Lommel 97a0ae3e1b RenderEngine api: support for viewport rendering, details here:
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/RenderEngineAPI

* This adds a Rendered draw type in the 3D view, only available when
  the render engine implements the view_draw callback.
* 3D view now stores a pointer to a RenderEngine.

* view_draw() callback will do OpenGL drawing instead of the viewport.
* view_update() callback is called after depsgraph updates.
2011-11-02 18:20:53 +00:00
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Mitchell Stokes 7fc26e0123 Committing patch #25675 "Make "Cast Buffer Shadows" option work in viewport and BGE" by me.
Description from the tracker:
"It's really handy to be able to prevent an object/material from casting a shadow. So, I made use of the Cast Buffer Shadows option in the material settings, and made it work in the viewport and the BGE."
2011-08-24 20:28:54 +00:00
Mike Erwin 72f70874bb experimental onscreen rotation guide 2011-07-26 02:35:46 +00:00
Mike Erwin 407a2a8439 tweaked ephemeral ndof data types 2011-07-21 21:40:04 +00:00
Campbell Barton 984d2e42e4 make api functions for converting rv3d->camzoom, so the odd logic for this isn't inlined all over. 2011-05-20 04:14:29 +00:00
Campbell Barton f4d8be977f there wasn't a good way to know if a RegionView3D was perspective or not (without having the View3D too and checking its camera values), added struct member 'is_persp', set with the view matrix. 2011-05-18 17:52:26 +00:00
Campbell Barton 99b7960781 remove some unused view3d members & added RV3D_VIEW_USER define.
Aligorith: replaced v3d->keyflags with ANIMFILTER_KEYS_LOCAL since v3d->keyflags couldn't be set anywhere and wasn't initialized.
2011-05-15 03:42:28 +00:00
Campbell Barton e7db080565 option to have the view controls apply to the camera view (and camera object).
- follow rotate/pan/zoom/dolly operators.
- auto-depth preference works.
- smooth view navigation supported.
- view selected, all & numpad operator work too.

TODO
- deal with camera transform locked axis
- find a way to move/zoom the frame while the camera is locked (if it turns out to be a problem).
2011-05-14 17:50:33 +00:00
Campbell Barton 092c3d8a85 fix bug [#26315] Background and 3D view mistakes
The bug is caused by a fix for [#22111], commits r29356, r28545.

exiting localview would set the rv3d->view but use the original rv3d->viewquat.
2011-03-08 07:44:30 +00:00
Campbell Barton c7609a27b3 remove unused RegionView3D retopo pointer and set quat printing to const args. 2011-03-08 07:31:42 +00:00
Nathan Letwory 22dbae84e5 DNA header files are now grouped under the same module. No further documentation done. 2011-02-17 20:48:12 +00:00
Campbell Barton fd448bcfc7 remove/comment unused defines, also zero FileGlobal.filename to quiet valgrind. 2011-01-16 21:12:38 +00:00
Campbell Barton 86bbab7de5 remove/comment unused defines. 2011-01-15 16:14:57 +00:00
Campbell Barton b4f61f0733 remove View3D.customdata_mask, since its stored in the scene now there is no need for each view to store every views combine data mask. 2010-12-23 04:26:53 +00:00
Campbell Barton 2dc2f50a6e bugfix [#25335] crash with file, console told me to report! svn 33836
view rotate precision was lost over time, make view3d rotate normalize rv3d->viewquat.

note, this no longer crashes blender, just prints.
also commented some RegionView3D struct members.
2010-12-22 02:28:06 +00:00
Campbell Barton 236a11ca63 misc small changes.
- commented unused View3D->flag's
- popup dialog now centers over the mouse
- only overwrite image alpha with render settings on save if saving the render result.
2010-11-30 18:07:44 +00:00
Campbell Barton 72279e1c92 fix for RNA ranges exceeding the range of the type (INT_MAX used on short's for eg). 2010-11-21 03:45:35 +00:00
Campbell Barton 5a1fdcdc2a bugfix [#24746] Align Camera to View locks 3D Editor in Camera Perspective View 2010-11-16 09:35:58 +00:00
Nathan Letwory 73f21f20b7 Lock to Cursor
Patch by Dan Eicher. In 3dview properties you can enable this. Rotating view then uses cursor as pivot point. Note that with this option enabled just relocating the 3d cursor also changes the 3dview.

Sebastian König: "Now the 3d cursor is actually useful" (sitting next to me while applying patch at bconf hostel)
2010-10-31 01:18:26 +00:00
Campbell Barton 106867910e use unsigned int for all layers. 2010-10-19 01:21:22 +00:00
Campbell Barton 1d2b96fa81 set the view3d used layer to be an unsigned int, mask out localview layers to avoid flag mismatch when checking if it changed. 2010-10-02 19:45:53 +00:00
Campbell Barton a6e7823942 make fly mode border draw into a area drawing callback rather then using a flag (no functional change). 2010-10-02 19:31:23 +00:00
Campbell Barton b2b0869212 - camera max zoom limit was inconsistent
- camera pan now follows the mouse
2010-09-11 04:39:00 +00:00
Campbell Barton 7d0e4ac889 simplify pass drawing, give each pass its own list, avoids some context switching.
- also fixes a problem where xray+transp+alpha1.0 objects wouldnt draw at all.
- the patch worked by adding twice but this leaked memory.
- solve by adding the xraytransp object to the xray list if the alpha is 1.0
2010-08-25 14:23:02 +00:00
Campbell Barton 1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
Brecht Van Lommel d0c10cd060 draw option to only display what is rendered, used for sequencer, opengl drawing by default. since we use preview renders a lot the empties & armatures can get in the way also.
(commit 27511 by Campbell from render25 branch)
2010-03-16 17:49:31 +00:00
Matt Ebb 2ad3d8f158 Fix [#21145] Preferences: Solid OpenGL lights viewport update 2010-03-09 06:20:08 +00:00