Commit Graph

10860 Commits

Author SHA1 Message Date
Geoffrey Bantle
07b1608fbe -> New memory allocator for Bmesh
Added a new pooling allocator for Bmesh based upon
the pool allocator availible in the Boost C++ library
as described here:

http://www.boost.org/doc/libs/1_34_0/libs/pool/doc/concepts.html

Each pool allocates elements of a fixed size, so every
element type in a mesh gets its own pool. For instance
verts occupy a different pool than edges. Each pool
is comprised of multiple arrays of a fixed size and allocating
/freeing elements is simple as removing or adding a head 
to a linked list. Since the list of free elements is interleaved
throughout the unused space in the arrays, the overhead
for storing the free list is only 1 pointer total per pool.
	
This makes building/destroying bmesh structures much faster
and saves quite a bit of memory as well.
2008-06-01 17:15:03 +00:00
Campbell Barton
652ee1e31b functionality fix
Originally the only way to run scripts automatically was with scriptlinks, which could be disabled for loading untrusted blend files.
Since then PyDrivers and PyConstraints would run even when G.f&G_DOSCRIPTLINKS was disabled.
Gensher, Theeth and Ianwill agree its acceptable to reuse the flag for other areas python runs automatically.

PyNodes still have no way to be disabled, (todo before 2.46a)
2008-06-01 16:13:04 +00:00
Peter Schlaile
8937989a91 == FFMPEG ==
Shouldn't crash any more in the case that
a) invalid video options were selected
and
b) audio multiplexing was active

