8 years agoFix format string warnings (gcc) by using string literals.
Nicholas Bishop [Mon, 19 Mar 2012 21:38:35 +0000 (21:38 +0000)]
Fix format string warnings (gcc) by using string literals.

gcc 4.6 was giving warnings like this:
"warning: format not a string literal and no format arguments [-Wformat-security]"

8 years agobmesh inset:
Campbell Barton [Mon, 19 Mar 2012 21:27:24 +0000 (21:27 +0000)]
bmesh inset:
  option to inset boundaries.

8 years agoRedraw data properties after selecting a bone.
Nicholas Bishop [Mon, 19 Mar 2012 21:21:23 +0000 (21:21 +0000)]
Redraw data properties after selecting a bone.

This is so that selecting bones while in weight paint mode will show
the correct active vertex group.

8 years agoFix #30531: mirror modifier with vertex groups did not add both the left and
Brecht Van Lommel [Mon, 19 Mar 2012 21:09:16 +0000 (21:09 +0000)]
Fix #30531: mirror modifier with vertex groups did not add both the left and
right groups to merged vertices, only one. This made the result asymmetric,
now merged vertices will be part of both groups with half weight.

8 years agoFix #30590: Crash in multires when undoing extrude [File incl.]
Sergey Sharybin [Mon, 19 Mar 2012 20:47:17 +0000 (20:47 +0000)]
Fix #30590: Crash in multires when undoing extrude [File incl.]

- Crash was caused by recursively copying directory into itself, fixed
  by switching from opendir() to scandir().
- Also do not try to unpack images which doesn't have name.

8 years agoRemove debug print in create_vert_poly_map
Nicholas Bishop [Mon, 19 Mar 2012 20:28:22 +0000 (20:28 +0000)]
Remove debug print in create_vert_poly_map

8 years agostyle cleanup: minor change to bmesh py repr + comment on loop radial next/prev to...
Campbell Barton [Mon, 19 Mar 2012 20:01:59 +0000 (20:01 +0000)]
style cleanup: minor change to bmesh py repr + comment on loop radial next/prev to avoid confusion.

8 years agofix for error reported on IRC, sorting zero sized lists would cause a crash.
Campbell Barton [Mon, 19 Mar 2012 19:27:39 +0000 (19:27 +0000)]
fix for error reported on IRC, sorting zero sized lists would cause a crash.

8 years agoSpelling of UI messages (then -> than).
Bastien Montagne [Mon, 19 Mar 2012 19:17:17 +0000 (19:17 +0000)]
Spelling of UI messages (then -> than).

8 years agoFix #30456: transforming object with a hair particle system, on a frame after
Brecht Van Lommel [Mon, 19 Mar 2012 18:14:24 +0000 (18:14 +0000)]
Fix #30456: transforming object with a hair particle system, on a frame after
the cache end frame would reset to the previous state on confirm. Was an issue
with object animation being evaluated unnecessarily, now make check more

8 years agoFix #30449: sampled motion blur not working with softbody.
Brecht Van Lommel [Mon, 19 Mar 2012 17:22:01 +0000 (17:22 +0000)]
Fix #30449: sampled motion blur not working with softbody.

8 years agoFix #30594: UV editor transform tools did not show help/pivot line to indicate
Brecht Van Lommel [Mon, 19 Mar 2012 17:21:46 +0000 (17:21 +0000)]
Fix #30594: UV editor transform tools did not show help/pivot line to indicate
transform center as it did in 2.49.

8 years agoFix for drag-n-drop images into sequencer: it was impossible to select files
Sergey Sharybin [Mon, 19 Mar 2012 10:52:16 +0000 (10:52 +0000)]
Fix for drag-n-drop images into sequencer: it was impossible to select files
from a file browser after dropping image strip from an external application.

8 years agobmesh inset:
Campbell Barton [Mon, 19 Mar 2012 09:47:32 +0000 (09:47 +0000)]
bmesh inset:
  fix hole when 2+ faces a vert but no edges (would make a hole), now splice the verts back together.

8 years agostyle cleanup: + some spelling errors for inset
Campbell Barton [Mon, 19 Mar 2012 08:49:49 +0000 (08:49 +0000)]
style cleanup: + some spelling errors for inset

