7 years agoMerged changes in the trunk up to revision 53584.
Tamito Kajiyama [Sat, 5 Jan 2013 22:24:05 +0000 (22:24 +0000)]
Merged changes in the trunk up to revision 53584.

Conflicts resolved:

Also made additional code updates for:
r53355 UIList - Python-extendable list of UI items
r53460 Alpha premul pipeline cleanup

7 years agoMaking a few tooltips more descriptive, in light of recent confusion over the
Joshua Leung [Sat, 5 Jan 2013 12:27:54 +0000 (12:27 +0000)]
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

7 years agoAdd translation contexts for line, mute and clip
Sv. Lockal [Sat, 5 Jan 2013 12:06:50 +0000 (12:06 +0000)]
Add translation contexts for line, mute and clip

7 years agoBugfix: "Change Frame" operator for setting current frame by clicking/scrubbing
Joshua Leung [Sat, 5 Jan 2013 11:56:20 +0000 (11:56 +0000)]
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

7 years agoTsst... "faled"... :p
Bastien Montagne [Sat, 5 Jan 2013 11:50:36 +0000 (11:50 +0000)]
Tsst... "faled"... :p

7 years agoAdding some example for new UIList...
Bastien Montagne [Sat, 5 Jan 2013 11:14:35 +0000 (11:14 +0000)]
Adding some example for new UIList...

7 years agorevert r53570, alpha background is useful for projection paint 'Quick Edit',
Campbell Barton [Sat, 5 Jan 2013 10:26:33 +0000 (10:26 +0000)]
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.

7 years agoBGE: Fix for [#33769] "Material friction settings are ignored" reported by Alex Frase...
Mitchell Stokes [Sat, 5 Jan 2013 08:53:39 +0000 (08:53 +0000)]
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.

7 years agoFix #33753: Not selected surface objects don't update in view if shading is changed
Sergey Sharybin [Sat, 5 Jan 2013 08:24:22 +0000 (08:24 +0000)]
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.

7 years agoFix #33674: Meta strip could overlap with other strips when exiting edit mode
Sergey Sharybin [Sat, 5 Jan 2013 08:03:16 +0000 (08:03 +0000)]
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.

7 years agoFix #33761: Infinite loop in space_image if tile size > image size
Sergey Sharybin [Sat, 5 Jan 2013 07:30:52 +0000 (07:30 +0000)]
Fix #33761: Infinite loop in space_image if tile size > image size

7 years agoFix #33768: BGE segfaults in do_versions during libload
Sergey Sharybin [Sat, 5 Jan 2013 07:25:02 +0000 (07:25 +0000)]
Fix #33768: BGE segfaults in do_versions during libload

7 years agoFix #33767: Edge of objects rendered out jerky when using OpenGL Rendering
Sergey Sharybin [Sat, 5 Jan 2013 07:08:54 +0000 (07:08 +0000)]
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.

7 years agoBGE: The Blenderplayer wasn't calling PyEval_InitThreads, which caused async lib...
Mitchell Stokes [Sat, 5 Jan 2013 03:30:56 +0000 (03:30 +0000)]
BGE: The Blenderplayer wasn't calling PyEval_InitThreads, which caused async lib loading to crash.

7 years agoThere was a typo in previous commit
Sergey Sharybin [Fri, 4 Jan 2013 20:34:06 +0000 (20:34 +0000)]
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.

7 years agoAdding Uzbek language
Bastien Montagne [Fri, 4 Jan 2013 18:19:07 +0000 (18:19 +0000)]
Adding Uzbek language

7 years agoOptimization for speed regression in mipmap generation
Sergey Sharybin [Fri, 4 Jan 2013 17:28:58 +0000 (17:28 +0000)]
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.

7 years agocode cleanup, also remove glError check in font drawing code since its now a debug...
Campbell Barton [Fri, 4 Jan 2013 17:24:40 +0000 (17:24 +0000)]
code cleanup, also remove glError check in font drawing code since its now a debug option.

7 years agoFix knife cut bug #33625, failure to cut in otho mode sometimes.
Howard Trickey [Fri, 4 Jan 2013 15:06:34 +0000 (15:06 +0000)]
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.

7 years agoFixes - post 2.65a
Ton Roosendaal [Fri, 4 Jan 2013 14:51:02 +0000 (14:51 +0000)]
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 :)

