Commit Graph

4257 Commits

Author SHA1 Message Date
Campbell Barton
2513b194a2 pedantic edit, no need to initialize var. 2011-03-21 12:40:06 +00:00
Campbell Barton
2e6a02438e move script directories for internal blender scripts.
ui/ --> startup/bl_ui
op/ --> startup/bl_operators

scripts/startup/ is now the only auto-loading script dir which gives some speedup for blender loading too.

~/.blender/2.56/scripts/startup works for auto-loading scripts too.
2011-03-21 12:35:49 +00:00
Janne Karhu
28d39473fc Changed the particle physics "timetweak" value to a more descriptive "timestep" value, which is in seconds.
* Done purely in rna, internally particles still use the timetweak value.
2011-03-21 10:53:29 +00:00
Campbell Barton
599bd1cbda patch from Martin, call classes register/unregister functions.
Modified to only do one lookup.

from Martin: 
 "Basically, what it does is allow you to add register and unregister class methods to rna types, this way you don't have to rely on module register/unregister methods to setup your types properly (and it makes them easier to move around when reorganizing code and easier to understand what a type does when reading code). This is especially nice for PropertyGroup classes that are added as properties to existing types, you can easily see in their register methods where they are added and removed in their unregister method. Obviously, those two methods are optional, so current code still works fine."
2011-03-21 06:22:09 +00:00
Joerg Mueller
a50cdf713a Added "Bake Sound to F-Curve" operator to the "Key" menu in the graph editor. 2011-03-20 12:19:21 +00:00
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
Campbell Barton
c8de6195c8 fix [#26252] Py error when installing addon through UI
Py3.1 for windows doesn't have os.path.samefile(), has been added in 3.2.
2011-03-01 08:28:37 +00:00
Campbell Barton
b4246549e7 select PoseBone attribute was made only available on bone. 2011-03-01 07:52:13 +00:00
Thomas Dinges
13b617c78f 2.5 Netrender UI File:
* Code cleanup.
2011-02-28 14:34:13 +00:00
Thomas Dinges
cbf976e7a6 2.5 UI scripts:
* Removed some unused code.
2011-02-28 14:25:40 +00:00
Campbell Barton
5ef65a0a3b build system now exclude config-*, turtledemo when copying system python.
also remove __pycache__ dirs when cleaning (new in python 3.2)
2011-02-28 05:59:44 +00:00
Campbell Barton
e09189cf50 complete lazy loading of py modules to use to a reduced set of pythons modules, gives ~40% speedup on cold & warm start (without netrender).
- use own OrderedDictMini class, pythons collections.OrderedDict is overkill, 179 sloc. replaced with own, 11 lines.
- remove code which stored the class file & line per RNA subclass, this was useful but would raise its own exception every time to generate a stack trace to get the class info so we could use of the class failed to register. the class stores its module & name which can be enough to find where it was defined.
2011-02-28 04:37:24 +00:00
Thomas Dinges
da27e6889a Info > Help Menu:
Finally, the Blender icon can be used for the splash screen menu entry, on own todo for almost 1 year!
Thanks to elubie for fixing this in the code. :)
2011-02-27 17:11:56 +00:00
Andrea Weikert
b39f09e962 == UI icons ==
* Moved ICON_BLENDER away from (0,0) spot in blenderbuttons, since ICON_BLENDER=0 define is conflicting ICON_NULL define as well as with logic checks for nonzero icon id.
* This solved bug where ICON_BLENDER can't be set from Python as well as when using new UI functions from within Blender.
2011-02-27 16:58:37 +00:00
Campbell Barton
fc0c016940 replace import *'s with named imports (using * is convenient for some scripts but considered bad practice by python devs) 2011-02-27 15:25:24 +00:00
Campbell Barton
52f92b4cb1 lazy load modules for more scripts. 2011-02-27 14:16:32 +00:00
Campbell Barton
87acf919a5 lazy load pydoc module. move help() replacement into console code rather then on startup since importing pydoc pulls in lots of other modules too. 2011-02-27 14:08:33 +00:00
Thomas Dinges
b51fb00654 2.5 particle UI File:
* Code cleanup and some assignment names fixes. 
We still have the code guidelines. http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Layouts

