Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2011-12-20 18:15:59 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-12-20 18:15:59 +0400
commit738fdc7b6f43c3e1e838bd4239b36340fa4c2e0f (patch)
tree8fdf2815739bff6a5ed3ee28cd840018b0f03acc /source/blender/editors/object/object_modifier.c
parent40259cfe7bf8ab3fa844d87b61096562c9ea2e42 (diff)
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...
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r--source/blender/editors/object/object_modifier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 240fb8017f2..913e5893a77 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -452,7 +452,7 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
Key *key=me->key;
KeyBlock *kb;
- if(!modifier_sameTopology(md)) {
+ if(!modifier_sameTopology(md) || mti->type == eModifierTypeType_NonGeometrical) {
BKE_report(reports, RPT_ERROR, "Only deforming modifiers can be applied to Shapes");
return 0;
}
@@ -500,7 +500,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
Mesh *me = ob->data;
MultiresModifierData *mmd= find_multires_modifier_before(scene, md);
- if( me->key) {
+ if(me->key && mti->type != eModifierTypeType_NonGeometrical) {
BKE_report(reports, RPT_ERROR, "Modifier cannot be applied to Mesh with Shape Keys");
return 0;
}