Commit Graph

182 Commits

Author SHA1 Message Date
Dalai Felinto 3abe8b3292 Rename any instance of scene layer or render layer in code with view layer
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.

* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started

Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.

Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D2927
2017-11-23 07:48:23 -02:00
Campbell Barton 1b462e5a51 Pass EvaluationContext instead of bContext
2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.

Also use const to prevent unexpected modifications.

This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
2017-08-16 12:46:04 +10:00
Bastien Montagne 41830cc432 Refactor ID copying (and to some extent, ID freeing).
This will allow much finer controll over how we copy data-blocks, from
full copy in Main database, to "lighter" ones (out of Main, inside an
already allocated datablock, etc.).

This commit also transfers a llot of what was previously handled by
per-ID-type custom code to generic ID handling code in BKE_library.
Hopefully will avoid in future inconsistencies and missing bits we had
all over the codebase in the past.

It also adds missing copying handling for a few types, most notably
Scene (which where using a fully customized handling previously).

Note that the type of allocation used during copying (regular in Main,
allocated but outside of Main, or not allocated by ID handling code at
all) is stored in ID's, which allows to handle them correctly when
freeing. This needs to be taken care of with caution when doing 'weird'
unusual things with ID copying and/or allocation!

As a final note, while rather noisy, this commit will hopefully not
break too much existing branches, old 'API' has been kept for the main
part, as a wrapper around new code. Cleaning it up will happen later.

Design task : T51804
Phab Diff: D2714
2017-08-07 20:34:36 +02:00
Bastien Montagne 9da7dfa158 Refactor ID copying (and to some extent, ID freeing).
This will allow much finer controll over how we copy data-blocks, from
full copy in Main database, to "lighter" ones (out of Main, inside an
already allocated datablock, etc.).

This commit also transfers a llot of what was previously handled by
per-ID-type custom code to generic ID handling code in BKE_library.
Hopefully will avoid in future inconsistencies and missing bits we had
all over the codebase in the past.

It also adds missing copying handling for a few types, most notably
Scene (which where using a fully customized handling previously).

Note that the type of allocation used during copying (regular in Main,
allocated but outside of Main, or not allocated by ID handling code at
all) is stored in ID's, which allows to handle them correctly when
freeing. This needs to be taken care of with caution when doing 'weird'
unusual things with ID copying and/or allocation!

As a final note, while rather noisy, this commit will hopefully not
break too much existing branches, old 'API' has been kept for the main
part, as a wrapper around new code. Cleaning it up will happen later.

Design task : T51804
Phab Diff: D2714
2017-08-07 16:39:55 +02:00
Luca Rood 1c4c288727 Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
2017-07-21 14:47:26 +02:00
Sergey Sharybin e5ee6cb448 Depsgraph: Remove meaningless comment
We are already on the new depsgraph only for quite some time now.
2017-07-12 11:08:51 +02:00
Luca Rood 913e9350a5 Convert BaseLegacy to Base (part) 2017-04-24 16:09:04 +02:00
Bastien Montagne 3e9ade6e31 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/depsgraph.c
	source/blender/blenkernel/intern/library_query.c
2017-01-31 10:47:43 +01:00
Bastien Montagne b5682a6fdd Cleanup: use 'cb_flag', not 'cd_flag' for library_query callbacks.
`cd_flag` tends to be used for CustomData flags in mesh area, while for
library_query those are rather callback flags...
2017-01-31 10:41:25 +01:00
Sergey Sharybin 5be2a62ca3 Merge branch 'master' into blender2.8 2017-01-24 14:56:56 +01:00
Sergey Sharybin b6ccba9241 Fix typo in comment 2017-01-24 14:56:35 +01:00
Sergey Sharybin 218b06eb83 Depsgraph: Remove legacy updateDepgraph callbacks from modifiers 2017-01-24 12:49:23 +01:00
Lukas Tönne 6ecab6dd8e Revert particle system and point cache removal in blender2.8 branch.
This reverts commit 5aa19be912 and b4a721af69.

Due to postponement of particle system rewrite it was decided to put particle code
back into the 2.8 branch for the time being.
2016-12-28 17:30:58 +01:00
Bastien Montagne faec430914 Merge branch 'master' into blender2.8
Conflicts:
	intern/cycles/blender/blender_curves.cpp
	source/blender/blenkernel/intern/dynamicpaint.c
	source/blender/blenkernel/intern/particle.c
	source/blender/blenloader/intern/versioning_270.c
	source/blender/editors/physics/particle_edit.c
	source/blender/editors/transform/transform_snap_object.c
	source/blender/editors/util/undo.c
	source/blender/makesrna/intern/rna_object_force.c
