blender.git
6 years agofix for missing NULL check in BKE_sequence_init_colorspace().
Campbell Barton [Fri, 4 Jan 2013 11:02:35 +0000 (11:02 +0000)]
fix for missing NULL check in BKE_sequence_init_colorspace().

6 years agoremove stray glBegin() during transform that caused a glError
Campbell Barton [Fri, 4 Jan 2013 09:35:38 +0000 (09:35 +0000)]
remove stray glBegin() during transform that caused a glError

6 years agofix [#33742] Solidify - Material index problem
Campbell Barton [Fri, 4 Jan 2013 08:17:09 +0000 (08:17 +0000)]
fix [#33742] Solidify - Material index problem
missed copying material offset values.

6 years agoSilent "no previous prototype" warning, which was treating as error here
Sergey Sharybin [Fri, 4 Jan 2013 08:01:35 +0000 (08:01 +0000)]
Silent "no previous prototype" warning, which was treating as error here

6 years agocommit bpy_path files, missed these in recent commit.
Campbell Barton [Fri, 4 Jan 2013 07:58:47 +0000 (07:58 +0000)]
commit bpy_path files, missed these in recent commit.

6 years agoadd length average option to 'Follow Active Quads' unwrap, gives nicer results.
Campbell Barton [Fri, 4 Jan 2013 07:57:33 +0000 (07:57 +0000)]
add length average option to 'Follow Active Quads' unwrap, gives nicer results.

6 years agofix [#33758] Blender crashes when user goes to choose "build navigation mesh"
Campbell Barton [Fri, 4 Jan 2013 05:43:26 +0000 (05:43 +0000)]
fix [#33758] Blender crashes when user goes to choose "build navigation mesh"

Give useful reports when the 'MESH_OT_navmesh_make' fails too.

6 years agochange bpy.app.build_options from frozen set to PyStructSequence_Field, mathes simila...
Campbell Barton [Fri, 4 Jan 2013 04:43:49 +0000 (04:43 +0000)]
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).

6 years agoexpose common extensions for image/movie/audio types, since python scripts had to...
Campbell Barton [Fri, 4 Jan 2013 03:47:37 +0000 (03:47 +0000)]
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 ...

6 years agofix occasional memory leak in projection paint - multiple threads could initialize...
Campbell Barton [Fri, 4 Jan 2013 03:07:25 +0000 (03:07 +0000)]
fix occasional memory leak in projection paint - multiple threads could initialize the brush curve at once.
also some header cleanup.

6 years agono need to initialize the 2D paint node tree when project painting.
Campbell Barton [Fri, 4 Jan 2013 02:54:38 +0000 (02:54 +0000)]
no need to initialize the 2D paint node tree when project painting.

6 years agofix own regression in cdDM_drawFacesTex_common() when drawParamsMapped isnt available.
Campbell Barton [Fri, 4 Jan 2013 02:14:31 +0000 (02:14 +0000)]
fix own regression in cdDM_drawFacesTex_common() when drawParamsMapped isnt available.

6 years agocode cleanup: warnings
Campbell Barton [Fri, 4 Jan 2013 02:13:29 +0000 (02:13 +0000)]
code cleanup: warnings

6 years agofix for NODE_OT_view_all / NODE_OT_view_selected not working properly.
Campbell Barton [Thu, 3 Jan 2013 16:36:17 +0000 (16:36 +0000)]
fix for NODE_OT_view_all / NODE_OT_view_selected not working properly.

6 years agofix bad left aligned text when zoomed out.
Campbell Barton [Thu, 3 Jan 2013 15:52:31 +0000 (15:52 +0000)]
fix bad left aligned text when zoomed out.
also minor change to cylinder_project_exec() - delay getting the MTFace.

6 years agoPatch from Ejner Fergo: enhancements to install_deps.sh.
Bastien Montagne [Thu, 3 Jan 2013 15:35:46 +0000 (15:35 +0000)]
Patch from Ejner Fergo: enhancements to install_deps.sh.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).

Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!

6 years agofix for bug rendering text at small sizes, padding was incorrectly being applied...
Campbell Barton [Thu, 3 Jan 2013 15:15:51 +0000 (15:15 +0000)]
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).

6 years agoFix bevel crash bug #33714. Had to disable elem tag on new vertices.
Howard Trickey [Thu, 3 Jan 2013 13:37:17 +0000 (13:37 +0000)]
Fix bevel crash bug #33714.  Had to disable elem tag on new vertices.

6 years agocorrect invalid filter value being use for icon scaling.
Campbell Barton [Thu, 3 Jan 2013 13:19:16 +0000 (13:19 +0000)]
correct invalid filter value being use for icon scaling.

6 years agoFix CUDA build error after last commit, and remove some comments.
Brecht Van Lommel [Thu, 3 Jan 2013 13:18:35 +0000 (13:18 +0000)]
Fix CUDA build error after last commit, and remove some comments.

6 years agoCycles Hair: add Generated texture coordinates for curves, so that procedural
Brecht Van Lommel [Thu, 3 Jan 2013 12:31:05 +0000 (12:31 +0000)]
Cycles Hair: add Generated texture coordinates for curves, so that procedural
textures now work without having to add a UV map.

Also made UV and intercept attributes only export when needed by the shader.

6 years agoCycles Hair: refactoring to store curves with the index of the first key and the
Brecht Van Lommel [Thu, 3 Jan 2013 12:09:09 +0000 (12:09 +0000)]
Cycles Hair: refactoring to store curves with the index of the first key and the
number of keys in the curve, rather than curve segments with the indices of two
keys. ShaderData.segment now stores the segment number in the curve.

6 years agoCycles Hair: refactoring to support generic attributes for hair curves. There
Brecht Van Lommel [Thu, 3 Jan 2013 12:08:54 +0000 (12:08 +0000)]
Cycles Hair: refactoring to support generic attributes for hair curves. There
should be no functional changes yet. UV, tangent and intercept are now stored
as attributes, with the intention to add more like multiple uv's, vertex
colors, generated coordinates and motion vectors later.

Things got a bit messy due to having both triangle and curve data in the same
mesh data structure, which also gives us two sets of attributes. This will get
cleaned up when we split the mesh class.

6 years agochange limited dissolve angle limit default from 15 -> 5 deg. since 15deg is quite...
Campbell Barton [Thu, 3 Jan 2013 08:09:57 +0000 (08:09 +0000)]
change limited dissolve angle limit default from 15 -> 5 deg. since 15deg is quite high for 2 surfaces to be considered co-planar

6 years agocode cleanup: BM_face_create_ngon()
Campbell Barton [Thu, 3 Jan 2013 08:06:12 +0000 (08:06 +0000)]
code cleanup: BM_face_create_ngon()

Change some of the paranoid checks into an assert since they should never happen.

6 years agofix [#33689] Crash with decimate modifier
Campbell Barton [Thu, 3 Jan 2013 07:53:30 +0000 (07:53 +0000)]
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.

6 years agofix [#33715] Dirty Vertex Colors display problem since 2.65a
Campbell Barton [Thu, 3 Jan 2013 07:01:41 +0000 (07:01 +0000)]
fix [#33715] Dirty Vertex Colors display problem since 2.65a

6 years agofix [#33682] Animation not updated when the active shape index isnt set
Campbell Barton [Thu, 3 Jan 2013 06:47:44 +0000 (06:47 +0000)]
fix [#33682] Animation not updated when the active shape index isnt set

6 years agoCMake: Looks like a period sneaked into r53515, which caused CMake to fail.
Mitchell Stokes [Thu, 3 Jan 2013 00:35:42 +0000 (00:35 +0000)]
CMake: Looks like a period sneaked into r53515, which caused CMake to fail.

6 years agoCMake: Setting vc10 to use Python 3.3 (it was still set to 3.2). For the time being...
Mitchell Stokes [Thu, 3 Jan 2013 00:29:13 +0000 (00:29 +0000)]
CMake: Setting vc10 to use Python 3.3 (it was still set to 3.2). For the time being, I'm having vc10 use the vc9 Python libs, which SCons is currently doing.

6 years agoadd option WITH_SYSTEM_BULLET to link against the bullet installation found on the...
Campbell Barton [Thu, 3 Jan 2013 00:23:52 +0000 (00:23 +0000)]
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.

6 years agoadd id property clear function (matching the same python function for dicts/lists)
Campbell Barton [Wed, 2 Jan 2013 23:10:14 +0000 (23:10 +0000)]
add id property clear function (matching the same python function for dicts/lists)

6 years agor53351 removed a NULL check for name in defgroup_name_index(). name can be NULL when...
Mitchell Stokes [Wed, 2 Jan 2013 22:14:40 +0000 (22:14 +0000)]
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.

6 years agorevert 53478, it looks this is still useful for a couple of use cases in non-projecti...
Antony Riakiotakis [Wed, 2 Jan 2013 20:51:47 +0000 (20:51 +0000)]
revert 53478, it looks this is still useful for a couple of use cases in non-projective texture painting such as stamping a static texture and using image space size in pixels.

6 years agoSome UI message fixes...
Bastien Montagne [Wed, 2 Jan 2013 16:56:36 +0000 (16:56 +0000)]
Some UI message fixes...

6 years agochanges needed for EDL import to work again.
Campbell Barton [Wed, 2 Jan 2013 16:15:45 +0000 (16:15 +0000)]
changes needed for EDL import to work again.
- add sequence.update(data=False) function.
- made some sequence vars editable.
- correct some comments.

also rename rna function sequence.getStripElem() --> strip_elem_from_frame()

6 years agoBug fix - post 2.65a
Ton Roosendaal [Wed, 2 Jan 2013 16:10:03 +0000 (16:10 +0000)]
Bug fix - post 2.65a

New option "Keep Session" was not using "untitled.blend" as default save name,
in case a startup.blend was kept as session. Could give bad accidents.

6 years agoFix [#33189] AFTER 2.65 - Units in doc strings in ocean modifier.
Bastien Montagne [Wed, 2 Jan 2013 16:03:58 +0000 (16:03 +0000)]
Fix [#33189] AFTER 2.65 - Units in doc strings in ocean modifier.

Also:
* Fixes a (op prop) bug which prevented, once you had baked and freed ocean once, to bake again.
* Fixed infinite values of acumulated foam when baking with foam_fade values above 1.0, now simply clipping accumulated foam value to 1.0, as already done for the "instantaneaous" foam value returned by BKE_ocean_jminus_to_foam().
* Added missing RNA descriptions.
* Made foam_fade unanimatable!
* Added in UI some missing properties that are imho useful: random seed, size (kindof 'surface scaling'), and foam_fade (baking only).
* Removed custom lerp() func from bke's ocean.c, BLI's interpf does exactly the same thing (the first two args are just in reversed order). Note: this could most certainly be done in other parts of the code, bpy's mathutils for e.g. has its own linear interpolation code for vectors and matrices :/).
* Did some general code cleanup (mostly line length and no C++ -> C comments)...

6 years agoFix playercompile with stub for BKE_brush_gen_texture_cache
Jens Verwiebe [Wed, 2 Jan 2013 13:41:30 +0000 (13:41 +0000)]
Fix playercompile with stub for BKE_brush_gen_texture_cache

6 years agofix [#33726] keyframe_insert() and keyframe_delete() with index=-1 always fail
Campbell Barton [Wed, 2 Jan 2013 06:09:53 +0000 (06:09 +0000)]
fix [#33726] keyframe_insert() and keyframe_delete() with index=-1 always fail

The bug was introduced in r53297, was calling pyrna_struct_anim_args_parse() twice for no reason, perhaps baddly applied patch?.

6 years agoadd assert to BLI_buffer_at if a type is given different to 'elem_size'
Campbell Barton [Wed, 2 Jan 2013 05:19:55 +0000 (05:19 +0000)]
add assert to BLI_buffer_at if a type is given different to 'elem_size'

6 years agoextend BLI_buffer
Campbell Barton [Wed, 2 Jan 2013 05:00:02 +0000 (05:00 +0000)]
extend BLI_buffer
- add option to calloc or not, existing code wasnt consistent here, would calloc on first alloc but not on realloc, also - the static memory was never zero'd.
  use flag BLI_BUFFER_USE_CALLOC to ensure all new memory is zero'd (static/alloc/realloc's).

- add BLI_buffer_declare_static / BLI_buffer_declare so its possible to have a buffer that never uses static memory.

6 years agodyntopo speedup for smooth brush, no need to search for the shared vert-face loop...
Campbell Barton [Wed, 2 Jan 2013 02:12:10 +0000 (02:12 +0000)]
dyntopo speedup for smooth brush, no need to search for the shared vert-face loop, instead just iterate over the loops.

6 years agoReplacing/cleaning up some gibberish...
Joshua Leung [Wed, 2 Jan 2013 02:08:43 +0000 (02:08 +0000)]
Replacing/cleaning up some gibberish...

6 years agostyle cleanup
Campbell Barton [Wed, 2 Jan 2013 01:49:07 +0000 (01:49 +0000)]
style cleanup

6 years agorename image paint_image_2d to lowercase (as we have for view2d).
Campbell Barton [Wed, 2 Jan 2013 01:36:36 +0000 (01:36 +0000)]
rename image paint_image_2d to lowercase (as we have for view2d).

6 years agoFix for what appears to be a typo (seq_prev is always NULL) - found while
Joshua Leung [Wed, 2 Jan 2013 00:15:37 +0000 (00:15 +0000)]
Fix for what appears to be a typo (seq_prev is always NULL) - found while
reviewing the latest Clang reports

6 years agoPatch [#29035] Vertex colour baking
Alex Fraser [Wed, 2 Jan 2013 00:05:30 +0000 (00:05 +0000)]
Patch [#29035] Vertex colour baking

There is a new option in the Bake panel to enable baking to vertex colors. Unlike regular baking, this mode does not require a UV map or image to bake to, however the object must have a vertex color layer.

Thanks to:
 - AutoCRC for funding
 - Brech van Lommel and Dalai Felinto for their initial advice on how to implement it
 - Campbell Barton for helping to make this feature work with modifiers and bmesh

6 years agorename paint_2D to paint_image_2D. Catering for possible name conflicts
Antony Riakiotakis [Tue, 1 Jan 2013 21:32:17 +0000 (21:32 +0000)]
rename paint_2D to paint_image_2D. Catering for possible name conflicts
with other 2D paint systems.

6 years agoCode cleanup:
Antony Riakiotakis [Tue, 1 Jan 2013 21:23:12 +0000 (21:23 +0000)]
Code cleanup:
Separate 2D painting functions away from brush.c, which should implement
the brush API and into its own file, paint_2D.c.
Ideally projective texturing and 2D painting should be totally separate,
however functionality is still interleaved mostly in the
BKE_brush_painter_paint function. The functionality of this function can
possibly be done using the brush stroke functions instead.

6 years agoFix for normal scaling when using triangle primitives for hair.
Stuart Broadfoot [Tue, 1 Jan 2013 19:50:29 +0000 (19:50 +0000)]
Fix for normal scaling when using triangle primitives for hair.

and some code clean ups in blender_curves and node_shader_hair_info.c

6 years agoFix to prevent undefined normals being generated with `add_face_normals()', from...
Stuart Broadfoot [Tue, 1 Jan 2013 19:44:09 +0000 (19:44 +0000)]
Fix to prevent undefined normals being generated with `add_face_normals()', from triangles with zero area.

6 years agoBug fixes, own collection.
Ton Roosendaal [Tue, 1 Jan 2013 19:02:08 +0000 (19:02 +0000)]
Bug fixes, own collection.

While examining icons, I noticed material icons were too dark.
It appeared a lot of bad hacks were added for colormanagement in preview render.

Removed them all, and things look smooth (yes, color management is OK!).

However! It is now very clear that Procedural Textures miss getting inverse
color managed in render - a reason why they show so bright washed out, already
since introduction of Color Management in Blender.

Try render a plane with linear black-white blend, shadeless!
http://www.blender.org/bf/Untitled.png

Todo: add colormanaged procedurals (optional).

6 years agoIntent to fix windows not compiling after r53480.
Bastien Montagne [Tue, 1 Jan 2013 18:18:45 +0000 (18:18 +0000)]
Intent to fix windows not compiling after r53480.

Looks like _Bool is also a type in std (at least with msvc), so the 'typdef bool _Bool;' generates a name collision... Now using _BLI_Bool as placeholder instead.

6 years agoFurther trackpad work:
Ton Roosendaal [Tue, 1 Jan 2013 16:42:35 +0000 (16:42 +0000)]
Further trackpad work:

When trackpad swipes don't convert to ScrollWheel steps anymore, several hardcoded
wheel events need to support swipe too.

This adds swipe support to:
- Menu item scroll
- Search item scroll
- ALT + number/slider/swatch values

The amount of old style scroll "clicks" is calculated based on how trackad is
being mapped to move a mouse pointer. Move it one widget unit = 1 click.

The swatch option applies trackpad swipe motion in analog way.

6 years agoHighlight currently rendering tiles
Sergey Sharybin [Tue, 1 Jan 2013 16:15:13 +0000 (16:15 +0000)]
Highlight currently rendering tiles

This commit implements highlight of tiles which are being currently
rendered for both Blender Internal and Cycles (and should be possible
to use it for other external engines as well).

Couple of implementation details:

- Added one extra boolean flag to render engine which should be set
  to truth if render engine wants to highlight tiles. If so, property
  use_highlight_tiles should be set to True.

- Render Part's ready boolena was changed by status enum, which could
  be NONE, IN_PROGRESS and READY. All render part with IN_PROGRESS
  status will be highlighted in image editor.

- For external engines render part's status is filling in automatically.
  Initially all render parts has got NONE status, then one external
  engine acquire render result, corresponding part will change status
  to IN_PROGRESS. As soon as render result is finished, corresponding
  render part will change status to FINISHED

  This should make it easy to highlight tiles for other engines as well.

6 years agoAdd a warning to enum props' items parameter, to *never* use a generator as value...
Bastien Montagne [Tue, 1 Jan 2013 15:55:21 +0000 (15:55 +0000)]
Add a warning to enum props' items parameter, to *never* use a generator as value for this param! It works in most cases, but in some it leads to an empty set of values for the enum (see [#33716]), and it's not an easy bug to track down!

6 years agofix for own error in recent weight paint code, bound-box clip wasnt working.
Campbell Barton [Tue, 1 Jan 2013 14:20:59 +0000 (14:20 +0000)]
fix for own error in recent weight paint code, bound-box clip wasnt working.

6 years agoAdded MOUSEPAN (the trackpad event) to control propertional size while transform.
Ton Roosendaal [Tue, 1 Jan 2013 14:06:02 +0000 (14:06 +0000)]
Added MOUSEPAN (the trackpad event) to control propertional size while transform.

There's many hardcoded scrollwheel events in Blender for this, and with new proper
analog trackpad handling I'll try to find good remapping for most cases.

6 years agofix for long standing annoyance with weight-paint mode selection.
Campbell Barton [Tue, 1 Jan 2013 13:08:07 +0000 (13:08 +0000)]
fix for long standing annoyance with weight-paint mode selection.

There was no selection flushing when faces or verts were selected, this allowed incorrect selection states like selected face with unselected vertices.

add flush commands to paintface_flush_flags() and paintvert_flush_flags()

6 years agomake wight-paint-through feature work in face select mode. (still WIP, relies on...
Campbell Barton [Tue, 1 Jan 2013 12:51:08 +0000 (12:51 +0000)]
make wight-paint-through feature work in face select mode. (still WIP, relies on selection flushing which currently ensured).

6 years agopatch [#33331] Time To Start Moving To Stdbool
Campbell Barton [Tue, 1 Jan 2013 12:47:58 +0000 (12:47 +0000)]
patch [#33331] Time To Start Moving To Stdbool
by Lawrence D'Oliveiro (ldo)

so BKE_utildefines.h allows use of C99's bool type and true/false.

currently scons wont try to use stdbool.h, and works as if its never found.

6 years agoremove vertex selection check for weight paint mode so you can paint `through` the...
Campbell Barton [Tue, 1 Jan 2013 11:47:47 +0000 (11:47 +0000)]
remove vertex selection check for weight paint mode so you can paint `through` the mesh.

also made the wire draw without depth masking when the depth check is off, similar to mesh editmode drawing, nice hint about whats going on.

6 years agoUI cleanup: fixed texture is a 2d image painting option, hide in 3D viewport toolbar
Antony Riakiotakis [Tue, 1 Jan 2013 11:46:12 +0000 (11:46 +0000)]
UI cleanup: fixed texture is a 2d image painting option, hide in 3D viewport toolbar

6 years agoFix: weight painting operated only for selected vertices in edit mode.
Antony Riakiotakis [Tue, 1 Jan 2013 11:08:05 +0000 (11:08 +0000)]
Fix: weight painting operated only for selected vertices in edit mode.
We only need this in case vertex selection is enabled.

6 years agoBGE: Fixing a crash that occurred when LibLoading a scene with a 2D Filter Actuator...
Mitchell Stokes [Mon, 31 Dec 2012 21:32:46 +0000 (21:32 +0000)]
BGE: Fixing a crash that occurred when LibLoading a scene with a 2D Filter Actuator. The actuator was still referencing the old scene.

6 years agosmart stitching:
Antony Riakiotakis [Mon, 31 Dec 2012 19:38:40 +0000 (19:38 +0000)]
smart stitching:
* Some code cleanup
* Bugfix: rotation of uv islands during stitch on images with aspect
ratio was different for different island rotations. I needed to correct
normal and tangent calculation to take image aspect into account.

6 years agocode cleanup: name event -> event_type in macros, since this is from event->type
Campbell Barton [Mon, 31 Dec 2012 17:39:01 +0000 (17:39 +0000)]
code cleanup: name event -> event_type in macros, since this is from event->type

6 years agocode cleanup: autocomplete functions
Campbell Barton [Mon, 31 Dec 2012 17:19:55 +0000 (17:19 +0000)]
code cleanup: autocomplete functions

6 years agosyntax highlight autocomplete listing.
Campbell Barton [Mon, 31 Dec 2012 16:40:14 +0000 (16:40 +0000)]
syntax highlight autocomplete listing.

6 years agotext autocomplete
Campbell Barton [Mon, 31 Dec 2012 16:24:49 +0000 (16:24 +0000)]
text autocomplete
- make the popup box line up the X axis with the current word.
- add poll function for the operator

6 years agoMore wrong "in degrees" busted out of tips!
Bastien Montagne [Mon, 31 Dec 2012 15:54:44 +0000 (15:54 +0000)]
More wrong "in degrees" busted out of tips!

6 years agoCorrection to RNA update functions
Sergey Sharybin [Mon, 31 Dec 2012 15:45:31 +0000 (15:45 +0000)]
Correction to RNA update functions

Either forgot to merge some local changes into trunk or merge happened wrong..

6 years agoFix for saving 8bit PNG images when there's no byte buffer in ImBuf
Sergey Sharybin [Mon, 31 Dec 2012 15:30:03 +0000 (15:30 +0000)]
Fix for saving 8bit PNG images when there's no byte buffer in ImBuf

Misunderstand flag of file filter, should work fine now.

6 years agoadd back initial autocomplete support.
Campbell Barton [Mon, 31 Dec 2012 15:11:36 +0000 (15:11 +0000)]
add back initial autocomplete support.

- This doesnt use python as 2.4x did, instead it just autocompletes based on the text files unique identifiers so its useful for any language.
- key is same as console (Ctrl+Space)

6 years agoRemoved on old patch from the code, which attempted to keep the scrollers
Ton Roosendaal [Mon, 31 Dec 2012 14:56:07 +0000 (14:56 +0000)]
Removed on old patch from the code, which attempted to keep the scrollers
in user preferences in place.

New scroller code made user pref scroller jump back on activating add-ons,
because that causes a full blender system refresh.

6 years agocode cleanup: warning
Campbell Barton [Mon, 31 Dec 2012 14:55:16 +0000 (14:55 +0000)]
code cleanup: warning

6 years agoSome minor cleanup in camera's FOV angle props (mostly use DEG2RAD macro, and remove...
Bastien Montagne [Mon, 31 Dec 2012 14:52:55 +0000 (14:52 +0000)]
Some minor cleanup in camera's FOV angle props (mostly use DEG2RAD macro, and remove reference to degrees in tips - user is free to use radians if he prefers!).

6 years agominor updates to text autocomplete api
Campbell Barton [Mon, 31 Dec 2012 14:49:27 +0000 (14:49 +0000)]
minor updates to text autocomplete api
- draw function wasn't lining up correctly since DPI edits
- rename text_python.c to text_autocomplete.c

6 years agoCorrection to recent PNG commit
Sergey Sharybin [Mon, 31 Dec 2012 14:02:33 +0000 (14:02 +0000)]
Correction to recent PNG commit

Need to set default depth to 8bit.

6 years agoRemoved byte glow effect from sequencer in favor of float one.
Sergey Sharybin [Mon, 31 Dec 2012 13:52:26 +0000 (13:52 +0000)]
Removed byte glow effect from sequencer in favor of float one.

Byte glow was disabled in previous commit and code is removed now
in separate commit for easier revert if that'd be needed.

6 years agoAlpha premul pipeline cleanup
Sergey Sharybin [Mon, 31 Dec 2012 13:52:13 +0000 (13:52 +0000)]
Alpha premul pipeline cleanup

This assumptions are now made:
- Internally float buffers are always linear alpha-premul colors
- Readers should worry about delivering float buffers with that
  assumptions.
- There's an input image setting to say whether it's stored with
  straight/premul alpha on the disk.
- Byte buffers are now assumed have straight alpha, readers should
  deliver straight alpha.

Some implementation details:

- Removed scene's color unpremultiply setting, which was very
  much confusing and was wrong for default settings.
  Now all renderers assumes to deliver premultiplied alpha.

- IMB_buffer_byte_from_float will now linearize alpha when
  converting from buffer.

- Sequencer's effects were changed to assume bytes have got
  straight alpha. Most of effects will work with bytes still,
  however for glow it was more tricky to avoid data loss, so
  there's a commented out glow implementation which converts
  byte buffer to floats first, operates on floats and returns
  bytes back. It's slower and not sure if it should actually
  be used -- who're using glow on alpha anyway?

- Sequencer modifiers should also be working nice with straight
  bytes now.

- GLSL preview will predivide float textures to make nice shading,
  shading with byte textures worked nice (GLSL was assuming straight
  alpha).

- Blender Internal will set alpha=1 to the whole sky. The same
  happens in Cycles and there's no way to avoid this -- sky is
  neither straight nor premul and doesn't fit color pipeline well.

- Straight alpha mode for render result was also eliminated.

- Conversion to correct alpha need to be done before linearizing
  float buffer.

- TIFF will now load and save files with proper alpha mode setting
  in file meta data header.

- Remove Use Alpha from texture mapping and replaced with image
  datablock setting.

  Behaves much more predictable and clear from code point of view
  and solves possible regressions when non-premultiplied images were
  used as textures with ignoring alpha channel.

6 years agoFix #33706: issue in cycles motion blur rendering after hair commit, my fault
Brecht Van Lommel [Mon, 31 Dec 2012 13:07:06 +0000 (13:07 +0000)]
Fix #33706: issue in cycles motion blur rendering after hair commit, my fault
for not finding it in review.

Also removed the hard limits on motion blur shutter time, soft limits are still
the same but it can be useful to set things lower/higher in some cases.

6 years agoUsability todo:
Ton Roosendaal [Mon, 31 Dec 2012 12:26:14 +0000 (12:26 +0000)]
Usability todo:

Editmode "Shear" didn't communicate well.
- Added X and Y shortcut to set shear axis
- Added print in header to denote that.

It will still switch with MMB press too.

6 years agoBug fix - post 2.65a problem:
Ton Roosendaal [Mon, 31 Dec 2012 12:13:30 +0000 (12:13 +0000)]
Bug fix - post 2.65a problem:

The keymap entries for NDOF device were moved up, so the hotkey searches for
menus didn't show the keyboard shortcuts. Special devices shouldn't list as a
shortcut.

6 years agoAdd try/catch around i18n locale setter code, just in case...
Bastien Montagne [Mon, 31 Dec 2012 12:12:50 +0000 (12:12 +0000)]
Add try/catch around i18n locale setter code, just in case...

6 years agoadd ".hh" as an extension for source scripts.
Campbell Barton [Mon, 31 Dec 2012 07:06:51 +0000 (07:06 +0000)]
add ".hh" as an extension for source scripts.

6 years agorename BM_edge_calc_squared_length -> BM_edge_calc_length_squared, matching len_v3...
Campbell Barton [Mon, 31 Dec 2012 02:40:15 +0000 (02:40 +0000)]
rename BM_edge_calc_squared_length -> BM_edge_calc_length_squared, matching len_v3, len_squared_v3

6 years agostyle cleanup
Campbell Barton [Mon, 31 Dec 2012 02:37:28 +0000 (02:37 +0000)]
style cleanup

6 years agoUsual UI messages-related fixes...
Bastien Montagne [Sun, 30 Dec 2012 23:21:33 +0000 (23:21 +0000)]
Usual UI messages-related fixes...

6 years agoCode cleanup: rename BLI_pbvh to BKE_pbvh
Nicholas Bishop [Sun, 30 Dec 2012 18:31:31 +0000 (18:31 +0000)]
Code cleanup: rename BLI_pbvh to BKE_pbvh

6 years agoAdd UI and keybindings for dynamic-topology sculpt mode
Nicholas Bishop [Sun, 30 Dec 2012 18:31:17 +0000 (18:31 +0000)]
Add UI and keybindings for dynamic-topology sculpt mode

* New topology panel in 3D view toolbar with the enable/disable button
  for dynamic topology and other controls

* Ctrl+DKEY to toggle dynamic topology

* Shift+DKEY to show a radial control for detail size

6 years agoAdd symmetrize operator for dynamic-topology sculpt mode
Nicholas Bishop [Sun, 30 Dec 2012 18:31:01 +0000 (18:31 +0000)]
Add symmetrize operator for dynamic-topology sculpt mode

6 years agoAdd simplify brush for sculpt mode
Nicholas Bishop [Sun, 30 Dec 2012 18:30:40 +0000 (18:30 +0000)]
Add simplify brush for sculpt mode

6 years agoUse GPU_Buffers to draw wireframe when in dynamic-topology sculpt mode
Nicholas Bishop [Sun, 30 Dec 2012 18:30:13 +0000 (18:30 +0000)]
Use GPU_Buffers to draw wireframe when in dynamic-topology sculpt mode

This adds an override to the CDDM edge drawing function that switches
to GPU_Buffers drawing for PBVHes of type PBVH_BMESH.

Within the GPU_Buffers code, glPolygonMode() is used to draw lines
instead of faces.

6 years agoHiding support for dynamic topology
Nicholas Bishop [Sun, 30 Dec 2012 18:29:56 +0000 (18:29 +0000)]
Hiding support for dynamic topology

6 years agoUpdate DerivedMesh for dynamic-topology sculpt mode
Nicholas Bishop [Sun, 30 Dec 2012 18:29:41 +0000 (18:29 +0000)]
Update DerivedMesh for dynamic-topology sculpt mode

* Build bmesh PBVH in CDDM when dyntopo is enabled

* Disable all modifiers when dyntopo is enabled

6 years agoModify info stats for dynamic-topology sculpt mode
Nicholas Bishop [Sun, 30 Dec 2012 18:29:25 +0000 (18:29 +0000)]
Modify info stats for dynamic-topology sculpt mode

Format is like this: "Verts:8 | Tris:12 | Cube"

6 years agoAdd dynamic topology support to sculpt mode
Nicholas Bishop [Sun, 30 Dec 2012 18:29:07 +0000 (18:29 +0000)]
Add dynamic topology support to sculpt mode

* User documentation:
  wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Dynamic_Topology_Sculpting

* Code review for this and the other dynamic-topology commits:
  https://codereview.appspot.com/6947064/
  Thanks to Sergey for doing code review!

* Add SCULPT_OT_dynamic_topology_toggle operator to enable or disable
  dynamic topology mode

* Most brushes need little modification for dynamic topology, but for
  some it won't work well and is disabled. This decision is made in
  sculpt_stroke_dynamic_topology().

* For brushes that need original data (e.g. grab brush) the topology
  is not updated during the stroke, but some changes to original
  vertex data is accessed were made since BMesh works a little
  differently from mesh/multires. This is abstracted with
  SculptOrigVertData and associated functions.

* Smooth brush gets yet another set of functions, for mesh and
  multires and dynamic topology and, separetely, masking

* For most brushes, the topology is updated during the stroke right
  before the regular brush action takes place. This is handled in
  sculpt_topology_update().

* Exiting sculpt mode also disables dynamic topology

* Sculpt undo works differently with BMesh. Since the contents of
  nodes in the PBVH do not remain static during a sculpt session, the
  SculptUndoNodes do not correspond with PBVHNodes if dynamic topology
  is enabled. Rather, each SculptUndoNode is associated with a
  BMLogEntry.

* Sculpt undo gets a few new cases: entering and exiting dynamic
  topology does an undo push of all mesh data. Symmetrize will
  similarly push a full copy of BMesh data, although it does so
  through the BMLog API.

* Undo and redo in dynamic-topology mode will do a full recalculation
  of the PBVH.

* Add some documentation to doc/sculpt.org. This could stand to be
  expanded a lot more, for now it mostly contains test cases for the
  undo system.

* Add SCULPT_OT_optimize operator to recalculate the BVH. The BVH gets
  less optimal more quickly with dynamic topology than regular
  sculpting. There is no doubt more clever stuff we can do to optimize
  it on the fly, but for now this gives the user a nicer way to
  recalculate it than toggling modes.

6 years agoAdd dynamic topology support to the PBVH
Nicholas Bishop [Sun, 30 Dec 2012 18:28:36 +0000 (18:28 +0000)]
Add dynamic topology support to the PBVH

* Add BLI_pbvh_build_bmesh(), similar to the other PBVH builders but
  specialized for BMesh. Whereas the PBVH leaf nodes for mesh and
  grids only store a start-index and count into the primitive indices
  array, the BMesh version uses GHashes to store the full set of faces
  and vertices in leaf nodes

* Update PBVH iterator to handle BMesh

* Make some of the pbvh.c functions non-static so they can be used by
  the new pbvh_bmesh code

* The BLI_pbvh_bmesh_update_topology() function is the main reason for
  adding BMesh support to the PBVH. This function is used during a
  sculpt stroke to dynamically collapse edges that are particular
  short and subdivide edges that are particularly long.