Commit Graph

27345 Commits

Author SHA1 Message Date
Joshua Leung
dbc5941cae Bugfix [#28515] Dupliframes start/end animation broken since 2.56A
Due to changes with the way that dupliframes were being evaluated (one
of those being that the animation for the object being animated would
get reevaluated for every frame sample for dupliframes) to get them
working properly again sometime during the 2.5 series, the dupliframe-
sampling loop would be prematurely terminated on the first frame in
this example.

That is because after the first step of the loop, the ob->dupend
property would have changed its value as it was being animated,
leading to the loop terminating, and only the a single dupli getting
added.
2011-11-04 08:06:46 +00:00
Campbell Barton
87cd81b162 - added docs and examples for bpy.app.handlers
- correct error in own last commit for BKE_screen_find_big_area()
2011-11-04 04:27:46 +00:00
Matt Ebb
7e9bc22925 Enabled ndof devices for controlling colour wheel and cube UI controls
(eg. colour pickers). Tilting the ndof device up and down and rolling it left and 
right will move the 'colour cursor' in screen x and y, and twisting the ndof device 
will rotate the cursor around the colour wheel (hue). Now you can turn off the 
lights and pretend you have a fancy DI deck!
2011-11-04 02:31:00 +00:00
Campbell Barton
2d787e6e01 utility function to find the biggest area: BKE_screen_find_big_area(...), was being done with static functions that were copied about. 2011-11-04 01:15:04 +00:00
Campbell Barton
29575c9ac8 compile without python works again 2011-11-03 23:20:54 +00:00
Sergey Sharybin
224c26f891 Fix #28998: sequence rendering with wrong progress bar
Show overall progress when doing sequence rendering. Nice for cases when
you're using sequencer to combine video strips only, without rendering
scenes and so. If scene strips are used in sequencer, per-frame rendering
would be used (because of scene rendering sets per-frame progress).
2011-11-03 17:06:12 +00:00
Brecht Van Lommel
d53989bda6 Depsgraph: more tweaking for update acces from python API
* Move scene_update_pre callback before depsgraph flusing so it works better
  when you do modifications on objects then.
* Fix missing update after making modifications in frame_change_pre, recalc
  flags were not being flushed.
2011-11-03 16:41:48 +00:00
Sergey Sharybin
b99f6e3d08 Fix #29005: Bezier/Surface Datablock switching bug?
This commit updates curve datablock to respect curve dimension flag
when setting datablock for curve.

Not ideal but this makes behavior quite expected, avoids big changes in
curves core stuff which depends on object type and prevents restrictions
on changing data datablock which works in general cases.
2011-11-03 16:16:19 +00:00
Campbell Barton
665f602f15 python string conversion
- use _PyUnicode_AsStringAndSize where possible
- use %R for PyErr_Format(...) rather then running repr on the object explicitly 
- use const char
2011-11-03 14:09:18 +00:00
Campbell Barton
d210703bca use Py_TYPE macro (no functional changes) 2011-11-03 13:10:37 +00:00
Sergey Sharybin
aefa2cda10 Fix #28935: Material display error VBO + Texture Solid + Modifier 2011-11-03 12:43:45 +00:00
Sergey Sharybin
17f90f8fe4 Fix #29122: Curve Radius keyable from Outliner Datablock view but not Transform Radius field in 3D Viewport
If there's only one control point selected, show radius property for this point, not for medium value.
2011-11-03 12:28:32 +00:00
Campbell Barton
dff93ddecc hopefully fix msvc build error 2011-11-03 12:01:18 +00:00
Joshua Leung
9e8a7c7e31 Bugfix [#29113] "Follow path" constraint subframes calculated
incorrectly

"Follow Path" constraint was applying subframe offsets to the curve-
path evaltime value for non-fixed case. However, it turns out that
when doing old-style mblur, this results in the offset getting applied
twice, resulting in incorrect values (i.e. by the time the constraint
gets ctime, this already has had subframe offset applied, and so too
has curve evaltime).
2011-11-03 11:20:22 +00:00
Brecht Van Lommel
fa8fffac1c Depsgraph/Python: ensure datablocks with animation data get tagged as being
updated on frame change.
2011-11-03 10:03:08 +00:00
Campbell Barton
f69818e7f6 correct error in stub 2011-11-03 09:20:54 +00:00
Campbell Barton
5eef937436 modify previous api feature to tag functions as permanent, use nicer decorator style, eg:
# --------

import bpy
from bpy.app.handlers import persistent

@persistent
def my_func(scene):
    pass

bpy.app.handlers.frame_change_pre.append(my_func)
2011-11-03 09:13:47 +00:00
Campbell Barton
e2393d1109 ability to have permanent callbacks that stay active when new blend files are loaded.
this works by tagging functions, eg:

  def my_func(scene):
      pass

  bpy.app.handlers.permanent_tag(my_func, True)  # <-- important bit
  bpy.app.handlers.frame_change_pre.append(my_func)
2011-11-03 06:53:52 +00:00
Campbell Barton
7d7977658a fix for warning on osx 2011-11-03 04:58:11 +00:00
Campbell Barton
887e1fed99 fix regression [#29076] 16bit Tiff save broken in Blender 2.60 2011-11-03 03:51:48 +00:00
Campbell Barton
1f291a69c1 correct spelling mistakes 2011-11-03 03:00:45 +00:00
Campbell Barton
4293f4738c patch [#28947] Patches for #28943 (Support for XDG Base Directory Specification)
from Cosme
2011-11-02 22:00:22 +00:00
Brecht Van Lommel
723e129252 Depsgraph/Python: callbacks and properties to detect datablock changes
* Adds two new python handlers: scene_update_pre() and scene_update_post()
  These run before and after Blender does a scene update on making modifications
  to the scene.
* Datablocks now have an is_updated property. This will be set to true in the
  above callbacks if the datablock was tagged to be updated. This works for the
  most common datablocks used for rendering: object, material, world, lamsp,
  texture, mesh, curve.
* Datablock collections also have an is_updated property. If this is set, it
  means one datablock of this type was added, removed or modified. It's also
  useful as a quick check to avoid looping over all datablocks.
* RenderEngine.view_update() can also check these properties, for interactive
  viewport rendering.

http://wiki.blender.org/index.php/Dev:2.6/Source/Render/UpdateAPI
2011-11-02 20:56:52 +00:00
Brecht Van Lommel
ac52c79cb1 RenderEngine/Nodes: system to check for shading nodes compatibility
* Scene.use_shading_nodes property to check if RenderEngine is using new shading
  nodes system, and RenderEngine.bl_use_shading_nodes to set this.
* Add mechanism for tagging nodes as being compatible with the old/new system.
2011-11-02 19:24:30 +00:00
Brecht Van Lommel
30f1f28a8a Nodes: add support for shader nodes on world and lamps, in addition to materials.
The internal render engine does not support them, and they are not accesible in
the UI yet, but cycles will use them.
2011-11-02 18:55:32 +00:00
Brecht Van Lommel
97a0ae3e1b RenderEngine api: support for viewport rendering, details here:
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/RenderEngineAPI

* This adds a Rendered draw type in the 3D view, only available when
  the render engine implements the view_draw callback.
* 3D view now stores a pointer to a RenderEngine.

* view_draw() callback will do OpenGL drawing instead of the viewport.
* view_update() callback is called after depsgraph updates.
2011-11-02 18:20:53 +00:00
Nicholas Bishop
42ce1d5943 Sculpt cleanup
Replace a use of bglMats in sculpt with ED_view3d_* functions().
2011-11-02 16:02:01 +00:00
Nicholas Bishop
11d05b379d Small sculpt cleanup
Since frontface() is always called with tex_strength(), moved the call
to frontface() into tex_strength (required a few new normal
parameters.)
2011-11-02 15:35:16 +00:00
Thomas Dinges
e1594ebb3c World Mist
* Removed some more unused stuff and marked as deprecated.
2011-11-02 14:36:21 +00:00
Brecht Van Lommel
e07389ccb8 RenderEngine: steps towards implementation of this proposal:
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/RenderEngineAPI

* RenderEngine is now a persistent python object that exists and retains
  properties as long as a frame is being rendered. This is mostly useful now
  that more than one callback will be added.
* Added update() callback that should ideally be used to export the scene,
  leaving only the rendering to the render() callback. This is not required to
  be used at this point, but separating this will make things more thread safe
  later on.
* Added tag_redraw() and tag_update() functions that will be used for viewport
  rendering.
* Internal change: status text is now retained after update_status calls.
2011-11-02 14:33:14 +00:00
Thomas Dinges
aa363800b0 World Stars:
* Remove remaining star color code, was unused. Marked as deprecated in DNA.
2011-11-02 14:28:16 +00:00
Brecht Van Lommel
79a389ee37 RenderEngine: add .is_animation and .is_preview properties to detect if it's
an animation or preview render that is being done.
2011-11-02 13:36:28 +00:00
Brecht Van Lommel
3d35e004d3 Related to #29092: make the working of the Mist Intensity option more clear in
the user interface.
2011-11-02 12:18:51 +00:00
Campbell Barton
e29aa363f2 new math function: Quaternion.to_axis_angle().
add in safety checks for inf/nan values which could happen in some cases.
2011-11-02 09:13:04 +00:00
Campbell Barton
43e297c0c0 minor cleanup for weightpaint fill
- SCE_SELECT_FACE and SCE_SELECT_VERTEX are mutually exclusive, use a macro to get a single value from them.
- was allocating an array for no reason.
2011-11-02 00:51:21 +00:00
Nicholas Bishop
b60f60453b Function convertViewVec() contained some piece of code duplicated four
times, pulled out into separate function and cleaned up a bit. Should
be no functional changes.

Review link: http://codereview.appspot.com/5308073/
2011-11-02 00:17:37 +00:00
Campbell Barton
d7de4d28dd quiet some warnings. 2011-11-01 22:51:10 +00:00
Thomas Dinges
27ffb5556a Bugfix for [#29055] node editor / texture node / scale node
* Node Vector sockets, don't have a PROP_FACTOR any longer.
2011-11-01 22:21:21 +00:00
Thomas Dinges
32b34d631a Space types:
* Some cleanup, removed references to already deleted *_header.c files.
* Marked SpaceScript as deprecated and removed header. Will keep space for now though, as some script operators are there and Campbell might want to re-use the space later.
2011-11-01 20:14:58 +00:00
Thomas Dinges
ea2f7c907c == Removal of SpaceSound ==
* Removed old, unused Space Sound space
* Removed data struct and Theme settings
* Old files with an open Audio window will be loaded as Info Space
2011-11-01 19:48:45 +00:00
Andrea Weikert
785de4cbfc == Cleanup of SpaceImasel ==
* removed struct for SpaceType and all usages
* SPACE_IMASEL in enum nees to be kept to identify it in old files
* it is replaces with SPACE_EMPTY on load, which is overridden by SPACE_INFO which has same struct members
* also removed theme settings
2011-11-01 18:27:09 +00:00
Sergey Sharybin
c70cde6f94 Fix #29124: Modifying mesh with mirror and solidify modifiers crashes blender
It is corrected fix for #29089 (svn rev 41409). That fix wasn't correct because
it used to set face number from derived mesh on which solidify is applying which
isn't correct for case of constructive modifiers applied on base mesh before
solidify modifier.

Actually nothing special should be performed here to set needed original index
because of ORIGINDEX layer is getting copyed automatically when when copying faces.
2011-11-01 17:43:30 +00:00
Andrew Wiggin
2241eaddf5 Reverting r41409 (broken fix for #29089)
r41409 can cause a crash if you delete a face of a mesh that has subsurf & solidify modifiers active
2011-11-01 17:06:10 +00:00
Brecht Van Lommel
d55298ee3c Fix #29109: bpy.ops.render.render() with scene parameter missed compositing,
previous bugfix needed a bit more refining.
2011-11-01 14:51:44 +00:00
Brecht Van Lommel
4b48a5a497 Fix #29101: 2D Tilt on Bezier Curve Bug?
Changing tilt for 2D curves doesn't really hurt, just makes things not so
clear tosee what's going on because you're changing value which isn't used
at all for 2D curves. Disallwo to run TRANSFORM_OT_tilt operator for 2D curves.

Also made a correct fix for incorrect shortcut for tilt in 3D viewport toolbar,
it was really confusing to have almost the same operators (TRANSFORM_OT_tilt and
TRANSFORM_OT_transform with mode=tilt) in keymap. Better to use tilt operator
in toolbar.
2011-11-01 11:00:08 +00:00
Campbell Barton
dd8a575c22 correct header, for some reason gcc doesnt warn about this 2011-11-01 09:47:19 +00:00
Campbell Barton
2ad80bf3bb vertex group mirror
- now works in vertex select + weight paint mode.
- added option not to mirror all vertex groups.
2011-11-01 08:11:55 +00:00
Campbell Barton
bcdcbb65c1 macro to check if an object type supports vgroups 2011-11-01 06:45:36 +00:00
Campbell Barton
e3f03d72b6 added path traversal flag - BPATH_TRAVERSE_SKIP_MULTIFILE,
so path manipulation functions dont run multiple times on the same path in the case of sequence strips where the one directory is used as the base for many images.
2011-11-01 06:26:55 +00:00
Campbell Barton
f3f3a42566 use math functions for mesh subdivide smooth (easier to follow for bmesh, no functional changes). 2011-11-01 04:19:21 +00:00
Brecht Van Lommel
4e0d8ccf96 Fix #29084: material/texture nodes crash introduced in 2.60, execdata is being
lazely created but this wasn't done in a thread safe way.
2011-10-31 17:00:59 +00:00
Brecht Van Lommel
bdb279ec5b Fix crash in texture nodes, when no derivatives available, other nodes already
did this check.
2011-10-31 16:44:24 +00:00
Brecht Van Lommel
56421d869d Fix: selecting with z-buffer hiding did not work when graphics card settings
enabled antialiasing, overriding application settings.

The fix for this got lost when the FSAA option was added and later disabled
again. Added it back now, and also disable AA for UI widgets since it makes
them look too blurry, they already do their own AA.
2011-10-31 14:08:14 +00:00
Campbell Barton
2ceeaf9721 fix [#29089] Faces created for "rims" by solidify modifier have incorrect visibility 2011-10-31 07:17:35 +00:00
Campbell Barton
797d2bbd88 use_verify option to defvert_sync_mapped and defvert_sync was flipped, also minor edits to defvert_verify_index() - no functional change. 2011-10-31 06:13:20 +00:00
Campbell Barton
9905094f5d fix own error r41191 getting id property string lengths. 2011-10-31 01:50:04 +00:00
Campbell Barton
dc1b3d88b8 fix [#29098] File save dialog cannot handle extra periods in file name 2011-10-31 00:23:42 +00:00
Thomas Dinges
9c115ccc40 Blender Conference Feature Request by Jonathan:
* Made "V3D_BGPIC_EXPANDED" true per default, so when you add a new background image, you don't have to expand the UI to select the image.
2011-10-30 23:01:24 +00:00
Jens Verwiebe
6d5cf68aaf WIN32, fix a crash when blender is executed in background mode, patch by kjym3 2011-10-30 20:47:03 +00:00
Sergey Sharybin
61a2dfe89d Change default values for mix node.
Discussed with plenty of artists on De Balie and this values makes much more sense.
2011-10-30 14:53:26 +00:00
Campbell Barton
c4fa7bf286 make_uv_vert_map() was looping over the texture face for not reason. 2011-10-30 06:53:25 +00:00
Thomas Dinges
f837b46a2b Modifier compilation tweaks (Blender conference commit)
* Fluid compilation: Inverse the compile flag from DISABLE_ELBEEM to WITH_MOD_FLUID for consistency. (scons/cmake)
* Use WITH_BF_FLUID in your user config (scons) 

* Add support for scons to disable build with Decimate and Boolean modifier. 
(WITH_BF_DECIMATE and WITH_BF_BOOLEAN)
2011-10-29 23:56:07 +00:00
Campbell Barton
e28c2ce753 bug from revision 2!, error noticed kjym3 on IRC, buffer overrun on lbarray, was 30 but 39 items beting accessed, surprising this didnt crash earlier. 2011-10-29 11:15:12 +00:00
Campbell Barton
1e4be0a4bf replace BLI_strtok_r from r41337 with lighter method that doesnt alloc for template_list 2011-10-29 08:18:42 +00:00
Brecht Van Lommel
ed77c356fc Fix: OpenGL renders on graphics cards which do not support non-power-of-two
textures were stretched and the wrong size.
2011-10-28 16:57:06 +00:00
Bastien Montagne
7627a742ab UI list template: committing patch [#26629].
This adds the ability (esp. for py scripts) to add some controls for each list element. See http://wiki.blender.org/index.php/User:Mont29/UI_Template_List_Enhancement for details.
2011-10-28 13:09:43 +00:00
Bastien Montagne
2ed7a66653 BLI_string: Adding the BLI_strtok_r function, which mimics stdlib strtok_r (unavailable on some systems).
It allows to iterate over a string, returning an new element each time, using a char as separator. See BLI_String.h's comments for more info and an example.

Needed by the UI template list patch following!
2011-10-28 13:07:11 +00:00
Campbell Barton
0d63bb005f replace VECCOPY and QUATCOPY with inline funcs. 2011-10-28 12:40:15 +00:00
Campbell Barton
565fcd8907 fix for error in gpu.export_shader() was missing *4 (only writing 1/4 of the colorband) 2011-10-28 08:53:00 +00:00
Campbell Barton
4b635d1631 use generic path remapping when making all library data local, previously only image paths were getting corrected, now all paths will (scene image seq strips, pointcache etc) 2011-10-28 04:44:59 +00:00
Campbell Barton
3ad7445e28 fix [#29062] Can not save image as external on a writable path 2011-10-28 04:05:52 +00:00
Campbell Barton
592879bfca prefix common internal operator function names so its possible to assign them breakpoints. 2011-10-28 03:02:09 +00:00
Joshua Leung
015b7b4fa9 Renaming the extensionless "blenderbuttons" to "blender_icons.png" 2011-10-28 00:09:13 +00:00
Jens Verwiebe
4ce5bb0ba2 OSX: adapt comments to new behaviour when compiling with gcc-4.6 but GHOST and QT with default compiler 2011-10-27 15:50:51 +00:00
Jens Verwiebe
7a20ced627 Fix player prototype, fix compile for OSX/XCode4.2, use always tablet enabled (test) 2011-10-27 15:46:26 +00:00
Campbell Barton
699030ceb6 use const for readonly strings and set some functions to static 2011-10-27 14:41:26 +00:00
Andrew Wiggin
626f737186 ..and now fix linux build since my windows build fix had a lowercase typo 2011-10-27 12:37:14 +00:00
Andrew Wiggin
76d2e76aec Fix windows build (__func__ macro needs definition from BLI_utildefines.h on MSVC) 2011-10-27 12:28:39 +00:00
Campbell Barton
99075b35ed fix [#29044] applying mirror modifier causes crash; something with vertex groups? 2011-10-27 07:54:32 +00:00
Campbell Barton
6aaccb69cc utf8 buffer wasn't being initialized in ghost_event_proc 2011-10-27 06:05:55 +00:00
Campbell Barton
f7d5cea669 use path remapping for all make local functions, patch from Alex Fraser with changes. 2011-10-27 05:34:39 +00:00
Campbell Barton
fa6e6e7fc0 pass image description to image loading functions for more useful error than 'Unknown fileformat'. 2011-10-27 04:24:34 +00:00
Campbell Barton
31d401613d bpath
- loop over all sequence images and pointcache
- option not to loop over library / packed data, expose in bpy.utils.blend_paths()
2011-10-27 03:40:12 +00:00
Joshua Leung
0ebda4ba58 Bugfix [#29015] Copy n Paste keyframes and poses broken?
Improved error messages presented when trying to paste keyframes.
Previously, "No keyframes to paste" would always be displayed, even if
the copy/paste buffer had some contents but couldn't be pasted if
there weren't any F-Curves selected to paste to.
2011-10-27 01:55:10 +00:00
Campbell Barton
cd852ce1a1 - remove bpath iterator and replace all uses with visitor.
- added flag to optionally receive all paths as absolute.
2011-10-27 01:25:07 +00:00
Joshua Leung
4772b72951 Typos and formatting fixes 2011-10-27 01:05:55 +00:00
Campbell Barton
5afc38b74c Support more kinds of paths for path re-writing / traversing, patch from Alex Fraser with additions.
this now supports as many types as bpath iterator which its intended to replace.
2011-10-26 22:46:06 +00:00
Campbell Barton
92fe279fe6 quiet -Wempty-body and unused warnings 2011-10-26 21:30:08 +00:00
Campbell Barton
a267f9ba4e edits ontop of Alex's patch from r41292.
pass main rather than use G.main when naming from -> to relative paths.
2011-10-26 21:22:35 +00:00
Brecht Van Lommel
ba0ef7a592 Fix #29030: render operator only used scene property if layers was used, now it
is possible to specify the scene without the layer too.
2011-10-26 14:05:01 +00:00
Alex Fraser
f09d36d6bc Fix [#28772] Filepaths are not remmaped after making a library item local
Added a visitor function to simplify processing of file paths that are attached to IDs. This is used for images, and could be used for other ID types in future.
Code reviewed by ideasman_42.
2011-10-26 10:49:21 +00:00
Sergey Sharybin
fe6ad36060 Fix compilation error for win32.
That static align trick i've wrote about is still necessary.
2011-10-25 18:13:12 +00:00
Campbell Barton
f149e49dff - fix numpad comma replacement which was broken since unicode input was added.
- add blender-softwaregl wrapper script for unix
- quiet compiler warning.
2011-10-25 13:13:02 +00:00
Sergey Sharybin
3d903ee3ff Libraries upgrade:
- Upgrade Eigen2 library to Eigen3
- Upgrade colamd library and placed in extern/ so other libraries from extern/ can use it

NOTE: With previous version of Eigen (3.0.1) it was necessary to define
      EIGEN_DONT_ALIGN_STATICALLY macro to make it compilable on windows 32bit.
      After latest upgrade it seems to be unnecessary (at least when was testing libmv),
      so i removed that defines which can reduce speed and lead to other problems.
2011-10-25 12:37:42 +00:00
Campbell Barton
675076a06e cmake macro to set less strict flags per file - remove_strict_flags_file(file, file...)
this way we can avoid removing strict flags for all files in blenkernel.
2011-10-25 11:06:52 +00:00
Campbell Barton
ff683ca5e5 misc small edits, remove remaining Id's 2011-10-25 04:01:09 +00:00
Sergey Sharybin
5b6224c847 Remove currently unused IMB_cache_limiter_* function.
Would be replaced with movie cache soon.
2011-10-24 17:26:24 +00:00
Sergey Sharybin
3cbadbf895 MovieCache implementation
Implementation of cache for general movie-related areas
such as sequencer and clip editor (in the future)

Some changes in limiter were necessary:
- Limiter counted mapped memory twice when was checking how many memory is used.
- It was using "global" memory usage not memory usage by cached elements.
  It will cause big problems when there's large mesh or plenty of undo steps are
  in memory nothing would be cached in sequencer.
- To solve this problem introduced "callback" to measure cached element size.
  It could be not very accurate in general, but it works well for image buffers.
  And if this callback isn't set old-school memory usage check would be used.
- The whole cache used to get freed when memory limit exceeded, now it'll drop only
  as much elements as necessary to reduce memory usage.

Seqcache is switched to use this new cache code.
2011-10-24 17:12:28 +00:00
Sergey Sharybin
8afc509be4 Some small fixes and changes:
- Add *.cc files to qtcreator project as well as .cpp and .cxx
  (would be needed for correct generating projects with libmv library).
- Added negate_v2 and negate_v2_v2 functions. They'll be needed for
  camera tracking project.
- Fixed issue with generating proxies from 32bit images.
  (generated jpg-s opened fine in blender, but were dark in osx viewer).
- Marked unused arg in indexer as UNUSED.
2011-10-24 17:09:31 +00:00
Campbell Barton
a29c3b2bbb fix [#28961] FCurves.range() returns wrong values for one-point curves (sic!)
also fix for case where verts were treated as found but were infact not because none were selected.
2011-10-24 12:26:14 +00:00