7 years agoCorrection for rev53555 which was obviously wrong -- always setting alpha to premul
Sergey Sharybin [Fri, 4 Jan 2013 13:19:57 +0000 (13:19 +0000)]
Correction for rev53555 which was obviously wrong -- always setting alpha to premul

Also optimized it a bit by skipping byte/float buffer allocation.

7 years agoAdded vertex color attributes (currently limited to one) and UVs included for triangl...
Stuart Broadfoot [Fri, 4 Jan 2013 12:44:38 +0000 (12:44 +0000)]
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.

7 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().

7 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

7 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.

7 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

7 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.

7 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.

7 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.

7 years agochange from frozen set to PyStructSequence_Field, mathes simila...
Campbell Barton [Fri, 4 Jan 2013 04:43:49 +0000 (04:43 +0000)]
change from frozen set to PyStructSequence_Field, mathes similar members of and less error prone (typos won't fail silently).

7 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


  if os.path.splitext(filename)[1].lower() in bpy.path.extensions_image:
      ... we have an image ...

7 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.

7 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.

7 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.

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

7 years agoHid the Misc panel in the Freestyle Line Style tab for now.
Tamito Kajiyama [Thu, 3 Jan 2013 23:47:53 +0000 (23:47 +0000)]
Hid the Misc panel in the Freestyle Line Style tab for now.

7 years agoNew command-line option --debug-freestyle to enable verbose debug messages
Tamito Kajiyama [Thu, 3 Jan 2013 23:27:20 +0000 (23:27 +0000)]
New command-line option --debug-freestyle to enable verbose debug messages
on the console during Freestyle rendering.  The debug prints are turned off
by default now.  Errors are still printed on the console.

A patch set implementing this functionality was provided by Bastien Montagne.
Many thanks! :)

7 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.

7 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.

7 years agoPatch from Ejner Fergo: enhancements to
Bastien Montagne [Thu, 3 Jan 2013 15:35:46 +0000 (15:35 +0000)]
Patch from Ejner Fergo: enhancements to
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).

* 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.!

7 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).

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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

7 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.

7 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.

7 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

7 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

7 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.

7 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.

7 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.

7 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)

7 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.

7 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.

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

7 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()

7 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.

7 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.

* 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)...

7 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

7 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?.

7 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'

7 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.

7 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.

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

7 years agoYet another big style clean-up patch by Bastien Montagne, thanks a lot!
Tamito Kajiyama [Wed, 2 Jan 2013 01:55:30 +0000 (01:55 +0000)]
Yet another big style clean-up patch by Bastien Montagne, thanks a lot!
Now the code style is acceptable for the merge now, according to Bastien.
Thanks again Bastien for having this done! :)

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

7 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).

7 years agoFix for theme colors not correctly applied to the user interface.
Tamito Kajiyama [Wed, 2 Jan 2013 01:20:19 +0000 (01:20 +0000)]
Fix for theme colors not correctly applied to the user interface.

This commit partly reverts the changes in revision 53197 for
making Freestyle optional.  Specifically #ifdef WITH_FREESTYLE
was removed from source/blender/editors/include/UI_resources.h so
that Freestyle-related theme properties are always defined
regardless of whether Freestyle is enabled or not.  This is in
line with the fact that Freestyle-related DNA components are
always defined no matter how a build is configured.

7 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

7 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

7 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.

7 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.

7 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

7 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.

7 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!

Todo: add colormanaged procedurals (optional).

7 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.

7 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.

7 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.

7 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!

7 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.

7 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.

7 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()

7 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).

7 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.

7 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.

7 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

7 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.

7 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.

7 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.

7 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

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

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

7 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

7 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!

7 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..

7 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.