Commit Graph

28949 Commits

Author SHA1 Message Date
Joshua Leung
f96a1546c0 Bugfix: "Sync Markers" option in Action Editor is now a bit more
useful.

Instead of only working for the "extend" transform mode, standard
transforms now work too now (i.e. grab and scale).

TODO:
This currently only works on Scene markers, though it should be
possible to make this work on a provided list of markers instead...
2011-03-14 03:10:23 +00:00
Campbell Barton
bd1c5d48f2 RNA API Rename
'create' was used as prefix and suffix, change dupli list functions to use as suffix, this matches obj.animation_data_create() & obj.animation_data_clear().
 obj.create_dupli_list() --> obj.dupli_list_create()
 obj.free_dupli_list() --> obj.dupli_list_clear()

Don't use 'create' for object to mesh function since other uses of this are for createing data which stays attached, instead use mathutils style naming convention.
  obj.create_mesh() --> obj.to_mesh()
2011-03-14 01:37:18 +00:00
Campbell Barton
9ec2dfe0df add dir() function for library objects, also was missing call to clear temp flag on exceptions. 2011-03-14 01:00:41 +00:00
Thomas Dinges
6cab58c8b9 Readme file:
* 2.56 > 2.56a and 1 grammar fix.
2011-03-13 22:35:54 +00:00
Lukas Toenne
05b2a75bfe Group tree sockets were not being freed after removing. 2011-03-13 22:13:42 +00:00
Lukas Toenne
24f72abf67 Fix for crashes due to links without fromnode pointers. This can happen with "unfinished" links created during the modal linking operator or when creating links from group tree inputs.
In addition don't store unfinished links in the nodetree->links list any more. This makes code a bit safer because all links in that list can be considered valid now. The temporary bNodeLinkDrag structs used by the modal linking operator are now also stored in a list in SpaceNode, so these links can be drawn too (this separation also allows different display of temporary links, e.g. currently they are drawn on top of all nodes).
2011-03-13 22:07:55 +00:00
Thomas Dinges
1e4010cad6 * Small code cleanup/removal 2011-03-13 20:39:15 +00:00
Lukas Toenne
2907826d8c Fixed the node_recurs_check function used to define the order of nodes in ntreeSolveOrder. This was creating equal node levels in some cases (auto-linking viewer to nodes further downstream), leading to falsely detected circular dependencies. 2011-03-13 17:23:44 +00:00
Andrea Weikert
70340503d8 fix mistake from commit rev. 33868. The variable icon was a pointer, not an integer icon id (ICON_NONE). 2011-03-13 17:20:52 +00:00
Brecht Van Lommel
5f7126c96f Fix "make test" on Mac, couldn't find executable. 2011-03-13 13:09:18 +00:00
Brecht Van Lommel
128bed8480 RNA: use a different method to set DNA types for BlendData* collections, to
solve issues with c++ api.
2011-03-13 13:01:02 +00:00
Joshua Leung
280592be9f Replaced RNA code in previous commit with a version which should be a
bit safer (less likelyhood of float <-> int corruption)
2011-03-13 12:26:53 +00:00
Joshua Leung
2144b23f51 Pose Sliding Tools - Custom Property Support + Other bugfixes
- Custom properties are now affected by the Pose Sliding tools too.
This is now more important to support, given that modern rigs use
these a lot for facial expressions/posing. By and large, this should
work fine, though discrete integer values may experience a bit of
trouble

- Fixed potential bugs with the code which detects which F-Curves are
relevant to a PoseBone's transforms (+ custom props). This was prone
to being tricked by certain setups if the names of the bones contained
some of the keywords these were searching for.

- Shuffled some code around: moved bulk of logic out of vec3 case into
new function for single-value, since it was really doing per axis
already
2011-03-13 12:22:57 +00:00
Campbell Barton
4cfa5d55e6 rna/api: new bezier keys added via fcu.keyframe_points.add() now use auto handles and bezier interpolation. 2011-03-13 09:52:49 +00:00
Sergey Sharybin
cf8cc39d4c Make BF_PYTHON_ABI_FLAGS a scons option. Default flags are empty.
Made changed to linux2-config and freebsd*-config. Windows/MacOS are kept
unchanged.

