Commit Graph

38348 Commits

Author SHA1 Message Date
Nathan Letwory
e8e1a7cb9e Enable OpenCOLLADA support for MingW64 builds by default.
Note: don't forget to update your local checkout of lib/mingw64
2012-05-11 17:29:55 +00:00
Lukas Toenne
fe33fc8db3 Fix for UI layout alignment of fixed-size items (including those with width < min. width). Such layout items were ignoring the center and right alignment in layouts before. 2012-05-11 17:05:10 +00:00
Campbell Barton
c8da0d01d4 style cleanup: whitespace 2012-05-11 16:11:52 +00:00
Campbell Barton
713a517f40 add missing NULL of scene->ed 2012-05-11 14:27:55 +00:00
Campbell Barton
3bbfbfe4b1 dont use sdl include when building headless 2012-05-11 14:17:49 +00:00
Campbell Barton
96cc298086 edits to recent sequencer api additions not to do scene lookups, the scene is already known. 2012-05-11 11:05:48 +00:00
Campbell Barton
b667f29a84 no need to clamp python values twice when assigning. 2012-05-11 10:25:12 +00:00
Campbell Barton
a2e225277f sequencer bug, was possible to add strips to negative channels, the channel clamping was ignored when calling RNA_property_int_set() when setting operator int/floats. 2012-05-11 10:20:35 +00:00
Campbell Barton
6ce6dfba16 - dont create scene.sequence_editor on read, means data-browser or autocomplete will allocate a sequencer.
... instead add scene.sequencer_editor_create / clear, these match id.animation_data_* functions.

- refactor for names, for scene level functions call them BKE_sequencer_*
2012-05-11 10:04:55 +00:00
Lukas Toenne
9d91bc38d3 A couple more changes to the file and image nodes to improve access to layers that don't follow Blender's rlayer.rpass naming scheme.
--- Changes to File Output node ---
* Flat layer names in EXR multilayer files.

 For a socket with name "AAA" the previous resulting EXR layer name would be "AAA.AAA", i.e. the render layer as well as render pass would use the socket name.

 Now the "render_layer.render_pass" scheme is ignored in multilayer files, socket names are directly written to EXR layers (EXR layer name is "AAA" in this example). If sockets should have a notion of "render layer" this can still be achieved by explicitly adding a separator, e.g. "AAA.BBB". When loading such layers into a Blender Image struct, the name is interpreted as a "render_layer.render_pass" again (although the image node does not care about it, see below).

* Socket sub-paths (for singlelayer) or layer names (for multilayer) are stored in dedicated string variables in the socket storage data. This way the RNA can define precise string subtypes (PROP_FILEPATH) and length. The file/layer slots are defined as separate structs with own name properties in the RNA as well, so they can be used nicely with the list template.

* Ensure unique socket paths/layer names to prevent overwriting of files and layers respectively.

--- Changes to Image node ---
* Loading multilayer OpenEXR files has improved layer name splitting into render layer + render pass names now. This properly supports arbitrary EXR layer names now.
  Example:

 OpenEXR layer name:   AAA.BBB.CCC

 is split into

 Render layer name:    AAA.BBB
 Render pass name:     CCC

 If the layer name has no '.' separators the render layer name is empty.

* Image node ignores the selected render layer in the image user data. Instead all existing layers are displayed at the same time by combining the render layer names with render pass names again, to reconstruct the original EXR layer name. This avoids the problem that render layers with empty name are not selectetable in the dropdown and allows using all image layers at the same time without duplicating the node.
2012-05-11 08:06:01 +00:00
Campbell Barton
ce17c35240 style cleanup: mainly sculpt/whitespace 2012-05-11 08:05:47 +00:00
Sergey Sharybin
dabc22826d Compilation error fix: abort() wasn't declared in BKE_ccg.h before 2012-05-11 05:27:23 +00:00
Brecht Van Lommel
8148d7b1df Cycles: reviewed the task scheduler code and fixed (hopefully all) windows threading problems. 2012-05-10 22:31:16 +00:00
Nicholas Bishop
d35d0e38ce Add mask-drawing support to GPU_Buffers.
This is the last commit of the sculpt masking merge. Documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/PaintMasks

Thanks to Brecht for reviewing!

* For VBO, add color to the VertexBufferFormat structure as three
  unsigned bytes. Since mask elements are scalar the three color
  components are identical to eachother, but the fixed-function OpenGL
  pipeline requires colors to be either three or four components.