8 years agocode cleanup: bmesh api - make arg order consistent - htype before hflag or oflag.
Campbell Barton [Mon, 19 Mar 2012 08:36:27 +0000 (08:36 +0000)]
code cleanup: bmesh api - make arg order consistent - htype before hflag or oflag.

8 years agoGrmml, dummy typo in previous UI message-fix commit… :/
Bastien Montagne [Mon, 19 Mar 2012 07:57:35 +0000 (07:57 +0000)]
Grmml, dummy typo in previous UI message-fix commit… :/

8 years agobmesh inset:
Campbell Barton [Mon, 19 Mar 2012 07:20:54 +0000 (07:20 +0000)]
bmesh inset:
improve inset code by not allocating an array the size of edges - instead count all inset edges and allocate an array only for those.
also fixes an error where edge lengths were being compared while the verts were being placed. (now do beforehand)

8 years agobmesh: inset tool, access from face menu (Ctrl+F)
Campbell Barton [Mon, 19 Mar 2012 05:45:15 +0000 (05:45 +0000)]
bmesh: inset tool, access from face menu (Ctrl+F)

- Even option (like solidify even option)
- Relative option (insets based on lengths of surrounding edges)

TODO: merge tares when 2+ face corners meet but don't form a contiguous region.

8 years agoAdd a multires function to delete MDisps.
Nicholas Bishop [Mon, 19 Mar 2012 05:13:41 +0000 (05:13 +0000)]
Add a multires function to delete MDisps.

The code was duplicated in various places, replaced with calls to
a new function, multires_customdata_delete().

8 years agoBMesh utility functions, not used yet,
Campbell Barton [Mon, 19 Mar 2012 01:57:42 +0000 (01:57 +0000)]
BMesh utility functions, not used yet,
- BM_edge_loop_pair incase you need the loops rather then the faces.
- BM_edge_ordered_verts_ex() - accepts a loop argument.
- BM_edge_length_calc() - simple length calc, useful if the edge is in some array, saves assigning a var and using len_v3v2().