2016-05-24 16:48:10 +02:00
Philipp Oeser 7a8bd2eaea Fix T47737: Lattice crashes w/ smooth modifier
Add flag for modifiers that support lattice
2016-05-18 22:46:29 +10:00
Lukas Tönne d8d49befa0 Removed particle system and particle instance modifiers. 2016-04-13 11:45:15 +02:00
Bastien Montagne f375028a25 Modifiers: add 'cd_flag' parameter to their ID looping callbacks, needed
since some IDs (objects) are not 'refcounted' while others (textures) are...

Partial merge from id-remap branch.
2015-10-08 15:05:37 +02:00
Bastien Montagne e5552f8241 Cleanup: use proper `ObjectWalkFunc` typedef in modifiers' object callback func.
Also, fix own stupidity, no need to define ID callback in case we only have objects,
calling code knows to fallback to `foreachObjectLink()` when `foreachIDLink()` is missing...
2015-10-05 15:57:10 +02:00
Sergey Sharybin 3d36489672 OpenSubdiv: Commit of OpenSubdiv integration into Blender
This commit contains all the remained parts needed for initial integration of
OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU
backends which works in the following way:

- When SubSurf modifier is the last in the modifiers stack then GPU pipeline
  of OpenSubdiv is used, making viewport performance as fast as possible.

  This also requires graphscard with GLSL 1.5 support. If this requirement is
  not met, then no GPU pipeline is used at all.

- If SubSurf is not a last modifier or if DerivesMesh is being evaluated for
  rendering then CPU limit evaluation API from OpenSubdiv is used. This only
  replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG
  structures exactly the same as they used to be for ages now.

This integration is fully covered with ifdef and not enabled by default
because there are several TODOs to be solved first:

- Face varying data interpolation is not really cleanly implemented for GPU
  in OpenSubdiv 3.0. It is also not implemented for limit evaluation API.

  This basically means we'll have really hard time supporting UVs.

- Limit evaluation only works with adaptivly subdivided meshes so far, which
  basically means all the points of CCG are pushed to the limit. This gives
  different result from old code.

- There are some serious optimizations possible on the topology refiner
  creation, which would speed up initial OpenSubdiv mesh creation.

- There are some hardcoded asumptions in the GPU and DerivedMesh areas which
  could be generalized.

  That's something where Antony and Campbell can help, making it so the code
  is structured in a way which is reusable by all planned viewport projects.

- There are also some workarounds in the dependency graph to make sure OpenGL
  buffers are only freed from the main thread.

Those who'll be wanting to make experiments with this code should grab dev
branch (NOT master) from

  https://github.com/Nazg-Gul/OpenSubdiv/tree/dev

There are some patches applied in there which we're working on on getting
into upstream.
2015-07-20 22:29:26 +02:00
Sergey Sharybin bac7353801 Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:

- More granular dependency relation nature, which solves issues with fake cycles
  in the dependencies.

- Move towards all-animatable, by better integration of drivers into the system.

- Lay down some basis for upcoming copy-on-write, overrides and so on.

The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.

It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.

There are number of assorted documents related on the design of the new system:

* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph

There are also some user-related information online:

* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/

Kudos to everyone who was involved into the project:

- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
  project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
  issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 16:06:37 +05:00
Campbell Barton 268524c025 Cleanup: use const for typeinfo 2015-03-30 21:18:49 +11:00
Campbell Barton b1d758ae6b Cleanup: redundant struct declarations 2015-03-29 03:56:39 +11:00
Sergey Sharybin aa4cb95a5c Pass proper bmain to the updateDepgraph() of modifiers
This is mainly to make physics modifiers being able to work
with it. For other cases this main is not needed.
2015-03-13 12:03:23 +05:00
Sergey Sharybin 67fa545ed0 Make modifier_unique_name return whether modifier was renamed or not 2015-02-13 13:46:51 +05:00
Sergey Sharybin 20550d6f7f Fix T40582: issues with apply scale when having multires and scene simplify
Reshape and applying scale matrix on multires needs to create DM with simplify
setting disabled. Added a special flag to modifier apply for this now.
2014-06-12 13:49:46 +06:00
Campbell Barton 7b7196e3ad Code cleanup: modifier_skin_customdata_ensure was a bad level call 2014-03-16 21:55:30 +11:00
Campbell Barton 2097e621ed Code cleanup: use r_ prefix for return args 2014-03-16 03:26:23 +11:00
Campbell Barton 158b4e61a0 Mesh Modifiers: refactor copying using a generic function 2013-12-22 04:37:26 +11:00
Thomas Dinges f372758257 Interface / Modifiers: Don't show cage placeholder in modifier header, if the current modifier does not support it or the cage is disabled (like Subsurf 0).
This way we save some space but still avoid the jumping around while changing settings in the header itself.

