Skip to content

Commit

Permalink
Changes to support latest YafaRay Core v3.5.1 with Qt5 and supporting…
Browse files Browse the repository at this point in the history
… MacOS
  • Loading branch information
DavidBluecame committed Jul 13, 2020
1 parent 1ecbf07 commit a591939
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions su2yafaray/su2yafaray.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
# SU2POV by Didier Bur and OGRE exporter by Kojack
# Usage : Compress su2yafaray_loader.rb and su2yafaray folder into a zip file.
# Then, rename extension from .zip to .rbz and install .rbz file with Sketchup Plugins Manager
# (Functionality way behind YafaRay Core v3.4.0, very limited and probably buggy (alpha state))
# Date : 2019-02-23
# (Functionality way behind YafaRay Core v3.5.1, very limited and probably buggy (alpha state))
# Date : 2020-07-13
# Type : Exporter
# Version : 3.4.0-alpha
# Version : 3.5.1-alpha


$:.push(File.join(File.dirname(__FILE__))) #add the su2yafaray folder to the ruby library search list
Expand All @@ -38,7 +38,7 @@
ENV["path"] = path.to_s + ";" + ENV["path"].to_s #To avoid the "error 126" when loading the "required" .so modules
ENV["QT_QPA_PLATFORM_PLUGIN_PATH"] = path.to_s #To avoid the Qt5 error "This application failed to start because it could not find or load the Qt platform plugin windows". Requires qwindows.dll from Qt5 plugins/platforms in the yafaray bin folder to work

require 'yafqt'
require 'yafqt_ruby'
require 'yafaray_v3_interface_ruby'

module SU2YAFARAY
Expand Down Expand Up @@ -124,11 +124,11 @@ def SU2YAFARAY.render(useXML)
SU2YAFARAY.set_params(yi)
result=SU2YAFARAY.report_window(start_time,"Time")
if result==6
Yafqt.initGui
settings=Yafqt::Settings.new
Yafqt_ruby.initGui
settings=Yafqt_ruby::Settings.new
settings.autoSave=false
settings.closeAfterFinish=false
Yafqt.createRenderWidget(yi,Integer(@ys.width),Integer(@ys.height),0,0,settings)
Yafqt_ruby.createRenderWidget(yi,Integer(@ys.width),Integer(@ys.height),0,0,settings)
yi.clearAll();
else
yi.clearAll();
Expand Down Expand Up @@ -227,7 +227,7 @@ def SU2YAFARAY.get_editor(type)
#####################################################################
#####################################################################
def SU2YAFARAY.about
UI.messagebox("SU2Yafaray version 3.2.0-alpha 2017-03-18
UI.messagebox("SU2Yafaray version 3.5.1-alpha 2020-07-13
SketchUp Exporter to Yafaray
Authors: * Alexander Smirnov (aka Exvion) e-mail: [email protected]
(Original su2yafaray exporter (and most of the work) done by Exvion until 2010)
Expand Down
4 changes: 2 additions & 2 deletions su2yafaray_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
require 'extensions.rb'

su2yafaray = SketchupExtension.new "YafaRay", "su2yafaray/su2yafaray.rb"
su2yafaray.copyright= 'GNU LGPLv.2 2010 Alexander Smirnov aka Exvion; 2016,2017 David Bluecame'
su2yafaray.copyright= 'GNU LGPLv.2 2010 Alexander Smirnov aka Exvion; 2016-2020 David Bluecame'
su2yafaray.creator= 'Alexander Smirnov, David Bluecame www.yafaray.org'
su2yafaray.version = '3.2.0-alpha'
su2yafaray.version = '3.5.1-alpha'
su2yafaray.description = "Model exporter and material editor for YafaRay."
Sketchup.register_extension su2yafaray, true

0 comments on commit a591939

Please sign in to comment.