Commit Graph

33103 Commits

Author SHA1 Message Date
Sergey Sharybin
936178d10f Do not run versioning code for new files. All stuff from current verisoning
block was written before 2.60 release, so it should be safe to move it into
if'ed block checking version number.

This patch should also fix bug #29147 which was caused by old->new particle
rotation mode switch.
2011-11-04 09:29:58 +00:00
Campbell Barton
2d09bf85af cleanup some BLF macros and dont over-alloc BGE's PyObjectPlus when setting strings (better change then the one I made recently). 2011-11-04 09:14:49 +00:00
Joshua Leung
3717059511 Comments and other text editing:
* Renamed one of the two "File is Saved" entries, as having two
entries with the same name in the Datablocks viewer was confusing
* Edited the tooltip text for "speed" option for dupliframes to
clarify what it does (or what it's supposed to do)
2011-11-04 08:08:47 +00:00
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
Campbell Barton
0e51c9014c patch [#27917] MARKER MENUS: Unification and adding "Duplicate Marker to Scene..."
from Troy Sobotka (sobotka), with edits

- remove Markers from Ctrl+L menu (was out of place here and was broken from recent changes to marker operators)
- further de-duplicte scripts by having all menus call the same function: marker_menu_generic().

this fixes bug [#29083] too.
2011-11-03 12:47:39 +00:00
Sergey Sharybin
aefa2cda10 Fix #28935: Material display error VBO + Texture Solid + Modifier 2011-11-03 12:43:45 +00:00
Thomas Dinges
563becafb9 Scons:
* Basic support for OpenImageIO and Boost libraries
* Path to libraries added for win32/64-vc-config.py, still commented out.
2011-11-03 12:40:15 +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
Thomas Dinges
6ea6e992ba Scons:
* Minor cleanup
2011-11-03 12:24:29 +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
9a4e1e0f0a Cycles: updates to follow code committed to trunk. 2011-11-03 10:18:58 +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
Campbell Barton
b07d92408b cmake could ignore defines for python lib/include passed from the command line if both weren't defined. 2011-11-02 21:35:00 +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
Thomas Dinges
a59f7e02f8 Projection Paint UI:
* Code cleanup, much better to understand what is going on there now. 
* Stencil menu was mis aligned, fixed it for UI beauty. :)
2011-11-02 16:19:57 +00:00
Brecht Van Lommel
2f453773f6 Cycles: svn merge -r41266:41467 ^/trunk/blender 2011-11-02 16:17:05 +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
Thomas Dinges
bdc029a193 Toolbar UI code:
* More cleanup.
2011-11-02 15:58:56 +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
Brecht Van Lommel
02fae3440c Cycles: RenderEngine api code tweaks, also ensuring it's backwards compatible. 2011-11-02 15:15:45 +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
Miika Hamalainen
b3dd11821f Dynamic Paint:
* Some fixes and tweaking for the previous commit.
2011-11-02 11:32:22 +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
90a19ce578 fix [#29120] project painting error 2011-11-01 23:01:57 +00:00