Commit Graph

27683 Commits

Author SHA1 Message Date
Campbell Barton
e7ed8a3be0 fix for [#25470] single property driver vars don't update 2011-01-03 11:50:10 +00:00
Ton Roosendaal
7d1fce5533 Bugfix #25449
Adding surface objects via top menu crashed for option
"view aligned". Bad context checking.
2011-01-03 10:47:36 +00:00
Campbell Barton
35422ac536 rna/api
move Object.update(...) to ID.update(). since depsgraph update function can now be called on ID types.

also changed how update flags work.

  obj.update(scene, 1, 1, 1)
... is now
  obj.update({'OBJECT', 'DATA', 'TIME'})

Don't pass scene anymore. This was used for recalculating text but I think this is better dont in a different function.
2011-01-03 09:09:30 +00:00
Campbell Barton
dacdfbe6f3 recent change to keyframe menu broke BVH import, now don't use the operator at all, instead assign the action manually.
Also added bpy.path.display_name_from_filepath(), since filepaths are not ensured to be utf8.
same as calling:  os.path.splitext(os.path.basename(name))[0].encode("utf8", "replace").decode("utf8")
2011-01-03 08:28:22 +00:00
Campbell Barton
e6d1f25842 remove rna func scene.collada_export(), export functions dont exist for any other formats, calling operators should suffice. 2011-01-03 07:42:30 +00:00
Campbell Barton
1306a38133 fix for own error in recent commit. 2011-01-03 07:07:18 +00:00
Campbell Barton
f533630585 dont draw lamp volume when its being used as the view camera, would flicker annoyingly when flying the lamp about to position it. 2011-01-03 06:45:47 +00:00
Campbell Barton
22b97743ef avoid int/float comparisons within a number of for loops in deep shadow map compression.
gives minor overall speedup.
2011-01-03 06:13:50 +00:00
Mitchell Stokes
97e84765cd stubs.c updates for uiLayoutGetRedAlert and uiLayoutSetRedAlert 2011-01-03 06:08:17 +00:00
Joshua Leung
ca0b5434fa Keyframing Operator Code Cleanup:
Keyframing operators now use a dynamically-generated enum for their
"type" property, which determines the Keying Set to use for keyframing
instead of the obscure "index" values which were determined
internally. Internally though, these same indices are still being used
:)

