azuby: true. thanks
![](/uploads/imported_avatars/upload/2cde590848b478d382d186ea9f7f6116_221.jpg)
Posts made by tbd
-
RE: Texture.use_alpha?
here some quick code to check for PNG transparency
class ReadPNG def initialize(file) @pngfile = File.open(file,"rb+").read read_offset(8) #skip header end def transparent? ok = true while ok chunk_size = read_offset(4).unpack("N")[0] section = read_offset(4) case section when 'PLTE' read_offset(chunk_size) when 'IDAT' read_offset(chunk_size) when 'tRNS' read_offset(chunk_size) return true else @offset += chunk_size end ok = section != "IEND" read_offset(4) # skip CRC end return false end def read_offset(length = 1, offset = nil) @offset ||= 0 @offset = offset if offset begin ret = @pngfile[@offset, length] rescue p "error reading at #{@offset}" end @offset += length ret end end p ReadPNG.new('texture.png').transparent?
-
RE: Texture.use_alpha?
@unknownuser said:
Is there way to find out if a texture has alpha channel?
nope
@unknownuser said:
Will material.materialType help me?
nope again - it returns the same value as for a non-alpha texture
you can look for 'tRNS' chunk inside .png files - if present than it contains transparency
-
RE: Please Welcome Style Builder...
tip: read the help files first
let the styles madness begin ! -
RE: Random Delete?
[shameless plug] add Randor in the mix and you have a good looking forest, crowd, ... [/shameless plug]
-
RE: Voice activated Sketchup - it's here
it supports semicolon and comma and it needs a training stage to learn your voice but still keyboard is way faster (and why a 44mb download for an installed 3mb program ?)
unless you want to have fun saying the same thing on the microphone - "push pull you stupid computer !"
-
RE: New way to dynamically resize images
already available to play with your photos interactively at http://rsizr.com/ (since Sep.28)
-
RE: SU6 SKM processing
that means that the user must export as OBJ first - not acceptable
so I think I will use TextureWriter as there is no Ruby method that points to the .skm file to do a .zip parsing of .xml files. urgh
thanks anyway
-
SU6 SKM processing
does anyone knows how to get the texture file from a material ?
sketchup.com is down and I dont have a mirror of SU6 Ruby help and in SU6 textures are stored inside .skm (which are renamed .zip files) versus SU5 where all textures were stored normally in Materials subdir.
one way is to TextureWrite it but I dont like to clutter the HDD for that
-
RE: [Plugin] Unhide ALL (Edges) - Inside Groups / Components ???
and here is the fix (thanks TIG) - works with both .skp from JClements & Howard L' (for the cube in JClements .skp you need to triple click to select all connected as it is not a group)
-
RE: [Plugin] Unhide ALL (Edges) - Inside Groups / Components ???
azuby: unfortunately it suffers from the same problem - somehow duplicated groups have the same entities as in a component
-
RE: [Plugin] Unhide ALL (Edges) - Inside Groups / Components ???
here ya go unhide from groups/components on selection or all if no selection
-
RE: How can I assign a keyboard key as a SketchUp shortcut
oscarlok: it is not possible to make a keyboard shortcut via Ruby as this is a feature that user should decide (imagine if every script started to change your shortcuts
)
-
RE: Ruby Scrambler -- Myth or Marvel?
here is one concrete proof
the email from Ruby docs is the one that gets you the scrambler (which is part of the SDK). btw, why do you need the scrambler ? you can make a scrambler yourself
-
RE: Select Visible?
I have written a SelectVisible class but it is a .rbs file (cannot attach here) and available only for private use.
if you want some tips I am available via email or PM.
-
RE: Interview with Octavian -TBD - Chis CatchUp now online
hehe, that was a good one. the idea with the name mixed with the nickname was taken from the movies/cartoon credits. didn't know that it was not so obvious.
thanks Coen for interview
TBD
-
RE: Poor Tree Placement
Susan: it is the same with this Amazon ISBN0685094790 ? it is 1989 edition and costs $175.00
if it is in public domain it would be nice to have the whole book online
also found another plate here (down the page) when searching.later edit: found by the same author, Sketching and Rendering In Pencil (1922, full book, PDF)
-
All / Only Visible
I noticed on the first video tutorial for Podium there was an option to render "all" or "only visible". Is this available on 1.5? I don't see it on the eval version.