I'm not sure which flags should be used for freebsd systems, so flags for
them also kept empty. Maintainers of this platform, please check which
flags should be used and make changes to rules.
2011-03-13 09:29:47 +00:00
Joshua Leung
0c734577f4 Bugfix [#26484] delete keyframe in pose mode --> segmentation fault 2011-03-13 09:27:28 +00:00
Campbell Barton
42c2654d0e Inconsistent use of array_index vs index with animation keyword args.
Settle with 'index' even though the attribute is array_index.
2011-03-13 06:44:40 +00:00
Campbell Barton
ca95a6f415 - lightmap pack wasnt reporting no mesh errors properly.
- cleanup headers.
- cmake on *nix was always writing to /bin/./2.56
2011-03-13 06:02:20 +00:00
Campbell Barton
6559209dbf [#26482] Solidify / Animation Opengl render. no texture.
workaround for view3d datamask not being correct on opengl render.
2011-03-13 02:44:25 +00:00
Campbell Barton
25a2eb4675 py/library api: raise an error if a requested member isn't found. 2011-03-13 01:15:14 +00:00
Guillermo S. Romero
60a2994435 SVN maintenance. 2011-03-13 00:26:46 +00:00
Campbell Barton
ed81c7755a quiet stricter compiler warnings/errors. 2011-03-12 23:41:57 +00:00
Joshua Leung
15063f0602 Bugfix [#26473] Keyframe values for F-Curves were incorrectly wrapped
in RNA as "translation" values, which implies dimensionality is
incorrect here as F-Curves do not specifically "know" about the type
of the data they affect
2011-03-12 23:07:00 +00:00
Sergey Sharybin
d190304c82 Fix for compilation error after bullet upgrade.
There was a typo in source file list.
2011-03-12 22:05:33 +00:00
Erwin Coumans
5e374328a8 update Bullet physics sdk to latest trunk/version 2.78
add PhysicsConstraints.exportBulletFile(char* fileName) python command
I'll be checking the bf-committers mailing list, in case this commit broke stuff
scons needs to be updated, I'll do that in a second.
2011-03-12 20:34:17 +00:00
Campbell Barton
8c526e79e3 library loading api.
this is not well suited to RNA so this is a native python api.

This uses:
  bpy.data.libraries.load(filepath, link=False, relative=False)

however the return value needs to use pythons context manager, this means the library loading is confined to a block of code and python cant leave a half loaded library state.


eg, load a single scene we know the name of:
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.scenes = ["Scene"]


eg, load all scenes:
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.scenes = data_from.scenes


eg, load all objects starting with 'A'
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.objects = [name for name in data_from.objects if name.startswith("A")]

As you can see gives 2 objects like 'bpy.data', but containing lists of strings which can be moved from one into another.
2011-03-12 16:06:37 +00:00
Thomas Dinges
ce5c1466a1 2.5 Fluid UI Python Script:
* Code cleanup, no UI changes, reduced code from 1244 lines to 1228 lines.
2011-03-12 15:24:16 +00:00
Campbell Barton
90d42e114c py/rna: BPy_reports_to_error() now takes the exception type as an argument and returns -1 as an error value 2011-03-12 15:18:08 +00:00
Campbell Barton
a5e59ede6e pass report list along to BLO_blendhandle_from_file(), avoid unlikely crash in the append operator. 2011-03-12 15:15:40 +00:00
Ton Roosendaal
f6b21ecf84 More on bug #26432
More undo-push disabling for switching render slots.
Also added 'undo push' print in debug mode (blender -d)
2011-03-12 15:09:29 +00:00
Campbell Barton
a416949382 - BKE_idcode_iter_step() - function to step over all ID codes.
- BLO_blendhandle_get_datablock_names() now takes an arg for the total items in the list, saves the caller counting.
2011-03-12 14:38:00 +00:00
Campbell Barton
c678bd2d7d py/rna, ability to have python static methods in collections. 2011-03-12 14:32:30 +00:00
Campbell Barton
460bdf1f59 tag/comment unused variables. 2011-03-12 14:21:04 +00:00
Ton Roosendaal
3c86933886 Bugreport #26464
Added more clear tooltip to render as B&W file option.
This only works now for PNG, JPEG, TGA and TIFF
2011-03-12 14:14:19 +00:00
Brecht Van Lommel
9b2f0dadb9 Fix uvedit unwrap tool not taking selection into account. 2011-03-12 13:15:09 +00:00
Janne Karhu
5b75593c23 Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.

New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
  from a users point of view. Now there are only a few intuitive basic parameters that
  define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
   density and spring rest lengths so that it's easy to get stable simulations by simply
   emitting particles for a few frames and adjusting the particle size (easy when the
   particle size is drawn) so that the fluid appears continuous (particles are touching
   eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
   problem to solve with particle based fluid simulation so some compromises have to be
   made. So the bigger the stiffness parameter is the less the fluid will compress under
   stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
   smooth out instabilities, so less viscous fluids again need more substeps to remain
   stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
   gravity, and high pressure areas start to come down.

* In addition to these basic parameters there are separate advanced parameters that can
  either be tweaked relative to the basic parameters (or particle size) or defined
  independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
   can lead to small clumps of particles, so the repulsion keeps the particles better
   separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to 
   eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
   particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
   densely next to eachother.
** Spring rest length - by default this is 2 * particle size.

* There are also new options for 3d view particle coloring in the display panel to show
  particle velocity and acceleration. These make it easier to see what's happening in the
  fluid simulations, but can of course be used with other particles as well.

* Viscoelastic springs have some new options too. The plasticity can now be set to much
  higher values for instant deletion of springs as the elastic limit is exeeded. In addition
  to that there is an option to only create springs for a certain number of frames when a
  particle is born. These options give new possibilities for breaking viscoelastic fluids.

New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
  will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree 
  implementation makes the code quite a bit cleaner and should also give a slight speed
  boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
  now the fluid calculations are also done using the selected integration method, so there
  are again more choices in effecting simulation accuracy and stability. This change also
  included a nice cleanup of the whole particle integration code.

As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
Campbell Barton
60fe23b100 cmake, search $HOME/py32 for python now too. 2011-03-12 04:39:43 +00:00
Campbell Barton
42e9796c04 builder reports MSVC was setting stack size to 2gig. 2011-03-12 04:31:28 +00:00
Nicholas Bishop
bbf6603961 == Sculpt ==
* Removed some fields from struct SculptSession:
  - Fields drawobject, projverts, and previous_r were completely
    unused
  - Field `ob' was really unnecessary, changed sculpt functions
    to pass the object rather than the SculptSession

This removal of `ob' from SculptSession should should make it a little
easier to continue generalizing paint/sculpt functionality.

There should be no visible changes from cleanup.
2011-03-12 02:12:02 +00:00
Joshua Leung
80de27914d Bugfix [#26222] Alt-O (smooth) in Graph editor destroys fcurve handle
type and data

Recoded Keyframe Smoothing operator to work better for continuous
curves (i.e. ones with monotonically increasing slopes in sections) as
opposed to hypothetically jagged ones.

The old method assumed that handles should be flat as otherwise, you'd
often get unsmooth curves just because you went and tilted some of the
handles for local extrema, causing some unkeyframed overshoots, which
also leads to changes in timing, which in turn often means unsmooth
motion. Hence, the code took advantage of this to do things with less
extra data.

However, now we have a proper "flatten handles" tool (under snap ->
horizontal) so this functionality is not needed in the general case
where it will lead to stair-stepping artifacts.
2011-03-12 01:09:40 +00:00
Campbell Barton
c786a2c805 edit scons to use py3.2 on all os's and use 'm' abiflag on linux since this is the most common. 2011-03-12 01:03:15 +00:00
Campbell Barton
a001b3f072 set 2mb stack for mingw too. 2011-03-12 00:50:34 +00:00
Brecht Van Lommel
06a763f9d7 Fix #25931: strand render + ray traced AO give tile image. The random numbers
for sampling were not consistent, now the RNG is seeded per strand, and some
tweaks were done to make the jittered sampler cache return consistent sample
numbers for strands.
2011-03-12 00:16:55 +00:00
Nathan Letwory
92665b0a51 Fix [#25659] crash when unwrapping specific mesh
Reported by Jan Hohoho

Running the unwrap causes stack to overflow. Double the size from default 1MB.
2011-03-11 23:27:15 +00:00
Brecht Van Lommel
c30708c47c Fix #26035: fix crash building raytree with inf/nan values in raytree. There's
many different checks here, but I couldn't handle all cases in fewer lines.
2011-03-11 23:12:58 +00:00
Brecht Van Lommel
9dfda4b002 Fix #26203: crash with empty raytree, all types should survive this now.
Also added a check for -inf/inf bounding boxes, just to be sure.
2011-03-11 22:27:06 +00:00
Nathan Letwory
60a4c9d09e Some explicit casts to silence warnings (unsafe to mix int and bool in comparisons). 2011-03-11 22:06:18 +00:00
Brecht Van Lommel
977fdc5a56 Fix #25654: strand render with instanced objects was not working right,
some coordinates didn't have the instance matrix applied, while others had
it applied twice.
2011-03-11 21:37:17 +00:00
Ton Roosendaal
44692c70ae Bugfix, irc report:
Pressing ESC on material icon preview changes made it stop updating
the icons. Was caused by default 'break' callback testing ESC and
not resetting it. Now it uses same break callback as other previews.
2011-03-11 17:59:40 +00:00
Ton Roosendaal
719bf206b4 Bugfix #26444
Double click in File Window also loaded a file on double-click at
a directory.

The operator for it was using a Macro mistakingly here. On any double
click, it selected the item first and then executed load.

By default, any double click action has to rely on the first click 
being properly handled before. Simply removing this macro, and assign
the "exec operator" to the double-click event works as expected.
A double click on a directory then just shows the dir (because the exec
requires an 'active' file item).
2011-03-11 17:01:29 +00:00