Commit Graph

364 Commits

Author SHA1 Message Date
ddf934dedf use enum for draw wire setting to be easier to read, no functional change. 2011-11-25 02:35:23 +00:00
Lukas Toenne
d4f27b7bf0 Yet another fix for crashes when drawing empty base mesh with constructive modifier. This crashed with ocean modifier (#29241). The previous fix was to avoid drawing mapped faces altogether for empty edit mesh, but that also disables the actual derived mesh display (#29346).
The real reason for this crash is that ocean modifier (in generative setting) does not properly set the derived mesh face ORIGINDEX data to ORIGINDEX_NONE. With this the previous fixes are not necessary.
2011-11-21 11:46:05 +00:00
539c94a051 Camera: some code refactoring, use an intermediate CameraParams struct instead
of long list of variables everywhere. Intention is to also let 3d view use this
eventually, instead of duplicating code.
2011-11-18 15:52:00 +00:00
Lukas Toenne
9a2174f57a Better fix for crashes when rendering original edit mesh faces on empty edit mesh with constructive modifier (#29241). This avoids the additional test inside the loop. 2011-11-14 11:17:07 +00:00
Lukas Toenne
ad943db0e3 Fix for #29241, ocean sim modifier crash when removing all vertices.
The object draw method did not check for valid data when mapping back to original face, constructive modifier on empty mesh does that.
2011-11-14 08:06:24 +00:00
094c9799f9 quiet -Wdouble-promotion warnings 2011-11-11 12:00:08 +00:00
afeb0eeaf0 Dynamic Paint merge:
Commit Dynamic Paint from "soc-2011-carrot" branch into trunk.

End-user documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Simulation/Dynamic_Paint

GSoC wiki page:
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2011-DynamicPaint
2011-11-10 10:24:34 +00:00
1b4a54ad73 Merge with trunk r41701 2011-11-09 15:46:53 +00:00
28ee0f9218 Texturing: texture and 3d view draw type changes, these should only have any
effect for a render engine using new shading nodes. In short:

* No longer uses images assigned to faces in the uv layer, rather the active
  image texture node is what is edited/painted/drawn.
* Textured draw type now shows the active image texture node, with solid
  lighting.
* Material draw mode shows GLSL shader of a simplified material node tree,
  using solid lighting.
* Textures for modifiers, brushes, etc, are now available from a dropdown in
  the texture tab in the properties editor. These do not use new shading nodes
  yet.

http://wiki.blender.org/index.php/Dev:2.6/Source/Render/TextureWorkflow
2011-11-08 13:07:16 +00:00
be5ef51b73 use some more logical BLI math functions & tracking used INT_MAX on a short. 2011-11-08 09:02:47 +00:00
edec46b0a6 Merge with trunk r41625 2011-11-07 16:36:49 +00:00
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
96d73bfdcf replace VECCOPY with copy_v3_v3, same for 2d copy, also added vec copy functions for int & char. 2011-11-07 01:38:32 +00:00
723484ec06 Removed old "bsystem_time()" function, which by now is just a
duplicate of BKE_curframe() which just takes two extra args.

For the few calls in the physics engine where CFRA+1 instead of CFRA
was being used, I've added a new BKE_nextframe() call, which will
calculate for CFRA+1 instead of CFRA in much the same way that
bsystem_time() would end up doing things (which means including
subframe steps).
2011-11-06 06:08:18 +00:00
440c1c2c17 As discussed on the mailing list, removing the non-functional,
incompatible, and unmaintainable Time Offset cruft.

- Slow Parenting lives another day (just), although it now carries
appropriate cautionary disclaimers. It's only really for the Game
Engine nowadays, as that's the only place where it can possibly work
with any reliability.
- "Animation Hacks" panel is now "Relations Extras". I could've merged
the two panels, though I figured these options weren't that frequently
used to justify taking up screen-space by default along with the panel
2011-11-06 05:46:45 +00:00
9884129117 Code refactoring: split camera functions from object.c into new camera.c. 2011-11-05 13:00:39 +00:00
2ed6f077b3 Merge with trunk r41545 2011-11-05 08:04:49 +00:00
62f2218554 macro formatting & remve some unused code. 2011-11-05 05:44:52 +00:00
b0adf37ef9 - view bounds (now split from collision bounds) was still being used for bge physics in one place, comparison was incorrectly treating it as a flag too.
- cleanup Object struct - remove pad and unused flags, convert some shot's to char's, saving 24 bytes.
2011-11-05 02:30:25 +00:00
77934cfaed Fix #28865: Draw_bounds_type does not display Polyhedron or Capsule types
Separate DNA properties for bounding box used for bounding box display
in 3d viewport and bounding box used for collision detection in game engine.

Bumped subversion for proper updating old files to new system, but it
need more complex testing.
2011-11-04 15:53:34 +00:00
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
46ae692710 Merge with trunk r41342 2011-10-28 17:00:53 +00:00
fae903e263 Dynamic Paint:
* More code changes pointed by Brecht in codereview.
* Some user interface improvements.
* Updating brush settings now also updates canvas preview.
2011-10-28 14:46:09 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
d4541fd891 Merge with trunk r41197 2011-10-22 16:43:23 +00:00
7f4bb1f71b spelling corrections in comments and quiet warning 2011-10-15 14:14:22 +00:00
cae655f81f fix for weight paint vertex select, it broke vertex paint when left on. 2011-10-15 01:32:49 +00:00
8be3249537 Merge with trunk r40991 2011-10-13 21:43:02 +00:00
aa3b531839 fix for using uninitialized stack memory in mesh_foreachScreenFace__mapFunc(), used for face selection. 2011-10-10 06:56:28 +00:00
e8bb972f3c Merge with trunk r40782 2011-10-04 11:42:44 +00:00
019dca9c54 remove redundant code, also dont bother with os.path.basename(x) for recent scons commit. 2011-10-04 08:28:37 +00:00
4b325a938e make drawobject.c's code for getting the camera view frame into its own function. (no functional changes) 2011-09-29 07:59:33 +00:00
018fa1540e whitespace edits, make formatting for functions consustent at least within the file. 2011-09-28 05:53:40 +00:00
48918130a1 remove redundant code & use GL_LINE_STRIP for object spiral drawing. 2011-09-22 18:42:16 +00:00
15cb47bf91 Merge with trunk r40409 2011-09-20 17:51:04 +00:00
84d06f252e tag & comment unused vars with /* UNUSED */ 2011-09-20 08:48:48 +00:00
Dalai Felinto
b263aefb0e TexFace to Material Settings big patch
Summary:
========
The idea here is to move the texface options into the material panel.
For images with the change please visit:
http://code.blender.org/index.php/2011/09/bge-material-texface-changes

1 - Some of the legacy problems 2.49 and 2.5x has with the texface system:
==========================================================================
1.1) Shadow, Bilboard and Halo are mutual exclusive (in the code), yet you can
select a face to be more than one mode.
1.2) Sort only works for blend Alpha yet it's an option regardless of the
Transparency Blend you pick.
1.3) Shared doesn't affect anything in BGE.
1.4) ObColor only works for Text objects (old bitmap texts) when using Texture
Face Materials. (not address yet, I so far ignored obcolor)

