Andy Broomell Posted February 13, 2021 Share Posted February 13, 2021 I'm using the Scale Objects command to scale down a 3D model which was built in Vectorworks. I'm intentionally checking the "Entire Drawing" checkbox. Unexpectedly, this does not scale texture definitions as well, so now all of the surface textures are disproportionate to the objects. Is there another approach I could take that would also scale textures? (I'm guessing not but I figured I'd check). Currently I'm going into every single texture definition and scaling down the "Size" by the same scale factor as I did the drawing, but this is tedious. Quote Link to comment
michaelk Posted February 13, 2021 Share Posted February 13, 2021 @Andy Broomell If you really mean to scale every texture in the drawing I think this script will take care of that: PROCEDURE ScaleTexture; {Badly Scripted by Michael Klaers} {12 February 2022} {This script will ask for a scale factor and ruthlessly scale the size of ALL -as in EVERY- texure in the resource browser of the file.} CONST CR = CHR(13); kTexture = 97; kFolderIndex = 0; ksubFolderName = ''; VAR h: HANDLE; numItems, TexIndex : LONGINT; i : INTEGER; TexName, MessText : STRING; TempReal, ScaleFactor : REAL; PROCEDURE WakeUP(hh:HANDLE); BEGIN ResetBBox(hh); END; BEGIN ScaleFactor := RealDialog('Texture Size Scale Factor: ','1.0'); TexIndex := BuildResourceList(kTexture,kFolderIndex,ksubFolderName,numItems); FOR i := 1 to numItems DO BEGIN TexName := GetActualNameFromResourceList(TexIndex,i); h := GetObject(TexName); TempReal := GetTextureSize(h); SetTextureSize(h,(TempReal*ScaleFactor)); END; ForEachObject(WakeUP, ((T<>LOCUS))); END; RUN(ScaleTexture); 1 Quote Link to comment
Andy Broomell Posted February 13, 2021 Author Share Posted February 13, 2021 14 hours ago, michaelk said: If you really mean to scale every texture in the drawing I think this script will take care of that Oh wow, this is perfect!! Thank you! This will save me lots of time this coming weeks. Quote Link to comment
michaelk Posted February 13, 2021 Share Posted February 13, 2021 Glad it's helpful. 😃 Just be careful. The script doesn't care if a texture is even used in the file. It just bulldozes every texture it can find. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.