Commit Graph

35122 Commits

Author SHA1 Message Date
Sergey Sharybin
92c8c2ed69 Code de-duplication in imageprocess.c -- made it use interpolation functions from blenlib 2012-11-11 08:48:35 +00:00
Ben Batt
a9eb610473 Fix #32398: Mirror modifier with "Merge" enabled producing pairs of faces
sharing the same set of vertices.

Modified the CDDM_merge_verts function (currently only used by the Mirror
modifier) to skip faces using all merged vertices.
2012-11-11 04:53:20 +00:00
Campbell Barton
83de5cb308 bge mesh conversion speedup, avoid calling ConvertMaterial() on every face.
now do per material bucket.
2012-11-11 01:54:30 +00:00
Campbell Barton
dfc55421df game engine material conversion: don't use the material to convert vertex colors, then extract back out (pre face). 2012-11-11 00:39:08 +00:00
Campbell Barton
f8af8100d2 code cleanup: bge - rename 'type' to 'use_mcol' in material conversion. 2012-11-10 23:57:13 +00:00
Campbell Barton
67b74f96da - property sensor was converting floating point values to text then back to float - for floating point properties.
- IntValue's GetNumber() was convert int -> float -> double.
- BL_Shader was using STR_String rather then char*, where most callers had a char*, use a char* to avoid STR_String conversion-and-alloc on shader access.
2012-11-10 22:32:15 +00:00
Sergey Sharybin
446f70f286 Removed determineDependingAreaOfInterest from movie distortion node
It wasn't used and it was incorrect anyway (distortion could be more than 100px).
2012-11-10 19:15:09 +00:00
Sergey Sharybin
18300e8eab Movie clip: display stabilization border even if current frame failed to load 2012-11-10 19:11:34 +00:00
Sergey Sharybin
f81e30a41f Solved issue with distorted compositor results in some cases
Originally issue was discovered when using stabilization and movie distortion
nodes, but in fact issue was caused by render layer node always doing nearest
interpolation. Now made it so this node will respect sampler passed to it's
executePixel function and do an interpolation.

Added two new functions to do bilinear/bicubic interpolation in float buffer
with variable number of components per element, so it could interpolate 1, 3
and 4 component vectors. This functions currently mostly duplicates the same
functions from imageprocess.c and it should actually be de-duplicated. Think
it's ok to leave a bit of time with such duplication, since functions should
be generalized one more time to support byte buffers, which could backfire on
readability.

Also removed mark as complex from stabilization node, which isn't needed sine
int fact this node is not complex.
2012-11-10 19:11:25 +00:00
Howard Trickey
5ebe7d6a13 Bevel: patch from Thomas Beck fixes numeric offset input and adds wheel input for number of segments. 2012-11-10 13:59:45 +00:00
Ton Roosendaal
4121e4b7e7 Added UI support to set OpenGL MultiSample.
Code to support it was lying around for long already, but not controlled by UI nicely.
Now you have in user preferences "System" tab an option to set it. 

NOTE:
- it only works saving as User startup.blend, and restart Blender.
- your system should support it, no check for it is visible in UI
- tested only on iMac OSX 10.7

Screenshot:
http://www.blender.org/bf/chinchilla.blend.png
2012-11-10 11:55:45 +00:00
Campbell Barton
250109f5ac add argument so recent bge function mesh.transform_uv() so you can optionally transform between UV1 / UV2 2012-11-10 10:26:39 +00:00
Campbell Barton
fecc3b9d68 add 2 new utility functions to the BGE mesh py api.
mesh.transform(matid, matrix)
  mesh.transform_uv(matid, matrix, uv_index=-1))


much more efficient then looping over verts in python to transform them.
2012-11-10 09:45:43 +00:00
Sergey Sharybin
f5c9f2c253 Cycles: correction to how device of lists is exposed to blender
compute_device_list is using static vector of device information which
had pointers (identifier and name) to values from device information
structures. That structures are also stored in static vector and being
refreshed every 5 seconds.

The issue is, as soon as device information is being updated, pointers
in vector from compute_device_list became incorrect.

Seems it was the reason of issues with sudden switching from CUDA to
OpenCL on my desktop and from CUDA to CPU on my laptop, It was also
seems to be making persistent images behaves instable.

Made it so device identifier and name are copied from device info
to structures used by RNA (CCLDeviceInfo).