Notes:
- I've kept the menu-building function and the special "menu" operator
for now, since it's better to not "pollute" the actual insert
keyframes operator with hardcoded menu-showing logic. Instead, the
menu operator does that, so that if you like, you could write another
such wrapper that works differently.
- The 'type' properties could have the PROP_HIDDEN flags removed,
though I think it's cleaner to leave these without this option for
now.
2011-01-03 05:36:52 +00:00
Campbell Barton
1ba9dde22d - add in asserts for unlikely cases of invalid ID types being assigned to key->from.
- mode duplicate pointer/offset code into a static function.
2011-01-03 04:59:57 +00:00
Campbell Barton
27b0bfef77 fix for possible comparison of un-initialized variable.
vol_get_bounds() only runs when shi->flippednor==0, but is.hit.ob was being checked afterwards irrespective.
2011-01-03 04:46:37 +00:00
Campbell Barton
17c3275c36 bugfix [#25459] Zooming out with view3d.zoom() crashes blender completely 2011-01-03 01:26:54 +00:00
Joshua Leung
6feddb8b61 Constraints UI Tweak:
Experimental tweak for the "Object Constraints" tab so that it now
shows a warning message instead of the "Add Constraints" button when
the active object is in Pose Mode. Hopefully this will further
alleviate any confusion over Object vs Bone level constraints.

Todo:
While coding this, I noticed that we currently don't have any way of
making help-text labels in UI panels which can span multiple lines
(word-wrapped or manually split). Probably not a critical issue, but
it would be nice for completeness...
2011-01-02 23:50:16 +00:00
Joshua Leung
c052a65b93 "Red-Alert" flags can now be set on UI layouts via the RNA API too 2011-01-02 23:47:48 +00:00
Joshua Leung
c7aa4f86a8 Bugfix:
Setting the group for F-Curves from the Py-API (i.e. to move F-Curves
from one group to another) was failing. After debugging this, this
functionality should now work correctly, while still prohibiting the
setting of groups on "F-Curves that aren't in actions" (i.e. driver-
fcurves)...
2011-01-02 23:47:03 +00:00
Brecht Van Lommel
9b4adf76e3 Fix #25456: using Live Unwrap always unwraps with method Angle Based. 2011-01-02 21:13:28 +00:00
Ton Roosendaal
05cfe50436 Bugfix #25446 (and todo item)
The icons for materials were always lagging or not updating
at all. I also found it suspicious slow... 
It appeared that the icons now store a "mip level", where for
every change in Materials 2 render jobs for icons were started,
one for 32x32 pix, one for 96x96. The latter was cancelling out
the first job almost always.

Also made preview renders detect size, to set amount of tiles
to be rendered. Small icons use 1 part, larger previews 16 now.

All in all, behaves much smoother now! But, will also update
the thread Jobs manager to allow "delayed jobs" like for icons,
these are aggressively put as first in the jobs list.
2011-01-02 19:46:32 +00:00
Sergey Sharybin
5d6c76c6a3 Spelling fix: itterator->iterator 2011-01-02 19:00:32 +00:00
Janne Karhu
fe44c6596d Small changes to new pointcache code:
* Removed the unused fuctions spotted by Campbel.
* Removed the gotos to make Ton happy.
* Added better debug prints to disk cache operations.
* Fixed a memory unmap error that seemed to happen on a test file.
2011-01-02 18:10:33 +00:00
Sergey Sharybin
78162fa793 Splitting quad into triangles and merging triangles into quad should
work correct with sculpting data now.

Joining two triangles could give incorrect sculpting result for
special topologies, but it's that case that can't be nicely handled
with our layers architecture.
2011-01-02 17:38:22 +00:00
Sergey Sharybin
24e80665d8 New customdata layer callback: validate
Used to validate displacement allocation size after face copying
to match face vertex and displacement corners count.
2011-01-02 17:08:25 +00:00
Sergey Sharybin
76f0569a86 Multires math function used for layer interpolation moved from customdata.c to multires.c
No functional changes
2011-01-02 16:43:28 +00:00
Ton Roosendaal
7b865b5ce8 Crash fix for pointcache... bad goto's here. 2011-01-02 13:57:06 +00:00
Ton Roosendaal
118667c1bf Small feature for debugging pleasure:
The svn revision nr is saved in Blender file header now.
Can only be retrieved with running blender -d now.
2011-01-02 13:33:32 +00:00
Ton Roosendaal
939cf114bb Bugfix 25451
Tooltip for "default render output" was wrong.
2011-01-02 11:14:47 +00:00
Campbell Barton
a7ceeafd71 - correct typos in comments.
- move boxpack struct out of the public header.
2011-01-02 11:06:50 +00:00
Brecht Van Lommel
4119132580 Fix #25435: remove code that enabled EWA filter on mipmap toggle, should not
have been there, mistake in removing SAT filter.
2011-01-02 10:52:21 +00:00
Mitchell Stokes
f6a034a481 CMake fix so MSVC works again. Fix suggested by Tamito Kajiyama. 2011-01-02 10:21:03 +00:00
Campbell Barton
8c86d2da3a Quiet warnings from last commit.
Janne: could you check if ptcache_file_pointers_seek() & ptcache_read_init() can be removed?
2011-01-02 10:13:17 +00:00
Mitchell Stokes
6127bcf854 CXX_Guardedalloc was complaining about freeing NULL pointers in VideoTexture. I've added guards around the deletes to prevent this. 2011-01-02 10:05:22 +00:00
Campbell Barton
f101e59e09 python api: rna array slices now return tuples rather then lists (fits with recent change made to mathutils).
minor improvements/cleanup to exporters.
2011-01-02 09:54:44 +00:00
Janne Karhu
a6a2512f47 Pointcache code cleanup and disk cache compression options:
* Massive reorganization of pointcache code, things are now cleaner than ever.
* For all but smoke the cache is first written to memory when using disk cache and after that written to disk in one operation. This allows less disk operations and the possibility to compress the data before writing it to disk.
* Previously only smoke cache could be compressed, now the same options exist for other physics types too (when using disk cache). For now the default compression option is still "no compression", but if there aren't any problems this can be set to "light compression" as it's actually faster than no compression in most cases since there's less data to write to the disk. Based on quick tests heavy compression can reduce the file size down to 1/3rd of the original size, but is really slow compared to other options, so it should be used only if file size is critical!
* The pointcache code wasn't really 64bit compatible (for disk cache) until now, so this update should fix some crashes on 64bit builds too. Now all integer data that's saved to disk uses 32 bit unsigned integers, so simulations done on 64bit should load fine on 32bit machines and vice versa. (Important disk cache simulations made on 64bit builds should be converted to memory cache in a revision before this commit).
* There are also the beginnings of extradata handling code in pointcache in anticipation of adding the dynamic springs for particle fluids (the springs need to be stored as extradata into point cache).
* Particles were being read from the cache with a slightly wrong framerate. In most cases this probably wasn't noticeable, but none the less the code is now correct in every way.
* Small other fixes here and there & some cosmetic changes to cache panel, but over all there should be no functional changes other than the new disk cache compression options.
* This whole re-organization also seems to fix bug #25436 and hopefully shouldn't introduce any new ones!
2011-01-02 06:52:47 +00:00
Campbell Barton
d5820f0dd0 bugreport & fix [#25441] Copy Transforms Constraint head/tail fixin'
from Dan Eicher (dna)
2011-01-02 04:16:19 +00:00
Janne Karhu
9f88e0faeb Fix for [#25427] cloth or soft body crash un Undo
* Argh my bad, sorry about this!
* Now only the actual data array is saved to avoid constant re-allocations, but no relations to active data are kept.
* Also reverted Ton's quick fix for the crash as it's not needed anymore.
2011-01-02 03:55:26 +00:00
Campbell Barton
03d046ad4f report & fix [#25447] SceneObjects null pointer dereference crash
from Dan Eicher (dna)

noticed sequence swap also wasn't checking for None.
2011-01-02 02:48:45 +00:00
Campbell Barton
129b6190ed geometry module
- rename functions from camel case.
- added docs for undocumented methods.
- minor functional changes with exceptions and accepting 3d/4d vectors where it makes no difference.

Renamed:
 - geometry.Intersect -> intersect_ray_tri
 - geometry.ClosestPointOnLine -> intersect_point_line
 - geometry.PointInTriangle2D -> intersect_point_tri_2d
 - geometry.PointInQuad2D -> intersect_point_quad_2d
 - geometry.LineIntersect -> intersect_line_line
 - geometry.LineIntersect2D -> intersect_line_line_2d
 - geometry.BezierInterp -> interpolate_bezier
 - geometry.TriangleArea -> area_tri
 - geometry.QuadNormal, TriangleNormal -> normal
 - geometry.PolyFill -> tesselate_polygon
 - geometry.BoxPack2D -> box_pack_2d
 - geometry.BarycentricTransform -> barycentric_transform
2011-01-02 02:11:38 +00:00
Campbell Barton
577e3b435e removing epydocs for mathutils and geometry mododules (now they are in sphinx) 2011-01-01 23:53:48 +00:00
Damien Plisson
559059ab3f Fix [#25442]: (Ghost Cocoa) Add missing initialization of associated object pointer when switching to/from fullscreen. 2011-01-01 19:48:14 +00:00
Ton Roosendaal
373524815a Bugfix #25445
CTRL+R loopcut now shows header print with instructions.
User report was that Blender was freezing :)
2011-01-01 17:52:06 +00:00
Ton Roosendaal
21eb65c450 For non-gnu compilers, the __func__ doesn't exist.
Fix for commit of 2 hours ago.
2011-01-01 15:49:25 +00:00
Ton Roosendaal
fd7152b839 Bugfix, IRC report
Floor constraint didn't work: the defines for the enums were using
the wrong ones, the right ones are not logical... but code and dna
and old files assume these. Now it works :)
2011-01-01 15:28:21 +00:00
Ton Roosendaal
d7c51aa3eb Bugfix #25437
Crash in Bezier animation (inserting keys on control points in
curve object). The animation rna paths were not fixed after an
editmode session, which got fixed 2 weeks ago, but for all older
binaries the issue can still pop up.

The crash happened because the RNA array-itterator was not doing
a boundary check, even whilst the array size was passed on to the
itterator callbacks. With rna then writing far outside of valid
memory, very bad and unpredictable corruptions happen.

I've added a range check now, and a decent print to denote the
issue. An assert quit is useless, since a tab-tab on curve objects
will fix the channels nicely.

Example of warning print:
Array itterator out of range: Spline_bezier_points_lookup_int (index 30 range 2)
2011-01-01 13:49:22 +00:00
Campbell Barton
7040c89af0 BVH Importing native order eulers was broken, simplify conversion between rotation orders. 2011-01-01 13:20:35 +00:00
Campbell Barton
e1f6dc5f73 bvh export
- write compatible eulers (no jumping as eulers change).
- write FPS.
- correct poll function incase bvh export is called without an armature.
2011-01-01 10:38:28 +00:00
Campbell Barton
f932371d1e added bvh export operator & menu item, now user accessible. 2011-01-01 09:44:13 +00:00
Campbell Barton
631745ab9b bvh export now works correctly with matrix multiplications and rad -> deg. 2011-01-01 08:57:09 +00:00
Campbell Barton
e98559fc12 pep8 cleanup 2011-01-01 08:44:17 +00:00
Campbell Barton
48921a4fa1 initial 2.5x port, still need to fix up matrix multiplication orders. 2011-01-01 08:35:38 +00:00
Campbell Barton
a1b1ac5781 committing 2.4x bvh exporter, updating to 2.5x. 2011-01-01 07:26:02 +00:00