Commit Graph

21772 Commits

Author SHA1 Message Date
ac56fef228 Todo items:
- Outliner: new scroll operator, PageUp PageDown scroll entire page now.
- 2D views (like buttons) PageUp PageDown now also scroll entire page.
  (they used same step as scrollwheel before)
2011-01-08 18:37:11 +00:00
5e8b877268 Crash fix, IRC report.
Python console crashed on opening.

Too quick code cleaning for "unused variables" caused a complete line
of code to disappear that was needed anyway :)
2011-01-08 17:47:34 +00:00
6594b591de Proportional editing:
- Proportional circle size is printed in header
  Allows you to find out if you make it smaller when it's large
- Proportional size is clipped with view3d clip-end now
- Added the size to rna, so you can inspect values via UI and py.
2011-01-08 16:54:38 +00:00
17dd29cb85 Bugfix, own collection
New displist code for curves/text copied display lists without 
checking for freeing existing ones. Caused some memleaking.
2011-01-08 15:35:15 +00:00
3b74074aec remove unused code & variables. 2011-01-08 12:43:44 +00:00
988e5371fa fix for crash when converting sequencer profiles with non-float buffers. 2011-01-08 12:22:16 +00:00
39e7848ca1 fix for using freed memory with animation/group/ungroup code. 2011-01-08 11:08:51 +00:00
d3d5fe42bf fixed a case with occlusion where uninitialized variable could be used.
also removed unused vars.