Alternative could be avoid cacheing CCLDeviceInfo and always use actual
list of device information by RNA. It shouldn't be so much slow.
2012-11-10 08:37:02 +00:00
Campbell Barton
936f0388e8 code cleanup: some warnings and formatting for PyMethodDef's in the BGE. 2012-11-10 05:42:50 +00:00
Sergey Sharybin
fc2b52b837 Fix for wrong usage of RE_engine_free 2012-11-10 05:03:45 +00:00
Sergey Sharybin
e5a9bd51ff Updated stubs to make blender player compilable 2012-11-10 04:59:52 +00:00
Sergey Sharybin
819ca0accc Fixes for movie distortion node
- Somehow this node was using nearest interpolation which seems have been
  passed from compositor node. It was using b-spline interpolation with
  old compositor implementation. Now forced this node to use bilinear
  interpolation, which should be close enough.

- Operation should be marked as complex it seems, otherwise area of
  interest wouldn't make any affect on it's behavior.
2012-11-10 04:59:32 +00:00
Mitchell Stokes
f6a110d6ea BGE: Committing patch [#32697] "New BGE gravity API" by HG1.
This patch adds a gravity attribute to KX_Scene.
2012-11-10 03:11:18 +00:00
Brecht Van Lommel
489e9cb788 Fix part of #31080: missing UV editor redraw after edge slide with correct UVs. 2012-11-10 03:05:08 +00:00
Brecht Van Lommel
8a89515393 Fix #33084: lock camera to view + view smooth disabled incorrectly moved the
camera when going into camera view (bug in revision 51256).
2012-11-10 02:45:56 +00:00
Campbell Barton
026e29a042 simple optimization for library loading, just reduce pointer indirection and use unsigned int's, gives up to 2x overall speedup for loading some libraries. 2012-11-10 02:38:16 +00:00
Campbell Barton
9117828902 fix for crashes running the BGE without colorspace enabled. 2012-11-09 23:59:16 +00:00
Brecht Van Lommel
7d03e5c615 Fix part of #33132: render resoltuion refresh issues after persistent images
was added for cycles.

This fixes the case where the option is disabled. I moved the option now to
Blender itself and made it keep the engine around only when it's enabled. Also
fixes case where there could be issues when switching to another renderer.
2012-11-09 23:54:58 +00:00
Campbell Barton
5a29885007 code cleanup: bge static functions & use C++ guarded alloc for the character class. 2012-11-09 23:47:06 +00:00
Brecht Van Lommel
b3fb373f89 Cycles OSL: auto update script node sockets when setting text datablock or filepath. 2012-11-09 22:08:51 +00:00
Brecht Van Lommel
b5553f006f Fix #30505: bpy.context.copy() gives error running in the properties editor
with cycles as render engine.
2012-11-09 17:12:39 +00:00
Sergey Sharybin
cf503f5c77 Sequencer: disabled sequencer recursion and corrected rendered preview mode
Sequencer recursion was never actually supported and only gives lots of
issues. Disabled it now, so users are not getting confused by semi-working
stuff.

Also made a correction to rendered sequencer preview, so now using scene
strip in it's own sequencer will work properly (it produced black frames
before).

This required killing compositor jobs since they could be using the same
render result as renderer called from sequencer uses.

Small improvements could be:
- Add slight delay before compositor job starts handling nodes so killing
  this job would be fast
- Tag compositor to be updated after preview was fully rendered.
2012-11-09 16:49:17 +00:00
Campbell Barton
d25b13d13f code cleanup: double promotion warnings, also allow cmake to build SDL without audaspace. 2012-11-09 16:15:00 +00:00
Howard Trickey
b67a297d33 Bevel: use library plane/line intersection instead of custom one.
Custom one had a bug, not worth tracking down.
2012-11-09 16:00:30 +00:00
Ton Roosendaal
1d90323637 UI scripting:
Layout separator should end button aligning.
2012-11-09 15:00:27 +00:00
Campbell Barton
6cdb555e6e bmesh refactor - rename some of the BM_****_share_****_count() functions to BM_***_share_check()
some of these were only returning a boolean, others returned a count even though only a boolean was needed.

split some of the functions in two as well where check/count are both needed.
2012-11-09 14:52:05 +00:00
Brecht Van Lommel
dc5ba03945 Fix #33123: lamp nodes drivers not working, now uses same hacks as material
to work around dependency graph limitations.
2012-11-09 13:57:09 +00:00
Ton Roosendaal
079a0a30e4 Usability:
Made SHIFT+drag mouse in Curve and ColorPicker widgets move with more precision.
This was only working with UserPref "continuous grab".
2012-11-09 13:33:23 +00:00
Campbell Barton
c046b13b56 rename template_color_wheel() to template_color_picker() 2012-11-09 11:03:53 +00:00
Ton Roosendaal
6d31921b26 Temporarily change:
Intel graphics cards now use Triple Buffer when you set it to "Auto".
Recent tests proved that this is now working... and better test this
now well than a week before a release!
2012-11-09 10:41:47 +00:00
Ton Roosendaal
3ce1d54e95 Bugfix #33124
User Preference setting for Color Picker type only affected the popup
version. Now it uses it for all color pickers in Panels too.

