blender.git
9 years agoAdd DerivedMesh.gridHidden and CCGDM implementation.
Nicholas Bishop [Wed, 14 Mar 2012 06:31:49 +0000 (06:31 +0000)]
Add DerivedMesh.gridHidden and CCGDM implementation.

9 years agoAdd MDisps.hidden bitmap.
Nicholas Bishop [Wed, 14 Mar 2012 06:31:38 +0000 (06:31 +0000)]
Add MDisps.hidden bitmap.

Updates SDNA, customdata functions, and file read/write. Also adds
accessor functions to BKE paint.

9 years agoAdd new CCG accessor functions.
Nicholas Bishop [Wed, 14 Mar 2012 06:31:24 +0000 (06:31 +0000)]
Add new CCG accessor functions.

ccg_gridsize() converts a level into gridsize, ccg_factor() is for
converting coordinates between different multires levels.

9 years agoAdd BKE mesh function to update edge/poly hidden flags from verts.
Nicholas Bishop [Wed, 14 Mar 2012 06:31:14 +0000 (06:31 +0000)]
Add BKE mesh function to update edge/poly hidden flags from verts.

9 years agoDon't wait for sculpt stroke to create PBVH.
Nicholas Bishop [Wed, 14 Mar 2012 06:30:55 +0000 (06:30 +0000)]
Don't wait for sculpt stroke to create PBVH.

This idea is borrowed from the multires modifier, which already
checked if the object was in sculpt mode and, if so, created the
PBVH. That check is now moved higher up the chain into
mesh_build_data(), so that it occurs for CDDerivedMesh too.

This also replaces an assert in cdDM_getPBVH for tesselated mesh faces
with a call to create them if missing.

9 years agomathutils py api:
Campbell Barton [Wed, 14 Mar 2012 06:14:15 +0000 (06:14 +0000)]
mathutils py api:

  Vector.angle_signed(other)
  for 2D vectors to get the clockwise angle between them.

  in BLI math its called - angle_signed_v2v2()

shorthand for...

  atan2f((v1[1] * v2[0]) - (v1[0] * v2[1]), dot_v2v2(v1, v2))

also corrects compile error in last commit.

9 years agobmesh py api: finished todo - editable select_history
Campbell Barton [Wed, 14 Mar 2012 04:46:12 +0000 (04:46 +0000)]
bmesh py api: finished todo - editable select_history

eg:
  bm.select_history = vert, face, edge

  bm.select_history.add(edge)

9 years agoAdd 'level' field to struct MDisps, companion to 'totdisp'.
Nicholas Bishop [Wed, 14 Mar 2012 03:10:18 +0000 (03:10 +0000)]
Add 'level' field to struct MDisps, companion to 'totdisp'.

Gets initialized when loading old files and updated at the same places
totdisp is updated. Saves having to do log+sqrt to extract level from
totdisp.