[#13311] video_stream NULL when writing ffmpeg

(did'nt crash for me though, but added extra protection :) )
2008-06-01 14:37:09 +00:00
Campbell Barton
c0199e192d bugfix (typo) [#13587] Python API Material.sssFront broken 2008-06-01 13:18:26 +00:00
Geoffrey Bantle
26cb5fa0db -Fix for bug #13067
Bevel tool was hanging on certain geometry where the edge
to be beveled was shared by two faces that had more than
one edge in common and caller was not checking return
status of Bmesh eulers. Fixed.
2008-06-01 01:56:35 +00:00
Campbell Barton
edd2b6ca73 bugfix for own error
[#13588] Python API Material.sssRadiusBlue broken
2008-06-01 01:49:11 +00:00
Campbell Barton
526d9cc5fc bugfix for own error
glitch when typing in / would ask the user to make a new directory. the last shash was being removed, then the "" path didnt exist and 
asked to create it.
2008-05-31 19:08:12 +00:00
Campbell Barton
c6528b3cd4 bufgfix for [#13584] SIGSEV in fluid bake with large amount of small fluid objects
the maximum number of objects (255) wasnt being checked, added a check before baking.
also changed bakeing to use G.scene->base rather then G.main->objects since these can be in other scenes, from linked 
groups, or used only by python so they should not be used for baking. it also meant having a domain in 2 scenes would fail with an error.

Nils, could be good to have a dynamic number of bakeable objects.
2008-05-31 19:01:14 +00:00
Campbell Barton
32de0da6df bugfix
* [#13394] Sequencer: if internal strips have handles selected, dragging the metastrip changes the meta length
* Extend did not work correctly on metastrips when the nested seq's are out of the meta's frame range, added an argument to seq_tx_get_final_left/right 
that returns the frame clipped by metastrip(s) if any.
2008-05-31 16:22:07 +00:00
Campbell Barton
57270125d8 bugfix for own error, introduced when running scripts were saved with the blend file.
a script error with a script that has an interface would not stop the interface from running again immediately, causing an annoying 
error message loop.
2008-05-31 12:12:03 +00:00
Willian Padovani Germano
5c1acc5ced == PyNodes ==
Bug #13277, reported by Juho (bebraw) Vepsalainen (thanks!) - a typo made pynodes w/o input socket definitions fail with an out of range error when accessing the output sockets in the script.
2008-05-30 20:04:52 +00:00
Kent Mein
791510f690 This is patch [#9057] Updated doc string to match current defines
also submitted by gsr

It just updates a comment to correct values.

Kent
2008-05-30 19:52:42 +00:00
Kent Mein
0caf1573d5 This is patch [#9053] More concrete makesdna reporting
Submitted by gsr

It just makes the printf's all different so you can tell where the problem
is.

Kent
2008-05-30 19:46:48 +00:00
Martin Poirier
2eb897e6db Fix crash with hidden bezier handles
See Cambo, that's why we have module owners.
2008-05-30 09:05:09 +00:00
Campbell Barton
da2d4904af bugfix
* scene.object.context and scene.object.selected had broken get_item 
funcs so scene.object.context[i]  returned the wrong object.
* aligning the view to an object (numpad*key), did not disable the 
ortho view grid.
* long standing problem where opening a relative image would fail with 
no message. BLI_convertstringcode was returning a path with /../../'s 
that need to be cleaned before the path could be read, the path was also 
invalid from unix shell so its not a blender path reading problem.
2008-05-30 01:59:15 +00:00
Martin Poirier
8e46d777f3 Transform Orientations
Edit Bone and Pose Bone can now be used as transform orientations

Also fix a bug with CTO comming from non-uniformally scaled meshes.
2008-05-29 19:10:09 +00:00
Joshua Leung
fe7b591280 Another bugfix for Fill Bone Between Joints. Changed the order that bones are created between 'head'/'tail' points 2008-05-29 06:14:53 +00:00
Joshua Leung
e015796b36 Fill Bone Between Joints:
This tool now parents the newly created bone to whichever bone acted as it's 'head' point. It also sets the connected-to-parent flag.
2008-05-29 01:04:12 +00:00
Janne Karhu
a17f322dd0 Bug fix: [#13268] Crash when creating a new particle system
-Ugh.. sorry about that.. damn default cube with it's default material!
2008-05-28 23:38:40 +00:00
Campbell Barton
1a5181c9c7 bugfix for own bug. mousewheel while playing in the sequencer crashes blender. 2008-05-28 21:15:40 +00:00
Brecht Van Lommel
04067c1833 Fix for bug #13224: vertex parenting didn't work correct with
multiple unconnected curves.
2008-05-28 18:11:45 +00:00
Brecht Van Lommel
9a19c5c8fe Fix for bug #13230: particle mirror could fail on some faces. 2008-05-28 17:55:06 +00:00
Brecht Van Lommel
d49d0e174e Small fix for last AO sphere sampling bugfix, didn't update
random sampling code as well.
2008-05-28 17:42:03 +00:00
Janne Karhu
9a3b25d8a0 Fix for bug: [#11680] "Col" option for particle systems does not work correctly with Mat IPOs
-the feature simply was not coded
2008-05-28 17:16:43 +00:00
Campbell Barton
c6668755ff bugfix for baking AO with greater then 16 samples, since it was being clamped in sphere_sampler but not in ray_ao_spheresamp that calls it. giving uneven art deco
results.
2008-05-28 17:13:15 +00:00
Campbell Barton
b36a358c1b bugfix
* python api render() would clamp the endframe to a short.
* python api's render() and renderAnim() would not render compositing because the name they gave to RE_NewRender was NOT G.scene->id.name, added comments to 
G.scene->id.name
2008-05-28 00:44:41 +00:00
Martin Poirier
c1874b3cee [#10223] a new object function to add vertex group from an armature
Patch from Jean-Michel Soler (with slight modifs)

Small BPy feature to help script writers deal with armatures and vertex groups (calls the bone heat method to create and assign groups)
2008-05-27 20:02:38 +00:00
Brecht Van Lommel
83a7fbf499 Another fix for bug #11140: explode modifier was still using more
memory than needed.
2008-05-27 15:36:36 +00:00
Brecht Van Lommel
c25b845abe Fix for bug #12463: hair didn't draw z-buffered in wireframe mode.
Instead of making it an exception compared to other objects which
don't draw z-buffered either, it now draws without lighting in the
wire color like it did before.
2008-05-27 13:26:52 +00:00
Brecht Van Lommel
4fd54681fc Fix for #12526: still didn't get dupli transform in envmaps correct. 2008-05-27 11:05:33 +00:00
Brecht Van Lommel
027b9a7e96 Fix for bug #12533: color picker didn't always redraw rgb/hsv/hex values. 2008-05-27 11:01:31 +00:00
Brecht Van Lommel
eb26992c25 Fix for bug #12806: compositor nodes with use nodes disabled
didn't properly redraw the node window on changes.
2008-05-27 09:41:43 +00:00
Campbell Barton
54572ccc22 bugfix for view naming, pressing numpad5 would clear the V3D_OPP_DIRECTION_NAME flag even though it wont switch the view direction. 2008-05-27 08:51:47 +00:00
Campbell Barton
c0a40125bb bugfix, copy posebone constraints didnt update properly, canceling transform would not reset the bone back to its original state. need to set teh flag "ob->pose->flag |=
POSE_RECALC", which is alredy done on adding a constraint.
back 
to
2008-05-26 20:43:35 +00:00
Stephen Swaney
a2298cb980 bugfix for crasher from Cedric Paille via bf-committers. 2008-05-26 15:12:20 +00:00
Martin Poirier
ae2a0bb273 Bug fix
Force proportional editing flag off in object mode.

While it didn't have any effect on objects themselves, it could display the falloff mode (Smooth) in the header. The bug was purely cosmetic.
2008-05-26 12:52:28 +00:00
Campbell Barton
3b4873250e when cyclic is enabled the knots would always be generated with uniform nurbs but after, cyclic nurbs would be incorrect if the bezier or endpoint u/v was set.
also replaced some numbers with constants.
2008-05-26 12:50:00 +00:00
Campbell Barton
0a90a52442 * The displist would be uninitialized when nurbs bezieru/v was set and the order wasnt 3 or 4. add a function that checks nurbs can produce a valid line. check_valid_nurb_u/v
* when check_valid_nurb_u/v fails, no curve is allocated or drawn.
* knotsu/v could be NULL but some functions didn't check for this, make sure this is checked for everywhere.
* The interface didnt change check the order when the bezier u/v flag was set, added functions clamp_nurb_order_u/v that takes into accound the number of points and the bezier u/v flag.
2008-05-26 09:50:46 +00:00
Campbell Barton
b7c6da39ae the last selected nurbs curve lastnu could become an invalid pointer in places, access this via functions now and store an index
rather then a pointer so if it becomes invalid it will just return a NULL pointer.
2008-05-25 23:05:13 +00:00
Diego Borghetti
5263021aa8 Commit patch #9059 by gsrb3d
Unnecesary include path in Makefile.
2008-05-25 21:11:34 +00:00
Martin Poirier
7f6fc12d8c Bug fix in X-Mirror for armatures
When a bone in a mirrored chain wasn't named properly, it would leave the head or tail in an invalid state.

Now it applies the mirror to connected joints that are mirrored.
2008-05-25 21:05:13 +00:00
Campbell Barton
b306aaccb9 patch [#11491] Fix for bug 11362: Blender.Draw.Image() method does not clip properly
fixing [#11362] Blender.Draw.Image() method does not clip properly
also return silently on zero zoomlevel rather then raising an error, only raise an error on negative values.
2008-05-25 16:39:57 +00:00
Peter Schlaile
20b4bf4aba == Sequencer ==
Fixes
[#12106] Memory leak in sequencer (>10MB/frame)

in parts: inner contents of meta strips are freed up after calculation
making more room for the cache.

Actually have to think of a mechanism, that remembers, which output
frames are asked for and caches only those.
2008-05-25 16:07:32 +00:00
Martin Poirier
03ccc38ddf [#11124] Hide Threshold button when Constant QMC sampling enabled
Patch by Olivier Saraja
2008-05-25 14:39:55 +00:00
Benoit Bolsee
da1f38f99d Apply BGE patch 11137: Render objects with negative scaling correctly (as in Blender) 2008-05-25 14:37:39 +00:00
Martin Poirier
f680b56ebf [#11119] Tool tips correction
Patch by Olivier Saraja
2008-05-25 14:32:59 +00:00
Benoit Bolsee
e2a9590a15 BGE patch: rename rayCastToEx() to rayCast() - better name 2008-05-24 22:50:31 +00:00
Benoit Bolsee
cc6dac8c42 BGE patch: add rayCastToEx(), an extended version of rayCastTo() for use in game script 2008-05-24 18:06:58 +00:00
Benoit Bolsee
7f10f5f66f fix BGE bug #8646: unusable anaglyph settings
The best rules for stereo rendering are now applied to Blender. Here is the new situation:
1) The focal distance is now settable through the GUI: select the camera (each camera can have a different setting) and go to the camera data (F9): the "Dof Dist" and "Dof Ob" can be used to set the focal distance for that camera. The "Dof Ob" is interesting because it sets the focal distance so that the center this object will appear at the surface of the screen when running the game.
2) The eye separation is automatically set to focal_distance/30, which is considered to be a reasonable value. If you need a different value, you can always use Python scripting. 

Notes: 
- If you switch camera during the game, the focal distance will also change unless you have set the focal distance by scripting, in which case it overwrites the focal distance setting of all cameras.
- If you don't set the focal distance in the camera data or by scripting, the default value will be used. The default value corresponds more of less to the near clipping plane which means that all the objects will be very far with little 3D effect.
- If you don't set the eye separation by scripting, it is automatically computed as focal_distance/30, regardless on how the focal distance was set.
2008-05-24 08:34:04 +00:00
Willian Padovani Germano
5f70682f6a == PyNodes ==
Fixing bug #11737 reported by Daniel Salazar (Zanqdo, thanks!): assigning as pynode a text that failed to parse as a pynode script, then deleting that text would crash Blender.

http://projects.blender.org/tracker/?func=detail&atid=125&aid=11737&group_id=9
2008-05-23 16:31:02 +00:00