Commit Graph

37202 Commits

Author SHA1 Message Date
Campbell Barton
ee9a00948b 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.
2012-03-14 06:14:15 +00:00
Campbell Barton
f15c15e992 bmesh py api: finished todo - editable select_history
eg:
  bm.select_history = vert, face, edge

  bm.select_history.add(edge)
2012-03-14 04:46:12 +00:00
Nicholas Bishop
99f72dfbfc 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.
2012-03-14 03:10:18 +00:00
Campbell Barton
f80fa54428 documentation edit to address bmesh py api bug [#30453]
warn when addons are not found when running cmake.
2012-03-14 00:30:20 +00:00
Campbell Barton
a64ee8433a fix [#30493] GE crashes on exit because of using freed mtfaces from tessfaces
prevent gpu_draw.c holding a pointer to a freed array.
2012-03-13 23:28:02 +00:00
Campbell Barton
489526477c print warning when release/datafiles/locale is missing when building with cmake (git-svn causes this). 2012-03-13 22:27:21 +00:00
Campbell Barton
08f17b2a53 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.
2012-03-13 20:24:05 +00:00
Campbell Barton
01b3e9cc9f loopwalker support for selecting the sides of ngons
see: wiki.blender.org/uploads/d/dc/BMesh_NGon_Loop_Select.png
2012-03-13 18:37:31 +00:00
Campbell Barton
b47e2ee907 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.
2012-03-13 17:13:44 +00:00
Campbell Barton
1581816d54 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.
2012-03-13 15:44:48 +00:00
Campbell Barton
59303e35fc WITH_GHOST_SDL working again (missing std:: update) 2012-03-13 14:28:58 +00:00
Sergey Sharybin
f34c3580ac Fix possible usage of NULL function reported by clang 2012-03-13 10:31:42 +00:00
Campbell Barton
2fbb5ce833 bmesh py api: more comprehensive intro page, also fix some spelling errors. 2012-03-13 06:22:43 +00:00
Campbell Barton
a69585573e bmesh python api:
BMesh.select_history.remove/clear/validate functions.
2012-03-13 02:59:42 +00:00
Campbell Barton
d25dc3b872 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)
2012-03-13 02:18:46 +00:00
Campbell Barton
a97825dfd7 stule cleanup for rct.c and fix for error in last commit. 2012-03-13 01:55:25 +00:00
Campbell Barton
8646bb4464 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.
2012-03-13 01:11:08 +00:00
Campbell Barton
b457c7fdbd style cleanup 2012-03-12 23:56:11 +00:00
Nicholas Bishop
caac81d75f 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.)
2012-03-12 23:03:43 +00:00
Nicholas Bishop
dfc9a57b3e 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.
2012-03-12 22:52:20 +00:00
Campbell Barton
07ffbbfcb6 better fix for [#30529], find the right axis rather then checking for folded quads. 2012-03-12 21:38:13 +00:00
Sergey Sharybin
e3cfca511f Bundle latest version of Carve library which shall resolve compilation issues with clang 2012-03-12 21:18:28 +00:00
Campbell Barton
30790e9390 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.
2012-03-12 21:09:27 +00:00
Sergey Sharybin
e0a2e79f4d 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.
2012-03-12 14:55:56 +00:00
Lukas Toenne
d3e271c55a 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. 2012-03-12 14:39:37 +00:00
Sergey Sharybin
a527e3ea25 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.
2012-03-12 14:35:07 +00:00
Brecht Van Lommel
74b7bc1228 Fix #30524: documentation example code for bge.types.KX_MeshProxy did not work,
using fix suggested by Ryan King.
2012-03-12 13:04:06 +00:00
Howard Trickey
50af47a67f 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.
2012-03-12 12:45:55 +00:00
Jens Verwiebe
cd2d2f2f4e 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 2012-03-12 12:03:52 +00:00
Brecht Van Lommel
b53cbb4e01 Fix #30512: external render saved render result after reporting error. 2012-03-12 11:32:23 +00:00
Howard Trickey
ca5fd21bb5 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.
2012-03-12 11:27:59 +00:00
Bastien Montagne
30907594b6 Style cleanup in blenfont (spaces, C++ comments, etc.). 2012-03-12 09:22:16 +00:00
Bastien Montagne
51c553befb Removing SWAP macro define from BLI_heap.c, already present in BLI_utildefines.h, giving compile error. 2012-03-12 09:20:38 +00:00
Sergey Sharybin
e3df2697c3 Commit patch from Shane Ambler to make VideoTexture compile with a clang on FreeBSD.
Thanks!
2012-03-12 08:46:53 +00:00
Sergey Sharybin
b22e06bf7b 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.
2012-03-12 08:45:06 +00:00
Miika Hamalainen
ea56a54747 Fix msvc compilation errors. (__func__ undeclared) 2012-03-12 07:21:22 +00:00
Campbell Barton
aedd4af57e 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.
2012-03-12 06:53:47 +00:00
Campbell Barton
0873cbaed5 style cleanup: line length - some over 300 long. 2012-03-12 06:07:16 +00:00
Guillermo S. Romero
1979679ad6 SVN maintenance. 2012-03-12 04:35:06 +00:00
Campbell Barton
a04f44f486 fix [#30472] 3d view objects not rendered, cycles.
holdout layer wasnt initializes in some cases.
2012-03-12 01:34:38 +00:00
Campbell Barton
7afeb21a41 text delimiter - convert to unicode before comparing characters. 2012-03-12 00:03:42 +00:00
Campbell Barton
cae11a98f9 style cleanup 2012-03-11 23:47:41 +00:00
Campbell Barton
ac24d98e24 bmesh: edge loop select
add support for loop selecting boundry edges only - handy for loop selecting the side of an ngon.
2012-03-11 21:47:14 +00:00
Antony Riakiotakis
33d8104716 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. 2012-03-11 20:45:58 +00:00
Sergey Sharybin
d6b8b03305 Port changes from libmv/CMakeLists.txt to build rules files generator script 2012-03-11 20:01:26 +00:00
Campbell Barton
b330abc290 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.
2012-03-11 19:58:56 +00:00
Sergey Sharybin
42b3463030 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.
2012-03-11 19:52:25 +00:00
Campbell Barton
c21c58f44c style cleanup, also remove unused externs. 2012-03-11 19:09:01 +00:00
Campbell Barton
65895a2a38 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).
2012-03-11 17:41:19 +00:00
Campbell Barton
178c2c32f2 [#30503] Callback for render job completion
from Jason van Gumster (thefallenweeble)

adds render_complete and render_cancel callbacks to bpy.app.handlers
2012-03-11 17:24:03 +00:00