8 years agobetter error reporting when a bmesh operator fails. (give reason and show char number...
Campbell Barton [Sun, 18 Mar 2012 23:38:31 +0000 (23:38 +0000)]
better error reporting when a bmesh operator fails. (give reason and show char number that fails)

8 years agoFix for [#30495] Framerate goes crazy after changing Sync mode from "Frame Dropping...
Joerg Mueller [Sun, 18 Mar 2012 22:21:29 +0000 (22:21 +0000)]
Fix for [#30495] Framerate goes crazy after changing Sync mode from "Frame Dropping" to "no Sync" while playing anim

8 years agoFix [#30234] Various problems with CD layers and tesselation, related to modifiers...
Bastien Montagne [Sun, 18 Mar 2012 22:06:57 +0000 (22:06 +0000)]
Fix [#30234] Various problems with CD layers and tesselation, related to modifiers stack.

Should also fix [#30266], [#29451], and partly [#30316].

Here are the changes made by this commit:
* It adds a "dirty" flag to DerivedMesh struct (for now, only DM_DIRTY_TESS_CDLAYERS, but more might be added as needed).
* It adds a new func, DM_update_tessface_data, which assumes tessfaces themselves are valid, but updates tessellated customdata from their poly/loop counter parts.
* At end of modstack, when valid tessellated faces are present in finaldm , but the cdlayers dirty flag is set, call that function (instead of recomputing the whole tessellation).
* Edits to the codes concerned (UVProject, DynamicPaint, and Subsurf modifiers).
* Also add to subsurf dm generation code the creation of a CD_POLYINDEX layer (mandatory for DM_update_tessface_data to work well, and imho all tessellated dm should have one).

Note: some pieces of old code are just #if 0’ed, will clean them later.

8 years ago"Fix" for [#30098] Particle rotation wrong / explode modifier
Janne Karhu [Sun, 18 Mar 2012 21:33:00 +0000 (21:33 +0000)]
"Fix" for [#30098] Particle rotation wrong / explode modifier
- The main problem was that in order to be accurate all particle
  rotations have to be calculated incrementally so the only working
  solution is to store rotations to the point cache (previously
  this was only done for dynamic rotations). This can nearly double
  the point cache size so it's not ideal to have this as a default
  as in many cases you don't care about particle rotations.
- Particle rotation panel now has a new "enable" checkbox that
  enables rotation calculations and the storing of rotations to
  point cache.
- Old files will have rotations enabled via do_versions so that in
  the worst case old files will only get bigger point caches, but no
  sudden loss of particle rotations.

8 years agolattice & UV 'select all' menu items were missing action assignment.
Campbell Barton [Sun, 18 Mar 2012 20:10:58 +0000 (20:10 +0000)]
lattice & UV 'select all' menu items were missing action assignment.

8 years agoGrumph, more fixes in this Select menu (Invert had default op name for metaball and...
Bastien Montagne [Sun, 18 Mar 2012 20:04:41 +0000 (20:04 +0000)]
Grumph, more fixes in this Select menu (Invert had default op name for metaball and particules...). Also fixed "(De)select All" name of particule op.

8 years agoFix [#30588] "select/deselect all"-menu for lattice doesn't default to TOGGLE
Bastien Montagne [Sun, 18 Mar 2012 19:55:42 +0000 (19:55 +0000)]
Fix [#30588] "select/deselect all"-menu for lattice doesn't default to TOGGLE

8 years ago== Sequencer ==
Peter Schlaile [Sun, 18 Mar 2012 19:32:26 +0000 (19:32 +0000)]
== Sequencer ==

Small fix for the last fix. Mixed up x and y scale... oh dear.

8 years agoRelease cycle
Thomas Dinges [Sun, 18 Mar 2012 16:01:11 +0000 (16:01 +0000)]
Release cycle
* BCon3: Beta. Ongoing module work, bug fixes and polishing features.

8 years agoAllow dropping image files from outside blender, or image datablocks from inside...
Sv. Lockal [Sun, 18 Mar 2012 15:12:11 +0000 (15:12 +0000)]
Allow dropping image files from outside blender, or image datablocks from inside blender to the shader and texture node editors, to add an image node. Earlier this was possible only for compositing node editor.

8 years agoRe-enable the clay strips sculpt brush.
Nicholas Bishop [Sun, 18 Mar 2012 11:44:14 +0000 (11:44 +0000)]
Re-enable the clay strips sculpt brush.

Most of the tool code was already in place, only significant
functionality change is that anchored stroke works now.

* Gave it a new icon, but could use a better one
* Default .blend should have a clay strips brush

8 years agoRename 'clay tubes' to 'clay strips' and include it in the capabilities RNA.
Nicholas Bishop [Sun, 18 Mar 2012 11:44:00 +0000 (11:44 +0000)]
Rename 'clay tubes' to 'clay strips' and include it in the capabilities RNA.

8 years agoUse enums for brush flags and sculpt tools.
Nicholas Bishop [Sun, 18 Mar 2012 11:43:51 +0000 (11:43 +0000)]
Use enums for brush flags and sculpt tools.

8 years ago== Sequencer ==
Peter Schlaile [Sun, 18 Mar 2012 11:43:22 +0000 (11:43 +0000)]
== Sequencer ==

Fixes typos in RECORD_RUN_NO_GAPS timecode description.

8 years ago== Sequencer ==
Peter Schlaile [Sun, 18 Mar 2012 11:13:28 +0000 (11:13 +0000)]
== Sequencer ==

Fix for:
[#29758] Sequencer `Image Offset` error with render percentage

* make preprocess parameters completely independent from render resolution
  (they are always relative to *final* resolution now)
* fix yesterdays fix for proxy resolution rendering (the case of unbuild
  proxies wasn't handled correctly)

8 years agoStyle cleanup in sculpt.c, no functional changes.
Nicholas Bishop [Sun, 18 Mar 2012 09:35:09 +0000 (09:35 +0000)]
Style cleanup in sculpt.c, no functional changes.

8 years agoCode style edits (mostly spliting long lines, and removing trailing spaces).
Bastien Montagne [Sun, 18 Mar 2012 09:27:36 +0000 (09:27 +0000)]
Code style edits (mostly spliting long lines, and removing trailing spaces).

Note about long lines: I did not touch to two pieces of code (because I don’t see any way to keep a nicely formated, compact code, with shorter lines):
* The node types definitions into rna_nodetree_types.h
* The vgroup name functions into rna_particle.c

8 years agofix for own mistake when refactoring bmesh - was treating the iterator as a type...
Campbell Barton [Sun, 18 Mar 2012 09:21:24 +0000 (09:21 +0000)]
fix for own mistake when refactoring bmesh - was treating the iterator as a type flag.

8 years agospelling cleanup
Campbell Barton [Sun, 18 Mar 2012 07:38:51 +0000 (07:38 +0000)]
spelling cleanup

8 years agongons draw with uniform normals in object mode now, I had this code disabled for...
Campbell Barton [Sun, 18 Mar 2012 06:49:32 +0000 (06:49 +0000)]
ngons draw with uniform normals in object mode now, I had this code disabled for speed (it was being called when it didnt need to), but for CDDM meshes without face normal layers this should still be called.

8 years agocode cleanup:
Campbell Barton [Sun, 18 Mar 2012 06:01:33 +0000 (06:01 +0000)]
code cleanup:
* replace 2D vector copy with copy_v2_v2().
* use puts rather then printf for single strings.
* style cleanup for drawobject.c indentation.

8 years agoSVN maintenance.
Guillermo S. Romero [Sun, 18 Mar 2012 01:58:16 +0000 (01:58 +0000)]
SVN maintenance.

8 years agobetter not to use rgb_float_to_uchar() from last commit (comment as to why)
Campbell Barton [Sat, 17 Mar 2012 23:37:14 +0000 (23:37 +0000)]
better not to use rgb_float_to_uchar() from last commit (comment as to why)

8 years agofix for weightpaint color with recent loopcolor abgr --> rgba conversion.
Campbell Barton [Sat, 17 Mar 2012 23:26:25 +0000 (23:26 +0000)]
fix for weightpaint color with recent loopcolor abgr --> rgba conversion.

8 years agobmesh py api:
Campbell Barton [Sat, 17 Mar 2012 23:22:44 +0000 (23:22 +0000)]
bmesh py api:

  use different types for bm.verts.layers, bm.faces.layers, otherwise the layers look to have customdata type that isnt compatible, UV's on edges for eg.

8 years agocode cleanup: not all mathutils callback creation functions tool unsigned char for...
Campbell Barton [Sat, 17 Mar 2012 22:31:57 +0000 (22:31 +0000)]
code cleanup: not all mathutils callback creation functions tool unsigned char for type & subtype args.

8 years agofix for invalid use of strncat (N == how many bytes may be appended, not the final...
Campbell Barton [Sat, 17 Mar 2012 22:14:52 +0000 (22:14 +0000)]
fix for invalid use of strncat (N == how many bytes may be appended, not the final string size).

8 years agofix: UV Islands not selected properly with Ctrl-L. A simple misplacement of the BMFac...
Antony Riakiotakis [Sat, 17 Mar 2012 22:12:17 +0000 (22:12 +0000)]
fix: UV Islands not selected properly with Ctrl-L. A simple misplacement of the BMFace iterating variable. Also cleaned up an unused nverts variable.

8 years agoupdate vertex paint code for last commit, was still using ABGR order.
Campbell Barton [Sat, 17 Mar 2012 21:11:28 +0000 (21:11 +0000)]
update vertex paint code for last commit, was still using ABGR order.

8 years agoswap BMLoopCol r/b color, requires subversion bump.
Campbell Barton [Sat, 17 Mar 2012 20:39:28 +0000 (20:39 +0000)]
swap BMLoopCol r/b color, requires subversion bump.

old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol.

Loading old files works, saving legacy format works too.

What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge.
(it wont crash but the blue and red will be swapped on vertex color layers).

8 years agobmesh py api:
Campbell Barton [Sat, 17 Mar 2012 19:34:02 +0000 (19:34 +0000)]
bmesh py api:
  access to MLoopCol as mathutils.Color type

8 years ago== Sequencer ==
Peter Schlaile [Sat, 17 Mar 2012 19:31:28 +0000 (19:31 +0000)]
== Sequencer ==

Bugfix: [#28159] sequencer strip crop values on proxy not scene render size

Also: IMB saturation change moved into imbuf-module.

8 years agoUI messages: unification of select/deselect stuff.
Bastien Montagne [Sat, 17 Mar 2012 19:14:08 +0000 (19:14 +0000)]
UI messages: unification of select/deselect stuff.

Previously we had three versions, Select/Deselect, Select or Deselect, and (De)select, choosen the third (shortest) one for now.

8 years agodont disable python when addons aren't found (addons are not needed for python to...
Campbell Barton [Sat, 17 Mar 2012 18:33:51 +0000 (18:33 +0000)]
dont disable python when addons aren't found (addons are not needed for python to run)

8 years agoFix 30562: bevel was infinite looping when adjacent faces had incompatible normals
Howard Trickey [Sat, 17 Mar 2012 15:47:48 +0000 (15:47 +0000)]
Fix 30562: bevel was infinite looping when adjacent faces had incompatible normals

The fix is to check for cases where BME_Bevel_Dissolve_Disk was trying
to join faces with opposite normals and reverse one.  This isn't a great
fix, and the example blend has strange corners at the top after beveling,
but at least it stops the infinite loops.

8 years agoBig step forward nodes UI translation:
Bastien Montagne [Sat, 17 Mar 2012 14:42:44 +0000 (14:42 +0000)]
Big step forward nodes UI translation:
*Add menu is now translated.
*Nodes' title is now translated.
*Nodes' sockets' labels are now translated.

However, about the last point, and unless I’m mistaking, we’ll have to add the "i18n tag" N_() to all sockets' names, in the input/ouput templates declaration, in all nodes' files, as those sockets are collections created at runtime, I think po-generating script has no way to access that from bpy.types... Quite a piece of (borring) work. :/

8 years agoMinor UI messages fixes, and enabling i18n for all modifier_setError() error messages.
Bastien Montagne [Sat, 17 Mar 2012 14:27:46 +0000 (14:27 +0000)]
Minor UI messages fixes, and enabling i18n for all modifier_setError() error messages.

8 years agocompile fix for 44939
Jens Verwiebe [Sat, 17 Mar 2012 12:32:36 +0000 (12:32 +0000)]
compile fix for 44939

8 years agoFix for yesterday i18n own commit (r44924): we now need to define WITH_INTERNATIONAL...
Bastien Montagne [Sat, 17 Mar 2012 12:07:58 +0000 (12:07 +0000)]
Fix for yesterday i18n own commit (r44924): we now need to define WITH_INTERNATIONAL everywhere TIP_/IFACE_ macros are used (else, we get non-international, dummy NOP macros instead!).

Also fixed in main CMakeList file, when no addon dir found, we want to disable WITH_PYTHON (I guess, certainly not WITH_INTERNATIONAL ;) ).

8 years agominor mathutils code cleanup - use mathutils callbacks as unsigned chars everywhere.
Campbell Barton [Sat, 17 Mar 2012 10:46:02 +0000 (10:46 +0000)]
minor mathutils code cleanup - use mathutils callbacks as unsigned chars everywhere.

8 years agoMake grumpy gcc happy again! :p
Bastien Montagne [Sat, 17 Mar 2012 10:23:44 +0000 (10:23 +0000)]
Make grumpy gcc happy again! :p

8 years agobmesh py api:
Campbell Barton [Sat, 17 Mar 2012 06:40:44 +0000 (06:40 +0000)]
bmesh py api:

added per loop UV layer access

8 years ago#collada instance_node import, partially fixes #27629
Arystanbek Dyussenov [Sat, 17 Mar 2012 06:37:26 +0000 (06:37 +0000)]
#collada instance_node import, partially fixes #27629

Patch applied in r37663 caused loss of <instance_node>s.

All parts of the smaller test file attached in the report now import.

8 years agobmesh py api:
Campbell Barton [Sat, 17 Mar 2012 04:43:32 +0000 (04:43 +0000)]
bmesh py api:
 split up BMElemSeq into BMVertSeq, BMEdgeSeq, BMFaceSeq and BMLoopSeq

 Was becoming cumbersome since each needed their own new() function, and other methods only worked for some of these types.

Added BMesh.loops - since you cant iterate over loops this is for customdata access only.

8 years agoReduce poly map memory usage (used by sculpt smooth brush.)
Nicholas Bishop [Sat, 17 Mar 2012 04:41:36 +0000 (04:41 +0000)]
Reduce poly map memory usage (used by sculpt smooth brush.)

Changed the create_vert_poly_map function to return a more compact
structure. Memory saved will vary depending on the mesh, but typically
it should be about one third of the old size.

8 years agominor improvement to image info color sample drawing, draw a grey outline.
Campbell Barton [Fri, 16 Mar 2012 23:44:08 +0000 (23:44 +0000)]
minor improvement to image info color sample drawing, draw a grey outline.

8 years agoFix for size of VBO index type when drawing multires in sculpt mode.
Nicholas Bishop [Fri, 16 Mar 2012 23:21:40 +0000 (23:21 +0000)]
Fix for size of VBO index type when drawing multires in sculpt mode.

The VBO index type can be either ushort or uint depending on the grid
size. The comparison was checking how many quads are in the array, but
this was incorrect; the size of the index elements should depend on
the maximum value they reference, i.e. the maximum coord/normal

8 years agoadd select invert for lattice
Campbell Barton [Fri, 16 Mar 2012 23:01:37 +0000 (23:01 +0000)]
add select invert for lattice

8 years agofix for own silly mistake with face creation (wasnt checking more then 1 vert was...
Campbell Barton [Fri, 16 Mar 2012 22:24:56 +0000 (22:24 +0000)]
fix for own silly mistake with face creation (wasnt checking more then 1 vert was selected)

8 years agostyle cleanup: py/capi
Campbell Barton [Fri, 16 Mar 2012 21:39:56 +0000 (21:39 +0000)]
style cleanup: py/capi

8 years agobugfix. Brush zoom could fail if uv sculpting was on
Antony Riakiotakis [Fri, 16 Mar 2012 21:26:18 +0000 (21:26 +0000)]
bugfix. Brush zoom could fail if uv sculpting was on

8 years agoFollow up to fix in r44919: use standard stats in paint modes.
Nicholas Bishop [Fri, 16 Mar 2012 20:42:29 +0000 (20:42 +0000)]
Follow up to fix in r44919: use standard stats in paint modes.

Removed the special case for header statistics in sculpt/paint
modes. The information provided was less useful, and less accurate
even because it didn't reflect multires.

8 years agoPatch by Psy-Fi + my minor changes
Alexander Kuznetsov [Fri, 16 Mar 2012 17:37:45 +0000 (17:37 +0000)]
Patch by Psy-Fi + my minor changes

Adds conformation on exit for windows. Needs to be enabled in user perf.

Tried to edit blender.exe.manifest for more modern dialog look, but didn't work out.

8 years agoi18n stuff: adds translation_context to RNA structs (used for there ui name), and...
Bastien Montagne [Fri, 16 Mar 2012 15:39:25 +0000 (15:39 +0000)]
i18n stuff: adds translation_context to RNA structs (used for there ui name), and a first default "Operator" one for all operators' label.

The fact is, operators' label are nearly always verbs, while properties labels are nearly always nouns. So this should already solve many translations' problems regarding noun/verb confusion.

This commit also simplifies a bit i18n usage:
*Now IFACE_ and TIP_ macros (or there context versions, CTX_IFACE_/TIP_) are used nearly everywhere (with one exception, where code is a bit complex and needs to manually test whether ui/tip translations is allowed, so no need to redo it later through those macros).
*Also, those macros are now defined to NOP in case WITH_INTERNATIONAL is false, which avoid testing that define everywhere in code!

8 years ago== Python API docs ==
Luca Bonavita [Fri, 16 Mar 2012 14:49:16 +0000 (14:49 +0000)]
== Python API docs ==

Small fixes (thanks Terry Wallwork for reporting)
- adding logger filehandler in main () so that ARGS.output_dir exists, otherwise we get an IOError
- the zip was not including files in a container directory

8 years agoAllow merging two tracks in cases when they've got overlapping tracked/keyframed
Sergey Sharybin [Fri, 16 Mar 2012 14:06:43 +0000 (14:06 +0000)]
Allow merging two tracks in cases when they've got overlapping tracked/keyframed
frame ranges using average position of both tracks as position/

8 years agoFix #30561 Modifiers with use_apply_on_spline = True do not work on curve with shapekeys
Sergey Sharybin [Fri, 16 Mar 2012 11:46:08 +0000 (11:46 +0000)]
Fix #30561 Modifiers with use_apply_on_spline = True do not work on curve with shapekeys

8 years ago== Python API docs ==
Luca Bonavita [Fri, 16 Mar 2012 10:49:39 +0000 (10:49 +0000)]
== Python API docs ==

Committing a patch similar to revision 44887 with fixes to my own bugs
(sorry Campbell, and thanks for reviewing :)

- examples/ svn directory not removed anymore (in-source builds possible again)
- fixed "include references somehow stopped working"
+ using shutils.makearchive() to zip the file

New command line options

-l: Log the output of the api dump and sphinx|latex warnings and errors
    If given, save logs in:
    * OUTPUT_DIR/.bpy.log
    * OUTPUT_DIR/.sphinx-build.log
    * OUTPUT_DIR/.sphinx-build_pdf.log
    * OUTPUT_DIR/.latex_make.log

    (using only one log directive instead of -l for bpy and -L for sphinx)

-P: builds the pdf

-R: pack the files in a dir ready for online deployment
    (including the zip and the pdf eventually)

Example usage:
./blender.bin -b -P doc/python_api/ -- -p bmesh* -o ./<OUTPUTDIR> -B -P -R -l

8 years agoFix object mode check in stats_update.
Nicholas Bishop [Fri, 16 Mar 2012 08:46:55 +0000 (08:46 +0000)]
Fix object mode check in stats_update.

Was checking object flag rather than mode.

8 years agobmesh py api:
Campbell Barton [Fri, 16 Mar 2012 08:26:22 +0000 (08:26 +0000)]
bmesh py api:
initial support for editing bmesh customdata per vert/edge/face/loop

shapes, crease, bevel weights working, missing UVs and Vertex Colors still.

8 years agofix for building bmesh bevel with scons (source file was left out)
Campbell Barton [Fri, 16 Mar 2012 05:25:02 +0000 (05:25 +0000)]
fix for building bmesh bevel with scons (source file was left out)

8 years agobmesh py api:
Campbell Barton [Fri, 16 Mar 2012 05:03:13 +0000 (05:03 +0000)]
bmesh py api:

Wrap customdata, so far you can access the data layers in a pythonic way but not manipulate the customdata yet.

provides dictionary like access to customdata layers, eg:
  texpoly = bm.faces.tex["UVMap"]
  print(bm.verts.shape.keys())  # un-intended pun, keys() works on all layers.
  print("MyInt" in  # __contains__
  layer = bm.faces.get("CheckForLayer")

8 years agopy api:
Campbell Barton [Fri, 16 Mar 2012 04:14:57 +0000 (04:14 +0000)]
py api:
  modify bpy.path.display_name_from_filepath() to accept bytes

8 years agoFix for multires VBO drawing in sculpt mode.
Nicholas Bishop [Fri, 16 Mar 2012 04:11:35 +0000 (04:11 +0000)]
Fix for multires VBO drawing in sculpt mode.

Forgot to use return value of function creating the index buffer.

8 years agobmesh: being back bevel modifier from 2.62 stable.
Campbell Barton [Thu, 15 Mar 2012 23:56:46 +0000 (23:56 +0000)]
bmesh: being back bevel modifier from 2.62 stable.

this is no big improvement but at least its not a regression.

using the new operator for the bevel modifier can be enabled again be uncommenting a define.

8 years ago*picky* fix for edge rotate
Campbell Barton [Thu, 15 Mar 2012 23:23:04 +0000 (23:23 +0000)]
*picky* fix for edge rotate

- Edge rotate would leave verts selected, this would give problems because those selections would leave edges that would try to rotate when run again. now de-select old verts on edge rotate.

- Rotating into hidden verts gave odd results, now make sure hidden state is ok.

- BMO_slot_buffer_hflag_disable / BMO_slot_buffer_hflag_enable now have flushing for the hide flag too.

8 years agoCommit patch from Nicholas Bishop with some small modifications
Sergey Sharybin [Thu, 15 Mar 2012 21:11:14 +0000 (21:11 +0000)]
Commit patch from Nicholas Bishop with some small modifications
to make nicer displaying of brush names.

8 years agoquiet debug print(), reported as [#30552], but infact is harmless.
Campbell Barton [Thu, 15 Mar 2012 20:25:07 +0000 (20:25 +0000)]
quiet debug print(), reported as [#30552], but infact is harmless.

8 years agomesh_validate code for bmesh (i.e. polys/loops).
Bastien Montagne [Thu, 15 Mar 2012 20:10:07 +0000 (20:10 +0000)]
mesh_validate code for bmesh (i.e. polys/loops).

Everything seems to work well (many tests making random changes over various meshes went good), but the code is a bit complex and hard to follow, due to the various possibilities of invalid poly/loop combinations… Code also makes more operations than previous tri/quad faces version (hence is a bit slower), but I don’t think we can do otherwise, it’s just the price for bmesh flexibility. ;)

Note: added the py script I used to make the tests, under source/tests/...

8 years agoadd missing break statement from recent brush code refactor,
Campbell Barton [Thu, 15 Mar 2012 19:24:16 +0000 (19:24 +0000)]
add missing break statement from recent brush code refactor,
selecting texture paint brush would never run brush_generic_tool_set()

8 years agoOSX/cmake: move the xcode 4.3 warning up, it was not shown due error happened before...
Jens Verwiebe [Thu, 15 Mar 2012 15:32:56 +0000 (15:32 +0000)]
OSX/cmake: move the xcode 4.3 warning up, it was not shown due error happened before, masking it

8 years agoOSX/scons: also allow for omp-builds with gcc-4.6.2 and 4.6.3 ( tested ), TODO: check...
Jens Verwiebe [Thu, 15 Mar 2012 14:57:51 +0000 (14:57 +0000)]
OSX/scons: also allow for omp-builds with gcc-4.6.2 and 4.6.3 ( tested ), TODO: check if we can compile objC/objC++ with newer gcc too

8 years ago2.6 User Interface:
Thomas Dinges [Thu, 15 Mar 2012 14:36:54 +0000 (14:36 +0000)]
2.6 User Interface:
* New Icons for the File menu, patch by David Klein (cgeffex). Thanks a lot!
* This patch also adds a new icon for the use_filter_text in Filebrowser.

8 years agoMove brush tool/paint-mode from toolbar to brush menu.
Nicholas Bishop [Thu, 15 Mar 2012 09:11:24 +0000 (09:11 +0000)]
Move brush tool/paint-mode from toolbar to brush menu.

8 years agoUse Brush.sculpt_capabilities in Python UI code for sculpt toolbar.
Nicholas Bishop [Thu, 15 Mar 2012 09:11:16 +0000 (09:11 +0000)]
Use Brush.sculpt_capabilities in Python UI code for sculpt toolbar.

8 years agoAdd RNA for brush capabilities (sculpt-only for now.)
Nicholas Bishop [Thu, 15 Mar 2012 09:10:54 +0000 (09:10 +0000)]
Add RNA for brush capabilities (sculpt-only for now.)

Added a new RNA-only nested structure, Brush.SculptCapabilities. It
contains read-only properties that use the current sculpt tool (and
occasionally other brush properties) to determine whether some feature
is available.

For example, the grab and snake-hook brushes don't support the
strength property. Querying brush.sculpt_capabilities.has_strength
will return false only if one of these brushes is selected.

8 years agomissed these last commit
Campbell Barton [Thu, 15 Mar 2012 06:51:09 +0000 (06:51 +0000)]
missed these last commit

8 years agoUn-abbreviate 'use_space_atten' (Brush RNA) to 'use_space_attenuation'.
Nicholas Bishop [Thu, 15 Mar 2012 06:39:54 +0000 (06:39 +0000)]
Un-abbreviate 'use_space_atten' (Brush RNA) to 'use_space_attenuation'.

8 years agoprepare for adding bmesh py api for customdata layer access - no functional changes.
Campbell Barton [Thu, 15 Mar 2012 06:08:27 +0000 (06:08 +0000)]
prepare for adding bmesh py api for customdata layer access - no functional changes.