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:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2008-09-19 18:15:36 +0400
committerAndre Susano Pinto <andresusanopinto@gmail.com>2008-09-19 18:15:36 +0400
commit656ee61718d85f9366115756ba28e4b53f36d6b2 (patch)
treecca1c89160ea2facf62675bfd9313a0c6a052d30 /source/blender/src/buttons_editing.c
parent2f9f0710d140466f3b8030b66f4637b7f12b9d4a (diff)
Merge from trunk
(The last time there was some files missing due to failed connection to svn server while merging.. thats why this stuff of reverting last merge and redoing it) svn merge -r 16231:16608 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/src/buttons_editing.c')
-rw-r--r--source/blender/src/buttons_editing.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index 5d2593b46bb..5aec47965fc 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -1619,6 +1619,18 @@ static void build_uvlayer_menu_vars(CustomData *data, char **menu_string,
}
}
+void set_wave_uvlayer(void *arg1, void *arg2)
+{
+ WaveModifierData *wmd=arg1;
+ CustomDataLayer *layer = arg2;
+
+ /*check we have UV layers*/
+ if (wmd->uvlayer_tmp < 1) return;
+ layer = layer + (wmd->uvlayer_tmp-1);
+
+ strcpy(wmd->uvlayer_name, layer->name);
+}
+
void set_displace_uvlayer(void *arg1, void *arg2)
{
DisplaceModifierData *dmd=arg1;
@@ -1896,6 +1908,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
y -= 18;
if (!isVirtual && (md->type!=eModifierType_Collision)) {
+ uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); /* only here obdata, the rest of modifiers is ob level */
+
uiBlockBeginAlign(block);
if (md->type==eModifierType_ParticleSystem) {
but = uiDefBut(block, BUT, B_MODIFIER_RECALC, "Convert", lx,(cy-=19),60,19, 0, 0, 0, 0, 0, "Convert the current particles to a mesh object");
@@ -1911,6 +1925,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
uiButSetFunc(but, modifiers_copyModifier, ob, md);
}
uiBlockEndAlign(block);
+
+ uiSetButLock(ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);
}
lx = x + 10;
@@ -2246,7 +2262,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
0.0, 1.0, 0, 0, "Set the UV layer to use");
MEM_freeN(strtmp);
i = CustomData_get_layer_index(fdata, CD_MTFACE);
- uiButSetFunc(but, set_displace_uvlayer, wmd,
+ uiButSetFunc(but, set_wave_uvlayer, wmd,
&fdata->layers[i]);
}
if(wmd->texmapping == MOD_DISP_MAP_OBJECT) {
@@ -2613,7 +2629,7 @@ static void editing_panel_modifiers(Object *ob)
block= uiNewBlock(&curarea->uiblocks, "editing_panel_modifiers", UI_EMBOSS, UI_HELV, curarea->win);
if( uiNewPanel(curarea, block, "Modifiers", "Editing", 640, 0, 318, 204)==0) return;
- uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ uiSetButLock((ob && ob->id.lib), ERROR_LIBDATA_MESSAGE);
uiNewPanelHeight(block, 204);
uiDefBlockBut(block, modifiers_add_menu, ob, "Add Modifier", 0, 190, 130, 20, "Add a new modifier");
@@ -6350,6 +6366,11 @@ static void editing_panel_mesh_uvautocalculation(void)
row= 180;
uiDefButBitS(block, TOGN, UVCALC_NO_ASPECT_CORRECT, B_NOP, "Image Aspect",100,row,200,butH,&G.scene->toolsettings->uvcalc_flag, 0, 0, 0, 0, "Scale the UV Unwrapping to correct for the current images aspect ratio");
+
+ row-= butHB+butS;
+ uiDefButBitS(block, TOG, UVCALC_TRANSFORM_CORRECT, B_NOP, "Transform Correction",100,row,200,butH,&G.scene->toolsettings->uvcalc_flag, 0, 0, 0, 0, "Correct for UV distortion while transforming, (only works with edge slide now)");
+
+ row= 180;
uiBlockBeginAlign(block);
uiDefButF(block, NUM,B_UVAUTO_CUBESIZE ,"Cube Size:",315,row,200,butH, &G.scene->toolsettings->uvcalc_cubesize, 0.0001, 100.0, 10, 3, "Defines the cubemap size for cube mapping");