Commit Graph

50156 Commits

Author SHA1 Message Date
d54b2f7d91 Code cleanup: use TRUE/FALSE instead of 1/0 for bool properties default values... 2013-08-23 21:13:30 +00:00
5b83a89c81 Followup to r59434 : py UI scripts edits.
Notes:
* Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it...
* Also made some cleanup "on the road"!
2013-08-23 20:41:21 +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
Lukas Toenne
dd36c6b948 Fix for an obscure bpy_types bug: When attempting to define __setattr__ in a metaclass based on RNAMetaPropGroup, the base class' __setattr__ method can not be called, since python prohibits setattr on
builtin classes. This was done in Python 2.3 to prevent changes to the 'object' type definition and similar issues. As explained by Guido van Rossum in the following mail, the python check will look for
the *closest* base class, which fails for RNAMetaPropGroup because its first base is RNAMeta, which is in turn a subclass of 'type'.

http://code.activestate.com/lists/python-dev/34489/

The easiest and safest way to prevent this issue therefore seems to be
to swap the base class order for RNAMetaPropGroup, so that StructMetaPropGroup is the first base, which has a perfectly valid setattr implementation.
2013-08-23 15:39:25 +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
01e22d1b9f Cycles: more code refactoring to rename things internally as well. Also change
property name back so we keep compatibility.
2013-08-23 14:34:34 +00:00
22f4874877 Cycles: change Progressive sampling option in UI to an enum of "Path Tracing"
and "Branched Path Tracing", to try to make it more clear that this is not
related to progressive refinement, non-progressive was always a bad name anyway.
2013-08-23 14:08:40 +00:00
805cca3903 Fix clang compile warning. 2013-08-23 14:08:39 +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
f560d25666 Code cleanup / Cycles:
* Some style tweaks for hair code.
2013-08-23 12:19:35 +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
e203c4c390 Cycles / Sampling UI:
* Do not show Total Samples print for Progressive, when Square Samples are disabled. In this case it's obvious even without the print. :)
2013-08-23 11:39:48 +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
9f72bf7865 Tracking cleanup
- Collapse plane track panels by default
- Hide 3D markers when in mask edit mode
- Remove alpha from mask layers list

Discussed with Sebastian and Roman.
2013-08-23 09:40:42 +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
e8dced9074 style cleanup: pep8 2013-08-23 04:04:46 +00:00
fc9d4bdf73 Cycles / Sampling UI:
* Add a "Total Samples" info at the bottom of the panel.
This makes understanding the Non-Progressive integrator easier, as it displays how many samples are used for the different ray types. 

* Rename Squared Samples to Square samples, to indicate that the action is not already done. The new Total Samples info should make this easier to understand now as well. Also added back for Progressive integrator, for consistency. 

Screenshot:
http://www.pasteall.org/pic/show.php?id=57980
2013-08-22 19:57:56 +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
104cd04f4f Had not been updated after last edit to prvicons.svg file (r53004)... 2013-08-22 13:48:22 +00:00
4c38db307e Fix [#36534] Errors in install_deps.sh script when running on Arch Linux
Patch provided by Darren Beck, thanks!
2013-08-22 06:05:40 +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
636b200709 style cleanup: pep8, also use float literals when comparing floats and pass tuples to mathutils.Vector() rather then list. 2013-08-21 23:19:01 +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
2a5b6d9c8f Temporary fix for gaps in strokes when objects are behind the lines.
Problem report by Light BWK through personal communications, thanks a lot!

Apparently there is something wrong in the way how edges are chained to
create strokes.  For some unknown reason, strokes may contain a very small
line segment that proceeds in the opposite direction (e.g., downward
even when adjacent stroke segments proceed upward), resulting in the
reported visual artefact.

This revision is intended to address the reported issue in most cases.
The present solution is not a proper fix of the issue.  Another code
update with better understanding of the real cause is due in the future
work.
2013-08-21 21:20:51 +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