Commit Graph

38810 Commits

Author SHA1 Message Date
Ton Roosendaal
093f95afaa Bug fix #34868
Pulldown menus with long shortcut text labels got clipped badly occasionally.
Made the offset follow DPI better.
2013-04-18 08:51:07 +00:00
Campbell Barton
8a06acfd7a add mesh distort display mode (highlights distorted faces) 2013-04-18 04:24:18 +00:00
Campbell Barton
e7895abb32 make bmbvh call BM_mesh_elem_index_ensure(), further calls to utility functions assert if the index values becomes dirty. 2013-04-18 02:01:59 +00:00
Campbell Barton
3f7f07faf5 style cleanup 2013-04-18 01:52:38 +00:00
Campbell Barton
9cceec40c4 use modified vertex coords for calculating display thickness and intersections.
internal improvement to editmesh_bvh.c

- optionally pass cage-coords as an arg, rather then calculating the coords in BKE_bmbvh_new(),
  since all callers already have coords calculated.
- de-duplicate coords creation function from knife and bmbvhm, move into own generic function: BKE_editmesh_vertexCos_get()
2013-04-18 01:20:04 +00:00
Campbell Barton
2fefbf24a5 bmbvh was allocating an array for vert coords but not using it, removed.
also use generic name for callback data.
2013-04-18 00:24:44 +00:00
Campbell Barton
67034c378d fix for BMBVH_USE_CAGE option,
knife tool with modifier was broken when modifier cage was used.
2013-04-18 00:19:57 +00:00
Campbell Barton
4a7feafa49 Support object scale for mesh display options. (currently only uniform scale for thickness test) 2013-04-17 23:30:19 +00:00
Antony Riakiotakis
3fcb75f0b9 Fix thumbnails not appearing on MinGW64, was actually a mistake on
MinGW-w64 headers (where _stat is actually _stati64), but since we
recommend a specific compiler build it's OK for now. Also tweaked other
places where _wstat is used.
2013-04-17 19:35:33 +00:00
Lukas Toenne
2cf167cd21 Fix for #34911, Compositor with multiple views autozooms to node when creating a link. In order to allow node trees have different offsets in different editor instances, the view_center is now stored primarily in the bNodeTreePath struct for each tree in a node space. The view_center in bNodeTree is only used as an initial setting when opening a node group or switching node trees. 2013-04-17 17:12:12 +00:00
Lukas Toenne
3d78032251 Fix for node editor lib_link and memfile restore (undo): The snode->nodetree/first tree path pointer was not properly mapped on file load due to the fact that it's stored locally in other ID data blocks. Undo was restoring the pointer correctly, but used an ugly hack. Now the SpaceNode->id pointer is linked first, then the datablock is checked for an internal node tree, which is then used instead of trying to lib-link the node tree pointer. 2013-04-17 15:55:10 +00:00
Brecht Van Lommel
0fc4f4b791 Fix for render results acquire/release in viewport render, should only release
after drawing to be thread safe.
2013-04-17 14:47:52 +00:00
Ton Roosendaal
96dffe952b Bug fix #34974
The open region indicator (with +) didn't do alpha blending properly, so it wasn't
visible for any theme color.
2013-04-17 13:40:00 +00:00
Antony Riakiotakis
adfa7c8afa Don't use auto vectorization for MinGW-w64. It may be a source for
trouble. Also fixed a few harmless warnings.
2013-04-17 11:16:53 +00:00
Campbell Barton
14f9f167b2 display options to help with 3d printing.
editmesh debug info,
- overhang (with axis angle options)
- wall thickness (with min/max distance)
- self-intersections.