2 - Notes:
============
2.1) Now "Use Face Textures" in material Option panel will work in Multitexture
even if there is no texture channel.

2.2) In FaceTexture mode it will use TexFace all the time, even if you don't
check the "Use Texture Face" option in the UI. It's a matter of decision, since
the code for either way is there. I decided by the solution that makes the
creation of a material fast - in this mode the user doesn't need to mess with
textures or this "Use Texture Face" option at all. I'm not strong in my opinion
here. But I think if we don't have this then what is the point of the Texture
Face mode?

2.3) I kept references for tface only when we need the image, UV or the tiling
setting. It should help later when/if we split the Image and UV layers from the
tface struct  (Campbell and Brecht proposal).

3 - Changes in a Nutshell:
==========================
3.1) "Texture Face" panel (in the Mesh/Object Data panel) no longer exists. Those settings are all part of the material properties, visible when Game Render is set.

3.2) "Texture Face" Shading mode (in the Render panel) is now called “Single Texture”, it needs a material for special settings (e.g. Billboard, Alpha Sort, …).

3.3) New options in the Material Panel
* Shadeless option in the Material panel is now supported for all three Shading modes.
* Physics is now toggleable, this is the old Collision option.
* Two Side (on) is now called Back Culling (off).
* Alpha Sort is one of the Alpha options, together (and mutually exclusive) to Alpha Blend, Alpha Clip, Add and Opaque (i.e. solid).
* Shadow, Billboard and Halo are grouped in the “Face Orientation” property.
* "Face Textures" and "Face Textures Alpha" (under Options) can be used for all but GLSL shading mode (to be supported in GLSL eventually).
* The backend in the game engine is still the same as before. The only changes are in the interface and in the way you need to think your materials. The bottomline is: It’s no longer possible to share materials between faces that do not share the same game properties.

