Commit Graph

14003 Commits

Author SHA1 Message Date
5b75ea38ff made rtbuild object_heuristic_spliter faster
I think its something like:
	old was:  4*nlogn + 3*(n*6)
	new is:  (2*nlogn + 3*(n*6)) * f, with f<1

Still missing changing the sorting function to an introsort instead of qsort
Other options like bucketing sort may be worth trying (for very large trees)
2009-07-07 19:07:53 +00:00
08fa786251 *added Object SAH support to rtbuild:
only for 2childs splits
	with "worse case heuristic" means each child is considered to have a cost linear on the number of leafs
	no termination criteria

number of BB test/hits expected to "reduced" by some factor
tree building is also expected to be slower as previous split was "object mean", which is quite fast to evaluate
2009-07-07 15:42:08 +00:00
c65a3e3166 *Added BLI_memarena on bvh
*Median split support on rtbuild
2009-07-06 19:45:00 +00:00
aa12d2153f *fix (forgot to multiply by BB size) 2009-07-06 15:35:46 +00:00
e0e66f6b74 *"Fixed" rayobject_bvh memory organization of BB's
until now rayobject_bvh should be at least as fast as BLIBVH, this seemed to be the missing piece
2009-07-06 14:36:26 +00:00
ba1f3323bf *Added output of BB/primitves test/hits
*"Added" SCE_PASS_RAYHITS to visually see each pixel primitive and BB tests (not-completed for UI)
*Added runtime exchange of tree structure
*Removed FLOAT_EPSILON from BLI_bvhkdop BB's
2009-07-06 13:27:40 +00:00
abc44f720a Set BVH (rayobject_bvh.c) as default tree type 2009-07-05 18:46:23 +00:00
6e1a81bc7a svn merge -r 21301:21372 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender 2009-07-05 15:20:19 +00:00
46f6cdcdcc Added a particle instance modifier option to use particle size. 2009-07-05 12:36:20 +00:00
621b37bed6 *Added BIH 2009-07-05 00:38:53 +00:00
7055702530 Rendering animations with particle trails cached. 2009-07-04 12:09:21 +00:00
66918b3add A bunch of fun stuff now possible because of new pointcache code:
* Baked normal particles can now use the "Path" visualization.
* Path "max length" & "abs length" are now history:
	- New option to set path start & end times + random variation to length.
	- Much more flexible (and calculated better) than previous options.
	- This works with parents, children, hair & normal particles unlike old length option.
	- Only known issue for now is that children from faces don't get calculated correctly when using path start time.
* New option "trails" for "halo", "line" and "billboard" visualizations:
	- Draws user controllable number of particle instances along particles path backwards from current position.
	- Works with children too for cool/weird visualizations that weren't possible before.
* Normal particle children's velocities are now approximated better when needed so that "line" visualization trails will look nice.
* New particle instance modifier options:
	- "path"-option works better and has controllable (max)position along path (with random variation possible).
	- "keep shape"-option for hair, keyed, or baked particles allows to place the instances to a single point (with random variation possible) along particle path.
	- "axis" option to make rotation handling better (still not perfect, but will have to do for now).

Some fixes & cleanup done along the way:
* Random path length didn't work for non-child particles.
* Cached & unborn particles weren't reset to emit locations.
* Particle numbers weren't drawn in the correct place.
* Setting proper render & draw visualizations was lost somewhere when initializing new particle settings.
* Changing child mode wasn't working correctly.
* Some cleanup & modularization of particle child effector code and particle drawing & rendering code.
* Object & group visualizations didn't work.
* Child simplification didn't work.
2009-07-04 03:50:12 +00:00
36df48eef6 2.5:
* Fix crash in python with enum properties, and don't throw
  error if no matching identifier is found. This shouldn't
  happen, but it should break a python script either, which
  is not at fault.
* Fix a wrong variable initialization in fluidsim.
2009-07-03 19:56:19 +00:00
3d06a104a4 rayobject_octree fixed 2009-07-03 18:16:59 +00:00
4a72557e6b Fixed memory aligns for 64bits 2009-07-03 17:10:54 +00:00
815fef5e7e 2.5/Multires:
Missed this somehow when merging the multires branch? Have to make sure that multires displacements are up-to-date before doing a modifier apply.
2009-07-03 15:59:59 +00:00
9e71b736eb 2.5/Sculpt:
Bugfix, mesh face normals not getting updated because a list was freed in the wrong place.
2009-07-03 15:31:23 +00:00
9f33496088 2.5
* Lattices: properties editable, editmode operators, menus working
  again. As a bonus you can now edit u/v/w in editmode.
* Shape Keys: some code cleanup, and added more buttons. The
  value/min/max buttons don't work correct yet though.
* Fix issue with uv textures, vertex colors not being visible outside
  editmode, and a few other issue. Mesh.edit_mesh is now NULL when
  not in editmode.
