diff options
author | Ben Batt <benbatt@gmail.com> | 2007-01-29 19:28:11 +0300 |
---|---|---|
committer | Ben Batt <benbatt@gmail.com> | 2007-01-29 19:28:11 +0300 |
commit | 1f35fd7929fafe80e1768d99a80ec903024ec015 (patch) | |
tree | c2f8c9a888e81d72890e830419aef99d699b1b5e /source/blender/src/buttons_editing.c | |
parent | 2a47217cba4123da38d47278a5f52c38080e926e (diff) |
= Addendum to UVProject's multiple UV handling - "Override Image" button =
* Added an "Override Image" button to the UVProject modifier; this overrides
faces' currently assigned image with the one given in the modifier panel.
This provides some of the functionality previously provided by the "Add UVs"
button - you still need to add a UV layer manually, but you only need to
change the image in one place.
* Note that the "Override Image" option uses the bit position previously used
by the "Add UVs" option, so old files which had "Add UVs" enabled will now
have "Override Image" enabled.
Diffstat (limited to 'source/blender/src/buttons_editing.c')
-rw-r--r-- | source/blender/src/buttons_editing.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 23580dd78ad..f0d403d61af 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1559,7 +1559,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco dmd->texmapping == MOD_DISP_MAP_UV) height += 19; } else if (md->type==eModifierType_UVProject) { - height = 105 + ((UVProjectModifierData *)md)->num_projectors * 19; + height = 114 + ((UVProjectModifierData *)md)->num_projectors * 19; } else if (md->type==eModifierType_Decimate) { height = 48; } else if (md->type==eModifierType_Wave) { @@ -1759,6 +1759,12 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco "Image to project (only faces with this image " "will be altered"); uiButSetCompleteFunc(but, autocomplete_image, (void *)ob); + uiDefButBitI(block, TOG, MOD_UVPROJECT_OVERRIDEIMAGE, + B_MODIFIER_RECALC, "Override Image", + lx, (cy -= 19), buttonWidth, 19, + &umd->flags, 0, 0, 0, 0, + "Override faces' current images with the " + "given image"); } else if (md->type==eModifierType_Decimate) { DecimateModifierData *dmd = (DecimateModifierData*) md; uiDefButF(block, NUM, B_MODIFIER_RECALC, "Ratio:", lx,(cy-=19),buttonWidth,19, &dmd->percent, 0.0, 1.0, 10, 0, "Defines the percentage of triangles to reduce to"); |