-
Notifications
You must be signed in to change notification settings - Fork 17
Wikihouse Extension 0.2 Dev #4
base: master
Are you sure you want to change the base?
Conversation
short script to add the plugin as a SketchUp Extension. Also updated README install instructions.
make release should upload following to Amazon S3 bucket: wikihouse_extension.rbz and wikihouse_extension-{git-rev}.rbz Included .gitignore for .rbz files. Renamed all instances of plugin to extension for clarity. Updated install instruction in README
namespace recalling between different files of ruby code. Beginning to split up wikihouse.rb into smaller files of related code. Run flags and config constants now in wikihouse_extension_loader before extension is loaded. Extra constants now in constants.rb Utility functions and classes now in utils.rb Output writters now in writers.rb SVG output currently has an error. Investigating.
with "install_mac"
object strings. Used in parsing data to web dialogues.
wikihouse_extension_loader.rb
'@@wikihouse_settings' to store variable info.
These will update all files in necessary plugin folders. Note folders must already exist.
check in SU 2013 that was throwing an error on loading plugin.
|
||
if File.size(model_path) > 12582912 | ||
reply = UI.messagebox "The model file is larger than 12MB. Would you like to purge unused objects, materials and styles?", MB_OKCANCEL | ||
if reply == REPLY_OK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already constants for the return values of UI.messagebox
: MB_OK
. See http://www.sketchup.com/intl/en/developer/docs/ourdoc/ui.php#messagebox
Maybe I should introduce myself, considering I just flooded this pull request with comments. My name is Thomas Thomassen and I'm a new member of the SketchUp Extensibility Team, just started a couple of days ago. Wanted to give some advice and pointers. |
join() | ||
result = eval(ruby_string) | ||
return result | ||
rescue Exception => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One shouldn't normally catch Exception
- instead StandardError
. http://www.skorks.com/2009/09/ruby-exceptions-and-exception-handling/
Thanks for the awesome code review @thomthom! 👍 Will definitely incorporate most of it when I eventually get round to merging and cutting the next release. Thanks again! |
Btw, I'm also the developer of "Milling Tools", the extensions that let you create dog-bone corners. I can assist on making the code from the reusable for your usage. |
Ok, so I have made quite a lot of changes to the code, though mostly for (re)organisation purposes. All has been tested on Mac OS and works fine, but not yet tested on Windows.
New Features:
List of Changes:
wikihouse_extension/lib/
directory.WikihouseExtension
, thereby protecting against any namespace clashes in the future.wikihouse_extension_loader.rb
script now contains all the configuration constants such as paths, platform, and run flags which are most likely to be changed between runs.utils.rb
along with any other perminant constants.writers.rb
.WebDialog.rb
.other.rb
.