9 years agodocumentation edit to address bmesh py api bug [#30453]
Campbell Barton [Wed, 14 Mar 2012 00:30:20 +0000 (00:30 +0000)]
documentation edit to address bmesh py api bug [#30453]

warn when addons are not found when running cmake.

9 years agofix [#30493] GE crashes on exit because of using freed mtfaces from tessfaces
Campbell Barton [Tue, 13 Mar 2012 23:28:02 +0000 (23:28 +0000)]
fix [#30493] GE crashes on exit because of using freed mtfaces from tessfaces

prevent gpu_draw.c holding a pointer to a freed array.

9 years agoprint warning when release/datafiles/locale is missing when building with cmake ...
Campbell Barton [Tue, 13 Mar 2012 22:27:21 +0000 (22:27 +0000)]
print warning when release/datafiles/locale is missing when building with cmake (git-svn causes this).

9 years agoSDL ghost update to work with SDL2.
Campbell Barton [Tue, 13 Mar 2012 20:24:05 +0000 (20:24 +0000)]
SDL ghost update to work with SDL2.

this gives some problems because SDL2 Needs a window before fullscreen is set, the player currently doesnt have a window created when fullscreen is called.

9 years agoloopwalker support for selecting the sides of ngons
Campbell Barton [Tue, 13 Mar 2012 18:37:31 +0000 (18:37 +0000)]
loopwalker support for selecting the sides of ngons
see: wiki.blender.org/uploads/d/dc/BMesh_NGon_Loop_Select.png

9 years agocode/style cleanup for loop walker which was is fairly confusing and hard to extend.
Campbell Barton [Tue, 13 Mar 2012 17:13:44 +0000 (17:13 +0000)]
code/style cleanup for loop walker which was is fairly confusing and hard to extend.
- only have one return at the end of the function.
- break up functionality more clearly between wire/face walk.
- remove unused struct member.

9 years agopatch [#30511] from r44792, broke setting the window state from the command line...
Campbell Barton [Tue, 13 Mar 2012 15:44:48 +0000 (15:44 +0000)]
patch [#30511] from r44792, broke setting the window state from the command line (-W / -w).

Fix this by storing if the border is set - before this was only done for the window dimensions.
also move these variables into a static struct so this logic is easier to follow.

9 years agoWITH_GHOST_SDL working again (missing std:: update)
Campbell Barton [Tue, 13 Mar 2012 14:28:58 +0000 (14:28 +0000)]
WITH_GHOST_SDL working again (missing std:: update)

9 years agoFix possible usage of NULL function reported by clang
Sergey Sharybin [Tue, 13 Mar 2012 10:31:42 +0000 (10:31 +0000)]
Fix possible usage of NULL function reported by clang

9 years agobmesh py api: more comprehensive intro page, also fix some spelling errors.
Campbell Barton [Tue, 13 Mar 2012 06:22:43 +0000 (06:22 +0000)]
bmesh py api: more comprehensive intro page, also fix some spelling errors.

9 years agobmesh python api:
Campbell Barton [Tue, 13 Mar 2012 02:59:42 +0000 (02:59 +0000)]
bmesh python api:
BMesh.select_history.remove/clear/validate functions.

9 years agobmesh: Pressing Fkey when a face cant be made falls back to the selection history...
Campbell Barton [Tue, 13 Mar 2012 02:18:46 +0000 (02:18 +0000)]
bmesh: Pressing Fkey when a face cant be made falls back to the selection history and creates edges in the order of verts selected, pressing F again will make an NGon.

(fun feature while our bug tracker is down)

9 years agostule cleanup for rct.c and fix for error in last commit.
Campbell Barton [Tue, 13 Mar 2012 01:55:25 +0000 (01:55 +0000)]
stule cleanup for rct.c and fix for error in last commit.

9 years agoworkaround [#30480] Knife tool flicker
Campbell Barton [Tue, 13 Mar 2012 01:11:08 +0000 (01:11 +0000)]
workaround [#30480] Knife tool flicker

the problem was numeric precision when in ortho mode the start/end points for the view vector would be 2000 apart which caused trouble for the intersection test.

9 years agostyle cleanup
Campbell Barton [Mon, 12 Mar 2012 23:56:11 +0000 (23:56 +0000)]
style cleanup

9 years agoCode cleanup: use explicit PBVH type enum rather than checking for grids or faces.
Nicholas Bishop [Mon, 12 Mar 2012 23:03:43 +0000 (23:03 +0000)]
Code cleanup: use explicit PBVH type enum rather than checking for grids or faces.

No functional changes, this is just a bit easier to read I think (and
nicer if we add more PBVH types in the future, e.g. for dynamic
topology sculpting.)

9 years agoCode cleanup: replace multires update function pointer with direct call.
Nicholas Bishop [Mon, 12 Mar 2012 22:52:20 +0000 (22:52 +0000)]
Code cleanup: replace multires update function pointer with direct call.

Renamed the multiresModifier_update() function to
multires_modifier_update_mdisps() and made it visible to subsurf_ccg.c
so it can be called directly. No functional change, just a bit simpler.

9 years agobetter fix for [#30529], find the right axis rather then checking for folded quads.
Campbell Barton [Mon, 12 Mar 2012 21:38:13 +0000 (21:38 +0000)]
better fix for [#30529], find the right axis rather then checking for folded quads.

9 years agoBundle latest version of Carve library which shall resolve compilation issues with...
Sergey Sharybin [Mon, 12 Mar 2012 21:18:28 +0000 (21:18 +0000)]
Bundle latest version of Carve library which shall resolve compilation issues with clang

9 years agofix [#30529] BMesh: Wrong Indizes of Faces
Campbell Barton [Mon, 12 Mar 2012 21:09:27 +0000 (21:09 +0000)]
fix [#30529] BMesh: Wrong Indizes of Faces

problem was bow-tie quads would add opposite normals together and result in zero vector which was used for projection.
Now is_quad_convex_v3() checks if quad contains 2 faces which point away from eachother when split by either direction.

Theres another fix for this bug which can be done since creating the face can use existing edges in the example given so it wont have to guess which order of verts to use.

9 years agoFix #30406: Hooks ignore Automatic handles setting in curves
Sergey Sharybin [Mon, 12 Mar 2012 14:55:56 +0000 (14:55 +0000)]
Fix #30406: Hooks ignore Automatic handles setting in curves

Update handles positions after applying modifiers which seems to be expected behavior.
The only currently unsolved issue is about updating aligned handles because this needs
to determine in which order handles need to be recalculated which currently depends on
selection flags and which is quite tricky to do when running modifiers and animation data,
so currently just not update their positions for now.

9 years agoFix for lasso gestures. After executing the modal gesture operator the list of gestur...
Lukas Toenne [Mon, 12 Mar 2012 14:39:37 +0000 (14:39 +0000)]
Fix for lasso gestures. After executing the modal gesture operator the list of gesture points is copied to the operator "path" id property, which is simply a collection of points. This list must be cleared before adding new lasso points to it, since operator properties are now stored after each execution. Noticed by Olivier Amrein (oenvoyage) on IRC.

9 years agoFix #30496: Bugs and crashes about "make links modifers" function.
Sergey Sharybin [Mon, 12 Mar 2012 14:35:07 +0000 (14:35 +0000)]
Fix #30496: Bugs and crashes about "make links modifers" function.

Was missed check for if modifier is available for particular object type
which ended up with unpredictable results when modifier which isn't supported
yet for some object type as linked to that object type.

9 years agoFix #30524: documentation example code for bge.types.KX_MeshProxy did not work,
Brecht Van Lommel [Mon, 12 Mar 2012 13:04:06 +0000 (13:04 +0000)]
Fix #30524: documentation example code for bge.types.KX_MeshProxy did not work,
using fix suggested by Ryan King.

9 years agoCode cleanup: knife gathers pos-related state into a struct. No functional change.
Howard Trickey [Mon, 12 Mar 2012 12:45:55 +0000 (12:45 +0000)]
Code cleanup: knife gathers pos-related state into a struct. No functional change.

This is in preparation for bug fixing and cleanup related to tracking
of bmface and is_space state variables.  And makes it more likely
to avoid bugs in future where some part of state is copied but not all.

9 years agoOSX/cmake: use again 10.5 as general deployment target ( pls verify 10.5 compatibilit...
Jens Verwiebe [Mon, 12 Mar 2012 12:03:52 +0000 (12:03 +0000)]
OSX/cmake: use again 10.5 as general deployment target ( pls verify 10.5 compatibility works with automatic weaklinking), use now then sdk which for sure exists, remove obsolete slash

9 years agoFix #30512: external render saved render result after reporting error.
Brecht Van Lommel [Mon, 12 Mar 2012 11:32:23 +0000 (11:32 +0000)]
Fix #30512: external render saved render result after reporting error.

9 years agoMake knifetool more robust against crashes. Fix some hole problems.
Howard Trickey [Mon, 12 Mar 2012 11:27:59 +0000 (11:27 +0000)]
Make knifetool more robust against crashes. Fix some hole problems.

Sometimes split would fail to make a face - make sure it doesn't
crash if that happens.
Chain finding code for holes would sometimes go back to same
vertex on the face, which causes problems, so fixe that.
Also, disallowed a cut that starts at a vertex or edge and
cycles back to that same point in a face - this would make
a face with a repeated vertex, which may not be handled by
the rest of the system properly.

9 years agoStyle cleanup in blenfont (spaces, C++ comments, etc.).
Bastien Montagne [Mon, 12 Mar 2012 09:22:16 +0000 (09:22 +0000)]
Style cleanup in blenfont (spaces, C++ comments, etc.).

9 years agoRemoving SWAP macro define from BLI_heap.c, already present in BLI_utildefines.h...
Bastien Montagne [Mon, 12 Mar 2012 09:20:38 +0000 (09:20 +0000)]
Removing SWAP macro define from BLI_heap.c, already present in BLI_utildefines.h, giving compile error.

9 years agoCommit patch from Shane Ambler to make VideoTexture compile with a clang on FreeBSD.
Sergey Sharybin [Mon, 12 Mar 2012 08:46:53 +0000 (08:46 +0000)]
Commit patch from Shane Ambler to make VideoTexture compile with a clang on FreeBSD.
Thanks!

9 years agoRe-bundle libmv from own branch.
Sergey Sharybin [Mon, 12 Mar 2012 08:45:06 +0000 (08:45 +0000)]
Re-bundle libmv from own branch.

Should resolve compilation error on some platforms when using linux and
compilation error of libmv on FreeBSB.

It was a regression caused by not applied changes on config_linux.h
and some changes made to utilities.cc were also occasionally missed.

9 years agoFix msvc compilation errors. (__func__ undeclared)
Miika Hamalainen [Mon, 12 Mar 2012 07:21:22 +0000 (07:21 +0000)]
Fix msvc compilation errors. (__func__ undeclared)

9 years agocode cleanup/bugfix uninitialized values
Campbell Barton [Mon, 12 Mar 2012 06:53:47 +0000 (06:53 +0000)]
code cleanup/bugfix uninitialized values
- edgebisect bmesh operator used uninialized beauty field.
- BLI_join_dirfile could read from before the string bounds when passed an empty dir string.
- pransform could use an uninitialized projected coordinate (unlikely but possible)
- RNA_property_path_from_ID_check would compare against an uninitialized pointer when the path wasn't found.

also have bmesh walker use BM_edge_other_vert() utility function.

9 years agostyle cleanup: line length - some over 300 long.
Campbell Barton [Mon, 12 Mar 2012 06:07:16 +0000 (06:07 +0000)]
style cleanup: line length - some over 300 long.

9 years agoSVN maintenance.
Guillermo S. Romero [Mon, 12 Mar 2012 04:35:06 +0000 (04:35 +0000)]
SVN maintenance.

9 years agofix [#30472] 3d view objects not rendered, cycles.
Campbell Barton [Mon, 12 Mar 2012 01:34:38 +0000 (01:34 +0000)]
fix [#30472] 3d view objects not rendered, cycles.

holdout layer wasnt initializes in some cases.

9 years agotext delimiter - convert to unicode before comparing characters.
Campbell Barton [Mon, 12 Mar 2012 00:03:42 +0000 (00:03 +0000)]
text delimiter - convert to unicode before comparing characters.

9 years agostyle cleanup
Campbell Barton [Sun, 11 Mar 2012 23:47:41 +0000 (23:47 +0000)]
style cleanup

9 years agobmesh: edge loop select
Campbell Barton [Sun, 11 Mar 2012 21:47:14 +0000 (21:47 +0000)]
bmesh: edge loop select
    add support for loop selecting boundry edges only - handy for loop selecting the side of an ngon.

9 years agoFix edge loop selection. Now boundary selection checks only for filled edges to deter...
Antony Riakiotakis [Sun, 11 Mar 2012 20:45:58 +0000 (20:45 +0000)]
Fix edge loop selection. Now boundary selection checks only for filled edges to determine when to stop and stops at vertices shared by only 2 edges.

9 years agoPort changes from libmv/CMakeLists.txt to build rules files generator script
Sergey Sharybin [Sun, 11 Mar 2012 20:01:26 +0000 (20:01 +0000)]
Port changes from libmv/CMakeLists.txt to build rules files generator script

9 years agoremove Object member from BMesh struct - was only used for undo and BMEditMesh alread...
Campbell Barton [Sun, 11 Mar 2012 19:58:56 +0000 (19:58 +0000)]
remove Object member from BMesh struct - was only used for undo and BMEditMesh already stores an object pointer.

also fix for own mistake with mesh conversion refactor, shape key index was off by 1 when switching editmode.

9 years agoBundle new upstream version of libmv from own branch
Sergey Sharybin [Sun, 11 Mar 2012 19:52:25 +0000 (19:52 +0000)]
Bundle new upstream version of libmv from own branch

This version of libmv includes new gflags and glog libraries which makes
it possible to compile libmv with clang compiler.

Also remove code from CMakeLists which was disabling libmv if using clang.

Tested on linux with gcc-4.6 and clang-3.0, windows cmake+msvc and scons+mingw.
Could be some issues with other platforms/build system which shall be simple to resolve.

9 years agostyle cleanup, also remove unused externs.
Campbell Barton [Sun, 11 Mar 2012 19:09:01 +0000 (19:09 +0000)]
style cleanup, also remove unused externs.

9 years agoimprove confusing macro GET_ACF_FLAG_PTR
Campbell Barton [Sun, 11 Mar 2012 17:41:19 +0000 (17:41 +0000)]
improve confusing macro GET_ACF_FLAG_PTR
- was operating on `type` which wasnt an argument to the macro.
- was calling return within the macro (makes code harder to follow).

9 years ago[#30503] Callback for render job completion
Campbell Barton [Sun, 11 Mar 2012 17:24:03 +0000 (17:24 +0000)]
[#30503] Callback for render job completion
from Jason van Gumster (thefallenweeble)

adds render_complete and render_cancel callbacks to bpy.app.handlers

9 years agoCycles UI files:
Thomas Dinges [Sun, 11 Mar 2012 16:25:58 +0000 (16:25 +0000)]
Cycles UI files:
* Minor cleanup and raise blender version to 2.62 in the addon.

9 years agofix for debug assignment left in from own commit r44778
Campbell Barton [Sun, 11 Mar 2012 15:27:08 +0000 (15:27 +0000)]
fix for debug assignment left in from own commit r44778

also removed private face normal update functions - they were same as public.

9 years agoOSX/libmv: restrict the unwind.h workaround to 10.6.sdk only
Jens Verwiebe [Sun, 11 Mar 2012 12:15:39 +0000 (12:15 +0000)]
OSX/libmv: restrict the unwind.h workaround to 10.6.sdk only

9 years agoOSX/libmv: added a ahck to fix compiling with 10.6.sdk, unwind.h related
Jens Verwiebe [Sun, 11 Mar 2012 11:23:30 +0000 (11:23 +0000)]
OSX/libmv: added a ahck to fix compiling with 10.6.sdk, unwind.h related

9 years agobmesh python api additions:
Campbell Barton [Sun, 11 Mar 2012 05:58:22 +0000 (05:58 +0000)]
bmesh python api additions:
- BMesh.is_wrapped
- BMesh.copy()
- BMesh.clear()
- BMesh.free()
- BMesh.from_object(obj, apply_modifiers=True)
- BMEdge.calc_length()
- BMLoop.calc_normal()
- BMLoop.calc_tangent()

9 years agobmesh py api - correct class references in docs and rename mesh conversion funcs...
Campbell Barton [Sun, 11 Mar 2012 04:07:22 +0000 (04:07 +0000)]
bmesh py api - correct class references in docs and rename mesh conversion funcs to ne less confusing.

9 years agobmesh py api: change .from_mesh() / .to_mesh() to be class methods of BMesh rather...
Campbell Barton [Sun, 11 Mar 2012 02:45:27 +0000 (02:45 +0000)]
bmesh py api: change .from_mesh() / .to_mesh() to be class methods of BMesh rather than functions in the module.

added example script which converts a mesh to a bmesh, edits and converts back again.

9 years agocode cleanup: remove unused externs.
Campbell Barton [Sun, 11 Mar 2012 00:00:27 +0000 (00:00 +0000)]
code cleanup: remove unused externs.

9 years agostyle cleanup: + some warning fixes, also remove unused metaelem extern.
Campbell Barton [Sat, 10 Mar 2012 22:00:55 +0000 (22:00 +0000)]
style cleanup: + some warning fixes, also remove unused metaelem extern.

9 years ago[#30373] Which part to snap in volume snapping is removed
Martin Poirier [Sat, 10 Mar 2012 21:40:35 +0000 (21:40 +0000)]
[#30373] Which part to snap in volume snapping is removed

By Bug reported by Pep Ribal

Also fixed an object mode bug with volume snapping and made it compatible with the edit mode "Snap on self" option

9 years agobmesh:
Campbell Barton [Sat, 10 Mar 2012 20:41:19 +0000 (20:41 +0000)]
bmesh:
- moved mesh conversion functions into their own file.

bmesh py api:
- can now create a new empty bmesh without first creating mesh data.
- added function to copy bmesh data back to a mesh.
- bmesh.from_mesh() can now get a mesh which isnt in editmode.

9 years ago2.6 UI:
Thomas Dinges [Sat, 10 Mar 2012 20:30:05 +0000 (20:30 +0000)]
2.6 UI:
World Context:
* Made world id block wider
* Don't show texture user when Cycles engine is used
Other:
* Change Dopesheet > DopeSheet in User Preferences Theme section for consistency.

9 years ago2.6 UI:
Thomas Dinges [Sat, 10 Mar 2012 20:08:25 +0000 (20:08 +0000)]
2.6 UI:
* Hide Modifier and Contraint Panel header, this gives a bit space.
As it's the only panel in these context tabs it does not make sense to close them anyways.

9 years agopatch [#30511] Save/load window state (allows Blender to start maximised)
Campbell Barton [Sat, 10 Mar 2012 17:49:26 +0000 (17:49 +0000)]
patch [#30511] Save/load window state (allows Blender to start maximised)
from Tom Edwards (artfunkel)

This patch fixes bug [#20791]

9 years agoRemove remained part of debug code.
Sergey Sharybin [Sat, 10 Mar 2012 17:14:50 +0000 (17:14 +0000)]
Remove remained part of debug code.

9 years agoForgot to remove code used for debuggning in previous commit.
Sergey Sharybin [Sat, 10 Mar 2012 16:55:09 +0000 (16:55 +0000)]
Forgot to remove code used for debuggning in previous commit.

9 years agoOSX/cmake: added a comment on method used
Jens Verwiebe [Sat, 10 Mar 2012 16:39:51 +0000 (16:39 +0000)]
OSX/cmake: added a comment on method used

9 years agoFinally 2D stabilization auto scale factor should be calculated perfectly
Sergey Sharybin [Sat, 10 Mar 2012 16:31:12 +0000 (16:31 +0000)]
Finally 2D stabilization auto scale factor should be calculated perfectly

9 years agoOSX/cmake: ensure newest Xcode compatibility, important: still needs a patched cmake...
Jens Verwiebe [Sat, 10 Mar 2012 16:21:48 +0000 (16:21 +0000)]
OSX/cmake: ensure newest Xcode compatibility, important: still needs a patched cmake ( see error you will get if missed ), patched cmake provided here: jensverwiebe.de/Blender/CMake%202.8-7patched.zip

9 years agofix for own error in recent commit with UV texture layers. - was shadowing variable...
Campbell Barton [Sat, 10 Mar 2012 15:55:25 +0000 (15:55 +0000)]
fix for own error in recent commit with UV texture layers. - was shadowing variable so assignment failed.

9 years agostyle cleanup
Campbell Barton [Sat, 10 Mar 2012 14:43:12 +0000 (14:43 +0000)]
style cleanup

9 years agostyle cleanup: unit code
Campbell Barton [Sat, 10 Mar 2012 14:20:55 +0000 (14:20 +0000)]
style cleanup: unit code

9 years agoFix an infinite loop in get_levels_from_disps().
Nicholas Bishop [Sat, 10 Mar 2012 12:26:32 +0000 (12:26 +0000)]
Fix an infinite loop in get_levels_from_disps().

This is called when adding a multiries modifier. BMesh MDisps have
only one loop's displacements rather than a full face's, so don't
multiply by number of corners here.

9 years agostyle cleanup: fly mode.
Campbell Barton [Sat, 10 Mar 2012 06:46:23 +0000 (06:46 +0000)]
style cleanup: fly mode.

9 years agofix [#30500] Mesh.tessface_uv_textures or Mesh.tessface_vertex_colors crash on access...
Campbell Barton [Sat, 10 Mar 2012 05:20:41 +0000 (05:20 +0000)]
fix [#30500] Mesh.tessface_uv_textures or Mesh.tessface_vertex_colors crash on access in editmode

just missing NULL checks on face data.

9 years agoRemove the OBJECT_OT_test_multires operator.
Nicholas Bishop [Sat, 10 Mar 2012 05:15:17 +0000 (05:15 +0000)]
Remove the OBJECT_OT_test_multires operator.

Originated in r35213, appears to have been some test for multires in
BMesh.

9 years agochange fly mode behavior to address issue raised in [#30508] - there being no way...
Campbell Barton [Sat, 10 Mar 2012 04:19:25 +0000 (04:19 +0000)]
change fly mode behavior to address issue raised in [#30508] - there being no way to pause.

now when reversing direction immediately - fly mode translation will pause until pressed again.

9 years agoSpeedup for ngon normal calculation
Campbell Barton [Sat, 10 Mar 2012 03:25:16 +0000 (03:25 +0000)]
Speedup for ngon normal calculation

- BM_mesh_normals_update was looping over all faces to find the largest one, this is no longer needed.
- calculating a face normal was looping over every faces corners twice, now only once - using the loops directly (not an iterator).
- face vert locations were being copied an array, now use directly.
- calculating the normals would copy a float vector for the next point in the face, which was never used (only current and previous used).
- was copying vectors to compute the normal, now just assign the float pointers.

9 years agoRevert changes BMesh changes MDisp loading in readfile.c
Nicholas Bishop [Sat, 10 Mar 2012 03:07:42 +0000 (03:07 +0000)]
Revert changes BMesh changes MDisp loading in readfile.c

These changes originated in r35321, which transfered MDisps to a
different memory allocator; this is no long used, however, so
post-merge it was just making an identical copy.

9 years agopicky changes to mouse cursor text selection behavior, previously as soon as the...
Campbell Barton [Fri, 9 Mar 2012 23:10:07 +0000 (23:10 +0000)]
picky changes to mouse cursor text selection behavior, previously as soon as the mouse was before a character it would select the previous, even if the cursor was closer to the space between the next 2 chars.

now find the closest point inbetween both chars.

9 years agodisable object outline draw when painting (its distracting), also fix for own recent...
Campbell Barton [Fri, 9 Mar 2012 22:00:40 +0000 (22:00 +0000)]
disable object outline draw when painting (its distracting), also fix for own recent mistake in vgroup_blend(). - had bad check for editmesh.

9 years agocode cleanup: remove unused variable assignents and added bmesh submodule links,...
Campbell Barton [Fri, 9 Mar 2012 21:23:15 +0000 (21:23 +0000)]
code cleanup: remove unused variable assignents and added bmesh submodule links, doc correction reported by dfelinto.

9 years agobmesh fix: faces were being created flipped the wrong way compared to surrounding...
Campbell Barton [Fri, 9 Mar 2012 20:29:53 +0000 (20:29 +0000)]
bmesh fix: faces were being created flipped the wrong way compared to surrounding geometry.
also the last edge was mot taken into account when calculating the correct winding.

9 years agostyle cleanup: consistent names for header guards.
Campbell Barton [Fri, 9 Mar 2012 19:17:19 +0000 (19:17 +0000)]
style cleanup: consistent names for header guards.

9 years agoCycles: another tooltip tweak.
Brecht Van Lommel [Fri, 9 Mar 2012 19:01:44 +0000 (19:01 +0000)]
Cycles: another tooltip tweak.

9 years agoFix makesdna error due to poor comment parsing, should be fixed in makesdna
Brecht Van Lommel [Fri, 9 Mar 2012 19:01:30 +0000 (19:01 +0000)]
Fix makesdna error due to poor comment parsing, should be fixed in makesdna
ideally but for now just tweak code in case it causes issues.

ERROR: still 1 structs unknown
*** Unknown structs: bSound

9 years agostyle cleanup: comment blocks
Campbell Barton [Fri, 9 Mar 2012 18:28:30 +0000 (18:28 +0000)]
style cleanup: comment blocks

9 years agoDO not increment image user counter on view3d duplicate and not decrement
Sergey Sharybin [Fri, 9 Mar 2012 13:43:37 +0000 (13:43 +0000)]
DO not increment image user counter on view3d duplicate and not decrement
it's user count on free. That's how other spaces handles ID block (like
image editor, space clip).

This fixes issue when loading file without loading UI when current layout
has got background images set.
Also this hopefully will fix issue #30429: Background Images Lost on Save/Close/Reload

9 years agoPrevious fix for stabilization autoscale actually broke stabilizaiton itself
Sergey Sharybin [Fri, 9 Mar 2012 13:37:42 +0000 (13:37 +0000)]
Previous fix for stabilization autoscale actually broke stabilizaiton itself
(median point was sliding a bit from it's original position)

This happens because of how transformation for stabilization calculates:
image is scaling around it's center, so image translation should be recalculated
after scale was changed, but scale also depends on translation. That's where
tricky things happens. It's still not ideal for case of rotation, but before
fixing this issue better to figure out usecase and see if it's indeed
so needed to scale around image center (it might only be helpful to use
stabilization parameters in compositor nodes).

9 years agoMarkers Tweak for Sequencer
Joshua Leung [Fri, 9 Mar 2012 13:31:20 +0000 (13:31 +0000)]
Markers Tweak for Sequencer

Applied the keymaps hack which is used for other animation editors to allow
markers to be added and renamed anywhere from within the sequencer strips
region, instead of just when the cursor is over the scrollbar.

Other operations where the hotkeys conflict though (delete, move) can still be
done only from the scrollbar, or better still, from the Timeline.

9 years agoTweaks for typos in the Keying Set descriptions commit
Joshua Leung [Fri, 9 Mar 2012 10:24:53 +0000 (10:24 +0000)]
Tweaks for typos in the Keying Set descriptions commit

9 years agoNode socket selection feature reimplemented from 2.49. Sockets can be selected as...
Lukas Toenne [Fri, 9 Mar 2012 10:16:41 +0000 (10:16 +0000)]
Node socket selection feature reimplemented from 2.49. Sockets can be selected as a sub-selection of nodes and are then preferred by the auto-connect operator. This makes it easier to create precise links over long distances as an alternative to the click & hold operator.
Socket selection is indicated by a simple white highlight circle.

Multiple inputs can be selected by holding SHIFTKEY (just like regular node select). Only one output socket can be selected at a time for each node, but several outputs in different nodes are allowed.

The auto-connect operator will prefer selected sockets on nodes for creating links. If either the output or input side have no selected sockets it will fall back to the previous behavior of chosing 'best' sockets first (colors, then vectors, then values). This could be improved in the future, but is out of scope here.

9 years agoSome fixes for 2D stabilization:
Sergey Sharybin [Fri, 9 Mar 2012 10:01:29 +0000 (10:01 +0000)]
Some fixes for 2D stabilization:
- Ron aspect ratio correction after applying location
  There're still some annoynments with rotation stabilization with
  pixel aspect != 1, will be fixed later.
- Joining tracks will update track used for rotation stabilization/

9 years agoOptimize index buffers for multires drawing in sculpt mode.
Nicholas Bishop [Fri, 9 Mar 2012 09:30:03 +0000 (09:30 +0000)]
Optimize index buffers for multires drawing in sculpt mode.

All multires grids have exactly the same ordering, so rather than
allocate a new index buffer for each PBVH node, just allocate one that
can be reused for every grid.

This requires more draw calls (one per grid rather than one per PBVH
node), but less graphics memory.

9 years agocode cleanup: replace macros VECCOPY, VECADD, VECSUB, INPR - with BLI_math funcs.
Campbell Barton [Fri, 9 Mar 2012 06:04:17 +0000 (06:04 +0000)]
code cleanup: replace macros VECCOPY, VECADD, VECSUB, INPR - with BLI_math funcs.

added copy float/double funcs: copy_v3fl_v3db(), copy_v3db_v3fl(). 2d & 4d too.