Commit Graph

29169 Commits

Author SHA1 Message Date
Campbell Barton
f3686b5885 py/api registration:
move calls to the classes register/unregister function into register_class() / unregister_class() and add docs.

also other minor changes:
- remove face sorting keybinding, was Ctrl+Alt+F, this is quite and obscure feature and face order normally doesn't matter, so access from Face menu is enough.
- add commented out call to mesh.validate() in addon template since its useful to correct incomplete meshes during development.
2011-03-22 01:38:26 +00:00
Campbell Barton
74a996c869 fix [#26385] operator edit_properties return error 2011-03-21 23:53:19 +00:00
Campbell Barton
d781ecff75 fix for grease pencil conversion to bezier curve reading past the end of the array. 2011-03-21 23:30:56 +00:00
Campbell Barton
4bca2e455d use spaces rather then tabs + minor pep8 edits. 2011-03-21 22:37:08 +00:00
Campbell Barton
379f55f54c fix for error printing class register error, remove an unneeded check. 2011-03-21 22:17:01 +00:00
Campbell Barton
2304256a6c quiet warning 2011-03-21 22:10:24 +00:00
Ton Roosendaal
67cbf22211 Bugfix #26549
Using environment map type "load" increased user counter on each
preview render.

Also noticed that this type of envmap use wasn't threadsafe, causing
imbufs being allocated for all threads. Also fixed that.
2011-03-21 17:10:55 +00:00
Brecht Van Lommel
9a75ba4463 Buildbot initial configuration files, for http://builder.blender.org
Maintained in svn to make it easier for others to contribute changes,
actually updating builder.blender.org requires manual update on the
server.
2011-03-21 16:46:26 +00:00
Brecht Van Lommel
f0d7fbc4b7 CMake package_archive target to create a .zip/.tar.bz2 package on mac/unix,
to be used by buildbot.
2011-03-21 16:42:21 +00:00
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
Nathan Letwory
e1a44e9ae6 COLLADA: small tweaks to directional light import. 2011-03-21 09:50:30 +00:00
Mitchell Stokes
ae530c23c1 Fixing a typo: "Unknown erro reading file" -> "Unknown error reading file" 2011-03-21 09:37:20 +00:00
Mitchell Stokes
500f393bda BGE Dynamic Loading: Fixing a particularly nasty leak that occurred if LibLoad() errored. 2011-03-21 09:32:54 +00:00
Mitchell Stokes
1f52d83a99 BGE Dynamic Loading: When given a relative path (starts with "//") for LibLoad(), make the path absolute. This helps resolve relative paths inside the library. 2011-03-21 09:29:28 +00:00
Janne Karhu
4a305e7edb Half way fix for [#25385] Particles Emitter only interpolates IPOs & [#26493] Particle system animates incorrectly when emitting mesh is parented
* Particle emission now updates all parent objects too to the exact emission time.
* This only does object level animation as updating the object data for every particle would be too slow.
* A better fix could be to interpolate the emission location directly from the current particle emission location and the location from the previous frame, but for this some point cache changes have to be made, so it will have to wait.
2011-03-21 08:47:04 +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
Campbell Barton
6031744c35 fix for use of un-initialized pointers in file_sfile_to_operator(...) & remove unused vars. 2011-03-21 03:22:33 +00:00
Andrea Weikert
8908d55907 == file browser == Code cleanup
* Remove direct access to file->selflag in file_ops.c
2011-03-20 15:15:05 +00:00
Brecht Van Lommel
b71efb4152 Fix #26557: dots near alpha borders on textures. Tweak threshold in alpha
de-premul for image textures to avoid float precision issues.
2011-03-20 15:03:13 +00:00
Brecht Van Lommel
549b5e1222 Fix/change in normal computation, now the viewport uses the same angle
weighted normals as the render engine, and the render engine will copy
normals from the mesh rather than always recalculating them.

Subsurf/multires still use regular vertex normals, but they are expected
to be sufficiently high resolution to not need this.

This means that normal maps displayed in the viewport actually match the
render engine exactly and don't have artifacts due to this discrepancy.
It of course also avoids unexpected surprises where your render normals
look different than your viewport normals.

Subversion bumped to 4 for version patch to recalculate normals.

Patch by Morten Mikkelsen, with some small changes.
2011-03-20 13:35:35 +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
Andrea Weikert
85970c39bf == file browser == Code cleanup
* Remove deprecated variables from FileSelectParams
2011-03-20 11:40:29 +00:00
Andrea Weikert
6be2d3aff9 == filebrowser == Code cleanup
* remove commented out code
2011-03-20 11:27:28 +00:00
Andrea Weikert
e73a2020dd == filebrowser == Code cleanup
* Separate out selection flags from file type flags, was bothering me since forever ;)
* Also renamed ACTIVEFILE to SELECTED_FILE to better reflect actual usage in code.
* Fix crash introduced with last commit, better check for valid selection
2011-03-20 11:16:59 +00:00
Andrea Weikert
5325f3b2e9 == file browser ==
Patch from Alexander Kuznetsov: Toggle selection rather than just extending.

Implements behaviour that unintendedly was available with previously using macro operator for selection. This was removed and now the functionality is properly implemented.

Patch accepted with minor changes:
1. Used enum rather than #defines and added value for removing from selection (deselect)
2. Moved if (select) outside file_select_do and improved check for whether last file in selection is actually selected. (Necessary since toggle can deselect and toggle select should still make file active)
3. Additionally fixed check in file_select_invoke to be consistent with border select.
2011-03-20 10:22:51 +00:00
Campbell Barton
5442e725a5 print how many times the operator failed. 2011-03-20 09:38:25 +00:00
Campbell Barton
790e47768a fix for crash when running WM_OT_read_factory_settings() from a script and then importing. 2011-03-20 07:23:17 +00:00
Campbell Barton
35cee79a37 fix so the batch importer can run with addons passed as arguments. 2011-03-20 06:02:47 +00:00
Campbell Barton
283bac0073 fix for --addons startup argument, string length was too short. 2011-03-20 04:44:03 +00:00
Campbell Barton
733b736e9e CMake, check for clang++ compiler and disable WITH_IK_ITASC and WITH_MOD_FLUID until there supported.
possibly allows builing with Xcode4.
2011-03-20 01:49:15 +00:00
Andrea Weikert
ef9356043e == file browser ==
Patch from Alexander Kuznetsov: Real-time File Selection, thanks for the contribution.

Still made a few minor changes from latest patch:
1. Rename SELECTEDFILE to HILITED_FILE, since we are not actually selecting the file, but previewing/highliting the possible selection.
2. Also made this clearer by not drawing the files as selected, but just highlight them.
3. Removed the Select/Deselect toggle when clicking on file, will be committed separately soon.
2011-03-20 00:34:08 +00:00
Mitchell Stokes
35dbf67c00 Fixing the other crash mentioned in bug #25083. m_current_scene isn't always pointing to valid memory by the time LinkBlendFile is called. So, use the supplied scene_merge scene instead. Scene LibLoad was already doing this, so I just made Mesh and Action follow suit. 2011-03-19 22:47:51 +00:00
Mitchell Stokes
815a795be9 Fixing 1/2 crashes mentioned in bug #25083. This crash happens when LibLoad tries to grab bad mesh data from a previous Load/Free via FindGameMesh(). FindGameMesh() makes use of m_map_mesh_to_gamemesh, so the mesh needs to be removed from this on free. 2011-03-19 22:37:27 +00:00
Ton Roosendaal
647f4246da Todo item:
Improving UI visualization of using Material nodes:
- Property editor: the context top line now shows the linkage path
  (in material and texture view mode)
- Activating new material node refreshes preview in property editor
  when in texture mode.

This should make editing textures with node materials a bit more clear.
2011-03-19 18:23:21 +00:00
Ton Roosendaal
5179a0c477 Code comments only
Tried to resolve todo item "Layer change in 3d view header doesn't update
dependencies on changed previously visible objects". Code is too much spread
around now though, and the 3d view header shares RNA code for changing layers.

I'll let this be a "glitch" for now.
2011-03-19 16:30:52 +00:00
Janne Karhu
e134e0139f ugh, left in a debug print in the previous commit 2011-03-19 13:36:43 +00:00
Ton Roosendaal
074f584cd2 Bugfix #26547
Missing DAG_id_tag_update() on tool "Align Camera to View".
2011-03-19 13:36:36 +00:00
Janne Karhu
f15c12a0d2 Fix for [#26546] Particles leak through deforming quad mesh
* Slightly too strong optimization in the new collisions code, the "edges" in the middle of quads weren't checked at all.
2011-03-19 13:33:03 +00:00
Campbell Barton
cadc1218c8 C, style changes (mostly white space edits), no functional change. 2011-03-19 11:12:48 +00:00
Brecht Van Lommel
ff1656175a Fix #26543: lamp sky settings were missing soft/linear light blend types,
made enum items shared with material ramp and mix node.
2011-03-19 10:26:15 +00:00
Campbell Barton
e9005b985e remove some redundant vars, assignments & checks. 2011-03-19 05:06:06 +00:00
Campbell Barton
3b8d4aa25f 2 tests for ctest.
- script_load_addons: loads and onloads all addons, error if any cant be enabled or disabled.
- script_load_modules: loads all blenders modules, error if any modules raise an exception or if any modules in the scripts dir are not tested (except for presets and templates).

These are useful because lazy module loading means a module can have an error which isnt raised until the tools used. This gives a way to detect basic errors that used to happen on startup or when enabling the addon.
2011-03-18 23:58:13 +00:00
Joshua Leung
5f8e8f2251 Safety checks for macro defines 2011-03-18 23:14:24 +00:00
Nathan Letwory
21b2f94235 Fix [#25480] Unable to use Windows titlebar icons after Loopcut
reported by Georg K
with patch [#26469] Windows mouse fix
by Alexander Kuznetsov

The amount of mouse grabs wasn't properly balanced with ungrabs, thus preventing from using proper mouse input outside client area.
2011-03-18 21:59:45 +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
Janne Karhu
b66f7a471c Fix for [#25878] UV Scale/Rotate/Grab break with non grid snapping.
* The selected uv-vertices (the ones being transformed) weren't being disregarded as snapping targets, so moving two verts that were in the same location together was impossible.
2011-03-18 16:35:42 +00:00
Ton Roosendaal
eeb94697d5 Bugfix #26462
Using "search menu" for browsing ID data (material, texture, brush)
wasn't sending an undo-push after use. This messed up undo or redo.
2011-03-18 16:09:29 +00:00
Janne Karhu
60ce95f562 New particle collisions code:
* The old collisions code detected particle collisions by calculating the
  collision times analytically from the collision mesh faces. This was
  pretty accurate, but didn't support rotating/deforming faces at all, as
  the equations for these quickly become quite nasty.
* The new code uses a simple "distance to plane/edge/vert" function and
  iterates this with the Newton-Rhapson method to find the closest particle
  distance during a simulation step.
* The advantage in this is that the collision object can now move, rotate,
  scale or even deform freely and collisions are still detected reliably.
* For some extreme movements the calculation errors could stack up so much
  that the detection fails, but this can be easily fixed by increasing the
  particle size or simulation substeps.
* As a side note the algorithm doesn't really do point particles anymore,
  but uses a very small radius as the particle size when "size deflect" isn't
  selected.
* I've also updated the collision response code a bit, so now the particles
  shouldn't leak even from tight corners.

All in all the collisions code is now much cleaner and more robust than before!
2011-03-18 15:31:32 +00:00