* For the same reason, multires VBO drawing now copies into the
  VertexBufferFormat format as well.

* Regression: material colors will not show up correctly now, masks
  colors are overriding. Not sure how to fix this nicely (would be
  much easier to fix if drawing with vertex shaders.)

* Also, masks will only draw PBVH drawing, so only 'solid' drawing
  will work correctly with masks.
2012-05-10 20:36:34 +00:00
Nicholas Bishop
3ee0305ebb Use VertexBufferFormat for multires VBO. 2012-05-10 20:36:24 +00:00
Nicholas Bishop
ee9f917f08 Add keymap and menu entries for masking.
* Add CTRL+IKEY to invert the mask.

* Add ALT+MKEY to clear the mask.

* Change the 'Hide' menu in sculpt mode to 'Hide/Mask', adds entires
  for clearing, filling, and inverting the mask, as well as hiding
  masked regions.
2012-05-10 20:36:13 +00:00
Nicholas Bishop
415d346db6 Add support for hiding masked regions.
Add a new mode, PARTIALVIS_MASKED, to the PAINT_OT_hide_show operator.
2012-05-10 20:36:01 +00:00
Nicholas Bishop
5cb08c47c5 Add a paint mask operator to clear, fill, or invert the mask. 2012-05-10 20:35:51 +00:00
Nicholas Bishop
919b363d13 Update the keymap for the mask brush.
* Add MKEY as a toggle for the mask brush. We could use ALT similar to
  SHIFT toggling the smooth brush, but it would conflict with MMB
  emulation (not to mention many window managers.)

* When the mask brush is active, SHIFT toggles it into smooth mode.
2012-05-10 20:35:41 +00:00
Nicholas Bishop
c8465eb42c Add mask brush for sculpt mode.
The mask brush currently has two modes, 'draw' and 'smooth'.
2012-05-10 20:35:32 +00:00
Nicholas Bishop
450bb3afcb Add new mask-brush icon from Julio Iglesias. 2012-05-10 20:35:12 +00:00
Nicholas Bishop
72de988d0f Use paint mask when calculating sculpt strength. 2012-05-10 20:34:54 +00:00
Nicholas Bishop
41b5206270 Add undo/redo support for paint masks. 2012-05-10 20:34:47 +00:00
Nicholas Bishop
c9c0bfeeb8 Ensure mask layers are always present in sculpt mode. 2012-05-10 20:34:35 +00:00
Nicholas Bishop
0f57b0f1e5 Copy GridPaintMask to vertex paint mask when applying multires.
Adds new subsurf_copy_grid_paint_mask() function similar to
subsurf_copy_grid_hidden().
2012-05-10 20:34:23 +00:00
Nicholas Bishop
f4929ad609 Add mask support to CCGSubSurf and multires.
* Add new CCG function ccgSubSurf_setAllocMask(). Similar to to
  ccgSubSurf_setCalcVertexNormals(), it sets whether the CCG elements
  have a mask layer and what that layer's offset is. Unlike normals
  however, it doesn't change any behavior during CCG calculation; it's
  there only to give CCGKey information on the mask.

* Add a new flag to _getSubSurf(), CCG_ALLOC_MASK. If set, space for
  an extra layer is allocated, but the number of CCG layers is not set
  to include it. This is done because GridPaintMasks are absolute,
  rather than being relative to the subdivided output (as MDisp
  displacements are), so we skip subdividing paint masks here.

* Add a new flag to subsurf_make_derived_from_derived(),
  SUBSURF_ALLOC_PAINT_MASK. This controls whether CCG_ALLOC_MASK is
  set for _getSubSurf(). Related, masks are never loaded in during
  ss_sync_from_derivedmesh(). After subdivision is finished, if the
  alloc mask flag is set, the number of CCG layers is increase to 4
  with ccgSubSurf_setNumLayers().

* Add a new flag to multires_make_from_derived(),
  MULTIRES_ALLOC_PAINT_MASK. Not all multires functions need paint
  mask data (e.g. multiresModifier_base_apply.) This flag is always
  set in MOD_multires.c so that subdividing a mesh with a mask updates
  properly even when not in sculpt mode.

* Update multiresModifier_disp_run() to apply, calculate, and add mask
  elements. It's almost the same as the existing operations with xyz
  coordinates, but treats masks as absolute rather than displacements
  relative to subdivided values.

