diff options
author | Joseph Eagar <joeedh@gmail.com> | 2007-01-27 00:06:49 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2007-01-27 00:06:49 +0300 |
commit | 4494b829b088054966388b29f0705376bf8622a5 (patch) | |
tree | 10a343724d4edca5a74b2a8a764c1940a3ab8b3b /source/blender/makesdna | |
parent | 40d49dec0236174a1b4a8674e5ad508e6ce54d52 (diff) |
=Displace modifier fix=
This commit fixes displace modifier to propery support arbitrary uv
layers. This seemed like a fairly big usability bug,
as displace modifiers would use the active UV layer (and thus could change when
you changed the active layer). The modifier UI code now uses a menu for browsing
the uv layers, however only the uv layer name is actually stored, so that
adding/deleting layers won't mess up displace modifiers.
Whenever a displace modifier has an invalid UV name (for whatever reason) the
UV name is set to the active layer. This is checked both in the UI code and
in the modifier exec code, so all bases are covered. For deleting a layer, this
required upgrading the layer delete code in the UI to properly preserve the
active layer, to prevent unwanted behaviour. I hope this is an ok solution.
Brecht, Ben you might want to look over and make sure I didn't break anything. I don't
think I did, I tested as thouroughly as I could.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 1665c0da983..12ee18d7e08 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -7,6 +7,8 @@ #define MODSTACK_DEBUG 1 +struct MemArena; + /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */ typedef enum ModifierType { @@ -26,7 +28,6 @@ typedef enum ModifierType { eModifierType_EdgeSplit, eModifierType_Displace, eModifierType_UVProject, - NUM_MODIFIER_TYPES } ModifierType; @@ -179,6 +180,7 @@ typedef struct DisplaceModifierData { float midlevel; int texmapping; struct Object *map_object; + char uvlayer_name[32]; } DisplaceModifierData; /* DisplaceModifierData->direction */ |