Commit Graph

36068 Commits

Author SHA1 Message Date
c6a0818642 Removal of old code trying to detect trackpads.
This was causing error in previous commit "wheel only worked after using trackpad once".
2013-01-05 18:23:05 +00:00
1005cdc72a Trackpad pans for UV/Image and MovieClip editors were inverse compared to all other editors. 2013-01-05 17:57:17 +00:00
aecfe6d148 style cleanup: also add checker for function brace placement. 2013-01-05 15:36:03 +00:00
fa0805e287 Changes for opengl render to reflect new alpha premul pipeline
without hurting quick texture painting

- ED_view3d_draw_offscreen will now output buffer with
  transparent alpha, if sky needed it should be alpha-undered
  later.

- ED_view3d_draw_offscreen_imbuf now accepts alpha mode as an
  argument which could be either R_ADDSKY or R_PREMULALPHA

- OpenGL render and sequencer's opengl preview will now reflect
  scene's Alpha Mode

- Quick Edit will use OpenGL with transparent alpha mode
2013-01-05 15:33:18 +00:00
Lukas Toenne
e8b415bdb4 This patch adds support in bpy.props for getter/setter callback functions. We already have update callbacks, but generic get/set functions can come in handy in some cases where the functionality is too complex to use a single value.
The current C callback functions are too simple allow a straightforward implementation, in particular they don't receive the PropertyRNA pointer itself as an argument, which means the callback cannot directly access the PropertyRNA's py_data pointers which store the python function objects. For this reason a second runtime variant of these callbacks has been added. It is only used for runtime callbacks and not in makesrna, but otherwise works the same way.
2013-01-05 14:56:37 +00:00
5ee3cd6c86 Remove some uneeded/irrelevant "PROP_TRANSLATE".
This sub-type is actually *only* needed for the "text" property of UI rna api (maybe we should rename it to "PROP_PY_TRANSLATE", as it is anyway only 'active' during conversion from py string to RNA string property...). In fact, I think it should only be used in RNA func properties anyway, as it stores the translated string into the property, it should only be used with "one time" RNA stuff...
2013-01-05 13:52:41 +00:00
cf0e646432 Remove usage of deprecated TEX_USEALPHA from GE code 2013-01-05 13:51:07 +00:00
37ba969c74 Making a few tooltips more descriptive, in light of recent confusion over the
purpose of some of these features

* ClampTo Constraint, Target Object field: now mentions that it is for curve
objects only
* Dopesheet Editor Modes: now describe what data is editable in each mode. The
wording may be a bit clumsy here, but (apart from Mask Editor one, which I'm not
entirely sure about) should at least be technically correct
2013-01-05 12:27:54 +00:00
5ffcde851b Add translation contexts for line, mute and clip 2013-01-05 12:06:50 +00:00
6cf52cc80c Bugfix: "Change Frame" operator for setting current frame by clicking/scrubbing
in a timeline view would show up search results in other editors (e.g. 3D View).