So please only use subsub if absolutely necessary!
2011-02-27 11:06:01 +00:00
Thomas Dinges
77959fe893 2.5 Constraint Ui File:
* Minor fix for my commit yesterday, label in FLOOR constraint was missing for location property.
2011-02-27 10:47:32 +00:00
Dalai Felinto
bc52b996e3 small UI cleanup - "Mouse Cursor" instead of "Show Mouse" and s/subcol/sub and a new line in the end of constraints ui file 2011-02-27 09:36:29 +00:00
Dalai Felinto
ac1b08a928 BGE patch: [#26223] Some RigidBody joints fixes (ui angles, conetwist/hinge limits etc) by Juha Mäki-Kanto + ui changes pour moi
From the tracker:::
Issues fixed:
- ConeTwist-constraint's params weren't making it to the CcdPhysicsEnvironment, also added Hinge's params.
- UI wasn't using angles where applicable.
- btHingeConstraint's constructor can create frame-matrices which don't align so the hinge doesn's start at 0 degree tilt.
This is an issue when setting limits.

Changes:
- UI: Hinge limits can be set (and disabled).
- UI: ConeTwist only has max-limits and only the twistX can be disabled
- PyApi via rna_constraint.c: added the functions limit_xyz_min, limit_xyz_max (for 6dof), limit_angle_xyz_min,
limit_angle_xyz_max (for 6dof), limit_angle_x_min, limit_angle_x_max (for hinge).
- PyApi: dropped python-function limit_cone_min. 

.:. Extra:
UI Changes:
- renamed "RigidBody Joint" to "Rigid Boidy Joint" 
- reorganized UI to conform with other parameters (e.g. Limit Rot)
- added dis/active all over the place :)
2011-02-27 09:21:13 +00:00
Thomas Dinges
039940e1e9 Image Editor:
* Added back selector for active UV texture. IRC Request by _BigWings_ :)
2011-02-26 19:18:02 +00:00
Campbell Barton
2f0d93ba56 clean whitespace 2011-02-26 16:27:58 +00:00
Campbell Barton
91e6fd1828 port of function from 2.4x's BPyMesh.py thanks to 'merlin_' on IRC. 2011-02-26 16:13:14 +00:00
Thomas Dinges
ab9490f8ea 2.5 UI Scripts:
* More code cleanup.
When removing the narrow_ui feature, a lot of split functions were kept. Changed them to rows, which are more easily readable. Check out properties_data_lattice.py for a good example.
2011-02-26 16:04:14 +00:00
Joshua Leung
7a55884b62 Added operator which makes selected scene markers into local 'pose'
markers.

This is useful for when working with lipsync shots, where you've used
markers for noting down key syllables and want to separate these out
into chunks to manage things better.
2011-02-26 06:28:24 +00:00
Sergey Sharybin
ce81cce75d Fix #26158: The layer hight of the layer tool cannot longer be controled by the strength of the brush, as it was in 2.49
Layer height used to be controlled with brush radius, quite confusing decision.
Added new property for brushes - height for adjusting affectable brush height
(it could be not only layer height in the future).
2011-02-25 16:54:09 +00:00
Campbell Barton
b25db7c8cb pep8 cleanup 2011-02-25 16:06:14 +00:00
M.G. Kishalmi
2158d05866 adjustments to recent commit:
* inv_ -> inverted_
* flagged image dirty after invert.
* restored properties accidently cut out of unpack operator.

brecht.beers[lmg]++
 thanks for paying attention! :)
