Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/disable preserve instances 94989124 #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions as_sketchfab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

Name : Sketchfab Uploader

Version: 2.1
Date : 3/17/2014
Version: 2.1.1
Date : 5/28/2015

Description : This plugin uploads the currently open model to Sketchfab.com

Expand Down Expand Up @@ -61,6 +61,9 @@
- Wrapped external modules in my namespace
- Consolidated code
- Switched export location to TEMP folder
2.1.1 (5/28/2015):
- Fixed namespaces and dependancies
- Disabled and hidden "Preserve Instances" option
TBD:
- Code cleanup

Expand Down
5 changes: 1 addition & 4 deletions as_sketchfab/as_sketchfab_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module AS_SketchfabUploader
:author_attribution => true,
:texture_maps => true,
:selectionset_only => false,
:preserve_instancing => true }
:preserve_instancing => false }

# Add the library path so Ruby can find it
$: << File.dirname(__FILE__)+'/lib'
Expand Down Expand Up @@ -292,14 +292,12 @@ def self.show_dialog_2014
mat = d.get_element_value("materials").gsub(/"/, "'")
tex = d.get_element_value("textures").gsub(/"/, "'")
fac = d.get_element_value("faces").gsub(/"/, "'")
ins = d.get_element_value("instances").gsub(/"/, "'")

# Adjust options from dialog
(edg == "True") ? @options_hash[:edges] = true : @options_hash[:edges] = false
(mat == "True") ? @options_hash[:materials_by_layer] = true : @options_hash[:materials_by_layer] = false
(tex == "True") ? @options_hash[:texture_maps] = true : @options_hash[:texture_maps] = false
(fac == "True") ? @options_hash[:doublesided_faces] = true : @options_hash[:doublesided_faces] = false
(ins == "True") ? @options_hash[:preserve_instancing] = true : @options_hash[:preserve_instancing] = false

# Export model as KMZ and process
if Sketchup.active_model.export @filename, @options_hash then
Expand Down Expand Up @@ -430,7 +428,6 @@ def self.show_dialog_2014
<p><label for="options">Options:</label><input class="cbox" type="checkbox" name="edges" id="edges" checked="true" value="True" /> Export edges<br />
<input class="cbox" type="checkbox" style="margin-left:150px;" name="textures" id="textures" checked="true" value="True" /> Export textures<br />
<input class="cbox" type="checkbox" style="margin-left:150px;" name="faces" id="faces" value="" /> Export two-sided faces<br />
<input class="cbox" type="checkbox" style="margin-left:150px;" name="instances" id="instances" checked="true" value="True" /> Preserve component hierarchy<br />
<input class="cbox" type="checkbox" style="margin-left:150px;" name="materials" id="materials" value="" /> Use 'color by layer' materials
</p>
<p><input type="submit" id="submit" value="Submit Model" style="font-weight:bold;" /></p>
Expand Down
Binary file added as_sketchfab/bin/7za.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion as_sketchfab/lib/multipart-post-as.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AS_SketchfabUploader
module AS_Extensions::AS_SketchfabUploader
# This file namespaces and compiles the multipart-post library

#--
Expand Down
2 changes: 1 addition & 1 deletion as_sketchfab/lib/zip.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module AS_SketchfabUploader
module AS_Extensions::AS_SketchfabUploader
# A small module to zip files

module Zip
Expand Down
Binary file added as_sketchfab_2-1-1.rbz
Binary file not shown.
Binary file removed as_sketchfab_2-1.rbz
Binary file not shown.