4 - Acknowledgment:
==================
Mike Pan for the design discussions, and testing along the whole development process.
Vitor Balbio for the first hands-on code with the interface changes. That helped me a lot to push me into work on that.
Benoit Bolsee and Brecht van Lommel for patch review (* no one reviewed the whole patch, or the latest iteractions, so I still hold liability for any problems).
Blender artists that gave feedback and helped testing the patch.

Patch review and original documentation can be found here:
http://wiki.blender.org/index.php/User:Dfelinto/TexFace
http://codereview.appspot.com/4289041/
2011-09-19 19:55:59 +00:00
a89b253aa6 edits to radish before merge with trunk
- removed some unused functions.
- renamed vars to make more sense paint_vertex.c 'flags' --> 'lock_flags'
- some odd modifications were made in unrealted, commented code, copy these back from trunk.
- rename vertex_group_fix 'cp' property to 'accuracy'
- make style more consistant with trunk.
- remove 'Radish' comments.
2011-09-19 02:43:03 +00:00
73863a1da5 Split do_weight_paint_vertex() to isolate the simple case.
Added a tool-tip to the "fix deforms" op.

Removed code markers:
"Radish"
2011-09-18 17:10:28 +00:00
a9c99f58f4 Changed the branch code markers to say "Radish" in response to a review.
They weren't & aren't meant to show ownership, they just help me navigate my related code.
2011-09-18 03:49:00 +00:00
96ada15d79 svn merge -r40197:40311 ^/trunk/blender 2011-09-18 02:35:26 +00:00
1b5d16f1bf I made multitude of fixes based on the comments provided online:
Removed the drawSelectedVerts and added drawSelectedVertices, which uses dm->foreachMappedVert.

In calc_weightpaint_vert_color():
Made the weight paint color black and return instead of input=-1

Made the pose bone selection normal when multi-paint is inactive.

Name fix for functions using mv instead of mvert.

Used vector functions provided by the math lib.

Changed some MEM_callocN references to be stacks.

Changed dm_deform_clear to use ob->derivedDeform primarily

Made the variable "float **changes" into "float (*changes)[2]"

Used CTX_data_active_object() in place of CTX_data_pointer_get_type()

Added the invert selection hotkey "Ctrl+I" to weight paint's vertex mask.
2011-09-18 01:09:18 +00:00
d4898f9c40 use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0 2011-09-17 09:43:51 +00:00
f2748bfdc3 more mini optimizations - don't call UI_ThemeColor 4 times per curve handle, instead get all colors at the start and index them when drawing curves in editmode.
also remove redundant NULL check.
2011-09-17 07:14:39 +00:00
5114320dc5 micro optimization for circle drawing.
- use vertex array for drawcircball()
- add circball_array_fill() and call from drawcircball().
- for object center's rather than drawing 2 circles, create the array and reuse it.
2011-09-17 06:18:35 +00:00
4aefbb77e4 use less confusing array syntax for circle drawing, no functional changes. 2011-09-17 05:35:55 +00:00
41fa456506 replace macros with math lib functions 2011-09-16 06:56:50 +00:00
3585808bdb fix for a bug painting on selected verts, also fix an error in my own recent commit. 2011-09-14 12:44:21 +00:00
4c99d83b56 another cleanup pass, quiet all warnings for GCC
- comment unused funcs/vars.
- replace some allocs with stack variables.
- use BLI_math functions to replace in-line vector math.
2011-09-14 05:25:43 +00:00
ac51152ec5 svn merge -r40179:40195 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-14 01:32:59 +00:00