Commit Graph

37202 Commits

Author SHA1 Message Date
Luca Bonavita
cddca9f606 == Python API docs ==
Committing a patch similar to revision 44887 with fixes to my own bugs
(sorry Campbell, and thanks for reviewing :)

Fixes
------
- 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/sphinx_doc_gen.py -- -p bmesh* -o ./<OUTPUTDIR> -B -P -R -l
2012-03-16 10:49:39 +00:00
Nicholas Bishop
0a9f817d35 Fix object mode check in stats_update.
Was checking object flag rather than mode.
2012-03-16 08:46:55 +00:00
Campbell Barton
f91407150a 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.
2012-03-16 08:26:22 +00:00
Campbell Barton
1823bb4abb fix for building bmesh bevel with scons (source file was left out) 2012-03-16 05:25:02 +00:00
Campbell Barton
ebec111618 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 bm.edges.int)  # __contains__
  layer = bm.faces.get("CheckForLayer")
2012-03-16 05:03:13 +00:00
Campbell Barton
c6c0601d8e py api:
modify bpy.path.display_name_from_filepath() to accept bytes
2012-03-16 04:14:57 +00:00
Nicholas Bishop
815beed922 Fix for multires VBO drawing in sculpt mode.
Forgot to use return value of function creating the index buffer.
2012-03-16 04:11:35 +00:00
Campbell Barton
eab24df950 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.
2012-03-15 23:56:46 +00:00
Campbell Barton
bed5ae5366 *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.
2012-03-15 23:23:04 +00:00
Sergey Sharybin
91c1f9ee77 Commit patch from Nicholas Bishop with some small modifications
to make nicer displaying of brush names.
2012-03-15 21:11:14 +00:00
Campbell Barton
2c895318e9 quiet debug print(), reported as [#30552], but infact is harmless. 2012-03-15 20:25:07 +00:00
Bastien Montagne
c9d0de49b9 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/...
2012-03-15 20:10:07 +00:00
Campbell Barton
e24d221e2a add missing break statement from recent brush code refactor,
selecting texture paint brush would never run brush_generic_tool_set()
2012-03-15 19:24:16 +00:00
Jens Verwiebe
4022c52cfa OSX/cmake: move the xcode 4.3 warning up, it was not shown due error happened before, masking it 2012-03-15 15:32:56 +00:00
Jens Verwiebe
f2475088b6 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 2012-03-15 14:57:51 +00:00
Thomas Dinges
1002714fd8 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.
2012-03-15 14:36:54 +00:00
Nicholas Bishop
32a92a65e5 Move brush tool/paint-mode from toolbar to brush menu. 2012-03-15 09:11:24 +00:00
Nicholas Bishop
f1d652aa11 Use Brush.sculpt_capabilities in Python UI code for sculpt toolbar. 2012-03-15 09:11:16 +00:00
Nicholas Bishop
9dd4058833 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.
2012-03-15 09:10:54 +00:00
Campbell Barton
c38e8e7a66 missed these last commit 2012-03-15 06:51:09 +00:00
Nicholas Bishop
e945acdd21 Un-abbreviate 'use_space_atten' (Brush RNA) to 'use_space_attenuation'. 2012-03-15 06:39:54 +00:00
Campbell Barton
6ed9c58a3d prepare for adding bmesh py api for customdata layer access - no functional changes. 2012-03-15 06:08:27 +00:00
Nicholas Bishop
f53888c5cc Code cleanup: simplify brush tool selection operators.
Created a single unifed operator, PAINT_OT_brush_select, to replace
BRUSH_OT_sculpt_tool_set, BRUSH_OT_vertex_tool_set,
BRUSH_OT_weight_tool_set, and BRUSH_OT_image_tool_set.
2012-03-15 05:59:44 +00:00
Campbell Barton
b40386a3e3 fixes for vertex color (found when brining X3D import back)
- tessface vertex color had the wrong sized array passing to rna_iterator_array_begin
- re-calculating tessface's would clear them if they were already created (own mistake)
- ED_mesh_color_add initialized tessface vertex colors from the loop color array

also made rna's mesh.tessface_vertex_colors.new() work like tessface_uv_textures.new()
where layers can be added as long as polygons are not present.
2012-03-15 05:40:33 +00:00
Nicholas Bishop
7081abf51f Remove unused parameter from multires_dm_create_from_derived. 2012-03-15 04:08:57 +00:00
Campbell Barton
d772b51b56 revert r44887, changes were OK but caused too many problems, better do this as a smaller patch.
sphinx_doc_gen.sh broke building docs - 
- examples/ svn directory was being removed since it assumed an out-of-source build.
- include references somehow stopped working (didnt find why).

also fixed an unrelated error with building docs in object_utils.py
2012-03-15 03:50:52 +00:00
Campbell Barton
be7477c638 fix [#30542] Shear Vertical Seg Faults Blender
honor the T_FREE_CUSTOMDATA flag.
2012-03-15 00:57:14 +00:00
Luca Bonavita
5788de8408 == Python API docs ==
New command line options:

-l: logs bpy dumping problems in OUTPUT_DIR/.bpy.log

-L: logs sphinx|latex problems in:
    * OUTPUT_DIR/.sphinx-build.log      (sphinx building html problems)
    * OUTPUT_DIR/.sphinx-build_pdf.log  (sphinx building latex problems)
    * OUTPUT_DIR/.latex_make.log        (latex make problems)

-P: builds the pdf

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


Example usage:
./cmake/bin/blender -b -P ./blender/doc/python_api/sphinx_doc_gen.py -- -p bmesh* -l -o ./python_api -B -P -R -L
2012-03-15 00:12:31 +00:00
Jens Verwiebe
23c1edb777 OSX/cmake: enable clang compiler with xcode >= 4.3, tested o.k.now 2012-03-14 23:42:46 +00:00
Campbell Barton
ea79c470d2 bmesh: Fkey now creates faces from 5 or more disconnected vertices.
Added function: BM_face_create_ngon_vcloud
creating quads and tris use this too since it finds the best face winding direction based on surrounding face (if any)
2012-03-14 22:57:15 +00:00
Campbell Barton
c2d93e8d4a comment cleanup 2012-03-14 22:39:56 +00:00
Sergey Sharybin
e7c4a25963 Fix #30549: Error adding mesh object to scene 2012-03-14 22:34:25 +00:00
Lukas Toenne
6f7eb383c8 Use helper functions in node_select when selecting/deselecting nodes and sockets in operators. This ensure that sockets are not selected on their own (parent node is always selected too). 2012-03-14 18:10:57 +00:00
Lukas Toenne
6624090a23 Make extension mode (shiftkey) mandatory for socket selection. Otherwise the user can end up with unexpectedly selected nodes, since socket selection allows selecting inputs and outputs from different nodes, which in turn also mean the parent nodes are selected. This fits the workflow better, you already needed to press shiftkey before to use the auto-connect operator. It will also solve some problems with the upcoming reroute nodes, where the node is basically a single socket. 2012-03-14 17:52:50 +00:00
Sergey Sharybin
930f43bd96 Fix crash on edge extrude from textured view
Issue was caused by MFACE layer adding for even DM without tessellated faces
which lead to adding new layer but with NULL data. This causes issues when layer
with faces (after extrude) was attempting to add because currently CD only checks
if layer type exists but does not check for size of the layer.

Solved by not adding MFACE layer if there's no tessellated faces.
2012-03-14 14:09:56 +00:00
Antony Riakiotakis
a829a905da fix hang when loop selecting an ngon. We need to check if edge currently walked on has already been added 2012-03-14 13:52:17 +00:00
Jens Verwiebe
639cf31f8a Avoid a sigsev after 44830 when reports is empty, clang compile work 2012-03-14 12:03:49 +00:00
Sergey Sharybin
f1da62d31f Switch *nix fileops from calling external commands via system() to posix api calls
which resolves some possible issues with operating files with quotes and backslashes.

Also this might resolve (or at least help) resolving compilation error on GNU Hurd platform
which will help a lot maintaining Blender for Debian.
2012-03-14 09:39:43 +00:00
Sergey Sharybin
b745621038 Changes to python-defined add object operators:
- Reset rotation value when toggling Align to View property
  which correctly re-alignes object on continuous property
  toggling and fixes issue
  #30510: [2.62] Add Mesh - Torus - "Align to View" cannot be switched back when toggling off

- Moves all generic object-add properties into a helper function
  which might be easily re-used.
2012-03-14 08:55:57 +00:00
Nicholas Bishop
bbb76ccb25 Fix for multires undo with partial visibility. 2012-03-14 08:14:03 +00:00
Nicholas Bishop
4d3f11c66f Fix some errors in partial visibility drawing.
Also changed show-in-border key to SHIFT+H as suggested by Daniel
Salazar.
2012-03-14 07:37:47 +00:00
Nicholas Bishop
7454d939c5 Add partial visibility operator including keymaps and menu items.
Uses HKEY for border hide, CTRL+HKEY for border show, and ALT+HKEY for
show all.

Documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/PartialVisibility

Code review:
http://codereview.appspot.com/5695043
2012-03-14 06:32:43 +00:00
Nicholas Bishop
68b8f3b0a8 Skip hidden elements in PBVH iterator, raycast, and drawing. 2012-03-14 06:32:25 +00:00
Nicholas Bishop
b37a355c8e Copy hidden flag to vertices when applying multires modifier. 2012-03-14 06:32:13 +00:00
Nicholas Bishop
521e724edd Skip hidden elements in PBVH iterator, raycast, and drawing. 2012-03-14 06:32:03 +00:00
Nicholas Bishop
8717e35db3 Add DerivedMesh.gridHidden and CCGDM implementation. 2012-03-14 06:31:49 +00:00
Nicholas Bishop
82840ef94b Add MDisps.hidden bitmap.
Updates SDNA, customdata functions, and file read/write. Also adds
accessor functions to BKE paint.
2012-03-14 06:31:38 +00:00
Nicholas Bishop
0c91821364 Add new CCG accessor functions.
ccg_gridsize() converts a level into gridsize, ccg_factor() is for
converting coordinates between different multires levels.
2012-03-14 06:31:24 +00:00
Nicholas Bishop
7f2acc173e Add BKE mesh function to update edge/poly hidden flags from verts. 2012-03-14 06:31:14 +00:00
Nicholas Bishop
38d4848020 Don't wait for sculpt stroke to create PBVH.
This idea is borrowed from the multires modifier, which already
checked if the object was in sculpt mode and, if so, created the
PBVH. That check is now moved higher up the chain into
mesh_build_data(), so that it occurs for CDDerivedMesh too.

This also replaces an assert in cdDM_getPBVH for tesselated mesh faces
with a call to create them if missing.
2012-03-14 06:30:55 +00:00