Commit Graph

4152 Commits

Author SHA1 Message Date
Campbell Barton
e44da6b695 hide addon_utils in bpy.utils & tag/remove unused vars in recent commits. 2011-03-18 20:57:32 +00:00
Campbell Barton
1fec2d179f fix [#26510] Crash when changing an object's property value 2011-03-18 06:36:57 +00:00
Joshua Leung
e3842d1ca4 Bugfix [#26505] zoom in selected keys on graph editor
Not really a "bug", but it was on my todo anyways. Based on patch
[#26508] by Campbell, with a few modifications including extending
this to the Action/DopeSheet editor too.
2011-03-17 10:02:37 +00:00
Andrea Weikert
67c7fa46db == filebrowser ==
People had trouble finding the 'Create New Directory' operator button in the file browser. Changed this to show the text as well and make button bigger.
2011-03-16 21:05:24 +00:00
Janne Karhu
6dda182a76 Fix for [#26520] Point Density turbulence not accessible in Texture Properties.
* Mistake in the ui file.
* Also found a possible memory leak.
2011-03-16 18:21:31 +00:00
Sergey Sharybin
b8f96b191b "Fix" #26445: edit mode vertex distortion
Discussed with Campbell, it's not actually bug and it's more about limitation
of topology mirror. It will work properly when both sides of mesh have matching
unique topology.
Added note to tooltip, so now unpredictable behaviour shouldn't confuse users
so much.
Also gray out "Topology mirror" when "X Mirror" is disabled.
2011-03-15 09:04:26 +00:00
Campbell Barton
4c3b8f0f7d fix [#26503] Copy Mirrored UV coords exception 2011-03-14 23:52:50 +00:00
Campbell Barton
82783cd0cd pep8 edits and remove commented code from last commit. 2011-03-14 23:17:52 +00:00
Campbell Barton
f2b1645a75 fix/disallow [#26502] segmentationfault on pressing button to browse existing images for UV window
creating RNA within draw functions can free existing RNA, crashing blender when this is already used in the UI.
disallowing this so it raises a python exception.

This was being used to dynamically generate addon categories so for now they are hard coded and we need proper enum-functions for python to do this.
2011-03-14 23:02:47 +00:00
Campbell Barton
2d1ef275f2 bpy.types.libraries.load sphinx doc & examples (doc system needed some updates).
http://www.blender.org/documentation/blender_python_api_2_56_3/bpy.types.BlendDataLibraries.html#bpy.types.BlendDataLibraries.load
2011-03-14 10:31:50 +00:00
Campbell Barton
b0a9dbf9c8 auto-complete was moving the selection. 2011-03-14 06:48:51 +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
Thomas Dinges
6cab58c8b9 Readme file:
* 2.56 > 2.56a and 1 grammar fix.
2011-03-13 22:35:54 +00:00
Thomas Dinges
1e4010cad6 * Small code cleanup/removal 2011-03-13 20:39:15 +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
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
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
Janne Karhu
01b547f993 Fix for [#26457] Physics Size attribute affects hair particle DupliObjects while hidden
* Forgotten settings for the "simple hair" ui.
2011-03-11 11:15:35 +00:00
Ervin Weber
102c5e0ad4 2011-03-11 07:59:43 +00:00
Campbell Barton
9c032756e9 when checking for windows check sys.platform starts with "win" rather then '== "win32"' & avoid importing platform.
also add some notes to CMake options.
2011-03-11 01:24:16 +00:00
Campbell Barton
d59e208216 also enable edge-seam unwrapping when running the mark_seam operator. 2011-03-10 06:06:55 +00:00
Campbell Barton
3ad8fd44c4 request from Jedrzej Slewczuk's:
Option for tagging creases (Ctrl+RMB) to also re-unwrap the mesh.
 In 2.42 this could be done by setting rt==8 (very hidden), now its a little less hidden (in the toolbar).
2011-03-10 05:52:16 +00:00
Campbell Barton
6a32442855 revert r35438, Martin doesn't like having this option tacked on. 2011-03-10 00:38:23 +00:00
Campbell Barton
1110c80696 add option requested [#25598] projection surface snap issue
for retopo workflow you don't wan't to project the mesh onto its self, added option not to.
2011-03-09 22:45:34 +00:00
Campbell Barton
63e37a6133 - CMake, print message to run 'make install', this is new and should help avoid confusion: [#26425] SVN release can't find scripts/modules and doesn't start properly
- remove extension from icon to match spec: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.htm
2011-03-09 21:19:15 +00:00
Campbell Barton
94a8435124 make python UV functions use a popup UI rather then redo UI, they are not fast enough. 2011-03-09 11:01:44 +00:00
Campbell Barton
897c2ede13 py/ui: ensure extensions which add draw functions for menus/headers/panels always get the default operator context, not the one that was last set. 2011-03-09 10:57:56 +00:00
Campbell Barton
2b88ba069f lightmap pack: made into an operator & added to UV calc menu 2011-03-09 10:49:12 +00:00
Campbell Barton
c9dbef90b1 working with bpy 2.5x api, convert into operator next. 2011-03-09 08:35:17 +00:00
Campbell Barton
44648fdf99 update for py3.x syntax and mostly pep8 compliant 2011-03-09 04:08:38 +00:00
Campbell Barton
bf4323ab6a copy from 2.4x, update to 2.5x next.
svn cp https://svn.blender.org/svnroot/bf-blender/branches/blender2.4/release/scripts/uvcalc_lightmap.py release/scripts/op/uvcalc_lightmap.py
2011-03-09 04:01:40 +00:00
Campbell Barton
b629256d42 moving to addons & splitting for lazy loading of eps/png/svg
TODO, add to defaults when startup.blend is updated.
2011-03-09 02:07:44 +00:00
Ton Roosendaal
3a43e08deb Bugfix & Feature fix: Only Shadow Material options
Patch from Miika Hämäläinen.

The old Material "Only Shadow" used an ancient 'best guess'
formula using Lamp Distance and some averaging for converting
shadow values to alpha.
A couple of bug reporters already complained about the not
very predictable renders. Miika fixed this by adding two
new options, to only give the true shadow factor exclusively,
or to give a result including light intensity values.

More info:
http://projects.blender.org/tracker/index.php?func=detail&aid=26413&group_id=9&atid=127
2011-03-08 16:08:43 +00:00
Campbell Barton
efb5f6008f temp workaround [#26397] Console error when selecting certain entries in the Help Menu (Report a Bug)
bug in python 3.2, reported upstream: http://bugs.python.org/issue11432
2011-03-08 01:03:27 +00:00
Martin Poirier
988886a73d Fix keymap operator polling functions to be a bit safer. 2011-03-07 23:53:08 +00:00
Campbell Barton
c9685af1ff use set's, since pythons 3.2's optimizer converts these to frozensets, lookups are also faster then tuples (though this isn't a bottleneck). 2011-03-07 13:23:45 +00:00
Campbell Barton
cfd9d6d190 Drop support for python 3.1.
for building py3.2 on *nix see:
  http://wiki.blender.org/index.php?title=Dev:2.5/Doc/Building_Blender/Linux/Troubleshooting#Python

also fixed possible buffer overrun with getting the fake filepath for a blender textblock.
2011-03-07 11:53:40 +00:00
Campbell Barton
c544d3ffb8 Py/Operators: FBX Exporter setting order was still randomized.
Some lines removed recently I thought were are needed were there so classes that use mix-ins keep the argument order.
2011-03-07 08:57:35 +00:00
Campbell Barton
db066592b7 PyAPI: allow subclasses of io_utils.ExportHelper to set when the extension is enforced. 2011-03-07 08:01:38 +00:00
Thomas Dinges
6288eb2ef7 2.5 Armature Panel UI Script:
* Code cleanup, no layout changes.
2011-03-04 19:57:05 +00:00
Campbell Barton
2f741e4dde fix for own error [#26310] "Randomize Transform" operator has widgets jumbled
the correct order was being overwritten.
2011-03-03 13:23:40 +00:00
Campbell Barton
a18e1043e8 solidify material offsets for 2nd surface and rim faces.
run do_versions() on use_rim_material option so Sintel's jacket loads ok.
(request from Bassam)
2011-03-03 05:09:07 +00:00
Campbell Barton
385c5f0755 minor correction for r35312, check the operator returns finished.
use lambda for uv.py (no functional change).
2011-03-03 04:25:14 +00:00
Dalai Felinto
13d5f6005e BGE: Material Force Field renaming + reorganization
the old FH setting was blended with the other physics settings (friction and elastic)
Also in the Physics panel it was saying "Use Material Physics" but the button is only for Force Field.

Since I was here I decided to change the Constraint FH ui name from Fh to Force. I don't think users really understand what FH is (I for once don't).
Thanks to Carsten Wartmann for pointing that out.
2011-03-03 01:47:17 +00:00
Campbell Barton
21067886aa update for changed exception type 2011-03-02 04:16:57 +00:00
Nathan Letwory
299d1552af Remove superfluous () 2011-03-01 21:55:51 +00:00
Sergey Sharybin
0e8d313f0e Fix #26218: texture paint
- Added option "Fixed Texture" to the UI. Because of strange reason,
  this feature was implemented but hidden from users.
  Would be cool, if somebody familiar with 2d texture paiting check.
- Fixed some issues in existing code of fixed texture paiting.
  It now handles brush radius and curve correct.
- Also fixed issue with paiting with texture from node tree - it used
  to be painted with regular brush color instead of texture.
2011-03-01 17:58:12 +00:00
Campbell Barton
f2f52a578a UV layout export: EPS format
Pass an iterator function rather then the iterator its self, allows to loop over the faces twice without making a list.
2011-03-01 17:32:17 +00:00
Campbell Barton
2be3a334e2 fix [#26257] Colored UV-Map on export
- EPS now exports material colors and face fill doesn't overwrite edges (draw in 2 passes).
- added opacity option for EPS/SVG/PNG
2011-03-01 17:22:27 +00:00