* Update multires_customdata_delete to free CD_GRID_PAINT_MASK in
  addition to CD_MDISPS.

* Update multires_del_higher() to call the new function
  multires_grid_paint_mask_downsample(), which allocates a
  lower-resolution paint mask grid and copies values over from the
  high-resolution grid.
2012-05-10 20:34:08 +00:00
Nicholas Bishop
4c66616f44 Add GridPaintMask accessor to paint.c. 2012-05-10 20:33:55 +00:00
Nicholas Bishop
4a149bcb66 Add paint mask access to the PBVH vertex iterator. 2012-05-10 20:33:45 +00:00
Nicholas Bishop
f95f558a8c Add access to mesh vertex customdata to the PBVH. 2012-05-10 20:33:36 +00:00
Nicholas Bishop
aa77bbd38d Add DNA and customdata entries for paint masks.
CD_PAINT_MASK is a layer of per-vertex floats for non-multires
meshes. Multires meshes use CD_GRID_PAINT_MASK, which is a layer of
per-loop GridPaintMask structures. GridPaintMask is similar to MDisp,
but contains an array of scalar floats.

Note: the GridPaintMask could be folded into MDisp, but this way
should be easier to add mask layers in the future (if we do fold
GridPaintMask into MDisp, the mask array should probably be an array
of arrays with a 'totmask' field so that mask layers can be easily
supported.)

Includes blenload read/write support for CD_PAINT_MASK and
CD_GRID_PAINT_MASK.
2012-05-10 20:33:24 +00:00
Nicholas Bishop
f751d0f6ae Replace hardcoded DMGridData structure with CCGElem/CCGKey.
* Changes to DerivedMesh interface: DMGridData has been removed,
  getGridData() now returns an array of CCGElem pointers. Also added
  getGridKey() to initialize a CCGKey (implemented only by
  CCGDerivedMesh.)

* PBVH: added BLI_pbvh_get_grid_key().

* A lot of code is affected, but mainly is just replacing
  DMGridData.co, DMGridData.no, and sizeof(DMGridData) with the
  CCG_*_elem functions, removing the reliance on grid elements of
  exactly six floats.
2012-05-10 20:33:09 +00:00
Nicholas Bishop
2ca64189b7 Add CCGKey/CCGElem for accessing CCGSubSurf elements.
CCGKey caches information about the CCGSubSurf element layout. This
data, along with the CCG_* inline functions, allows access to
CCGSubSurf elements with an arbitrary number of layers (as opposed to
the hardcoded DMGridData structure which assumes xyz coordinates
followed by three normal components.)

The CCGElem structure is declared but not defined anywhere, just used
as a convenient type.
2012-05-10 20:32:51 +00:00
Nicholas Bishop
dcacbc25bc Modify CCGSubsurf to subdivide an arbitrary number of (float) layers.
The layout of vert data in CCGSubSurf is almost the same; previously
it was three floats (for xyz coordinate) optionally followed by three
floats for the normal. The only change is that the first three floats
can now be any number of floats.

* _getSubSurf takes a numLayers parameter to set the number of layers,
  stored in CCGMeshIFC.numLayers.

* All calls to _getSubSurf currently have numLayers set to 3, except
  for UV subsurf, where it is reduced to 2 (with a corresponding
  change when reading the results out to use float (*)[2] rather than
  float (*)[3].)

* The various VertData* macros in CCGSubSurf.c are now functions that
  take a CCGSubSurf pointer, which provides access to CCGMeshIFC,
  which has numLayers.

* Add ccgSubSurf_setNumLayers() to the API. Only changes the number of
  layers that get subdivided, doesn't change the amount of memory
  allocated. So if space for N layers is allocated, it's safe to set
  the number of layers to less than N, but not more.

* The rest of the changes are just adding the 'ss' parameter.
2012-05-10 20:32:41 +00:00
Nicholas Bishop
147b4b13ba Add new options to PAINT_OT_brush_select, toggle and create_missing.
The toggle option, if enabled, will toggle back and forth between two
brushes. (The first brush of the desired tool type will be toggled to,
running the toggle again switches back to the previously selected
brush.)