access below 'Mesh Display' panel.
2013-04-17 09:27:23 +00:00
Campbell Barton
cfefa1d086 add function BKE_bmbvh_find_face_segment()
given a segment, finds finds an intersecting faces from the first point to the second, needed for checking self intersections (not used yet).
2013-04-17 06:29:13 +00:00
Campbell Barton
861a38ea09 code cleanup: bmesh bvh
- remove unused members from BMBVHTree
- move per-raycast vars from BMBVHTree into per-callback structs (weren't threadsafe).
- simplify BKE_bmbvh_find_vert_closest().
2013-04-17 06:18:21 +00:00
Campbell Barton
b0752f1b89 add interp_v3_v3v3v3_uv() to use for use with uv value from isect_ray_tri_v3(), rename tree -> bmtree for BMBVHTree. 2013-04-17 05:49:06 +00:00
Campbell Barton
8ee1de2de3 text editor reload no-longer resets scroll & cursor - annoying when making tweaks to UI scripts.
also restrict freestyle hack to WITH_FREESTYLE define.
2013-04-17 04:53:23 +00:00
Campbell Barton
7abc2243b6 style cleanup 2013-04-17 01:16:23 +00:00
Ton Roosendaal
ae58968e0a Blender Internal Render in viewport
Because of our release soon, feature has been added behind the Debug Menu.
CTRL+ALT+D and set it to -1. Or commandline --debug-value -1.

When debug set to -1, you can put the viewport to 'render' mode, just like
for Cycles. Notes for testers: (and please no bugs in tracker for this :)

- It renders without AA, MBlur, Panorama, Sequence, Composite
- Only active render layer gets rendered. Select another layer will re-render.
- But yes: it works for FreeStyle renders!
- Also does great for local view.
- BI is not well suited for incremental renders on view changes. This only
  works for non-raytrace scenes, or zoom in ortho or camera mode, or for 
  Material changes. In most cases a full re-render is being done.
- ESC works to stop the preview render.
- Borders render as well. (CTRL+B)
- Force a refresh with arrow key left/right. A lot of settings don't trigger
  re-render yet.

Tech notes:

- FreeStyle is adding a lot of temp objects/meshes in the Main database. This
caused DepsGraph to trigger changes (and redraws). I've prepended the names
for these temp objects with char number 27 (ESC), and made these names be
ignored for tag update checking.

- Fixed some bugs that were noticable with such excessive re-renders, like 
  for opening file window, quit during renders.
2013-04-16 17:39:20 +00:00
Sv. Lockal
6dcee054be Set min value for sampling value of freestyle line geometry modifier to 0.
Negative sampling does not make any sense and leads to crash.
2013-04-16 17:12:04 +00:00
Antony Riakiotakis
858c7acd5b Fix: texture scaling for sculpting is different between overlay and
stroke. The reason is that we use a different sampling function.
Reported by Michalis Zissiou, thanks!
2013-04-16 16:22:26 +00:00
Antony Riakiotakis
c1276960e8 Fix some names, and move overlay flag to overlay_flags. 2013-04-16 15:59:02 +00:00
Campbell Barton
51cb077f16 add missing call to flush selection on selecting manifold geometry. 2013-04-16 15:45:30 +00:00
Campbell Barton
c458e051d3 fix for BKE_bmbvh_ray_cast() returning one of the vertices normals rather then the face normal. also remove redundant NULL checks. 2013-04-16 15:35:01 +00:00
Campbell Barton
9f5006a967 add distance arg to BKE_bmbvh_ray_cast(). currently unused. 2013-04-16 15:16:48 +00:00
Antony Riakiotakis
53c9507c28 Option to hide overlay during a stroke. To enable, press the brush icon
next to the overlay alpha.
2013-04-16 15:02:41 +00:00
Campbell Barton
ea0ad013d3 bmesh speedup for bvh building, replace SmallHash with BLI_bitmap, using a hash doesn't make much sense since in most cases all vertices are accessed and the hash isn't guaranteed to be small.
gives ~9x speedup to filling 'cagecos' in my own tests on a high poly mesh.
2013-04-16 14:57:02 +00:00
Antony Riakiotakis
e39ea5f0a3 Fix crash when no brush is active. Reported by Francesco Siddi, on irc
thanks!
2013-04-16 14:00:18 +00:00
Campbell Barton
fe4305ef82 skip calling BKE_editmesh_tessface_calc() from BKE_bmbvh_new(), also quiet float/double warnings. 2013-04-16 13:01:46 +00:00
Sergey Sharybin
c429349054 Fixed compilation error with gcc 4.4 and 4.5
Was giving structure re-declaration error,
made it one typedef and struct declaration only.
2013-04-16 11:27:19 +00:00
Campbell Barton
a120049c3b use psys->seed for smoke random number generator, increase size of MATHUTILS_TOT_CB and reduce float->double conversions. 2013-04-16 09:04:34 +00:00
Tamito Kajiyama
547796db53 Fix for line instability with the Polygonization geometry modifier.
Extra long straight lines showed up randomly due to the use of an uninitialized
variable as a line length parameter.
2013-04-16 07:13:49 +00:00
Campbell Barton
37e73aa368 code cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_editmesh_bvh.h 2013-04-16 05:59:48 +00:00
Campbell Barton
77da6b3662 move editmesh functions out editderivedmesh.c into editmesh.c 2013-04-16 05:46:17 +00:00
Campbell Barton
fa919d23bc move editmesh_bvh.c into blenkernel. 2013-04-16 05:23:34 +00:00
Antony Riakiotakis
e93f00d73d Compile fixes for recent commits 2013-04-16 00:56:24 +00:00
Brecht Van Lommel
d3a878688e Fix crash rendering environment maps. I think this freestyle code was not
intended to be here and probably was left over from some earlier code, as
resetting the configuration on render would lead to data loss.
2013-04-15 23:12:54 +00:00
Brecht Van Lommel
a1a4631f11 Fix crash rendering environment maps. 2013-04-15 23:12:52 +00:00
Brecht Van Lommel
f4fe1b8e77 Fix a few warnings. One was an actual bug in freestyle where stroke attributes
were not properly interpolated.
2013-04-15 23:12:49 +00:00
Brecht Van Lommel
afb4b65167 Random number generator: replace a bunch of usage of the global random number
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.

Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
2013-04-15 23:12:40 +00:00
Stuart Broadfoot
638b084f82 Cycles Hair: Strand Minimum Pixel Size
Code is added to restrict the pixel size of strands in cycles. It works best with ribbon primitives and a preset for these is included. It uses distance dependent expansion of the strands and then stochastic strand removal to give a fading. To prevent a slowdown for triangle mesh objects in the BVH an extra visibility flag has been added. It is also only applied for camera rays.

The strand width settings are also changed, so that the particle size is not included in the width calculation. Instead there is a separate particle system parameter for width scaling.
2013-04-15 21:38:31 +00:00
Brecht Van Lommel
ceb61eb14d Fix #34978: for cycles, images displayed in the UV editor where coupled to the
active image texture node in the material, now this is removed and the image in
the image editor is decoupled and not changed upon entering edit mode.

This system caused more confusion then it's worth, changing or removing textures
would modify the material but users would often not be aware of this.
2013-04-15 18:05:53 +00:00
Brecht Van Lommel
d260ccb927 Fix #34975: crash rendering curve/text with modifiers that alter topology,
was issue in new freestyle code.
2013-04-15 17:45:15 +00:00
Sergey Sharybin
24ef6f7add Touch properties when clearing/adding to a collection.
Fixes an issue when adding several movie strips fails
second time in sequencer.
2013-04-15 16:24:35 +00:00
Brecht Van Lommel
460456baca Fix for cycles border render optimization commit, render status bar was off by 1 pixel. 2013-04-15 16:18:33 +00:00
Sergey Sharybin
9b1a7b1cb5 Fix #34967: Display transform makes byte image with alpha=0 black
Skip premultiplication/de-premultiplication when acquiring display
buffer for a byte image. Will make conversion a bit faster also :)
2013-04-15 15:41:53 +00:00
Campbell Barton
59ca83c3a9 rename axis_angle_to_mat3_no_norm() --> axis_angle_normalized_to_mat3().
this matches closer to convention from existing functions - angle_v3v3() angle_normalized_v3v3().

also added assert to ensure argument given to axis_angle_normalized_to_mat3() is in fact normalized.
2013-04-15 15:16:11 +00:00
Bastien Montagne
03d6319862 Fix: when using a search menu with an operator's enum prop, the operator was previously always executed with default options (appart from the search-set enum, of course). Now we store the op's properties in search button, so that you can specify non-default options (as it was already possible with e.g. pop-up menu from an operator's enum prop).
To achieve this, some code (callbacks and search button creation) was moved from wm_operators.c to interface/interface.c, and a new UI function was added, uiDefSearchButO_ptr.

Note: This new code uses the fact that uiButHandleFunc callbacks get executed before operator when one of its arg is the button itself!

Many thanks to Campbell who helped me a lot with this patch!

Cleanup: also removed two unused pointers from uiBut struct.
2013-04-15 15:01:12 +00:00