Commit Graph

417 Commits

Author SHA1 Message Date
c8c22d2cf6 rna: added lib.parent access and made filename editable. 2010-04-22 08:25:05 +00:00
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
582f1621e5 there were duplicate modifier init's, harmless but better remove. 2010-04-13 22:11:01 +00:00
9563a85242 more header cleanups 2010-04-12 01:09:59 +00:00
909493eac9 booleanops.c was moved to MOD_boolean_util.c, remove empty file. 2010-04-11 22:20:02 +00:00
3fdaf5cecc [#14437] Modifier Stack Refactor
patch by Ben Batt (artificer)

Updated patch for 6 or so modifiers added since the patch was written.

- tested with CMake and SCons
- fixed one error were flags were being added to the fluids type.
- remove BKE_simple_deform.h, simple_deform.c, move functions into MOD_simpledeform.c since there were problems with circular deps.
- moved some fluid and boolean functions used by modifiers too.
2010-04-11 22:12:30 +00:00
4d2f5a275d Solidify Modifier
- vertex normals were not being flipped (though faces are)
- rim faces didnt influence edge vertex normals

apply solidify on top of solidify modifier now works correctly
2010-04-10 22:12:10 +00:00
39d3ff135f no functional change
- convert solidify edge crease values into chars once rather then for each edge.
- sort vertex was checking the array all the time when it wasnt needed.
2010-04-08 16:08:06 +00:00
f1ac9b559e "Fix" for [#21591] Explode modifier bug
* The new default particle size is quite small, so exploded pieces didn't match the original pieces
* There's now an option to use the particle size (useful for some effects), but it isn't used by default
* This commit will change how some old files look (explode modifier and not 1.0 particle size), but the exact old behavior is achieved with the new "size" option
2010-04-06 08:43:52 +00:00
ba627ff40c svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r27867:27871 2010-03-31 07:28:23 +00:00
c9f81c87b8 bugfix [#21743] Incorrect Rim Normals with Screw mod and Solidify Mod on a Curve Object 2010-03-30 23:16:42 +00:00
71446eea57 * Multiply for panorama cameras
* Some cases of struct name being set where it shouldnt have been.
* Spelling: wich --> which
* Copy and initialize uv modifier scale, remove unneeded enum.
* Ability to pin any object into the context.
* Update uv window while transforming (useful when used with UVProject modifier)
* Patch by Wahooney, so new template's are internal text and dont get saved over
  by mistake.
* Fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186
  Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process
  /usr/bin/blender.bin was killed by signal 6 (SIGABRT). Original fix submitted
  by Jochen Schmitt.
* [#21816] bpy.data.add_image has stopped working on Windows. moved to
  bpy.data.images.load(), missed this call.

(commits 27726,27825,27828,27831,27832,27833,27834,27836,27837,27838,27839,27858 by Campbell from render25 branch)
2010-03-30 12:15:16 +00:00
052cb2afd2 Rest shape key for cloth option, this makes it possible
to specify different spring lengths.

Implementation is quite ugly because the shape key has to be pulled
through the modifier stack somehow, need a more flexible data mask
system to solve this properly.

(commits 27773,27775,27778 by Brecht from render25 branch)
2010-03-30 11:49:07 +00:00
751a9975e4 [#21802] UVProject Modifier Crash
fix for bug in recent addition of panorama support
2010-03-28 18:41:49 +00:00
57b2ea62ab Remove object type check in Cast Modifier deformation, was wrong now that Curves support modifiers.
Also fixes [#21742] Crashes when adding a Cast mod after a Screw mod on a Curve Object
2010-03-25 10:43:55 +00:00
8456995181 xaspect and yaspect were not working with uv project modifier & panorama, also removed some includes. 2010-03-24 16:20:13 +00:00
c76a069bd1 Panorama camera support for UV project modifier 2010-03-23 20:04:05 +00:00
a3ee78b885 Screw Modifier
flip the closing edge so when applied a second time it doesnt flip the closing ring of faces. (means you can make a torus from 1 vertex and 2 modifiers)
2010-03-22 12:09:39 +00:00
09b1c681e1 Sculpt Mode Bugfixes:
* #20833: layer brush doesn't work with multires.
* #20946: sculpt mode partially removes parts of the mesh in the viewport.
* #20420: grab brush stops after moving some distance.
* #20906: sculpt grab tool moves in wrong direction.
* #21132 and #21272: undo on object with subdivision surface modifier crashes.
* #21115: subsurf + multires + sculpting + undo causes crash.
* #20683: sculpt + multires apply + undo crash.
* #19094: wrong outline in solid mode.
2010-03-22 11:59:36 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
9b2dd9aac6 fixes for screw modifier
- steps for a closed screw was off  by 1
- screw offset wasnt being copied
2010-03-22 08:49:12 +00:00
fb9546746e Screw Modifier (old patch was called Lathe)
didnt commit this patch because curves are generally better to create a shape to lathe however now that curves can have modifiers applied to them I think its good to have this.

Added options to offset the lathe so it can work like the screw tool as well.

- optional object for axis which also controls the center point.
- screw offset so rather then just lathing this can work more like the screw tool.
- screw optionally using the object distance along the axis.
- iterations so the screw can be applied multiple times.

tested to work well with curves.
2010-03-22 00:22:52 +00:00
546ca400d8 removed unused includes, except for physics and particle related files 2010-03-21 13:42:25 +00:00
7da0c4c699 Fix #21599: Duplicating an object with solidify doesnt copy the flags correctly
Someone forgot to copy solidify modifier's flag.
2010-03-14 08:15:20 +00:00
f03a17d0f9 * Fix for crash using texture nodes in displace modifier
Modifier code was asking for filtered textures without sending derivatives. 
Disabled this and also checks for filtered/non-filtered.

Brecht, I assumed this was ok due to the existence of the p->osatex variable 
- if this isn't what you had in mind, please change or let me know :)
2010-03-09 00:35:05 +00:00
8d53f3f04e Enable "Build" modifier for curves/surfaces. 2010-03-07 10:40:52 +00:00
d0c70ad1d5 Constructive modifiers for curves and surfaces
Used approach with creating DerivedMesh for curves whet they've got such modifiers.

Available modifiers are: array, edge split, mirror, solidify, subsurf.
2010-03-05 16:47:52 +00:00
a9e3e0e40f Patch #21267 by Sergey Sharybin
His log:
There is a small typo in copy_curve(): there will be serious troubles 
if this functions is called for OB_FONT in edit mode (for my cases 
it is segmentation fault).
I think we should set editfont to NULL for cloned curves (as it is made 
for edit nurb).

This bug was found by trying to edit text with applied Cast modifier 
and while I was searching what's wrong, I've found that in 
castModifier_deformVerts() DerivedMesh is creating for all objects, 
but in castModifier_*_do() derived mesh is used only for OB_MESH 
objects. Maybe this place could be optimized a bit by skipping DM 
creation for non-meshes?
2010-02-27 16:06:33 +00:00
6afd97b9af multi-multi modifier support. 2010-02-24 15:03:28 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
d8c7f743ab Depsgraph: fix for old problem where dependencies would not get executed
properly on file loading. Some things get preserved on file save/load,
like object matrices and armature poses, but other things need to be remade
like derivedmeshes and displists. The latter were not tagged for recalc on
load causing them to be made on countall or redraw typically, so not in the
right order and dependencies on hidden layer were not done at all.

Now these get tagged for recalc and flags flushed on load. There shouldn't
be much if any slowdown on opening existing files, if there is it should be
fixable.
2010-02-07 10:00:27 +00:00
aefdec6ae2 Fix part of #20090: boolean modifier would lose link to object
if evaluation failed, it should display an error message instead.
2010-01-27 14:13:01 +00:00
246bcf48ad weight panel editing now supports mirroring
- use mirror when the option is enabled in editmode.
- fliped group names are used when they exist.
- only the setting that is edited will be applied to the mirrored verts group.
- copy value is applied to all mirrored verts of the selection.
- normalize normalizes all vgroups and mirrors.

utility functions defvert_sync and defvert_sync_mapped, similar to defvert_copy but does not remove existing groups and optionally creates groups as needed.
defvert_sync_mapped uses a an int array for mapping the flipped values.
2010-01-26 17:07:47 +00:00
e307f6c6a0 rename defgroup functions to be more consistant.
* no functional changes *
2010-01-26 13:50:17 +00:00
9cbbeb2d65 modifier.c has all its vergex group index lookups inline, use get_named_vertexgroup_num() instead.
no functional changes.
2010-01-26 09:36:33 +00:00
623ea4931c Fix for recent commit, crash on entering edit mode. 2010-01-25 16:42:04 +00:00
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
70060b2936 fix for own un-initialized pointer 2010-01-16 15:39:00 +00:00
03e924cdee mirror modifier vgroup option was doing string name conversion to find the flipped name for every vertex for every weight.
the vertex flip mapping only needs to be made once.

warning fixes too.
2010-01-16 01:15:47 +00:00
ace8d45c1c - particle drawing was using invalid memory with weights.
- particle set weight operator (Shift + K) and from the menu.
- mirror vertex groups operator can also flip weight group names.

a number of utility functions for weight groups added
 int *get_defgroup_flip_map(struct Object *ob);
 void flip_vertexgroup_name (char *name_r, const char *name, int strip_number); // moved from modifier.c 
 void copy_defvert (struct MDeformVert *dvert_r, const struct MDeformVert *dvert);
 void flip_defvert (struct MDeformVert *dvert, int *flip_map);
2010-01-15 17:28:00 +00:00
b0f87935a8 spelling errors, no real changes to code. 2010-01-14 10:59:42 +00:00
e5be23c141 check if the layer exists rather then getting the array. 2010-01-13 12:17:21 +00:00
49fc1f9860 Fix #20619: subsurf + explode modifier crash. 2010-01-11 10:22:24 +00:00
e9d9602bab change the defaults for solidify since users are getting unexpected spikes because of the 'Even Thickness' option.
For buildings this is nice but for cloth and random mesh input it ends up giving ugly spikes.
2010-01-10 23:18:09 +00:00
14646a143b Fix #20613: crash with subsurf+shrinkwrap+smooth modifiers. 2010-01-08 17:38:16 +00:00
83f677d9cf Fix #20519: shrinkwrap modifier doesnt work with subsurface modifier.
Fix #20516: subsurf modiefier+pressing add for smoke sims results in crash.
Fix retopo not working correct on subsurf mesh.

Various deforming modifiers were not correctly taking into account that a
derivedmesh is not necessarily a CDDerivedMesh, made utility functions for
this now.
2010-01-06 12:05:46 +00:00
ca4a5f309e solidify supports original mapping, so enable in the modifier.
this means you can select the copied face (as with the mirror modifier)
2010-01-03 05:49:56 +00:00
bf6fc75161 freeing particle modifier would access freed memory (only to tak the psys to be deleted), set to NULL after freeing and check before tagging. 2010-01-03 04:35:51 +00:00
f7f06d96f3 Solidify rim faces now get face data from the faces they extrude from, (UV and VCol support) 2009-12-21 10:16:04 +00:00
824b763322 solidify modifier - rim faces now copy values from the faces they extrude from (material, face flags but not uvs or vcols yet)
this doesnt work in editmode yet.
2009-12-21 08:37:30 +00:00