can_pbvh_draw() had a NULL check which is never needed (callers check for this), a NULL ob would have crashed the function anyway.
2011-01-08 10:23:36 +00:00
c35db522da variable 'pool' could be accessed as NULL, globalPool was allocated but not assigned before use.
also remove unused vars.
2011-01-08 10:13:59 +00:00
053776bf57 Sculpt/Paint:
More cleanups: moved a function declaration to the correct module,
removed old/incorrect comments, marked more things with TODO where
appropriate, refactored copy-pasted function, de-duplicated code.
2011-01-08 01:45:02 +00:00
2579347a9a Paint:
More cleanups to the cursor drawing code; factored out another
sculpt-related function, replaced float calculations with bitwise
flags, removed unnecessary GL changes, de-duplicated some lines,
removed unused parameters, and added more comments.
2011-01-08 01:16:35 +00:00
14d6d1cdf6 More Windows+mingw compiling fixes:
FILE_FILE_MAXDIR/FILE were undefined. Restoring BKE_utildefines.h
include to make this work again in the meantime.
2011-01-07 23:54:58 +00:00
e415798e13 Removed some overly agressive (and IMO pointless) "UNUSED(arg)"
wrappers which was breaking compiling on Windows (mingw)
2011-01-07 23:47:12 +00:00
46bf79fd02 Paint cleanup:
Pulled out the paint brush overlay drawing code into its own
function, brush drawing function was before ~250 lines.
2011-01-07 23:36:48 +00:00
2d9c11f3a3 Paint/Sculpt:
More minor cleanups: fixed names and factored out a function that was
copy-pasted into paint stroke.
2011-01-07 22:46:52 +00:00
ab41b9bbaf Paint/Sculpt:
Some minor cleanups: removed `#if 0' code and moved a function into paint_util to avoid `extern' declaration.
2011-01-07 22:03:16 +00:00
473838aec9 Fix for bug [#21534] Multires modifier strange deformations
This adds the "Apply Base" feature from my gsoc2010 branch.

Apply Base partially applies the modifier, in that the mesh is
reshaped to more closely match the deformed mesh. The upper-level
displacements are recalculated so that the highest multires level
appears unchanged.

Multires does not currently deal well with too large displacements.
An easy-to-reproduce example: create any mesh type, add multires,
subdivide a few times, then use the sculpt grab brush to drag the
entire mesh over a few units. At the highest level, and at level 0,
the mesh looks fine, but all of the intervening levels will have ugly
spikes on them.

This patch doesn't help with situations where you can't modify the
base mesh, but otherwise works around the problem fairly well (albeit
with a heuristic, not an exact solution.)
2011-01-07 21:12:47 +00:00
ab11863b2f SVN maintenance. 2011-01-07 20:02:56 +00:00
89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
a601fd8893 Bug fix: unbaked particle cache was cleared from current frame onwards on file load. 2011-01-07 17:27:27 +00:00
b9fe5399e8 Revert bump mapping patch for now, backwards compatibility is not good enough,
we may need to preserve the previous method.
2011-01-07 16:55:56 +00:00
f01cac08e7 Fix #25078: texture mapping options (e.g. size) not working correctly with bump.
This problem was in both new bump and new new bump. The derivatives used for
bump mapping did not include the mapping, which gave mismatched offset for the
taps, now just do the mapping beforehand.
2011-01-07 15:41:24 +00:00
c8e0ca44a3 Improved bump mapping patch by M.G. Kishalmi (lmg) and M.S. Mikkelsen (sparky).
Many thanks to them!

For comparison, see here:
http://kishalmi.servus.at/3D/bumpcode/

Based on algorithm in: Mikkelsen M. S.: Simulation of Wrinkled Surfaces Revisited.
http://jbit.net/~sparky/sfgrad_bump/mm_sfgrad_bump.pdf

This fixes bugs:
#24591: Artefacts/strange normal mapping when anti-aliasing is on
#24735: Error at the Normal function.
#24962: Normals are not calculated correctly if anti-aliasing is off
#25103: Weird artefacts in Normal

This will break render compatibility a bit, but fixing this bugs would have also
done that, so in this case it should be acceptable.

Patch committed with these modifications:
* Bump method Old/3-Tap/5-Tap option in UI, 3-Tap is default
* Only compute normal perturbation vectors when needed
* Fix some middle of block variable definitions for MSVC
2011-01-07 14:42:01 +00:00
03e0f28ea0 bugfix [#25528] lack of update and crash using hook modifier. 2011-01-07 11:48:35 +00:00
3c6077e8ec Bug fix: particle point cache was reset on start frame if particles had grid distribution even if there were no changes. 2011-01-07 11:38:28 +00:00
29efbf8a04 New hair child options:
* Renamed children to "simple" and "interpolated" as this is
  easier to explain and more descriptive than "from particles"
  and "from faces".
* Also shuffled the child ui around a bit to make it clearer.
* Child seed parameter allows to change the seed for children
  independent of the main seed value.
* Long hair mode for interpolated children:
  - Making even haircuts was impossible before as the child
    strand lengths were even, but their root coordinates were
    not similar in relation to the parent strands.
  - The "long hair" option uses the tips of the parent strands
    to calculate the child strand tips.
* Hair parting options:
  - Hair parting can now be calculated dynamically on the fly
    when in 2.49 there was a cumbersome way of using emitter mesh
    seams to define parting lines.
  - For long hair parting can be created by a tip distance/root
    distance threshold. For example setting the minimum threshold
    to 2.0 creates partings between children belonging to parents
    with tip distance of three times the root distance
    ((1+2)*root distance).
  - For short hair the parting thresholds are used as angles
    between the root directions.
* New kink parameters:
  - Kink flatness calculates kink into a shape that would have
    been achieved with an actual curling iron.
  - Kink amplitude clump determines how much the main clump value
    effects the kink amplitude.
  - The beginning of kink is now smoothed to make the hair look
    more natural close to the roots.
* Some bugs fixed along the way too:
  - Child parent's were not determined correctly in some cases.
  - Children didn't always look correct in particle mode.
  - Changing child parameters caused actual particles to be
    recalculated.
* Also cleaned up some deprecated code.

All in all there should be no real changes to how old files look
(except perhaps a bit better!), but the new options should make
hair/fur creation a bit more enjoyable. I'll try to make a video
demonstrating the new stuff shortly.
2011-01-07 11:24:34 +00:00
7ad97b04b7 cmake: share the DNA_*.h list definition between makesrna and makesdna 2011-01-07 11:08:47 +00:00
841c50b5e2 Fix for [#25526] Inmediate crash when changing amount of particles in a particle system
* Point cache index array doesn't necessarily have all particles if the particles were re-allocated recently.
2011-01-07 10:38:17 +00:00
96128ee69f Fix for [#25506] Hair showing up in places not assigned by a weightmap
* Two separate bugs, with very similar symptoms.
* The distribution binary search didn't work correctly in cases where there were a lot of faces with 0 weights.
* Maximum distribution sum should have been exactly 1, but due to the wonderful nature of floats this wasn't the case at all.
2011-01-07 10:13:30 +00:00
57a3cff3b8 patch [#25440] Object.vertex_group fixin'
from Dan Eicher (dna) 

 From the tracker (with minor edits)
========================

cube = bpy.data.objects['Cube']
foo = cube.vertex_groups.new('foo')
foo.add([1,3,5,7], 1.0, 'ADD')

for i in range(len(cube.data.vertices)):
    try:
        weight = foo.weight(i)
        print('vert: %i weight: %f' % (i, weight))
    except:
        pass

foo.remove([1,3])

cube.vertex_groups.remove(foo)
2011-01-07 09:50:23 +00:00
41c00063dd another error in commit r34143, was using the define's 'BLEN' & 'DER_' however the latter is incorrect since DER- is used for 64bit blend files.
removed the define.
2011-01-07 09:47:05 +00:00
7fe16a24a4 fix for error in own commit r34143 2011-01-07 08:59:00 +00:00
f3a00259e2 bugfix [#25457] Lack of update on undoing a lattice rig 2011-01-07 07:36:51 +00:00
a132674634 patch [#25490] Fix for [#22096] Blender tries to open non-blend file
from Alexander Kuznetsov (alexk) with edits.

From the report:
Blender assumed that all files are .blend as retval = 0;

Now retval is initialized as file cannot be open (-1) for gzopen fail and directory case
retval = -2; is defined for not supported formats
This must be assigned before #ifdef WITH_PYTHON because this part can be missing
Finally retval = 0; if it is a .blend file

---
also made other edits.

- exotic.c's blend header checking was sloppy, didn't check data was actually read, only checked first 4 bytes and had a check for "blend.gz" extension which is unnecessary.
- use defines to help readability for BKE_read_exotic & BKE_read_file return values.
- no need to check for a NULL pointer before calling BKE_reportf(). (will just print to the console)
- print better reports when the file fails to load.
2011-01-07 06:50:29 +00:00
0db684be3c incorrectly documented return type 2011-01-07 06:39:48 +00:00
82659944c6 Fix/add OSX style text editing shortcuts to default keymap 2011-01-07 05:50:17 +00:00
0f2089afa1 py/rna api speedup for collection slicing in all cases, rather then having an exception for [:].
- avoid looping over the entire collection unless a negative index is used.
- dont use the get index function for building the slice list, instead loop over the collection until the stop value.
2011-01-07 05:33:30 +00:00
5d74d65106 bugfix [#25519] particlesystem, type hair, hair dynamics enabled: crash with amount 0 2011-01-07 04:38:31 +00:00
109d3b8454 bugfix [#25519] particlesystem, type hair, hair dynamics enabled: crash with amount 0 2011-01-07 04:30:02 +00:00
adf961a46c fix [#25520] crash when closing the properties panel in uv/image editor
don't draw the image if the size is 0.

Crash was actually an assert() so debug builds only, replace assert() with BKE_assert() so crash is opt in build option.
2011-01-07 04:10:37 +00:00
af64765456 Todo items:
- Toobar views were reset on hide/unhide. Now they keep the view
  and zoom level.
- Added operator to delete all unused 'space data', this to make
  clean startup.blend files, remove unused editors, and to be
  able to test starting defaults for editors.
  No hotkey, use search for "Clean-up space-data"
2011-01-06 17:54:17 +00:00
b67d08c3c7 Todo item:
Compositor: Texture Node now behaves like an image.
- Image always in render output size
- Buffer outputs RGBA and Value both supported
- Works for filter and blur and scaling too.
- Mixing 2 textures works

Implementation note:
The texture node was meant to be 'procedural', not a buffer
but a color-sample method. Unfortunately the node editor 
didn't support this well, blur/filter/scale ignored it too.

For now, its better to drop this procedural concept, then
things work at least as expected. :)
2011-01-06 14:58:58 +00:00
7b302d5052 Bug fix:
On texture-space transform, pressing Rkey crashed.
Now it refuses to enter rotation mode. :)
2011-01-06 14:19:46 +00:00
149955b3e2 print_m3/m4 didnt use const char *, which gave an errror with passing strings & pedantic warnings.
also minor rename in bvh export
2011-01-06 13:49:09 +00:00
5cef085f77 Todo item:
Auto-texture space now is more responsive and correct.
- on transforming it, the buttons get redrawn to show option was reset
- on enabling option, texture space is recalculated/reset
2011-01-06 11:16:35 +00:00
28e689b9aa bugfix [#25498] Projection paint clone tool leaves seams 2011-01-06 09:32:25 +00:00
a0b134cd88 bugfix [#25488] Game engine crash when try to run after blender app start
- also found other places where utf8 isnt ensured.
- remove duplicate NULL checks in object_edit.c
2011-01-06 05:04:07 +00:00
bba20eb5ae use ED_markers_get_first_selected() where possible, simplify ed_marker_rename_exec 2011-01-06 04:35:57 +00:00
68b931b03f py/rna optimizations, will help for faster exporting.
Speedup for getting collection indices, avoid getting the collection length unless a negative index is given. This avoids a loop over the entire collection in many cases.

Speedup for getting collection slices by detecting collection[:] and internally calling collection.values(), this gives a big speedup with some collections because each slice item would loop over the list until that index was found.

Rough test with 336 objects.
- getting index of listbase collection ~ 5.0x faster
- getting index of array collection ~ 1.15x faster

- getting slices of listbase collections ~ 34.0x faster
- getting slices of array collections ~ 1.5x faster
2011-01-06 04:01:06 +00:00