Академический Документы
Профессиональный Документы
Культура Документы
Updates:
20101212 loader now more robust.
20101213 new methods added. skm, material and ImageAnimator.
20101213a new gifxtractor tool added.
The attached zip file should be extracted into the Plugins folder - there should
be a SKMtools_loader.rb file that goes directly into Plugins, the there is also
a SKMtools folder containing several files and sub-folders - theses should all
remain in their relative sub-folders, and the SKMtools folder itself goes into P
lugins.
The wide-ranging set of tools and code that these files provide briefly is as fo
llows:'skm_class.rb' - a new class 'SKM' added to the API - with SKM-file methods - .i
mport, .export, .save_texture and .save_thumbnail, PLUS .extract and .save_textu
re_and_thumbnail - a separate post outlines these in detail...
'material_class.rb' - extensions of the 'Sketchup::Material' class - with new Ma
terial methods - .save_texture, .save_thumbnail, .save_bumpmap, .export_skm, .de
lete and .name=, PLUS .save_texture_and_thumbnail- a separate post outlines thes
e in detail...
There is a file 'podium_texture+bumpmap.rb' that makes a new method podiumtextur
ebumpmap(materialname, folder, boolean) to export a given material by name into
a given folder as a bumpmap PNG [the optional boolean determines if the bumpmap
is 'inverted' or not] using specific naming conventions etc - it could easily be
modified to suit other applications - a separate post outlines this in detail..
.
'image_class.rb' - extensions of the 'Sketchup::Image' class - with new Image me
thods - .definition, .transformation, .transformation=, .use_as_material, .make_
unique, .copy, .clone, .imagefile, .imagefile=, .save_imagefile and a series of
methods relating to Image-Animation - .folder, .folder=, .timer, .timer=, .facem
e, .faceme=, .start_animation, .start_animation_all, .stop_animation and .stop_a
nimation_all - a separate post outlines these in detail...
There are various cross-platform Java .jar executable applets in the folder requ
ired for some of the image and SKM file manipulations. There is also a 'SKMDefau
ltXMLs' folder containing the premade XML files required for new SKM files.
There is a script 'ImageAnimator.rb' that adds a new Tool to the Plugins Menu /
Toolbar. This allows you to set a selected Image's 'folder' containing sequentia
l image-files for use in an Image-Animation. It also allows you to set the selec
ted Image(s) 'folder' to 'Nil'. You can also set the selected Image(s) 'timer' t
o a frame-rate in seconds [the default of 0.0 means the Image only updates as a
Scene tab changes]. You can also set the selected Image{s] 'faceme' behavior bet
ween 'None' and facing the camera pivoting about Bottom-Left, Bottom-Center and
Bottom-Right locations of the image: when 'faceme' is set the Image is grouped w
hen 'None' it is not. The other controls are 'Animate Selected Images' and 'Stop
Selected Images' Animation' or 'Animate All Images' and 'Stop All Image Animati
on' = PLUS new menu items 'make_unique' and 'clone'.
An animated image will change as you work/pan-zoom or take a screen shot. It sho
uld also change with the Scene-tabs if timer=0.0..