Skip to content

Commit

Permalink
Update to V1.0d
Browse files Browse the repository at this point in the history
Found a bug in which Xray-ing multiple groups that do not contain materials caused only one group to be Xray'ed properly.
  • Loading branch information
rkildare committed Jun 28, 2021
1 parent af849c2 commit afd184c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Ind_Xray.rb
Expand Up @@ -6,7 +6,7 @@ module IndXray
unless file_loaded?(__FILE__)
ex = SketchupExtension.new('Individual Xray', 'Ind_Xray/main')
ex.description = 'Xray view creater for individual groups.'
ex.version = '1.0c'
ex.version = '1.0d'
ex.creator = 'rkildare'
Sketchup.register_extension(ex,true)
file_loaded(__FILE__)
Expand Down
13 changes: 8 additions & 5 deletions Ind_Xray/main.rb
Expand Up @@ -42,11 +42,12 @@ def self.search(obj)
# ent.material = "white"
#end
ent.material = mmat(ent.material)
if ent.back_material.nil?
ent.back_material = ent.material
else
ent.back_material = mmat(ent.back_material)
end
#if ent.back_material.nil?
# ent.back_material = ent.material
#else
# ent.back_material = mmat(ent.back_material)
#end
ent.back_material = mmat(ent.back_material)
elsif ent.is_a?(Sketchup::Group)
ent.make_unique()
ent.material = mmat(ent.material)
Expand All @@ -70,6 +71,8 @@ def self.btmat(obj)
if Sketchup.active_model.materials["white"].nil?
col = Sketchup.active_model.materials.add("white")
col.color = 0xffffff
else#canrem
col = Sketchup.active_model.materials["white"]#canrem
end
return col
end
Expand Down
Binary file added Ind_Xray_V1.0d.rbz
Binary file not shown.

0 comments on commit afd184c

Please sign in to comment.