2011-02-23 19:40:24 +00:00
Janne Karhu
3bee6abb74 Fix for [#26133] Explode modifier doesn't care about UVs (Option "split edges")
* This is basically a total rewrite of the edge split algorithm. The old one didn't handle tris at all and quads were cut wrong in some cases too with the addition of not handling uv coordinates at all.
* This new algorithm uses a flag system to categorize different splits and the identical but rotated cases in a similar way to how marching cubes indexes different cases.
* It cuts quads and tris and creates proper uv's for the new faces too.
* I also renamed the option to "edge cut" to differentiate if from the edge split modifier and added an option to override a uv-channel in the exploded mesh with particle age as x-coordinate so that the shrapnel can be faded out nicely etc.
2011-02-23 19:29:59 +00:00
M.G. Kishalmi
f0f3d9a2ff added image-editor operators:
Invert Image Colors (RGB)
--
Invert Red Channel
Invert Green Channel
Invert Blue Channel
Invert Alpha Channel

mostly because of the recent changes in normalmap channels,
so users can adopt old bakes quickly.
though they might aswell prove useful in other situations.
2011-02-23 12:02:43 +00:00
Campbell Barton
9349374359 add back view 1:1 operator from 2.4x (Shift+PadEnter) 2011-02-23 06:48:47 +00:00
Campbell Barton
2f472ccd60 add back 2.4x mesh vertex sort/randomize operators, were called xsort and hash in 2.4x.
available from vertex menu.
2011-02-23 05:17:29 +00:00
Campbell Barton
0a7fecac8f add 2.4x posemode & weightpaint feature as an operator - Flip Active, Shift+F. 2011-02-23 04:58:08 +00:00
Campbell Barton
43007d7fed - fix python error for poselib UI when none is active.
- add info to create_dupli_objects rna function docstring.
- transform snap had bad define, disabling BVH accelerated snap (own fault).
2011-02-23 03:08:14 +00:00
Campbell Barton
8378aa74fa python console namespace fix, merging namespace dicts was no good, since it pulled in private vars. use normal import command. 2011-02-23 01:20:40 +00:00
Campbell Barton
2fd60d9719 error in own recent moving addons functions into its own module. addon_utils.reset_all failed. 2011-02-22 22:24:50 +00:00
Thomas Dinges
86e6c39f60 Material UI, patch by Ervin Weber (lusque). Thanks!
Now we have the old UI again, as suggested by several developers on the Mailing List. 
At least for simple materials. For Node Materials we keep the new Pipeline panel.

This should make both sides happy. :)
2011-02-22 19:22:27 +00:00
Campbell Barton
4b859e91cb bugfix/workaround [#25629] Add torus with autmatic edit mode duplicates mesh after >Aling to View.
adding meshes in C does:
 Add Empty Mesh -> Enter Editmode -> Create Mesh

while python does:
 Add Generated Mesh -> Enter Editmode


problem with this is there is no empty undo state for undo-redo to use so it always gave a duplicate mesh on redo-ing.
workaround by adding an empty mesh, do an undo push, and join the generated mesh into the empty one.

this would be fixed if undo stack spanned modes.
2011-02-22 02:47:59 +00:00
Nathan Vegdahl
ea20a27240 Editbone length was still using "normalize()" instead of "normalized()"
for setting length, which was thus failing and erroring out.
2011-02-21 20:26:37 +00:00
Campbell Barton
b26a4dc4af fix [#26093] Install Add-On Fails and deletes script
problem was on installing a file which was already installed, when the source and target paths match python deleted the file.

now check if the selected file is inside any of the addon search paths and abort with an error.
2011-02-21 07:33:59 +00:00
Campbell Barton
eee4a62e87 move addon utilities into their own module, these were getting mixed between bpy.utils and space_userpref. 2011-02-21 07:07:44 +00:00
Campbell Barton
848d60caee Move blender version info into BKE_blender.h so we only have the info in one place and so package building scripts can extract it in a more usable way.
this also means we can have a version string like '2.56a-beta' without using buildinfo.

release/VERSION was only used by scons, NSIS installer.

Possibly helps to fix bug [#26062] too.
2011-02-21 04:45:47 +00:00
Campbell Barton
1e4c17a82f missed updating this when editing registration,
netrender wasn't registering its RenderEngine subclass.
2011-02-21 02:45:13 +00:00
Campbell Barton
54dd0f57cf bug [#26089] editbone.transfrom() seems to mess up bone roll (by more than float precision error)
This is intentional behavior but add options not to transform the bones scale & roll.
2011-02-21 01:29:35 +00:00
Campbell Barton
863ac9e07f change shrinkwrap modifier cull front/back options from 2 booleans into an enum since it makes no sense to have front and back enabled at once. 2011-02-19 09:53:38 +00:00
Campbell Barton
e4a69ffb60 fix [#26104] Context Set Boolean op fails [34892i]
could give better feedback but these operators are mainly for internal use.
2011-02-19 04:28:07 +00:00
Campbell Barton
8cde7ef020 Correct report [#26139] Documentation is incorrect
also remove Irix from list of supported OS's, add FreeBSD.
2011-02-19 00:58:46 +00:00
Sergey Sharybin
8856b598fd Another small text space usability: option to show right margin (aka print marign) 2011-02-18 13:57:54 +00:00
Campbell Barton
063a7f217b python api docs & examples for registrable Menu/Panel/Operator/PropertyGroup classes. 2011-02-18 08:47:37 +00:00
Janne Karhu
c4d7bb80f5 "Fix" for [#26130] Turbulence Force Field seed does not look to generate a new texture when the seed changes via IPO keyframe
* Small force field ui changes to make things a bit clearer.
2011-02-18 07:42:38 +00:00
Campbell Barton
d17df68c24 - clear some warnings
- rename layout.operator_enums -> operator_enum (since we have operator_menu_enum, only called in 4 places)
2011-02-18 06:07:41 +00:00
Janne Karhu
1dc4db7775 Fix for [#26120] Particle Grid options available when shouldn't 2011-02-18 00:40:15 +00:00
Campbell Barton
a241ce1fd1 patch [#26056] fix for ValueError when no addons are present
by Amorilia (amorilia), fix modified.
2011-02-17 22:38:51 +00:00
Campbell Barton
812f238494 pep8 cleanup and remove unused vars/imports 2011-02-17 04:35:41 +00:00
Thomas Dinges
8ead7b327c 2.5 UI Interface Scripts:
* Code cleanup, seriously we have a lot of unnecessary code!
* Small modification for OpenEXR buttons.
2011-02-16 20:29:23 +00:00
Thomas Dinges
0ea7f1ce15 Material UI: Code cleanup.
Please, don't use a split function if you just have 2 properties in one line, a row is all you need here. ;-)
2011-02-16 19:52:32 +00:00
Thomas Dinges
878c8f47d8 Commit patch [#25939] material panel proposal by Ervin Weber (lusque). Thanks!
From the patch description:
"A new panel is proposed to bring togheter all the properties of a material that belong to the render pipeline level.
Such properties are currently not mixable with node materials, as nodes operate on a shader level."

Commiting this patch as approved in the sundy meeting.
2011-02-16 19:39:45 +00:00
Janne Karhu
ef920a50da Particle settings can now be pinned too:
* Particle system's are comparable to texture slots, which can
  only exist within an id block. Particle settings on the other
  hand are idblocks which should be pinnable just like textures.
* When particle settings are pinned only properties that make
  sense without the actual particle system are shown in the
  particle panel.
2011-02-16 10:57:58 +00:00
Janne Karhu
d450e35f21 Added full texture idblock controls for displace and wave modifier. 2011-02-16 10:23:27 +00:00
Janne Karhu
e6879c7646 Correct texture pinning:
* Now texture pinning works consistently for all textures.
* The only problem is that there is no way to pin textures if there are
  no textures in the context path, so it's for example impossible to pin
  the texture of a displace modifier without adding a texture somewhere
  else and selecting that texture first. I my opinion this is quite
  counter productive so perhaps a dedicated "only textures" texture
  context option is needed after all.
2011-02-16 10:22:19 +00:00
Campbell Barton
430bb75749 enum-flag arguments were incorrectly documented. 2011-02-16 10:19:14 +00:00
Joshua Leung
437bdbc96c PoseLib Bugfixes, Cleanups, and Missing Operators
* All the various index-related issues should finally be sorted now.
It seems you cannot just partially implement some of these active
index getter/setters...
* Standardised the call used by PoseLib operators to get the Object
from which they get the active PoseLib data from
* PoseLib operators which require some existing data to work now use a
poll() which checks for this
* Added back the operator used to make standard actions into ones
usable by PoseLib
* Added a dummy operator for the apply active pose button which really
just calls the same backend functions as "Browse Interactive", but
which has a nicer frontend (naming + description) for the purpose of
being used in this way
* Also, removed some useless code from here
2011-02-16 06:18:20 +00:00
Campbell Barton
4c35d8d5a8 rename IDPropertyGroup to PropertyGroup
also renamed IDProperty to PropertyGroupItem (these are not referenced for common usage and we already have 'Property' defined).
2011-02-16 02:51:56 +00:00
Campbell Barton
fee5363912 bugfix [#26094] Going to Bone Roll menu brings up python error
also correct for pep8 warnings.
2011-02-16 02:25:03 +00:00
Joshua Leung
7756da34c9 PoseLib UI and Bugfixes:
- Added operator button to show the current pose. This runs on top of
the interactive pose browse functionality, so the tooltip may be a bit
obtuse...
- Specifying a pose for the Pose browse functionality to set now works
correctly. Previously, some old depsgraph hacks were actually
interferring with correct updating (only the armature updated
correctly, but deforms didn't occur)
- Fixed a case of accessing freed memory, which I'm surprised no
static checkers have reportedly picked up on yet, or that nobody has
really had issues with (probably due to low memory "turnaround" so
far)
2011-02-16 02:05:41 +00:00
Joshua Leung
147309e3c5 Pose Lib: Start of PoseLib UI in Armature buttons
This presents a UI from which PoseLibs can be assigned/removed from
Objects. From here, it is also possible to see the list of poses and
add/remove poses from this list.

Known Issues:
- [Py/RNA/Operators BUG ALERT!] If after immediately starting Blender
you try to remove a pose from the PoseLib using the UI buttons, you'll
get a an error the first time you do so (but not for subsequent
attempts). This seems to be caused by the "pose" enum (dynamically
generated) of the POSELIB_OT_pose_remove operator, which does not seem
to be getting initialised when the operator's exec gets called without
the invoke having been called previously
- Changing the active Pose Library still seems to be broken (to be
fixed soon)

Todos:
- Operator button to make the selected pose get shown in the 3d view
- Restore the "validate action" operator and add that to this panel
- Rename pose access
2011-02-16 00:17:22 +00:00
Sergey Sharybin
e9ff1b98cb - Do not use old anchor toggling operator. It used to set brush flags to
unawaliable state.
- Also changed dynamic space bar menu, so it now also wouldn't allow to
  set brush stroke flags to unavaliable state.

Also tried to remove use_anchor, use_space, use_restore_mesh and
use_airbrush, so user would be unable to set flags to unavaliable state,
but it was quite difficult for non-sculpt paint modes. They don't support
all of stroke methods, so brush.stroke_method can't be used for them.

Keep this area unchanged for now.
2011-02-15 19:19:36 +00:00
Campbell Barton
8845163574 menu to select an enum from an RNA path:
eg,
   bpy.ops.wm.context_menu_enum(data_path="scene.tool_settings.vertex_paint.brush.stroke_method")

This saves us defining operators only for menus.
2011-02-15 18:12:41 +00:00
Campbell Barton
8b7482892b made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors. 2011-02-14 17:55:27 +00:00
Campbell Barton
a6765280f9 py rna api: turn class.is_register into a class property rather then a class method.
eg:

if MySybclass.is_registered:
    ...
2011-02-14 07:26:07 +00:00
Guillermo S. Romero
7b201c7693 SVN maintenance. 2011-02-14 04:47:55 +00:00
Joshua Leung
54190dd8e5 Bone Colour Sets (theme ones) can now be edited from the User
Preferences UI again
2011-02-14 03:43:28 +00:00
Joshua Leung
35abb674b2 Forgot NLA Editor support for this... 2011-02-14 03:04:59 +00:00
Joshua Leung
b8a19d3a43 Graph Editor part of the changes in the previous commit... 2011-02-14 02:50:52 +00:00
Joshua Leung
52525a00f7 DopeSheet: Add menu entries and hotkeys to select all keyframes
left/right to current frame in dope sheet

This commit separates out this selection functionality out of the
click-selection operator into a separate operator, so that hotkeys and
menu entries can be assigned to it.

This is based on an idea+patch (#23738) submitted by Torsten Rupp
(rupp), though I've ultimately decided not to go with the suggested
implementation as I don't think this fits that well under the "column"
select operator.

Todo: Graph Editor support will be coming shortly...
2011-02-14 02:30:33 +00:00
Janne Karhu
7b4c4183f3 Small addition to particle grid distribution:
* New option to distribute particles in a hexagonal grid.
* This is much more stable for fluids than normal grid distribution and looks quite nice otherwise too :)
* Also some small scale code cleanup of grid distribution code.
2011-02-13 13:50:19 +00:00
Janne Karhu
373fea6662 Small update for billboards:
* Renamed the old split uv's animate option "time" to "age" and added a new option to change the used split frame by frame. These are good changes were suggested/implied by Hannu Hoffren over 3 years ago in his tutorial video! (oh my how time flies)
* Also cleaned up the billboard ui quite a bit. For example now the uv channels can be properly chosen from the existing channels.
2011-02-12 23:25:03 +00:00
Janne Karhu
0a83817672 Small particle effectors update:
* Greetings from farsthary: particle rotation is now taken into account for particle effector direction.
** This gives all kinds of new possibilities as he shows in his blog http://farsthary.wordpress.com/2011/02/08/vortex-particle-simple-tut/.
**The only modification I made to his patch was to use the actual rotated particle direction as the effector direction as this defaults to the particle velocity vector, so no actual new options are needed.
* I also added an "effector amount" setting for particle effectors so that only a part of the particles can be considered as effectors. This makes it possible to create simple "farsthary vortexes" with only one particle system.
* Also some tiny reorganization of the falloff min/max values for a nicer ui.
2011-02-12 17:54:24 +00:00
Janne Karhu
fafbd9d71b Particles todo item: particle textures
* Effecting particle properties with textures was possible in 2.49,
  but not in 2.5 anymore.
* Now particles have their own textures (available in texture panel
  for objects with particle systems), which are totally separate from
  the material textures.
* Currently a basic set of particle properties is available for
  texture control. Some others could still be added, but the whole
  system is not intended as an "change anything with a texture" as
  this kind of functionality will be provided with node particles in
  the future much better.
* Combined with the previously added "particle texture coordinates"
  this new functionality also solves the problem of animating particle
  properties through the particle lifetime nicely.
* Currently the textures only use the intensity of the texture in
  "multiply" blending mode, so in order for the textures to effect
  a particle parameter there has to be a non-zero value defined for
  the parameter in the particle settings. Other blend modes can be
  added later if they're considered useful enough.
2011-02-12 14:38:34 +00:00
Campbell Barton
e70ca00f71 - move keyingsets_utils.py into modules.
- add gplv2 header
- define __all__ so when importing '*' it wont being in locally defined vars.
2011-02-12 08:12:00 +00:00
Campbell Barton
9bd57cd302 update templates for registration changes 2011-02-12 08:04:32 +00:00
Campbell Barton
c50bf404d2 patch [#25978] mathutils fixes for bpy_types.py and vertexpaint_dirt.py
from Filiciss Muhgue (filiciss)
2011-02-11 12:30:17 +00:00
Campbell Barton
7f6946d4f7 add torus script wasnt registering. 2011-02-11 03:42:36 +00:00
Campbell Barton
17efeb310d bpy.utils.register_module() generator could go into eternal loop. 2011-02-11 01:27:00 +00:00
Campbell Barton
2f4f046b6f UI functions added to existing UI classes (operators adding their own menus for eg),
would stop the entire menu from drawing if they raised an exception.

now print the exception and continue.

Also added a verbose argument for bpy.utils.(un)register_module() to help test whats being registered.
2011-02-11 01:12:01 +00:00
Campbell Barton
b1cdf5c344 use weak references for the internal metaclass typemap,
this should help with blender leaking memory with python classes though the bug is still not fixed.
2011-02-11 00:39:07 +00:00
Campbell Barton
fb8c135584 minor python register changes.
- KeyingSetInfo classes are now collected like Panels, Operators etc so bpy.utils.register_module() can be used.
- move bpy.types.register() to bpy.utils.register_class
2011-02-11 00:11:17 +00:00
Campbell Barton
4612034cf4 patch [#25809] Auto-Registration as utility function.
This removes auto-registration, committed by Martin r30961.
Realize this is a contentious topic but Brecht and myself both would rather opt-in registration.

TODO:
- addons need updating.
- class list will be modified to use weakrefs (should have been done for existing system too).
- will move bpy.types.(un)register functions into bpy.utils.(un)register_class, currently including these functions in a type list is internally ugly, scripts which loop over types also need to check for these.
2011-02-10 23:48:22 +00:00
Campbell Barton
d240206c88 fix for crash with GLSL material when image couldn't be loaded.
also quiet pep8 warnings.
2011-02-10 14:59:17 +00:00
Joshua Leung
fc3b29b637 Small consistency fixups 2011-02-10 09:39:55 +00:00
Michael Fox
446299db1c small feature request from zanqdo, merging in the mirror modifier is now optional, simply turning town the merge limit just simply do anything, and merging is off by default as this seems more logical behaviour 2011-02-10 00:05:03 +00:00
Campbell Barton
30552f9f46 patch [#25972] blender-thumbnailer.py: GVFS support
from Shinsuke Irie (irie) with some minor edits.

Shinsuke's description from the tracker:
---
I have implemented GVFS framework support of blender-thumbnailer.py which allows some file managers like Nautilus and Thunar to show thumbnails in trash or network directories. If Python's gio module is available, the thumbnailer uses it to access to filesystems mounted via GVFS. This change shouldn't affect desktop environments other than GNOME and XFCE.

A function gvfs_open() in this patch is defined to solve a stupid incompatibility between Python file object and GIO Seekable object.

On Ubuntu 10.10, I confirmed thumbnails can be generated for file://, trash://, sftp://, and smb://.
2011-02-09 02:09:30 +00:00
Joshua Leung
4eb76a1a90 Graph Editor: Added option to turn off AA drawing for performance
gains when using really heavy files
2011-02-09 02:09:25 +00:00
Joshua Leung
adfbb83cdf Bugfix: When removing the "only insert for active keyingset" option
for Auto-keying from the UserPrefs, I forgot to remove the option from
the UI there.
2011-02-09 00:52:53 +00:00
Campbell Barton
32e3aac6bc use update() rather then update_tag(), needed for making edge data. 2011-02-08 21:32:26 +00:00
M.G. Kishalmi
4ac2d60800 jahka IRC fix
pinning the texture properties gave python errors.
2011-02-08 16:24:00 +00:00
Janne Karhu
811a1b910c Texture context selector for texture panel:
* Texture context was previously determined by going to the appropriate panel, for example "world panel -> texture panel" to access world textures. Additionally there was a separate button to access brush textures.
* Now the texture context can be selected directly through an expanded icon menu, which shows the available context options.
* This context selector is now at the top of the texture panel, but this could later be perhaps integrated to the context path somehow to be more intuitive.
2011-02-08 14:29:48 +00:00
Campbell Barton
cd95dd42d7 fix own recent error [#25977] Torus disappears when adding "Subdivision Surface"
ID's and meshes both have update functions, call the meshes rather then update_tag() for recalculating edges.
2011-02-08 11:20:19 +00:00
Martin Poirier
89bb5e6423 [#25693] Netrender "shadow" images with last frame always appear
Render engine postprocess property was not named properly
2011-02-08 01:56:36 +00:00
Campbell Barton
6c21f4713b mailed Stani Michiels and he's ok to switch his console autocomplete to GPLv2 or later. 2011-02-08 00:01:15 +00:00