This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy face materials (front and back) from a source face to a target face. | |
# For v2021.1 and higher, any texture positioning and projection is copied. | |
# @param face1 [Sketchup::Face] the source face. | |
# @param face2 [Sketchup::Face] the target face. | |
# @return [Boolean] whether texture positioning was enabled during copy. | |
def copy_face_materials(face1, face2) | |
# Test if the API is at or higher than 2021.1: | |
positioning_enabled = face1.respond_to?(:texture_projected?) | |
# | |
frontside = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# | |
# Boilerplate Ideas for SketchUp Embedded Ruby System module. | |
if (Sketchup.platform == :platform_win rescue RUBY_PLATFORM !~ /darwin/) | |
module System # for MS Windows | |
require 'win32ole' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# | |
# Boilerplate Ideas for SketchUp Embedded Ruby System::Paths module. | |
require 'SketchUp_Ruby_System' | |
module System | |
if (Sketchup.platform == :platform_win rescue RUBY_PLATFORM !~ /darwin/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### | |
##### SAVE IN FORMAT: "UTF-8 WITHOUT BOM" OR "ANSI AS UTF-8" | |
### | |
### | |
# Wtyczka: "P-ytkuj" | |
# Autor: Krzysztof Skrzrtnicki | |
# Licencja: GPLv3 | |
# Wersja: 2.0 |