Note for UI Py team: col.template_color_wheel() function follows
the userpref - might be a need for rename here? Dunno how to handle
this. Comment noted in template code.
2012-11-09 10:33:42 +00:00
Joshua Leung
98e60b2f43 Edits for consistency with other parts of code
For the record, AnimData vars should be named "adt", not "ad"
2012-11-09 09:57:35 +00:00
Campbell Barton
2bb174cfa4 style cleanup: indentation 2012-11-09 09:33:28 +00:00
Sergey Sharybin
76525d5398 Cycles: persistent images option
This option enables keeping loaded images in the memory in-between
of rendering.

Implemented by keeping render engine alive for until Render structure
is being freed.

Cycles will free all data when render finishes, optionally keeping
image manager untouched. All shaders, meshes, objects will be
re-allocated next time rendering happens.

Cycles cession and scene will be re-created from scratch if render/
scene parameters were changed.

This will also allow to keep compiled OSL shaders in memory without
need to re-compile them again.

P.S. Performance panel could be cleaned up a bit, not so much happy
     with it's vertical alignment currently but not sure how to make
     it look better.

 P.P.S. Currently the only way to free images from the device is to
       disable Persistent Images option and start rendering.
2012-11-09 08:46:53 +00:00
Campbell Barton
eff734203f add fallbacks for BM_vert_calc_shell_factor() and BM_vert_calc_mean_tagged_edge_length() to avoid divide by zero when a vertex has no connected geometry.
also style cleanup.
2012-11-09 08:28:14 +00:00
Sergey Sharybin
9dcd7f3b0b Fix crash when copying scene with sequencer's animation using Link Objects or Link Object Data methods
- Don't crash if there's any fcurves created for sequencer but no sequencer itself
- Don't copy sequencer's fcurves when copy new scene with linking data/objects method
2012-11-09 07:29:27 +00:00
Joshua Leung
9b91da0d0d Axis Colours are now Themeable
This commit allows you to set the RGB <-> XYZ axis colours used for things like
the mini axis indicator, grid axis indicators, manipulators, transform
constraint indicators, F-Curves (when using XYZ to RGB colouring option), and
perhaps something else I've missed. Previously, these places all used hardcoded
defines (220 * i/j/k), but the readability of these colours was often quite
poor, especially when used with certain themes.

The settings for these colours can be found under the "User Interface" section
of the themes (i.e. same set of colours is used across editors). I could have
made these per editor, but since it's unlikely that these will need to be too
different across editors in practice (+ being easier to version patch), they are
stored under the UI section.
2012-11-09 06:36:11 +00:00
Campbell Barton
0f2c27b855 Option for shrink-fatten to maintain shell thickness (hold Alt). 2012-11-09 05:37:36 +00:00
Campbell Barton
56ae13be99 add a distance limit to the shrinkwrap modifiers project mode,
it was problematic for vertices to fire rays out and hit some unrelated-far-off geometry which is often not what users want.
2012-11-09 04:20:17 +00:00
Campbell Barton
11a5c909f8 code cleanup: move shrinkwrap's benchmark macro into PIL_time.h & some minor style edits. 2012-11-09 04:01:19 +00:00
Campbell Barton
cf08068e10 fix [#33121] crashing when srolling down in text editor ! 2012-11-09 03:36:38 +00:00
Brecht Van Lommel
1c3640997c Fix #33082: dupliverted metaball showing wrong in cycles render and metaball
edit mode. I've made it follow blender internal now, but this system should
really be improved once, metaballs that are in linked dupligroups will never
show up.
2012-11-09 03:10:15 +00:00
Campbell Barton
610d746c12 code cleanup: double promotion warnings with new bevel code & wrong use of NULL in cycles. 2012-11-09 03:08:02 +00:00
Ton Roosendaal
360528d667 Bugfix #29072 (Color pickers don't close properly when moving the mouse away)
This rewinds the fix for revision 50483. 

- the removed code there (as comment said) closes menus on hoovering over another
  button in panels. Is unfinished feature to allow quick inspecting menus
  by mouse-hold going over menu popup buttons. 

- It added yet another check for closing menus - should be done with ->saferct

- The actual bug was simple; the block flag with UI_BLOCK_MOVEMOUSE_QUIT was
  accidentally cleared for colorpickers.
2012-11-08 16:50:31 +00:00