If no brush of the desired type is found, and the create_missing
option is enabled, a new brush of that type will be created and set.
2012-05-10 20:32:31 +00:00
Nicholas Bishop
26ce1018cd Add an RNA access function to get an enum item name from its value.
New function is RNA_enum_name_from_value.
2012-05-10 20:32:21 +00:00
Nicholas Bishop
3794ad5e14 Code cleanup for multires_dm_create_from_derived().
Changed name to multires_make_derived_from_derived() and parameter
order to be more similar to subsurf_make_derived_from_derived().

Added MultiresFlags enum with flag values to replace the local_mmd and
useRenderParams parameters.
2012-05-10 20:32:09 +00:00
Nicholas Bishop
6dbfbabcd6 Code cleanup for parameters of subsurf_make_derived_from_derived.
This is the first commit of the sculpt masking merge. Documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/PaintMasks

Thanks to Brecht for reviewing!

Replaced four boolean parameters with a single flag and a new enum,
SubsurfFlags.
2012-05-10 20:31:55 +00:00
Brecht Van Lommel
072a882d03 Fix #31379: cycles not recognizing 16 bit tiff as float image. 2012-05-10 17:09:36 +00:00
Sergey Sharybin
591a091003 Fix #31221: Multiple Monitors/Windows Double Click For Focus
Window might be focused by mouse click in configuration of window manager
when focus is not following mouse.
Click could have been done on a button and depending on window manager settings
click would be passed to blender or not, but in any case button under cursor
should be activated. Currently the easiest way to activate button is to
generate mouse move event.

Not sure about OSX, but on windows it worked fine because OS is generating
WM_MOUSEMOVE event "automatically" so nothing special from blender side was
needed.
2012-05-10 15:34:23 +00:00
Campbell Barton
f3d721aa93 minor changes to sequencer api
- rename seqelements.push(file) --> filename
- rename SoundSequence.waveform --> show_waveform
- dont pass context to sequencer functions. editing any scenes sequence can be done, irrespective of context.
2012-05-10 15:32:01 +00:00
Sergey Sharybin
582aef8162 Fix #31393: Shape Keys on curves with hooks
Own mistake when was fixing #30561 - handles ARE included in shape keys
2012-05-10 15:28:35 +00:00
Campbell Barton
ffe7d668ff style cleanup: sequencer and scene rna 2012-05-10 15:22:29 +00:00
Campbell Barton
efde4dbba8 patch [#30871] VSE py-api
from Dan Eicher (dna)

--- message from the tracker

Classes for all effect types with proper input attributes

Added new/delete functions for SequenceEditor.sequences.

push/pop functions for ImageSequence.elements to add/remove images

Moved waveform from the base class to SoundSequence (probably should be renamed use_waveform or show_waveform)

Fixed user count for scene and movie clip types

--- my own comments

- dont have blending mode argument from sequencer.new_*() functions. Better edit this after.

- dont change waveform attribute, seems unrelated change and should be kept for sound afaik.

- dont apply scene, clip usercount changes - Sergey dealt with these separately.
2012-05-10 15:10:51 +00:00
Antony Riakiotakis
f91fa9d2ce Enable ffmpeg building with MinGW-w64. The libraries were compiled with gcc 4.7, however is has been claimed there are issues with gcc > 4.4 so this is for testing purposes. Still it doesn't crash on startup anymore. Forgot to mention on ffmpeg lib commit that committed ffmpeg version is 0.10.2 2012-05-10 11:37:41 +00:00
Sergey Sharybin
4bf0e61de2 Style cleanup: use 2 spaces for indentation in bundle scripts 2012-05-10 11:17:15 +00:00
Sergey Sharybin
cc5f18693f Carve and libmv bundling scripts: should work with svn checkout now 2012-05-10 11:08:25 +00:00
Sergey Sharybin
89b61e5430 Bundle updated version of carve. Should be no functional changes, small code cleanup 2012-05-10 11:00:02 +00:00
Sergey Sharybin
b73307471f Synchronize libmv with changes in git branch 2012-05-10 10:39:28 +00:00
Campbell Barton
4effdf4aff fix [#31382] Loop Cut and Slide numpad (-)
investigation lead to finding 3 bugs here...
- transform key input handling didnt ignore minus key on an unsigned value as it should.
- not being able to set numcuts to 0 made typing in numbers not very useful.
- backspace would set the cuts to an unsigned value.
2012-05-10 07:10:39 +00:00
Campbell Barton
caba2601ea fix for fix, own fix for [#31368] didnt work right, now move shadeless & wire paint drawing into draw_mesh_paint(). 2012-05-10 06:32:24 +00:00