This only really works where there is a timeline view as:
1) The modal interactive stuff is built on the assumption that a suitable 2D
view mapping exists
2) The operator is not "registered" (i.e. no props display after usage, and
doesn't get shown in undo) as it's more "view state" than "scene data"

Rewrote poll callback to handlethis properly
2013-01-05 11:56:20 +00:00
5b72578a13 Tsst... "faled"... :p 2013-01-05 11:50:36 +00:00
bb74409031 revert r53570, alpha background is useful for projection paint 'Quick Edit',
it would also give odd results drawing semi transparent faces will give partial alpha which is strange to have with solid backdrop.
2013-01-05 10:26:33 +00:00
9106b3b107 BGE: Fix for [#33769] "Material friction settings are ignored" reported by Alex Fraser (z0r).
As of r53332, give_current_material() won't accept a 0 index and return NULL. CreateMaterialFromBlenderObject() was using index 0 to just grab the first material. Since this now returned NULL, it would use default settings. We'll just ask for index 1 now instead.
2013-01-05 08:53:39 +00:00
9611202f28 Fix #33753: Not selected surface objects don't update in view if shading is changed
In fact surfaces should be displaying the same way in textures and solid shading,
but they used to change a way they're displaying by draw_textured_end not resetting
light model properly, leaving two-sided shading for all further objects draw.
2013-01-05 08:24:22 +00:00
0d678e71a8 Fix #33674: Meta strip could overlap with other strips when exiting edit mode
Not sure what's the best thing to do here, for now just added vertical shuffle
of meta strip if it overlaps with other strips when existing edit mode.
2013-01-05 08:03:16 +00:00
93a6872a25 Fix #33761: Infinite loop in space_image if tile size > image size 2013-01-05 07:30:52 +00:00
a3f3c205cd Fix #33768: BGE segfaults in do_versions during libload 2013-01-05 07:25:02 +00:00
3b3d419dcb Fix #33767: Edge of objects rendered out jerky when using OpenGL Rendering
Made OpenGL sky opaque, so now it behaves exactly the same as sky for final render.
2013-01-05 07:08:54 +00:00
d9001335ff BGE: The Blenderplayer wasn't calling PyEval_InitThreads, which caused async lib loading to crash. 2013-01-05 03:30:56 +00:00
52a81c8364 There was a typo in previous commit
Additional changes:

- Made mipmapping operate with unsigned short instead of char
  which allowed to eliminate extra division by 255, so prevision
  should be a bit better now.

- Actually, this is not real unsigned short range, but it's a
  range of 255*255 which is more convenient for mipmapping, so
  made conversion functions private for scaling.c

  Not sure it worth making this functions operate in 65535
  range, for now current behavior seems to be just fine.
2013-01-04 20:34:06 +00:00
4990883664 Optimization for speed regression in mipmap generation
Regression was caused by alpha premul cleanup commit and the reason
of slowdown was uchar <-> float conversion which is slow.

Replaced with uchar <-> int conversion which seeps to be accurate
enough and mostly eliminates slowdown.

Slowdown was easy to notice when movie clip is used for 3d vierport
background and undistortion is enabled. In this case every frame
will re-calculate mipmaps.

It's still a nit slower than mipmap generation before cleanup
commit, but couldn't think about extra boost here atm.
2013-01-04 17:28:58 +00:00
4190169282 code cleanup, also remove glError check in font drawing code since its now a debug option. 2013-01-04 17:24:40 +00:00
0f56514986 Fix knife cut bug #33625, failure to cut in otho mode sometimes.
Problem was that the code to limit the front and back planes
for better precision assumed line would have center near origin.
2013-01-04 15:06:34 +00:00
4fa340c716 Fixes - post 2.65a
- Trackpad swipes now behave same as scrollwheel for listview scrolls
  (disabling 2d view scroll when mouse over)

- Added back 2.4 debug print for glGetError()
  Only useful for developers - to check what goes on when ogl messes up.

- Made more clear print for read factory default. It's not error :)
2013-01-04 14:51:02 +00:00
821d481f53 Correction for rev53555 which was obviously wrong -- always setting alpha to premul
Also optimized it a bit by skipping byte/float buffer allocation.
2013-01-04 13:19:57 +00:00
ec33cacc62 Added vertex color attributes (currently limited to one) and UVs included for triangle mesh hair.
I have also included a small speedup for the intersection test.
2013-01-04 12:44:38 +00:00
1022151d6e fix for missing NULL check in BKE_sequence_init_colorspace(). 2013-01-04 11:02:35 +00:00
03044290ce remove stray glBegin() during transform that caused a glError 2013-01-04 09:35:38 +00:00
b94a5d59bf fix [#33742] Solidify - Material index problem
missed copying material offset values.
2013-01-04 08:17:09 +00:00
3b3c0b97fd commit bpy_path files, missed these in recent commit. 2013-01-04 07:58:47 +00:00
ab913fe15d add length average option to 'Follow Active Quads' unwrap, gives nicer results. 2013-01-04 07:57:33 +00:00
6fabbcb4dd fix [#33758] Blender crashes when user goes to choose "build navigation mesh"
Give useful reports when the 'MESH_OT_navmesh_make' fails too.
2013-01-04 05:43:26 +00:00
1e762a29ee change bpy.app.build_options from frozen set to PyStructSequence_Field, mathes similar members of bpy.app and less error prone (typos won't fail silently). 2013-01-04 04:43:49 +00:00
9dbe85c17e expose common extensions for image/movie/audio types, since python scripts had to do this internally.
- bpy.path.extensions_image
- bpy.path.extensions_movie
- bpy.path.extensions_audio

eg:

  if os.path.splitext(filename)[1].lower() in bpy.path.extensions_image:
      ... we have an image ...
2013-01-04 03:47:37 +00:00
a50794e4f9 fix occasional memory leak in projection paint - multiple threads could initialize the brush curve at once.
also some header cleanup.
2013-01-04 03:07:25 +00:00
2a7ee4e373 no need to initialize the 2D paint node tree when project painting. 2013-01-04 02:54:38 +00:00
27343d0732 fix own regression in cdDM_drawFacesTex_common() when drawParamsMapped isnt available. 2013-01-04 02:14:31 +00:00
c7b7cba238 code cleanup: warnings 2013-01-04 02:13:29 +00:00
922aeb33c8 fix for NODE_OT_view_all / NODE_OT_view_selected not working properly. 2013-01-03 16:36:17 +00:00
c03d1270c8 fix bad left aligned text when zoomed out.
also minor change to cylinder_project_exec() - delay getting the MTFace.
2013-01-03 15:52:31 +00:00
2ce08bb2d4 fix for bug rendering text at small sizes, padding was incorrectly being applied to the characters y offset causing out of bounds pixels to be requested from glTexSubImage2D().
also clamp width, height of the character bitmap to the bitmap bounds since this can still happen for very small text (2-3 pixels high).
2013-01-03 15:15:51 +00:00
835ebd576c Fix bevel crash bug #33714. Had to disable elem tag on new vertices. 2013-01-03 13:37:17 +00:00
220a233921 correct invalid filter value being use for icon scaling. 2013-01-03 13:19:16 +00:00
8ca977b16e change limited dissolve angle limit default from 15 -> 5 deg. since 15deg is quite high for 2 surfaces to be considered co-planar 2013-01-03 08:09:57 +00:00
b2f6e6b113 code cleanup: BM_face_create_ngon()
Change some of the paranoid checks into an assert since they should never happen.
2013-01-03 08:06:12 +00:00
7b212b3bd0 fix [#33689] Crash with decimate modifier
in fact a more general bug in BM_face_create_ngon() where edges containing the same vertex multiple times were not accounted for.
2013-01-03 07:53:30 +00:00
d8d24bdebd fix [#33682] Animation not updated when the active shape index isnt set 2013-01-03 06:47:44 +00:00
c2839bfe76 add option WITH_SYSTEM_BULLET to link against the bullet installation found on the system.
Note: this doesn't work yet for everything with latest stable bullet (2.81), need to look into why and likely apply some patches upstream.
However I managed to link blender by disabling some features, likely it can be made to work without too much trouble.
2013-01-03 00:23:52 +00:00
1a7638fa94 add id property clear function (matching the same python function for dicts/lists) 2013-01-02 23:10:14 +00:00
a4a3ed0018 r53351 removed a NULL check for name in defgroup_name_index(). name can be NULL when deforming verts in the BGE, so I'm adding a NULL check back in. 2013-01-02 22:14:40 +00:00