Commit Graph

40795 Commits

Author SHA1 Message Date
3cf14f0b3a style cleanup: space around for loop wrappers 2013-08-24 10:05:29 +00:00
3741a588bc Fix 36505: Collada exporter crashes Blender when exporting to locked file 2013-08-24 09:51:05 +00:00
bffd7767e2 fix for crash in weight-paint-gradient, missing call to curve curvemapping_initialize 2013-08-24 08:58:58 +00:00
2fefb0fe85 Fix [#36330] Clicking Scrolled Object Properties Tab Brings Up Wrong One
Actually, happened in any view2D... Just added a call to WM_event_add_mousemove() in view_pan_apply, so that overed/active button is refreshed in this case.
2013-08-24 08:46:48 +00:00
b97334f992 add GPL header to treehash.c and add missing includes to cmake. 2013-08-24 03:17:28 +00:00
b44f3bf1ab code cleanup: change to r59443, TRUE/FALSE are deprecated, see BLI_sys_types.h 2013-08-24 03:16:22 +00:00
3a73f635c2 Fix #36441: opengl render of smoke wrong after regular render with blender internal.
Object.imat isn't always the inverse of Object.obmat, needs to be set before usage
as mentioned in DNA_object_types.h.

Thanks to Miika for tracking down the cause of this bug.
2013-08-23 22:57:29 +00:00
ab24f8aa9d Related to [#36548] "Grease Pencil" Problems
Use scene's GPencil when active object is deselected. Else it can be tricky and not user-friendly to access to the scene's GPencil once some objects have GPencil data (you have to select/active a non-gpencil object, or switch to a layout without active object...).
2013-08-23 21:26:59 +00:00
d54b2f7d91 Code cleanup: use TRUE/FALSE instead of 1/0 for bool properties default values... 2013-08-23 21:13:30 +00:00
52eb61f84b Fix state losses for recursive outliner trees (e.g. datablocks editor)
In previous optimization in outliner I assumed that order in treehash was not important.
But testing outliner in datablocks mode revealed a problem: when user expands multiple recursive levels and then closes any element, it always closed the top level of recursion.
Now it should work fine with recursive trees.
Now treehash contains groups of elements indexed by (id,nr,type). Adding an element with the same (id,nr,type) results in appending it to existing group. No duplicates are possible in treehash.
This commit should also make lookups a little bit faster, because searching in small arrays by "used" is faster than searching in hashtable with duplicates by "id,nr,type,used".
2013-08-23 20:35:00 +00:00
587796170a Fix compile in Visual Studio 2008:
* isfinite is not defined, in Blender code we use 'finite' instead
2013-08-23 18:02:23 +00:00
5dacf174e6 UI layout: Fix the fact that children layouts were implicitely inconditionnaly aligned when the parent was. E.g.in
col = layout.column(True)
row = col.row(False)

Items in row would be 'aligned' in the same group as those in col. Now to get this happening, you have to set row as aligned as well.

Please note that fixes for py UI scripts will follow in another commit.

Also fixed labels of RNA pointers searchboxes, which were missing the colon!
2013-08-23 16:53:37 +00:00
384b8aafbf patch to add backkbacks for game engine start/end,
by sjoerd_de_vries
2013-08-23 15:45:18 +00:00
6f26acb009 simplify dist_to_plane_v3 and add dist_squared_to_plane_v3 2013-08-23 15:19:20 +00:00
25ca762238 Fix [#36538] Discontinuity (Euler) Filter - never ends - (deadlock?)
Code could enter in an infinite loop when curve value was an odd multiple of PI (i.e. 180°)...

Current code was also factorized and got rid of fabs calls! ;)
2013-08-23 15:17:54 +00:00
09ff49755f math api edits - replace point-normal form for a plane with dist_to_plane_v3()
also correct python mathutils api, was missing vector checks.
2013-08-23 14:37:22 +00:00
a55857c653 new mesh bisect had a problem not selecting faces with fill option in face mode. 2013-08-23 14:07:22 +00:00
620d674b85 fix error in recently added symmetrize rewrite, verts already on the aligned to the mirror-plane would not be welded. 2013-08-23 13:27:44 +00:00
d6b9fb36d8 fix leak in BM_face_split() with multires if the split failed.
also remove redundant normal copy.

only triangulate the mesh if its needed when enabling dyntopo.
2013-08-23 13:00:43 +00:00
c752346cfa new mesh bisect tool, available in the mesh menu.
cuts the mesh in half based on the cursor location and the viewport,
optionally supports filling the cut area (with uvs. vcols, etc),
and removing geometry on either side of the cut.
2013-08-23 11:46:08 +00:00
81096bab0c correct error in recent commit triangle-fill-dissolve, need to check if the edges face is removed (happens in rare cases). 2013-08-23 11:28:33 +00:00
9843170f4b * Compile fix for r59395, 'move bmesh tools into their own include'. 2013-08-23 11:16:52 +00:00
111b365c58 _another_ fix for recently added bisect operator, looping over mixed geometry could read freed memory when vertices were removed. 2013-08-23 11:11:59 +00:00
98bb2197a2 add dissolve option to triangle fill operator, running dissolve after scanfill isn't so simple because of errors if one edge can't merge. 2013-08-23 11:10:46 +00:00
59b082dc27 fix for error in recetly added bisect operator, in rare cases it could attempt to remove vertices twice. 2013-08-23 10:19:58 +00:00
5b5cae86b7 optiona for bmesh triangle fill operator to take a normal argument 2013-08-23 10:12:09 +00:00
2e2ea1ae21 set function args in BLI_math_rotation as const where possible. 2013-08-23 09:46:11 +00:00
a734ddc506 Tracking Python API improvements
- Solved issue with changing marker's frame number
  for tracks which doesn't belong to camera object.

- Support find_frame, insert_frame and delete_frame
  functions for plane markers.
2013-08-23 09:10:23 +00:00
68592d3cd1 Fix #36535: Color difference when saving image
Issue was caused by precision loss in alpha under code.
Now it might be slower a bit, but it's as precise as it
could be. At least i hope so :)
2013-08-23 08:27:01 +00:00
6f4b79d5af edits to new symmetrize tool
- snap axis-aligned verts to the center.
- expose the threshold for detecting if a vertex is on the axis.
2013-08-23 05:32:43 +00:00
77fa1aaab5 modify closest_to_plane_v3 not to use point-normal form. 2013-08-23 05:15:12 +00:00
6cba2b8d73 move bmesh tools into their own include,
changes to tool args would rebuild far too many files and these are mainly by modifiers outside of bmesh.
2013-08-23 04:22:07 +00:00
da7af1e271 correct own error in r59365, reported as [#36536] Extrusion detaches faces 2013-08-22 18:52:34 +00:00
c4e1d40022 replace symmetrize code with calls to bmesh operators.
calls: bisect, duplicate, scale, flip, weld.

resolves report [#36475] Symmetrise does not keep uv/weight

also fixes issues with faces that cross the axis more then once.
2013-08-22 18:02:36 +00:00
e97f979f73 new bmesh operator bisect_plane, cuts a mesh in half, takes a user defined plane as an argument, handles concave ngons which need multiple cuts. 2013-08-22 17:56:08 +00:00
c1cc9f3376 bmesh duplicate operator: add vertmap output slot. 2013-08-22 17:32:41 +00:00
2ee6c0ac6b add utility functions for dealing with planes
- plane_point_side_v3(), a bit like line_point_side_v2()
- isect_point_planes_v3(), moved from paint_hide.c

functions to convert between point/normal pairs.
- plane_from_point_normal_v3()
- plane_to_point_normal_v3()
2013-08-22 15:30:24 +00:00
29c8d3e20d Automatically re-generate png icon files from svg ones (CMake only for now)... Expects Inkscape program. 2013-08-22 13:51:00 +00:00
ccc1fc1499 minor internal change: isect_point_poly_v2 was assigning a value past the array bounds,
not that bad since it wasn't read but this isnt good practice and its simple to avoid.
2013-08-21 23:33:50 +00:00
c26a4be5c0 Fix [#36530] Texture tab refreshing problem
That was not really a bug (code working as expected), but the way tex context was handled was a bit raw, now it is much smarter:
* Default fallback context (when current one is no more valid) will now choose "most specific" ones first (i.e. material/lamp/particules before world and "others").
* When using that default fallback context, previous one is stored and we try to revive it later, if possible. Thus e.g. object[mat tex ctxt] -> empty[default world ctxt] -> object[mat tex ctxt] is now working as expected.
* However, when user explicitely or implicitely (through e.g. going to Material context...) sets a tex context, previous one is not stored, so that only default fallback context switch may later automatically revive a previous (presumably user-set) context.
2013-08-21 21:35:45 +00:00
5ba8b52923 set nonnull args for BLI_qsort_r 2013-08-21 20:45:51 +00:00
4dd9353e56 ghash/edgehash flag wasn't being initialized for new hashes. also init vars in same order for ghash/edgehash. 2013-08-21 20:21:42 +00:00
a31db0c7e9 rename recently added BLI_ghash_assign() -> BLI_ghash_reinsert() 2013-08-21 16:06:03 +00:00
7490cb9e94 fix for bad mistake in recently added BM_face_create_verts functiofix for bad mistake in recently added BM_face_create_verts functionn 2013-08-21 16:00:53 +00:00
dcddd32c45 Scultping: Growing the pbvh node container should use malloc instead of
calloc. Since we copy the first 1/1.3 part of the new array from the
existing nodes, only the rest 0.3/1.3 should be initialized to zero.
This should in theory cut down the times of occasional hangs with
dyntopo, since my guess is that it is caused by dynamic reallocations.
Maybe a linked list structure would help here? This is a bigger change
though, leaving as is for now.

Also, minor cleanup, delete duplicate ghash deletion and remove unneeded
commented code.
2013-08-21 15:21:56 +00:00
fca659252f code cleanup: bmesh duplicate functions
- avoid using an iterator when stepping around an edges radial loop.
- use naming constant with the rest of the bmesh operators.
2013-08-21 14:35:51 +00:00
d4b90378a7 Copying of nurbs shall happen after converting font to curves
Otherwise changing font settings wouldn't apply instantly.
2013-08-21 13:13:48 +00:00
e84be41946 Fix #36453: scaling faces with individual origins would permanently turn of
proportional editing because this combination doesn't work, but it should
be only temporary.
2013-08-21 12:20:40 +00:00
76a4d91dc4 Fix #36499: proportional edit circle was drawing behind objects in some cases,
now it always draws in front to ensure the circle is visible.
2013-08-21 12:20:31 +00:00
649743dfd6 mesh duplication was doing a loop & hash lookup for every loop corner, when there is no need since the faces are aligned.
was also initializing and stepping an iterator for no reason.
2013-08-21 11:27:18 +00:00