Thanks to Brecht for help on this. :)
2013-12-13 20:57:54 +01:00
Bastien Montagne b375388959 Fix [#37266] Skin modifier can't be copied.
Patch by Martin Felke, many thanks.

When copying that modifier across objects, we also have to ensure that a skin CDLayer is present in dest objects (just as when adding it).
2013-11-01 08:31:36 +00:00
Campbell Barton 9794c70f65 modifiers_isCorrectableDeformed now checks a modifier is enabled before returning true,
also check deformMatricesEM callback for modifier_isCorrectableDeformed() rather then checking modifier types.
2013-09-24 00:56:47 +00:00
Sergey Sharybin 35b61a7512 Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.

Makes code easier to follow and allows to manage special
attributes in more efficient way.

Thanks Campbell for review!
2013-09-01 15:01:15 +00:00
Sergey Sharybin beffaa293e Made modifiers_getVirtualModifierList safe for threading
Move static variables to context filling in by this fcuntion
and owned by a callee function. This ensures no conflicts
between threads happens because of static variables used in
this function.

Also moved modifier types and virtual modifiers data to a
function called from creator. This is needed to be sure all
the information is properly initialied to the time when
threads starts to use this data.

--
svn merge -r57899:57900 ^/branches/soc-2013-depsgraph_mt
2013-08-19 09:05:34 +00:00
Campbell Barton 418011907c remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h 2013-07-02 10:14:59 +00:00
Campbell Barton d9ec2efe8f move modifier callback wrappers into modifier.c 2013-06-19 08:00:20 +00:00
Campbell Barton 532503e0cb fix for problem with creating weight-paint preview.
In the case where the modifier stack didnt need deform-verts to calculate,
they would not be available for the preview either.

This fixes a bug caused by r57206 which set mirror to preview so the mirrored
weights would be displayed, but it only worked when there was an armature after it, see [#35545].
2013-06-13 00:33:48 +00:00
Campbell Barton e648ca8862 use booleans for modifiers and api callbacks. 2013-06-02 03:59:19 +00:00
Brecht Van Lommel 4a4f091155 Fix #35174: dynamic paint displacement missing in render.
A previous bugfix disabled the dynamic paint modifier for orco texture
coordinate evaluation of the modifier stack. However the MOD_APPLY_USECACHE
flag is not a good way to check if the modifier is evaluated for orcos.

Instead I've added a MOD_APPLY_ORCO flag. Also removed a bunch of
applyModifierEM callbacks, none of them served a purpose except for the
subsurf modifier.
2013-05-02 14:42:05 +00:00
Miika Hamalainen 511e3466da Fix [#35110]: Dynamic Paint does not paint accurately in baked "Image Sequence" on Armature-Posed-Mesh
Dynamic Paint was also being calculated during "orco" mesh generation, causing image sequence baking to use orco derived mesh instead. This likely affected vertex type surfaces too in some cases.
2013-04-29 15:02:54 +00:00
Campbell Barton 11ffc7f5c2 remove modifiers_indexInObject(), just call BLI_findindex directly. 2012-12-15 05:46:41 +00:00
Campbell Barton d94b2efbb9 disable applying constructive modifiers when in sculpt mode with multi-res data, since this would crash.
also rename modifier_sameTopology -> modifier_isSameTopology(), modifier_nonGeometrical -> modifier_isNonGeometrical()
2012-11-13 14:21:55 +00:00
Joshua Leung 04f063de84 Parenting an object to a deformer (armature/curve/lattice) will now attempt to
check if the object is already parented to said deformer before trying to add a
new modifier

This should help reduce the number of cases where users inadvertantly end up
creating multiple deform modifiers pointing to the same object, which has been
known to be a cause of "double-transform" artifacts.

Note that this is only able to detect these cases by checking if the parent
object is selected, so this will only really work for the Ctrl-P shortcut where
you have to select both objects first. However, it shouldn't be a problem either
in the Outliner (drag and drop), as the object probably won't be a child of its
parent already if you're doing this.
2012-10-15 03:16:38 +00:00
Daniel Genrich 958cf139f6 Bugfix Smoke / DynamicPaint: Missing update call from depsgraph was missing when force fields were used. 2012-07-04 16:55:17 +00:00
Campbell Barton 9892736206 code cleanup: header cleanup and remove some duplicate defines. 2012-05-12 20:39:39 +00:00
Bastien Montagne 318b44fe5d Refactor of modifiers' apply function: now use a single bit-flag parameter to pass options, instead of having one parameter per boolean flag (i.e. replaces current useRenderParams and isFinalCalc by a single ModifierApplyFlag flag. ModifierApplyFlag is an enum defined in BKE_modifier.h). This way we won't anymore have to edit all modifier files when e.g. adding a new control flag!
Should have no effect over modifier behavior.
2012-05-09 15:00:26 +00:00
Nicholas Bishop 47cd3d4b8e Fix for truncation of 64-bit CustomDataMasks.
Can't use GET_INT_FROM_POINTER anymore with CD masks, as this
truncates to 32-bit.

Bug: http://projects.blender.org/tracker/index.php?func=detail&aid=30680&group_id=9&atid=498
CR: http://codereview.appspot.com/5905059/
2012-03-26 16:25:21 +00:00
Bastien Montagne 9751653410 Renaming CD_WEIGHT_MCOL/MLOOPCOL and their masks from WEIGHT to PREVIEW, as this layer is now also used for various preview tasks in Object mode.
“Cleanup” commit, no functional changes.
2012-03-22 08:41:50 +00:00
Campbell Barton 95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
Campbell Barton a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
Campbell Barton 48006292d8 svn merge ^/trunk/blender -r44189:44204 2012-02-17 20:56:25 +00:00
Campbell Barton 2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Bastien Montagne 6eb0ca9385 Merged with trunk (-r43609:43611): updated modifier preview.
Noted preview code for DynamicPaint is currently disabled, will see if I can re-enable it…
2012-01-22 20:05:26 +00:00
Bastien Montagne 1a93d88343 Add weight preview to WeightVG modifiers, and first, simple/basic refactor of how modifiers can generate preview.
User side:
* Preview for DynamicPaint should keep the same behavior (for now). Weight preview should be somawhat quicker, though.
* Preview for WeightVG modifiers is only active in WeightPaint mode, and if the affected vgroup is the active one.
* Last active preview modifier in stack wins!

Note: that modifier preview topic is yet to be further refined, quite raw/incomplete for now.

Dev side:
* In draw code, renamed DRAW_DYNAMIC_PAINT_PREVIEW flag to DRAW_MODIFIERS_PREVIEW
* Removed use of MOD_DPAINT_PREVIEW_READY in DynamicPaint code (seems unecessary, and if it was, should be of more general scope).
* Added eModifierTypeFlag_UsesPreview to ModifierTypeFlag, for modifiers that can generate some preview data.
* Added three new modifier funcs, to handle preview modifiers in draw code / mod stack.
* For weights preview: added the generic DM_update_weight_mcol func, which can update WEIGHT_MCOL layer with either a given array of weights (currently used by DynamicPaint only), or from current active vgroup(s).

So now, draw code is fully generic (i.e. no more modifier-type checking in it). Mod stack code is generic to some extent, but will need more work.
2012-01-22 17:54:23 +00:00
Campbell Barton 1fef05084e svn merge ^/trunk/blender -r42761:42776 2011-12-20 22:08:24 +00:00
Bastien Montagne 738fdc7b6f New modifier type: eModifierTypeType_NonGeometrical, for modifiers affecting CustomData layers only (e.g. UVProject and WeightVG ones).
Also, allow applying to obdata those modifiers, even with shapekeys, but do not allow applying them *as* shapekey (as shapekeys do not have CD layers).

Fix [#29636] Vertex Weight Mix modifier "apply" button don't work.

Note: applying whit shape keys currently always uses base shape, not current one (for apply to obdata as well as apply to shapekey), but this is another topic...
2011-12-20 14:15:59 +00:00
Campbell Barton 8eb41f0fdb svn merge ^/trunk/blender -r41998:42009 2011-11-20 16:05:51 +00:00
Campbell Barton f1eb66aa68 share code for fluidsim, ocean & dynamic paint file paths.
- use BLI_join_dirfile for joining all paths (no need to ensure slash is appended).
- paths from linked library files now supported.
2011-11-20 14:38:11 +00:00
Campbell Barton 15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton 55a560c0c4 svn merge -r39286:39385 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-08-16 06:30:14 +00:00
Brecht Van Lommel c265a686d8 Modifiers: add callback to loop over each texture assigned to a modifier. 2011-08-12 18:11:22 +00:00
Joseph Eagar c98148a963 =bmesh= merge from trunk at r36153 2011-04-15 01:19:13 +00:00
Campbell Barton 2e5eb41522 pedantic warning cleanup, also remove texspace_edit() since its been added using a different method. 2011-02-27 08:31:10 +00:00
Joseph Eagar f01261d040 merge with/from trunk at r35190 2011-02-27 06:19:40 +00:00
Nathan Letwory 22638e22ea doxygen: blenkernel under core as module. 2011-02-18 13:05:18 +00:00
Sergey Sharybin 329e2d8037 Todo issue: sculpting on deformed mesh
Used a crazyspace approach (like in edit mode), but only modifiers with
deformMatricies are allowed atm (currently shapekeys and armature modifiers only).
All the rest modifiers had an warning message that they aren't applied because
of sculpt mode. Deformation of multires is also unsupported.

With all this restictions users will always see the actual "layer" (or maybe
mesh state would be more correct word) they are sculpting on.

Internal changes:
- All modifiers could have deformMatricies callback (the same as deformMatriciesEM but
  for non-edit mode usage)
- Added function to build crazyspace for sculpting (sculpt_get_deform_matrices), but it
  could be generalized for usage in other painting modes (particle edit mode, i.e)

Todo:
- Implement crazyspace correction to support all kinds of deformation modifiers
- Maybe deformation of multires isn't so difficult?
- And maybe we could avoid extra bad-level-stub for ED_sculpt_modifiers_changed
  without code duplicating?
2011-01-31 20:02:51 +00:00
Campbell Barton 0271ad6322 Give functions that use printf style formatting GCC format attributes so if incorrect formatting is used the compiler will warn of this.
found & fixed 2x incorrect formatting args.
2010-12-04 11:44:56 +00:00
Campbell Barton 263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
Campbell Barton fbf208d63f add UNUSED() to modifiers, also removed some unused args. 2010-10-14 06:29:17 +00:00
Campbell Barton 81b6d308a7 [#23673] Modifier construction gives correct result in viewport but incorrect in render.
When there are 2+ consecutive deform modifiers, the second modifier was getting incorrect normals, this only showed up for the displace modifier since its the only deform modifier that uses vertex normals.

It would have been easy to fix this by always calculating normals on deform modifiers, but slow.

To fix this I added a function to check if a deform modifier needs normals, so the normal calculation function only runs if there are 2 modifiers in a row and the second uses normals.
2010-09-30 10:51:36 +00:00
Nicholas Bishop 4eaa10aa02 == Multires ==
Fixed bug #23657, "Modifiers dosen't work when you select diffrent mesh for object"

Multires modifier now adds empty mdisps if they're missing, rather than displaying a warning
Switching an object's mesh will now check for a multires modifier; if found the modifier's total number of levels are reset to match the mesh's mdisps
Switching the mesh also forces a multires update so that sculpted changes aren't lost
2010-09-09 00:14:51 +00:00
Joseph Eagar c11c196efa part 1 of merge from trunk at r30358; it compiles, but doesn't link quite yet :) 2010-07-19 04:44:37 +00:00
Brecht Van Lommel 08775e8f14 Mesh Deform Modifier: compress static binding weights better, threshold
is still set very low so in many cases it could be even smaller, but being
a bit conservative here to try to avoid breaking rigs.

This is not forward-compatible, i.e. loading new files in older blender
versions will loose the binding.
2010-04-23 11:19:06 +00:00
Matt Ebb 5c94896490 Fix [#22078] Cannot apply modifier in python (context error)
Previously all modifier operators relied on the buttons layout data context pointer to 
decide which modifier to work on. This meant that these operators would only work 
from from the properties panel, and not from scripting/macros or for operator redo.

This commit makes all modifier operators take the modifier name as an operator 
property, so the operators can be re-done or executed outside of the modifier panel. 
When invoking the operators from the modifier panel, they automatically fill in the 
operator property from context.

This isn't a perfect API design, but it does bring these operators in line with the design 
of being able to access all UI functionality via other means like scripts.
2010-04-22 01:55:10 +00:00
Campbell Barton 1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
Joseph Eagar 71003b9bcc merge with trunk at r27259 and commit of a patch by anthony jones to fix msvc (though further work may be needed because changes made by the merge 2010-03-09 04:32:40 +00:00
Campbell Barton 081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Brecht Van Lommel cbb23d96bb Added simplification back for quicker preview renders with less subdivision
levels, child particles, and shadow/SSS/AO quality.. Now also works on what
is displayed in the 3d view instead of only rendering, see panel in the scene
properties.

Most file changes were to make scene available in the isDisabled modifier
callback function.
2010-01-25 11:39:56 +00:00
Joseph Eagar 67ff197cb1 Merge with trunk/2.5 at r25563
Most likely will not compile for others, I'd appreciate any build errors
and missing files reports (I can never seem to get everything committed
and all the build systems working without help).

Porting over the sculpt/multires tools was a breeze,
thanks goes to brecht for a design that didn't exclude
ngons and was easy to port.

Note that I've not tested externally-backed multires
file support yet.  Also, I still need to write version
patch code for some cases.

Some notes:

* Like trunk, topological changes don't update multires right,
  so e.g. subdivide will duplicate multires data on the new faces,
  instead of subdividing it.
* If you set the debug value (ctrl-alt-d) to 1 it'll turn on
  my experiments in speeding up sculpting on higher-res multires
  meshes (but note it makes partial redraw not completely accurate).
* There's a bug where you have to go through editmode to get out
  of sculpt mode, not sure if I inherited or created this myself.
2010-01-05 22:33:41 +00:00
Brecht Van Lommel 6639ba6b86 Sculpt Branch:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r25180:25245
2009-12-09 15:24:55 +00:00
Matt Ebb 2ef0ee76a0 Fix for [#20249] duplicating a mesh in edit mode with a lattice modifier
Removed lattice and curve modifiers from being correctable for crazy space - it didn't work and was giving weird results.
2009-12-09 01:53:04 +00:00
Joseph Eagar abd16aac5a ok, apparently didn't commit this either. apparently includes a merge with trunk/2.5 at r24811 I thought I'd committed but did not, yeek. 2009-11-29 00:53:23 +00:00
Brecht Van Lommel 55d2a56d60 Sculpt:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r24483:24889
2009-11-25 17:51:16 +00:00
Brecht Van Lommel fffce6c554 Sculpt: Multires
* Displacement coordinates are now stored differently, as a grid per
  face corner. This means there is duplication of coordinates, especially
  at low subdivision levels, but the simpler implementation justifies it
  I think.
* ToDo: conversion of existing multires files (2.4x or 2.5x), loading them
  may even crash now.
* Editmode preservation/interpolation code also has not been updated yet.

* Multires now works on the CCGDerivedMesh grids instead of CDDerivedMesh,
  which should be more memory efficient.
* There are still bad memory peaks (if you're using 32bit) when subdividing
  or propagating displacements. Though at least there should be no huge
  memory blocks allocated, which windows is now to have trouble with.
* Still found some weird spike artifacts at lower multires levels, some also
  happening before this commit. Perhaps computation of tangents needs to be
  tweaked more.

* Multires modifier now has viewport, sculpt and render levels. Also the
  levels have been made consistent with subsurf, previously the same level
  of subdivision was one less for multires.
* Both multires and subsurf modifier now can have their subdivision level
  set to 0 for no subdivision.
2009-11-25 14:07:12 +00:00
Matt Ebb 8be7b757e3 * New option on modifiers that don't change topology: Apply as Shape
Rather than applying the modifier to the object data, it will create a new shape 
with the deformed vertices in there. Only mesh at the moment, other object 
types on the todo.
2009-11-22 13:44:09 +00:00
Joseph Eagar 2d0d4e7de4 commit before doing some hefty shapekey change, will break compilation 2009-11-01 00:06:53 +00:00
Joseph Eagar 8f788c64db merge with trunk/2.5 at r23876
[[Split portion of a mixed commit.]]
2009-10-22 23:22:05 +00:00
Brecht Van Lommel 3ffb695b10 Shape Keys
Blended shape keys can now be displayed & edited in edit mode. This
is much like showing an armature modifier in edit mode, and shape keys
now are a applied as a virtual modifier (for mesh & lattice only, curve
doesn't fit in the stack well due to tilt).

The main thing missing still is being able to switch between the active
shape key in edit mode, that's more complicated.. but the weights of
other shapes can be edited while in edit mode.

One thing to be careful about is that this does automatic crazyspace
correction, which means that if you edit a shape key with a low value,
the actual vertices will be moved to correct for that and actually move
a (potentially much) longer distance.

Also includes some UI tweaks, mainly placing some buttons horizontally
since the vertical list was getting too long.
2009-10-22 16:35:51 +00:00
Joshua Leung 9ebcd9c5e4 A few bugfixes:
* #19583: Keying Sets list issues
Deleting a Keying Set (or a Keying Set Path) set the active index to 0, but that would mean that the first item would be selected but not visible.

* #19590: Keyframing properties of a modifier with more than one of it's type the property will highlight in all
- Modifiers now always have a unique name, so renaming a modifier should check that the name is unique. Most of the files changed in this commit were just to make sure that modifiers got unique names when they were created
- Modifiers path getter was wrapped a bit wrong (missing the "s around the name)

* Constraints Bugs
- Constraints renaming now also makes sure the names stay unique
- Fixed (or attempted to fix) compiler warnings about some enum declaration for distance constraint
2009-10-09 09:48:04 +00:00
Joseph Eagar de7f08cc41 merge with 2.5 at r22793 2009-08-26 10:27:04 +00:00
Brecht Van Lommel 1be67b60fd 2.5: Modifiers & Menus
* Popup menus now remember the last clicked item again.
* Modifier and File Format menus are now organized in multiple
  columns with categories.
* Hook, explode, uv project modifiers have all their buttons
  again with the relevant operators implemented.
* Modifiers that can't be added by the user, or don't work on
  curves for example, are not in the menu anymore.
* Fix search menu overlapping buttons when near the bottom of
  the screen.
* Fix uv layers search menu not working in some modifiers.
* Cleanup popup menu code a bit, layout engine is used in more
  cases now instead of ugly position calculation code.
2009-08-21 02:51:56 +00:00
Joseph Eagar 38de6d14e4 merge with 2.5 (not trunk, last merge message said that on accident) at r22252 2009-08-06 09:56:14 +00:00
Campbell Barton 2a727083c9 fix for warnings and implicit declarations
also fixed smoke comparing a float's mem-location rather then its value.
2009-07-31 01:40:15 +00:00
Joseph Eagar 0b1649b2b8 merge with 2.5 at r21568 2009-07-16 06:27:37 +00:00
Brecht Van Lommel 093ff8202c 2.5: Physics Buttons
All kinds of changes to get it ready for UI layouts. This means RNA
and operators should be working correct, but most buttons are still
not actually there yet.

* Added near empty soft body, fluid, field and collision panels,
  tweaks to cloth panels.
* Fluid bake works, but without escape or showing any progress.
* Fluid/Softbody/Cloth/Collision can now be both added as modifiers
  or in the physics panels.
* Missing: fields & soft body for particles.
* Missing: proper updating softbodies, guess this code still needs
  updates after pointcache refactor?
2009-07-02 19:41:31 +00:00
Campbell Barton a1cf7988c1 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20855:20928
Sequencer changes from source/blender/src coming next
2009-06-16 14:21:58 +00:00
Brecht Van Lommel b8d0f62fd2 Fix for bug #18924: OpenGL performance issue with particle modifiers,
actually two modifier datamask optimizations that were never done.

* Don't use modifier data mask for disabled modifiers.
* Check if UV data is needed for particle system instead of always
  requesting it.
2009-06-15 11:48:42 +00:00
Joseph Eagar fc79b456fd merge with 2.5 at r20783 2009-06-10 19:15:27 +00:00
Daniel Genrich 934e3ddf0d Deform modifiers can now use useRenderParams and isFinalCalc in modifier stack as non-deforming and constructing modifiers can already - please check for problems or if i missed something 2009-05-31 17:20:57 +00:00
Joseph Eagar 0ba863de29 renamed BMTessMesh to BMEditMesh, did some more monkeywork, cleaned up the more serious warnings, and also non-backbuffered selection sortof works now, though it still needs plenty of work. 2009-05-18 08:46:04 +00:00