2009-07-03 15:23:33 +00:00
a7d6b6eebf 2.5
Windows #ifdef code missed semicolon.
2009-07-03 13:48:42 +00:00
ea287fc4ec 2.5
More scroller work:

- Added subtle arrow widgets to denote a scroller can zoom the view.
- Made zoom symmetric (old convention to only zoom "one side" just
  worked badly)
2009-07-03 13:21:09 +00:00
3c6f957097 fix for own missing var in recent commit. 2009-07-03 11:46:46 +00:00
c12b2796d7 2.5 - Additional warning fix 2009-07-03 11:24:52 +00:00
74fc3a8e22 2.5 - Quick compiling fix for Ton's commit
Patch (http://www.pasteall.org/6436/diff) by skejoe. Thanks.
2009-07-03 11:22:32 +00:00
d059fc6d20 2.5
Upgrading text editor to draw new scrollbar too.
2009-07-03 10:54:39 +00:00
b0f19ea7ca set the PYTHONPATH to BLI_gethome_folder("python") if it exists.
This lets us distribute blender with our own python module directory (next to ui and io), and avoids the need for a shell script to start blender.
2009-07-03 04:38:55 +00:00
44ef6c1eac *little fix 2009-07-03 02:56:54 +00:00
8394653ebd *No need of a BB if the underlying structure already has a BB 2009-07-03 02:26:40 +00:00
fb5f9273eb cmake support for building without fluidsim 2009-07-02 22:22:35 +00:00
4b81d44282 *fixed crash 2009-07-02 22:12:26 +00:00
686a426cf0 *fixed rtbuild (there was a sorting bug introduced while adapting code from BLI_bvh)
This bvh should be at least as fast as BLI_kdopbvh now
2009-07-02 21:57:50 +00:00
093ff8202c 2.5: Physics Buttons
All kinds of changes to get it ready for UI layouts. This means RNA
and operators should be working correct, but most buttons are still
not actually there yet.

* Added near empty soft body, fluid, field and collision panels,
  tweaks to cloth panels.
* Fluid bake works, but without escape or showing any progress.
* Fluid/Softbody/Cloth/Collision can now be both added as modifiers
  or in the physics panels.
* Missing: fields & soft body for particles.
* Missing: proper updating softbodies, guess this code still needs
  updates after pointcache refactor?
2009-07-02 19:41:31 +00:00
5a0896e1a3 2.5
Cleanup of scroller drawing in 2D windows.

Before:
http://download.blender.org/institute/rt11.jpg
After:
http://download.blender.org/institute/rt12.jpg

Will add 'zoom' widget circles later, as mockupped here:
http://www.reynish.com/files/blender25/fcurve_scrollbar.png

Also note the scale values are inside scroller; drawing it
on top conflicts with current frame item and markers.

Currently scroller disappear entirely when view is total.

For Joshua:
To make sliders behave nicely, the boundbox (v2d->tot) has to
be refreshed on each change. I've added it in graph drawing
now, but it could be notifier based I guess... not sure what
the correct anim api call would be. Can discuss tomorrow!

On todo:
Layout config hints so people can make scroller positions swap.
2009-07-02 18:12:46 +00:00
5c207a61f3 *RTBuilder now supports splitting leafs in N leafs
something is wrong on rayobject_bvh as it looks slower than BLI_bvh and code is based on it
2009-07-02 15:45:15 +00:00
aefa7b626a out own Py_GetPath() function to replace pythons, so we can bundle python modules with blender, #if 0'd for now but having it is useful for testing.
This works by copying /usr/lib/python3.1 to a dir called "python", next to blenders "ui" and "io" dirs.
2009-07-02 12:11:20 +00:00
b14298f959 svn merge -r 21041:21301 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender 2009-07-02 11:28:42 +00:00
c7bd0d1248 2.5
More toolbar functionality for workflow review.

- Split the region in two parts, bottom has the Tool Properties, the
  top part shows 2 panels, one for python defined tools, other for a
  "tool shelf" which (later) will get saved in files.
- Added a full context driven framework for this toolbar, showing 
  the tools depending on 3D window 'mode'. Both python defined tools
  as the shelf respect this. So - for example - you will see different
  tools in editmode mesh, as in vertex paint mode, etc.
- First template for the python tools will be committed after this commit;
  it has placeholder tools to just show/test functioning.

NOTE: if you had saved a layout that shows tools region, open/close it
once to get the new region created for properties.

TODO:

- Moving paint properties to tool settings
- Test a layout with horizontal toolbar (without properties)
- Bring back floating panels, and put tool-properties here. (as option)
2009-07-02 11:23:19 +00:00
2acac0ff99 Reverted incorrect merge (missing files)
svn up -r 21247
svn merge -r 21247:21246 . (<= revert incorrect: merge -r 21041:21243)
svn up
2009-07-02 02:59:43 +00:00
421f44278c 2.5: Lists for vertex groups, shape keys, uvs, vertex colors.
RNA
* Added the relevant active_*_index properties, with proper
  get/set/range, updates and notifiers.
* Context.tool_settings.
* ToolSettings.vertex_group_weight.

Operators
* MESH_OT_uv_texture_add/remove
* MESH_OT_vertex_color_add/remove
* MESH_OT_sticky_add/remove
* OBJECT_OT_vertex_group_add/remove/assign/remove_from/
  select/deselect/copy/copy_to_linked
* OBJECT_OT_shape_key_add/remove

UI
* Some updates and cleanups in list template code.

Known issue: when going in & out of editmode, uv textures and vertex
colors dissappear. I thought me->edit_mesh would be NULL when not in
edit mode but it is not?
2009-07-01 22:25:49 +00:00
cda566d646 2.5: Fix a case of using freed memory in event handling. 2009-07-01 22:16:16 +00:00
666ce6de80 needed for building with py2 2009-07-01 20:55:32 +00:00
594c8802d7 Added support for collection parameters also for RNA_function_call_direct family of functions. The syntax for passing collection parameters is similar to passing pointers where you pass first the RNA type and then the ListBase representing the collection. The format specifier is "C" instead of "O", e.g.
RNA_function_call_direct_lookup(C, reports, ptr, "do_something", "sC", "some string value", &RNA_SomeItemType, listbase); 

Note that from python you could in theory pass collections of items each of a different type while using this API you can't. I don't think this should be a problem as RNA supports collections this way anyway (i.e. where items are all of the same type or inherit from the same base type).

Also a small fix for pointer parameters.
2009-07-01 19:56:50 +00:00
1a86cd6dcd slice support working in py3 for Vector and Matrix types.
Added slice to PyRNA collections and arrays (py3 only).

eg.
some_verts = mesh.verts[0:10]
some_rna_array[4:-1] = [0,1,2,3]

Collections dont support assignment, when assigning slices, resizing the array isnt support like with python lists.
2009-07-01 13:31:36 +00:00
1b557a61a5 fixed ray mirror/trans shadow on rayobject_bvh 2009-07-01 12:36:05 +00:00
82055c8217 RNA
* Mesh.add_geometry, Mesh.update and make indices editable. This
  is without checking if they are valid still, no time now to
  implement this.
* Also fix warnings in rna_ui.c, and a bug in CDDM_calc_edges.

Example code:

co = [0.0, 0.0, 0.0] + [1.0, 0.0, 0.0] + [0.0, 1.0, 0.0] + [1.0, 1.0, 0.0]
faces = [0, 1, 2, 0] + [1, 3, 2, 0]

mesh.add_geometry(4, 0, 2)

mesh.verts.foreach_set("co", co)
mesh.faces.foreach_set("verts", faces)

mesh.update()
2009-07-01 12:19:00 +00:00
91226e6807 *Added rayobject_bvh
A bvh structure to use on the raytracer
2009-07-01 11:27:43 +00:00
0fabb2039b 2.5/Sculpt:
== Re-added smooth stroke ==

UI: toggle is just in the sculpt menu for now. Also changes the sculpt paint cursor slightly, draws a line between previous and current locations.

It's a different implementation than in 2.4, works like this:

The stroke interpolates between the last mouse location and the current location, weighted towards the previous location. If the stroke gets within a certain radius of the current mouse location, the stroke stops. This radius allows for sharp turns in the stroke.

Todo: there are two hard-coded parameters that should become user settable, that's the weighting between previous and current locations, and most important, the no-update radius.

Note also that this option was added as a per-brush flag, worth discussing whether that's the correct place, or whether it should be a sculpt setting like symmetry?

== Improved stroke spacing ==
The previous implementation of stroke spacing simply guaranteed that stroke dots would not occur any closer than the space setting. It now forces stroke dots to always be the specified distance apart.

Todo: Performance gets pretty awful with a small spacing setting, this needs optimization.
2009-06-30 23:06:50 +00:00
1deba75110 *Added initial code of rayobject_rtbuild
An helper class to build trees
2009-06-30 22:07:42 +00:00
5403edf8ff disabling foreach_get/set for python2.x, since it uses new buffer api. 2009-06-30 21:59:21 +00:00
60c2599a1a 2.5 filebrowser
* show only name of the last directory for the bookmark
* small fix of projectfile: header BLI_fileops.h was moved
Note: full path should appear in tool tip later, also for renaming bookmarks later on.
2009-06-30 20:34:00 +00:00
03e11e1e55 Reverting changes made for laptop/two button mice - will make the changes available as a patch. 2009-06-30 20:14:53 +00:00