[SCM] yafaray-blender2.5-exporter/master: Imported Upstream version 0.1.2~beta2.1

mfv-guest at users.alioth.debian.org mfv-guest at users.alioth.debian.org
Sat Sep 24 08:51:32 UTC 2011


The following commit has been merged in the master branch:
commit 2a06524cb7ccd37ea406277e11611d50d10c028d
Author: Matteo F. Vescovi <m.vescovi at revese.it>
Date:   Sat Sep 24 10:43:13 2011 +0200

    Imported Upstream version 0.1.2~beta2.1

diff --git a/GPL-license.txt b/GPL-license.txt
new file mode 100644
index 0000000..1ab0fa4
--- /dev/null
+++ b/GPL-license.txt
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/README b/README
index abe5b26..4c09840 100644
--- a/README
+++ b/README
@@ -1,7 +1,22 @@
 Yafaray exporter for Blender 2.59:
+
 The exporter is in an experimental stage, so use it for testing purposes only.
-For the latest builds check http://www.yafaray.org/development and graphicall.org
-Downloading and extract at Blender/2.59/scripts/addons/yafaray directory
+For the latest exporter updates check:
+
+https://github.com/YafaRay/Blender-2.5-Exporter
+
+and for the latest Yafaray builds (including exporter files too) 
+check megasofts builds on graphicall.org:
+
+http://www.graphicall.org/megasoft78
+
+or look into this forum post for other platform builds:
+
+http://www.yafaray.org/community/forum/viewtopic.php?f=16&t=3520
+
+Download and extract the exporter files and folders to the 'Blender/2.59/scripts/addons/yafaray' directory.
+
+We need to test it, please post bugreports and feature requests here:
+http://www.yafaray.org/development/bugtracker/yafaray
 
-We need to test it and report errors found.
-Thanks.
+Thank you.
diff --git a/__init__.py b/__init__.py
index 5666056..ab4b9b4 100644
--- a/__init__.py
+++ b/__init__.py
@@ -29,10 +29,10 @@ sys.path.append(BIN_PATH)
 bl_info = {
     "name": "YafaRay Exporter",
     "description": "YafaRay integration for blender",
-    "author": "Shuvro Sarker, Kim Skoglund (Kerbox), \
-Pedro Alcaide (povmaniaco), Paulo Gomes (tuga3d), \
-Michele Castigliego (subcomandante), Bert Buchholz, \
-Rodrigo Placencia (DarkTide), Alexander Smirnov (Exvion)",
+    "author": "Shuvro Sarker, Kim Skoglund (Kerbox), "
+              "Pedro Alcaide (povmaniaco), Paulo Gomes (tuga3d), "
+              "Michele Castigliego (subcomandante), Bert Buchholz, "
+              "Rodrigo Placencia (DarkTide), Alexander Smirnov (Exvion)",
     "version": (0, 1, 2, 'alpha'),
     "blender": (2, 5, 9),
     "api": 39324,
diff --git a/io/__init__.py b/io/__init__.py
index 7c669c5..cbf5cd2 100644
--- a/io/__init__.py
+++ b/io/__init__.py
@@ -1,11 +1,26 @@
-# import all files for register all classes
-
-from yafaray.io import yaf_export
-from yafaray.io import yaf_world
-from yafaray.io import yaf_integrator
-from yafaray.io import yaf_texture
-from yafaray.io import yaf_object
-from yafaray.io import yaf_light
-from yafaray.io import yaf_material
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
 
 import yafrayinterface
+from . import yaf_export
+from . import yaf_world
+from . import yaf_integrator
+from . import yaf_texture
+from . import yaf_object
+from . import yaf_light
+from . import yaf_material
diff --git a/io/yaf_export.py b/io/yaf_export.py
index 8fd1a08..56ae372 100644
--- a/io/yaf_export.py
+++ b/io/yaf_export.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 #TODO: Use Blender enumerators if any
 import bpy
 import os
@@ -163,12 +181,24 @@ class YafaRayRenderEngine(bpy.types.RenderEngine):
     def exportMaterials(self):
         self.yi.printInfo("Exporter: Processing Materials...")
         self.materials = set()
+
+        # create a default shiny diffuse material -> it will be assigned, if object has no material(s)
         self.yi.paramsClearAll()
         self.yi.paramsSetString("type", "shinydiffusemat")
+        self.yi.paramsSetColor("color", 0.8, 0.8, 0.8)
         self.yi.printInfo("Exporter: Creating Material \"defaultMat\"")
         ymat = self.yi.createMaterial("defaultMat")
         self.materialMap["default"] = ymat
 
+        # create a shiny diffuse material for "Clay Render" option in general settings
+        self.yi.paramsClearAll()
+        self.yi.paramsSetString("type", "shinydiffusemat")
+        cCol = self.scene.gs_clay_col
+        self.yi.paramsSetColor("color", cCol[0], cCol[1], cCol[2])
+        self.yi.printInfo("Exporter: Creating Material \"clayMat\"")
+        cmat = self.yi.createMaterial("clayMat")
+        self.materialMap["clay"] = cmat
+
         for obj in self.scene.objects:
             for mat_slot in obj.material_slots:
                 if mat_slot.material not in self.materials:
@@ -197,7 +227,7 @@ class YafaRayRenderEngine(bpy.types.RenderEngine):
         }
         filetype = switchFileType.get(filetype, 'png')
         # write image or XML-File with filename from framenumber
-        frame_numb_str = "{:0"+str(len(str(self.scene.frame_end)))+"d}"
+        frame_numb_str = "{:0" + str(len(str(self.scene.frame_end))) + "d}"
         output = os.path.join(output_path, frame_numb_str.format(self.scene.frame_current))
         # try to create dir if it not exists...
         if not os.path.exists(output_path):
diff --git a/io/yaf_integrator.py b/io/yaf_integrator.py
index c3f65e0..e8bfa31 100644
--- a/io/yaf_integrator.py
+++ b/io/yaf_integrator.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 
 
diff --git a/io/yaf_light.py b/io/yaf_light.py
index 1214063..9d3b70c 100644
--- a/io/yaf_light.py
+++ b/io/yaf_light.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 import os
 import mathutils
diff --git a/io/yaf_material.py b/io/yaf_material.py
index 4dd21e7..f4deb8f 100644
--- a/io/yaf_material.py
+++ b/io/yaf_material.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 import mathutils
 import yafrayinterface
diff --git a/io/yaf_object.py b/io/yaf_object.py
index 3c97dcf..9845d18 100644
--- a/io/yaf_object.py
+++ b/io/yaf_object.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 import time
 import math
@@ -85,7 +103,10 @@ class yafObject(object):
                 if x < y:
                     f_aspect = x / y
 
-                yi.paramsSetFloat("focal", camera.lens / (f_aspect * 32.0))
+                sensor_width = 32.0
+                if hasattr(camera, "sensor_width"):
+                    sensor_width = camera.sensor_width
+                yi.paramsSetFloat("focal", camera.lens / (f_aspect * sensor_width))
 
                 # DOF params, only valid for real camera
                 # use DOF object distance if present or fixed DOF
@@ -506,6 +527,9 @@ class yafObject(object):
                 for mat_slot in matSlots:
                     if mat_slot.material in self.materialMap:
                         ymaterial = self.materialMap[mat_slot.material]
+        else:
+            # set material to "clay", if "Clay Render" option is enabled in general settings
+            ymaterial = self.materialMap["clay"]
 
         return ymaterial
 
diff --git a/io/yaf_scene.py b/io/yaf_scene.py
index 729d735..5e2b0b3 100644
--- a/io/yaf_scene.py
+++ b/io/yaf_scene.py
@@ -1,3 +1,22 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+
 def computeSceneSize(render):
     sizeX = int(render.resolution_x * render.resolution_percentage * 0.01)
     sizeY = int(render.resolution_y * render.resolution_percentage * 0.01)
@@ -15,7 +34,7 @@ def getRenderCoords(scene):
 
     cam_data = None
 
-    if len(scene.objects):
+    if scene.objects:
         for item in scene.objects:
             if item.type == 'CAMERA':
                 cam_data = item.data
diff --git a/io/yaf_texture.py b/io/yaf_texture.py
index c55021b..923d509 100644
--- a/io/yaf_texture.py
+++ b/io/yaf_texture.py
@@ -1,6 +1,23 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 import os
-from math import *
 
 
 def noise2string(ntype):
@@ -268,9 +285,6 @@ class yafTexture:
             yi.paramsSetBool("calc_alpha", tex.use_calculate_alpha)
             yi.paramsSetBool("normalmap", tex.yaf_is_normal_map)
             yi.paramsSetFloat("gamma", scene.gs_gamma_input)
-            #  yi.paramsSetFloat("exposure_adjust", tex.yaf_tex_expadj)  # experimental?
-            if not tex.yaf_tex_interpolate == 'bilinear':  # bilinear is set by default
-                yi.paramsSetString("interpolate", tex.yaf_tex_interpolate)
 
             # repeat
             repeat_x = 1
diff --git a/io/yaf_world.py b/io/yaf_world.py
index a85b02e..0521005 100644
--- a/io/yaf_world.py
+++ b/io/yaf_world.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from bpy.path import abspath
 from os.path import realpath, normpath
diff --git a/ot/__init__.py b/ot/__init__.py
index 0f5f523..b83225d 100644
--- a/ot/__init__.py
+++ b/ot/__init__.py
@@ -1,3 +1,21 @@
-from yafaray.ot import yafaray_operators
-from yafaray.ot import yafaray_converter
-from yafaray.ot import yafaray_presets
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+from . import yafaray_operators
+from . import yafaray_converter
+from . import yafaray_presets
diff --git a/ot/yafaray_converter.py b/ot/yafaray_converter.py
index 005c856..639a51e 100644
--- a/ot/yafaray_converter.py
+++ b/ot/yafaray_converter.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 
 
@@ -169,6 +187,35 @@ def convertLight(lightObj):
     return problemList
 
 
+def convertTextures(textures):
+    problemList = []
+
+    for tex in textures:
+        try:
+            tex.name = tex.name
+        except:
+            tex.name = "Problem"
+            problemList.append("Renaming texture name to {0}".format(tex.name))
+
+    for tex in textures:
+        problemList += convertTexture(tex)
+
+    return problemList
+
+
+def convertTexture(tex):
+    problemList = []
+
+    texType = tex.type
+
+    if texType is not None:
+        tex.yaf_tex_type = texType
+    else:
+        problemList.append("No texture type on texture {0}".format(tex.name))
+
+    return problemList
+
+
 def convertMaterials(materials):
     problemList = []
 
@@ -196,6 +243,7 @@ def convertMaterial(mat):
     materialNames = []
     for item in bpy.data.materials:
         materialNames.append(item.name)
+
     if props["type"] == "Rough Glass":
         mat.mat_type = "rough_glass"
     else:
@@ -218,6 +266,7 @@ def convertMaterial(mat):
         variableDict["IOR"] = "IOR_reflection"
 
     elif mat.mat_type in {"glass", "rough_glass"}:
+        variableDict["color"] = "diffuse_color"
         variableDict["IOR"] = "IOR_refraction"
         variableDict["alpha"] = "refr_roughness"
         variableDict["mirror_color"] = "glass_mir_col"
@@ -229,7 +278,7 @@ def convertMaterial(mat):
         if p in variableDict:
             p = variableDict[p]
 
-        if p in {"type", "mask"}:
+        if p in {"type", "mask", ""}:
             continue
 
         if p in {"brdf_type", "brdfType"}:
@@ -287,9 +336,10 @@ def convertWorld(world):
         attgridScale="v_int_attgridres")
 
     for p in props:
+        value = props[p]
+
         if p in {"bg_type", "from"}:
             continue
-        value = props[p]
 
         if p in variableDict:
             p = variableDict[p]
@@ -367,7 +417,7 @@ def convertGeneralSettings(scene):
             switch_file_type = {"TIFF [Tag Image File Format]": "TIFF", "TGA [Truevision TARGA]": "TARGA", \
                                 "PNG [Portable Network Graphics]": "PNG", "JPEG [Joint Photographic Experts Group]": "JPEG", \
                                 "HDR [Radiance RGBE]": "HDR", "EXR [IL&M OpenEXR]": "OPEN_EXR"}
-        scene.img_output = switch_file_type.get(props["file_type"], "PNG")
+            scene.img_output = switch_file_type.get(props["file_type"], "PNG")
 
     variableDict = dict(
         raydepth="ray_depth",
@@ -465,10 +515,11 @@ class ConvertYafarayProperties(bpy.types.Operator):
 
         problemList = []
 
+        problemList += convertTextures(data.textures)
         problemList += convertMaterials(data.materials)
         problemList += convertLights([l for l in data.objects if l.type == "LAMP"])
         problemList += convertCameras([c for c in data.objects if c.type == "CAMERA"])
-        problemList += convertWorld(data.worlds[0])
+        problemList += convertWorld(scene.world)
         problemList += convertSceneSettings(scene)
         problemList += convertObjects([o for o in data.objects if o.type == "MESH"])
 
@@ -476,4 +527,4 @@ class ConvertYafarayProperties(bpy.types.Operator):
         for p in problemList:
             print(p)
 
-        return {"FINISHED"}
+        return {'FINISHED'}
diff --git a/ot/yafaray_operators.py b/ot/yafaray_operators.py
index 883d46b..74319d2 100644
--- a/ot/yafaray_operators.py
+++ b/ot/yafaray_operators.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 import math
 import mathutils
@@ -6,12 +24,12 @@ from bpy.props import FloatProperty, StringProperty
 
 
 class OBJECT_OT_get_position(Operator):
-    bl_label = 'From( get position )'
-    bl_idname = 'world.get_position'
-    bl_description = 'Get position from selected sun lamp'
+    bl_label = "From( get position )"
+    bl_idname = "world.get_position"
+    bl_description = "Get position from selected sun lamp"
 
     def execute(self, context):
-        warning_message = sunPosAngle(mode = 'get', val = 'position')
+        warning_message = sunPosAngle(mode="get", val="position")
         if warning_message:
             self.report({'WARNING'}, (warning_message))
             return {'CANCELLED'}
@@ -20,12 +38,12 @@ class OBJECT_OT_get_position(Operator):
 
 
 class OBJECT_OT_get_angle(Operator):
-    bl_label = 'From( get angle )'
-    bl_idname = 'world.get_angle'
-    bl_description = 'Get angle from selected sun lamp'
+    bl_label = "From( get angle )"
+    bl_idname = "world.get_angle"
+    bl_description = "Get angle from selected sun lamp"
 
     def execute(self, context):
-        warning_message = sunPosAngle(mode = 'get', val = 'angle')
+        warning_message = sunPosAngle(mode="get", val="angle")
         if warning_message:
             self.report({'WARNING'}, (warning_message))
             return {'CANCELLED'}
@@ -34,12 +52,12 @@ class OBJECT_OT_get_angle(Operator):
 
 
 class OBJECT_OT_update_sun(Operator):
-    bl_label = 'From( update sun )'
-    bl_idname = 'world.update_sun'
-    bl_description = 'Update position and angle of selected sun lamp according to GUI values'
+    bl_label = "From( update sun )"
+    bl_idname = "world.update_sun"
+    bl_description = "Update position and angle of selected sun lamp according to GUI values"
 
     def execute(self, context):
-        warning_message = sunPosAngle(mode = 'update')
+        warning_message = sunPosAngle(mode="update")
         if warning_message:
             self.report({'WARNING'}, (warning_message))
             return {'CANCELLED'}
@@ -47,16 +65,16 @@ class OBJECT_OT_update_sun(Operator):
             return{'FINISHED'}
 
 
-def sunPosAngle(mode = 'get', val = 'position'):
+def sunPosAngle(mode="get", val="position"):
     active_object = bpy.context.active_object
     scene = bpy.context.scene
     world = scene.world
-    warning_message = ''
+    warning_message = ""
 
-    if active_object and active_object.type == 'LAMP' and active_object.data.type == 'SUN':
+    if active_object and active_object.type == "LAMP" and active_object.data.type == "SUN":
 
-        if mode == 'get':
-            if val == 'position':
+        if mode == "get":
+            if val == "position":
                 location = mathutils.Vector(active_object.location)
 
                 if location.length:
@@ -67,12 +85,12 @@ def sunPosAngle(mode = 'get', val = 'position'):
                 world.bg_from = point
                 return
 
-            elif val == 'angle':
+            elif val == "angle":
                 inv_matrix = mathutils.Matrix(active_object.matrix_local).copy().inverted()
                 world.bg_from = (inv_matrix[0][2], inv_matrix[1][2], inv_matrix[2][2])
                 return
 
-        elif mode == 'update':
+        elif mode == "update":
 
             # get gui from vector and normalize it
             bg_from = mathutils.Vector(world.bg_from)
@@ -121,7 +139,7 @@ def checkSceneLights():
     scene = bpy.context.scene
 
     for l in scene.objects:
-        if not l.hide_render and l.is_visible(scene) and l.type == 'LAMP':
+        if not l.hide_render and l.is_visible(scene) and l.type == "LAMP":
             sceneLights = True
             break
         else:
@@ -130,9 +148,9 @@ def checkSceneLights():
 
 
 class RENDER_OT_render_view(Operator):
-    bl_label = 'YafaRay render view'
-    bl_idname = 'render.render_view'
-    bl_description = 'Renders using the view in the active 3d viewport'
+    bl_label = "YafaRay render view"
+    bl_idname = "render.render_view"
+    bl_description = "Renders using the view in the active 3d viewport"
 
     @classmethod
     def poll(self, context):
@@ -148,16 +166,16 @@ class RENDER_OT_render_view(Operator):
         # if the region is not a 3d view
         # then search for the first active one
         if not view3d:
-            for area in [a for a in bpy.context.window.screen.areas if a.type == 'VIEW_3D']:
+            for area in [a for a in bpy.context.window.screen.areas if a.type == "VIEW_3D"]:
                 view3d = area.spaces.active.region_3d
                 break
 
-        if not view3d or view3d.view_perspective == 'ORTHO':
+        if not view3d or view3d.view_perspective == "ORTHO":
             self.report({'WARNING'}, ("The selected view is not in perspective mode or there was no 3d view available to render."))
             bpy.types.YAFA_RENDER.useViewToRender = False
             return {'CANCELLED'}
 
-        elif not sceneLights and scene.intg_light_method == 'Bidirectional':
+        elif not sceneLights and scene.intg_light_method == "Bidirectional":
             self.report({'WARNING'}, ("No lights in the scene and lighting method is bidirectional!"))
             bpy.types.YAFA_RENDER.useViewToRender = False
             return {'CANCELLED'}
@@ -175,9 +193,9 @@ class RENDER_OT_render_view(Operator):
 
 
 class RENDER_OT_render_animation(Operator):
-    bl_label = 'YafaRay render animation'
-    bl_idname = 'render.render_animation'
-    bl_description = 'Render active scene'
+    bl_label = "YafaRay render animation"
+    bl_idname = "render.render_animation"
+    bl_description = "Render active scene"
 
     @classmethod
     def poll(self, context):
@@ -188,7 +206,7 @@ class RENDER_OT_render_animation(Operator):
         sceneLights = checkSceneLights()
         scene = context.scene
 
-        if not sceneLights and scene.intg_light_method == 'Bidirectional':
+        if not sceneLights and scene.intg_light_method == "Bidirectional":
             self.report({'WARNING'}, ("No lights in the scene and lighting method is bidirectional!"))
             return {'CANCELLED'}
 
@@ -199,14 +217,14 @@ class RENDER_OT_render_animation(Operator):
             return {'CANCELLED'}
 
         else:
-            bpy.ops.render.render('INVOKE_DEFAULT', animation = True)
+            bpy.ops.render.render('INVOKE_DEFAULT', animation=True)
             return {'FINISHED'}
 
 
 class RENDER_OT_render_still(Operator):
-    bl_label = 'YafaRay render still'
-    bl_idname = 'render.render_still'
-    bl_description = 'Render active scene'
+    bl_label = "YafaRay render still"
+    bl_idname = "render.render_still"
+    bl_description = "Render active scene"
 
     @classmethod
     def poll(self, context):
@@ -220,7 +238,7 @@ class RENDER_OT_render_still(Operator):
         sceneLights = checkSceneLights()
         scene = context.scene
 
-        if not sceneLights and scene.intg_light_method == 'Bidirectional':
+        if not sceneLights and scene.intg_light_method == "Bidirectional":
             self.report({'WARNING'}, ("No lights in the scene and lighting method is bidirectional!"))
             return {'CANCELLED'}
 
@@ -229,22 +247,22 @@ class RENDER_OT_render_still(Operator):
             # turn off border render
             scene.render.use_border = False
             return {'CANCELLED'}
-           
+
         else:
             bpy.ops.render.render('INVOKE_DEFAULT')
             return {'FINISHED'}
 
 
 class YAF_OT_presets_ior_list(Operator):
-    bl_idname = 'material.set_ior_preset'
-    bl_label = 'IOR presets'
+    bl_idname = "material.set_ior_preset"
+    bl_label = "IOR presets"
     index = bpy.props.FloatProperty()
     name = bpy.props.StringProperty()
 
     @classmethod
     def poll(self, context):
         yaf_mat = context.material
-        return yaf_mat.mat_type == 'glass' or yaf_mat.mat_type == 'rough_glass'
+        return yaf_mat.mat_type in {"glass", "rough_glass"}
 
     def execute(self, context):
         yaf_mat = context.material
diff --git a/ot/yafaray_presets.py b/ot/yafaray_presets.py
index 4414f3c..8b342d1 100644
--- a/ot/yafaray_presets.py
+++ b/ot/yafaray_presets.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from bpy.types import Operator
 import os
@@ -6,7 +24,7 @@ from bpy.path import clean_name, display_name
 from bpy_types import StructRNA, _GenericUI, RNAMeta
 
 
-def yaf_preset_find(name, preset_path, disp_name = False):
+def yaf_preset_find(name, preset_path, disp_name=False):
     if not name:
         return None
 
@@ -87,7 +105,7 @@ class YAF_AddPresetBase():
             filepath = yaf_preset_find(preset_active, target_path)
 
             if not filepath:
-                filepath = yaf_preset_find(preset_active, target_path, disp_name = True)
+                filepath = yaf_preset_find(preset_active, target_path, disp_name=True)
 
             if not filepath:
                 return {'CANCELLED'}
diff --git a/prop/__init__.py b/prop/__init__.py
index accd8a2..ffb4ec0 100644
--- a/prop/__init__.py
+++ b/prop/__init__.py
@@ -1,15 +1,45 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 from . import yaf_object
 from . import yaf_material
 from . import yaf_light
+from . import yaf_scene
+from . import yaf_camera
+from . import yaf_texture
+from . import yaf_world
 
 
 def register():
     yaf_object.register()
     yaf_material.register()
     yaf_light.register()
+    yaf_scene.register()
+    yaf_camera.register()
+    yaf_texture.register()
+    yaf_world.register()
 
 
 def unregister():
     yaf_object.unregister()
     yaf_material.unregister()
     yaf_light.unregister()
+    yaf_scene.unregister()
+    yaf_camera.unregister()
+    yaf_texture.unregister()
+    yaf_world.unregister()
diff --git a/prop/yaf_camera.py b/prop/yaf_camera.py
new file mode 100644
index 0000000..698eebe
--- /dev/null
+++ b/prop/yaf_camera.py
@@ -0,0 +1,113 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+import bpy
+from bpy.props import (FloatProperty,
+                       EnumProperty,
+                       BoolProperty)
+
+Camera = bpy.types.Camera
+
+
+def call_camera_update(self, context):
+    camera = context.camera
+    if camera is not None:
+        if camera.camera_type == 'orthographic':
+            camera.type = 'ORTHO'
+        else:
+            camera.type = 'PERSP'
+
+
+def register():
+    Camera.camera_type = EnumProperty(
+        name="Camera Type",
+        items=(
+            ('perspective', "Perspective", ""),
+            ('architect', "Architect", ""),
+            ('angular', "Angular", ""),
+            ('orthographic', "Ortho", "")
+        ),
+        update=call_camera_update,
+        default='perspective')
+
+    Camera.angular_angle = FloatProperty(
+        name="Angle",
+        min=0.0, max=180.0, precision=3,
+        default=90.0)
+
+    Camera.max_angle = FloatProperty(
+        name="Max Angle",
+        min=0.0, max=180.0, precision=3,
+        default=90.0)
+
+    Camera.mirrored = BoolProperty(
+        name="Mirrored",
+        default=False)
+
+    Camera.circular = BoolProperty(
+        name="Circular",
+        default=False)
+
+    Camera.use_clipping = BoolProperty(
+        name="Use clipping",
+        default=False)
+
+    Camera.bokeh_type = EnumProperty(
+        name="Bokeh type",
+        items=(
+            ('disk1', "Disk1", ""),
+            ('disk2', "Disk2", ""),
+            ('triangle', "Triangle", ""),
+            ('square', "Square", ""),
+            ('pentagon', "Pentagon", ""),
+            ('hexagon', "Hexagon", ""),
+            ('ring', "Ring", "")
+        ),
+        default='disk1')
+
+    Camera.aperture = FloatProperty(
+        name="Aperture",
+        min=0.0, max=20.0, precision=5,
+        default=0.0)
+
+    Camera.bokeh_rotation = FloatProperty(
+        name="Bokeh rotation",
+        min=0.0, max=180, precision=3,
+        default=0.0)
+
+    Camera.bokeh_bias = EnumProperty(
+        name="Bokeh bias",
+        items=(
+            ('uniform', "Uniform", ""),
+            ('center', "Center", ""),
+            ('edge', "Edge", "")
+        ),
+        default='uniform')
+
+
+def unregister():
+    Camera.camera_type
+    Camera.angular_angle
+    Camera.max_angle
+    Camera.mirrored
+    Camera.circular
+    Camera.use_clipping
+    Camera.bokeh_type
+    Camera.aperture
+    Camera.bokeh_rotation
+    Camera.bokeh_bias
diff --git a/prop/yaf_light.py b/prop/yaf_light.py
index fc6ec83..d1c6f2c 100644
--- a/prop/yaf_light.py
+++ b/prop/yaf_light.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from bpy.props import (EnumProperty,
                        BoolProperty,
@@ -10,8 +28,9 @@ Lamp = bpy.types.Lamp
 
 def call_lighttype_update(self, context):
         lamp = context.lamp
-        switchLampType = {'area': 'AREA', 'spot': 'SPOT', 'sun': 'SUN', 'point': 'POINT', 'ies': 'SPOT'}
-        lamp.type = switchLampType.get(lamp.lamp_type)
+        if lamp is not None:
+            switchLampType = {'area': 'AREA', 'spot': 'SPOT', 'sun': 'SUN', 'point': 'POINT', 'ies': 'SPOT'}
+            lamp.type = switchLampType.get(lamp.lamp_type)
 
 
 def register():
diff --git a/prop/yaf_material.py b/prop/yaf_material.py
index 5b3cce3..cf992b3 100644
--- a/prop/yaf_material.py
+++ b/prop/yaf_material.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from bpy.props import (FloatProperty,
                        BoolProperty,
diff --git a/prop/yaf_object.py b/prop/yaf_object.py
index f89e611..c2bfcea 100644
--- a/prop/yaf_object.py
+++ b/prop/yaf_object.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from bpy.props import (FloatVectorProperty,
                        FloatProperty,
diff --git a/prop/yaf_scene.py b/prop/yaf_scene.py
new file mode 100644
index 0000000..ea40a24
--- /dev/null
+++ b/prop/yaf_scene.py
@@ -0,0 +1,445 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+import bpy
+from sys import platform
+from bpy.props import (IntProperty,
+                       FloatProperty,
+                       FloatVectorProperty,
+                       EnumProperty,
+                       BoolProperty,
+                       StringProperty)
+
+Scene = bpy.types.Scene
+
+
+# set fileformat for image saving on same format as in YafaRay, both have default PNG
+def call_update_fileformat(self, context):
+    sc = context.scene
+    rd = sc.render
+    if sc.img_output != rd.file_format:
+        rd.file_format = sc.img_output
+        if rd.file_format == "OPEN_EXR" and sc.gs_z_channel:
+            rd.exr_zbuf = True
+
+
+def register():
+    # Default Gamma values for Windows = 2.2, for Linux and MacOS = 1.8
+    if platform == "win32":
+        gamma = 2.20
+    else:
+        gamma = 1.80
+
+    ########### YafaRays general settings properties #############
+    Scene.gs_ray_depth = IntProperty(
+        name="Ray depth",
+        description="Maximum depth for recursive raytracing",
+        min=0, max=64, default=2)
+
+    Scene.gs_shadow_depth = IntProperty(
+        name="Shadow depth",
+        description="Max. depth for transparent shadows calculation (if enabled)",
+        min=0, max=64, default=2)
+
+    Scene.gs_threads = IntProperty(
+        name="Threads",
+        description="Number of threads to use for rendering",
+        min=1, default=1)
+
+    Scene.gs_gamma = FloatProperty(
+        name="Gamma",
+        description="Gamma correction applied to final output, inverse correction "
+                    "of textures and colors is performed",
+        min=0, max=5, default=gamma)
+
+    Scene.gs_gamma_input = FloatProperty(
+        name="Gamma input",
+        description="Gamma correction applied to input",
+        min=0, max=5, default=gamma)
+
+    Scene.gs_tile_size = IntProperty(
+        name="Tile size",
+        description="Size of the render buckets (tiles)",
+        min=0, max=1024, default=32)
+
+    Scene.gs_tile_order = EnumProperty(
+        name="Tile order",
+        description="Selects tiles order type",
+        items=(
+            ('linear', "Linear", ""),
+            ('random', "Random", "")
+        ),
+        default='random')
+
+    Scene.gs_auto_threads = BoolProperty(
+        name="Auto threads",
+        description="Activate thread number auto detection",
+        default=True)
+
+    Scene.gs_clay_render = BoolProperty(
+        name="Render clay",
+        description="Override all materials with a white diffuse material",
+        default=False)
+
+    # added clay color property
+    Scene.gs_clay_col = FloatVectorProperty(
+        name="Clay color",
+        description="Color of clay render material",
+        subtype='COLOR',
+        min=0.0, max=1.0,
+        default=(0.8, 0.8, 0.8))
+
+    Scene.gs_mask_render = BoolProperty(
+        name="Render mask",
+        description="Renders an object mask pass with different colors",
+        default=False)
+
+    Scene.gs_draw_params = BoolProperty(
+        name="Draw parameters",
+        description="Write the render parameters below the image",
+        default=False)
+
+    Scene.gs_custom_string = StringProperty(
+        name="Custom string",
+        description="Custom string will be added to the info bar, "
+                    "use it for CPU, RAM etc.",
+        default="")
+
+    Scene.gs_premult = BoolProperty(
+        name="Premultiply",
+        description="Premultipy Alpha channel for renders with transparent background",
+        default=False)
+
+    Scene.gs_transp_shad = BoolProperty(
+        name="Transparent shadows",
+        description="Compute transparent shadows",
+        default=False)
+
+    Scene.gs_clamp_rgb = BoolProperty(
+        name="Clamp RGB",
+        description="Reduce the color's brightness to a low dynamic range",
+        default=False)
+
+    Scene.gs_show_sam_pix = BoolProperty(
+        name="Show sample pixels",
+        description="Masks pixels marked for resampling during adaptive passes",
+        default=True)
+
+    Scene.gs_z_channel = BoolProperty(
+        name="Render depth map",
+        description="Render depth map (Z-Buffer)",
+        default=False)
+
+    Scene.gs_verbose = BoolProperty(
+        name="Log info to console",
+        description="Print YafaRay engine log messages in console window",
+        default=True)
+
+    Scene.gs_type_render = EnumProperty(
+        name="Render",
+        description="Choose the render output method",
+        items=(
+            ('file', "Image file", "Render the Scene and write it to an Image File when finished"),
+            ('into_blender', "Into Blender", "Render the Scene into Blenders Renderbuffer"),
+            ('xml', "XML file", "Export the Scene to a XML File")
+        ),
+        default='into_blender')
+
+    ######### YafaRays own image output property ############
+    Scene.img_output = EnumProperty(
+        name="Image File Type",
+        description="Image will be saved in this file format",
+        items=(
+            ('PNG', " PNG (Portable Network Graphics)", ""),
+            ('TARGA', " TGA (Truevision TARGA)", ""),
+            ('JPEG', " JPEG (Joint Photographic Experts Group)", ""),
+            ('TIFF', " TIFF (Tag Image File Format)", ""),
+            ('OPEN_EXR', " EXR (IL&M OpenEXR)", ""),
+            ('HDR', " HDR (Radiance RGBE)", "")
+        ),
+        default='PNG', update=call_update_fileformat)
+
+    ########### YafaRays integrator properties #############
+    Scene.intg_light_method = EnumProperty(
+        name="Lighting Method",
+        items=(
+            ('Direct Lighting', "Direct Lighting", ""),
+            ('Photon Mapping', "Photon Mapping", ""),
+            ('Pathtracing', "Pathtracing", ""),
+            ('Debug', "Debug", ""),
+            ('Bidirectional', "Bidirectional", ""),
+            ('SPPM', "SPPM", "")
+        ),
+        default='Direct Lighting')
+
+    Scene.intg_use_caustics = BoolProperty(
+        name="Caustic Photons",
+        description="Enable photon map for caustics only",
+        default=False)
+
+    Scene.intg_photons = IntProperty(
+        name="Photons",
+        description="Number of photons to be shot",
+        min=1, max=100000000,
+        default=500000)
+
+    Scene.intg_caustic_mix = IntProperty(
+        name="Caustic Mix",
+        description="Max. number of photons to mix (blur)",
+        min=1, max=10000,
+        default=100)
+
+    Scene.intg_caustic_depth = IntProperty(
+        name="Caustic Depth",
+        description="Max. number of scatter events for photons",
+        min=0, max=50,
+        default=10)
+
+    Scene.intg_caustic_radius = FloatProperty(
+        name="Caustic Radius",
+        description="Max. radius to search for photons",
+        min=0.0001, max=100.0,
+        default=1.0)
+
+    Scene.intg_use_AO = BoolProperty(
+        name="Ambient Occlusion",
+        description="Enable ambient occlusion",
+        default=False)
+
+    Scene.intg_AO_samples = IntProperty(
+        name="Samples",
+        description="Number of samples for ambient occlusion",
+        min=1, max=1000,
+        default=32)
+
+    Scene.intg_AO_distance = FloatProperty(
+        name="Distance",
+        description=("Max. occlusion distance."
+                     " Surfaces further away do not occlude ambient light"),
+        min=0.0, max=10000.0,
+        default=1.0)
+
+    Scene.intg_AO_color = FloatVectorProperty(
+        name="AO Color",
+        description="Color Settings", subtype='COLOR',
+        min=0.0, max=1.0,
+        default=(0.9, 0.9, 0.9))
+
+    Scene.intg_bounces = IntProperty(
+        name="Depth",
+        description="",
+        min=1,
+        default=4)
+
+    Scene.intg_diffuse_radius = FloatProperty(
+        name="Search radius",
+        description="Radius to search for diffuse photons",
+        min=0.001,
+        default=1.0)
+
+    Scene.intg_cPhotons = IntProperty(
+        name="Count",
+        description="Number of caustic photons to be shot",
+        min=1, default=500000)
+
+    Scene.intg_search = IntProperty(
+        name="Search count",
+        description="Maximum number of diffuse photons to be filtered",
+        min=1, max=10000,
+        default=100)
+
+    Scene.intg_final_gather = BoolProperty(
+        name="Final Gather",
+        description="Use final gathering (recommended)",
+        default=True)
+
+    Scene.intg_fg_bounces = IntProperty(
+        name="Bounces",
+        description="Allow gather rays to extend to paths of this length",
+        min=1, max=20,
+        default=3)
+
+    Scene.intg_fg_samples = IntProperty(
+        name="Samples",
+        description="Number of samples for final gathering",
+        min=1,
+        default=16)
+
+    Scene.intg_show_map = BoolProperty(
+        name="Show radiance map",
+        description="Directly show radiance map, useful to calibrate the photon map (disables final gathering step)",
+        default=False)
+
+    Scene.intg_caustic_method = EnumProperty(
+        name="Caustic Method",
+        items=(
+            ('None', "None", ""),
+            ('Path', "Path", ""),
+            ('Path+Photon', "Path+Photon", ""),
+            ('Photon', "Photon", "")),
+        description="Choose caustic rendering method",
+        default='None')
+
+    Scene.intg_path_samples = IntProperty(
+        name="Path Samples",
+        description="Number of path samples per pixel sample",
+        min=1,
+        default=32)
+
+    Scene.intg_no_recursion = BoolProperty(
+        name="No Recursion",
+        description="No recursive raytracing, only pure path tracing",
+        default=False)
+
+    Scene.intg_debug_type = EnumProperty(
+        name="Debug type",
+        items=(
+            ('N', "N", ""),
+            ('dPdU', "dPdU", ""),
+            ('dPdV', "dPdV", ""),
+            ('NU', "NU", ""),
+            ('NV', "NV", ""),
+            ('dSdU', "dSdU", ""),
+            ('dSdV', "dSdV", "")),
+        default='dSdV')
+
+    Scene.intg_show_perturbed_normals = BoolProperty(
+        name="Show perturbed normals",
+        description="Show the normals perturbed by bump and normal maps",
+        default=False)
+
+    Scene.intg_pm_ire = BoolProperty(
+        name="PM IRE",
+        default=False)
+
+    Scene.intg_pass_num = IntProperty(
+        name="Passes",
+        min=1,
+        default=1000)
+
+    Scene.intg_times = FloatProperty(
+        name="Radius factor",
+        min=0.0,
+        default=1.0)
+
+    Scene.intg_photon_radius = FloatProperty(
+        name="Search radius",
+        min=0.0,
+        default=1.0)
+
+    ######### YafaRays anti-aliasing properties ###########
+    Scene.AA_min_samples = IntProperty(
+        name="Samples",
+        description="Number of samples for first AA pass",
+        min=1,
+        default=1)
+
+    Scene.AA_inc_samples = IntProperty(
+        name="Additional Samples",
+        description="Number of samples for additional AA passes",
+        min=1,
+        default=1)
+
+    Scene.AA_passes = IntProperty(
+        name="Passes",
+        description=("Number of anti-aliasing passes."
+                     " Adaptive sampling (passes > 1) uses different pattern"),
+        min=1,
+        default=1)
+
+    Scene.AA_threshold = FloatProperty(
+        name="Threshold",
+        description="Color threshold for additional AA samples in next pass",
+        min=0.0, max=1.0, precision=4,
+        default=0.05)
+
+    Scene.AA_pixelwidth = FloatProperty(
+        name="Pixelwidth",
+        description="AA filter size",
+        min=1.0, max=20.0, precision=3,
+        default=1.5)
+
+    Scene.AA_filter_type = EnumProperty(
+        name="Filter",
+        items=(
+            ('box', "Box", "AA filter type"),
+            ('mitchell', "Mitchell", "AA filter type"),
+            ('gauss', "Gauss", "AA filter type"),
+            ('lanczos', "Lanczos", "AA filter type")
+        ),
+        default="gauss")
+
+
+def unregister():
+    Scene.gs_ray_depth
+    Scene.gs_shadow_depth
+    Scene.gs_threads
+    Scene.gs_gamma
+    Scene.gs_gamma_input
+    Scene.gs_tile_size
+    Scene.gs_tile_order
+    Scene.gs_auto_threads
+    Scene.gs_clay_render
+    Scene.gs_clay_col
+    Scene.gs_mask_render
+    Scene.gs_draw_params
+    Scene.gs_custom_string
+    Scene.gs_premult
+    Scene.gs_transp_shad
+    Scene.gs_clamp_rgb
+    Scene.gs_show_sam_pix
+    Scene.gs_z_channel
+    Scene.gs_verbose
+    Scene.gs_type_render
+
+    Scene.img_output
+
+    Scene.intg_light_method
+    Scene.intg_use_caustics
+    Scene.intg_photons
+    Scene.intg_caustic_mix
+    Scene.intg_caustic_depth
+    Scene.intg_caustic_radius
+    Scene.intg_use_AO
+    Scene.intg_AO_samples
+    Scene.intg_AO_distance
+    Scene.intg_AO_color
+    Scene.intg_bounces
+    Scene.intg_diffuse_radius
+    Scene.intg_cPhotons
+    Scene.intg_search
+    Scene.intg_final_gather
+    Scene.intg_fg_bounces
+    Scene.intg_fg_samples
+    Scene.intg_show_map
+    Scene.intg_caustic_method
+    Scene.intg_path_samples
+    Scene.intg_no_recursion
+    Scene.intg_debug_type
+    Scene.intg_show_perturbed_normals
+    Scene.intg_pm_ire
+    Scene.intg_pass_num
+    Scene.intg_times
+    Scene.intg_photon_radius
+
+    Scene.AA_min_samples
+    Scene.AA_inc_samples
+    Scene.AA_passes
+    Scene.AA_threshold
+    Scene.AA_pixelwidth
+    Scene.AA_filter_type
diff --git a/prop/yaf_texture.py b/prop/yaf_texture.py
new file mode 100644
index 0000000..5cf4b29
--- /dev/null
+++ b/prop/yaf_texture.py
@@ -0,0 +1,69 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+import bpy
+from bpy.props import (EnumProperty,
+                       StringProperty,
+                       BoolProperty)
+
+Texture = bpy.types.Texture
+
+
+# update blender propertie texture.type to YafaRay's texture.yaf_tex_type
+def call_tex_type_update(self, context):
+    tex = context.texture
+    if tex is not None:
+        tex.type = tex.yaf_tex_type
+
+
+def register():
+    Texture.yaf_tex_type = EnumProperty(
+        name="Type",
+        items=(
+            ('NONE', "None", ""),
+            ('BLEND', "Blend", ""),
+            ('CLOUDS', "Clouds", ""),
+            ('WOOD', "Wood", ""),
+            ('MARBLE', "Marble", ""),
+            ('VORONOI', "Voronoi", ""),
+            ('MUSGRAVE', "Musgrave", ""),
+            ('DISTORTED_NOISE', "Distorted Noise", ""),
+            ('IMAGE', "Image", "")
+        ),
+        update=call_tex_type_update,
+        default='NONE')
+
+    Texture.yaf_tex_interpolate = EnumProperty(
+        name="Interpolation",
+        items=(
+            ('bilinear', "Bilinear", ""),
+            ('bicubic', "Bicubic", ""),
+            ('none', "None", "")
+        ),
+        default='bilinear')
+
+    Texture.yaf_is_normal_map = BoolProperty(
+        name="Use map as normal map",
+        description="Use image RGB values for normal mapping",
+        default=False)
+
+
+def unregister():
+    Texture.yaf_tex_type
+    Texture.yaf_tex_interpolate
+    Texture.yaf_is_normal_map
diff --git a/prop/yaf_world.py b/prop/yaf_world.py
new file mode 100644
index 0000000..1e4e264
--- /dev/null
+++ b/prop/yaf_world.py
@@ -0,0 +1,332 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+import bpy
+from bpy.props import (EnumProperty,
+                       FloatProperty,
+                       FloatVectorProperty,
+                       IntProperty,
+                       BoolProperty)
+
+World = bpy.types.World
+
+
+def call_world_update(self, context):
+    world = context.scene.world
+    world.ambient_color = world.ambient_color
+
+
+def register():
+    ########### YafaRays world background properties #############
+    World.bg_type = EnumProperty(
+        name="Background",
+        items=(
+            ('Gradient', "Gradient", "Gradient background"),
+            ('Texture', "Texture", "Textured background"),
+            ('Sunsky1', "Sunsky1", "Sunsky background"),
+            ('Sunsky2', "Sunsky2", "New model of Sunsky background"),
+            ('Single Color', "Single Color", "Single color background")
+        ),
+        default="Single Color",
+        update=call_world_update)
+
+    World.bg_color_space = EnumProperty(
+        name="Color space",
+        items=(
+            ('CIE (E)', "CIE (E)", "Select color space model"),
+            ('CIE (D50)', "CIE (D50)", "Select color space model"),
+            ('sRGB (D65)', "sRGB (D65)", "Select color space model"),
+            ('sRGB (D50)', "sRGB (D50)", "Select color space model")
+        ),
+        default="CIE (E)",
+        update=call_world_update)
+
+    World.bg_zenith_color = FloatVectorProperty(
+        name="Zenith color",
+        description="Zenith color",
+        subtype='COLOR',
+        min=0.0, max=1.0,
+        default=(0.57, 0.65, 1.0),
+        update=call_world_update)
+
+    World.bg_horizon_color = FloatVectorProperty(
+        name="Horizon color",
+        description="Horizon color",
+        subtype='COLOR',
+        min=0.0, max=1.0,
+        default=(1.0, 1.0, 0.5),
+        update=call_world_update)
+
+    World.bg_zenith_ground_color = FloatVectorProperty(
+        name="Zenith ground color",
+        description="Zenith ground color",
+        subtype='COLOR',
+        min=0.0, max=1.0,
+        default=(1.0, 0.9, 0.8),
+        update=call_world_update)
+
+    World.bg_horizon_ground_color = FloatVectorProperty(
+        name="Horizon ground color",
+        description="Horizon ground color",
+        subtype='COLOR',
+        min=0.0, max=1.0,
+        default=(0.8, 0.6, 0.3),
+        update=call_world_update)
+
+    World.bg_single_color = FloatVectorProperty(
+        name="Background color",
+        description="Background color",
+        subtype='COLOR',
+        min=0.0, max=1.0,
+        default=(0.7, 0.7, 0.7),
+        update=call_world_update)
+
+    World.bg_use_ibl = BoolProperty(
+        name="Use IBL",
+        description="Use the background as the light source for your image",
+        default=False)
+
+    World.bg_with_caustic = BoolProperty(
+        name="Caustic photons",
+        description="Allow background light to shoot caustic photons",
+        default=True)
+
+    World.bg_with_diffuse = BoolProperty(
+        name="Diffuse photons",
+        description="Allow background light to shoot diffuse photons",
+        default=True)
+
+    World.bg_ibl_samples = IntProperty(
+        name="IBL Samples",
+        description="Number of samples for direct lighting from background",
+        min=1, max=512,
+        default=16)
+
+    World.bg_rotation = FloatProperty(
+        name="Rotation",
+        description="Rotation offset of background texture",
+        min=0.0, max=360.0,
+        default=0.0,
+        update=call_world_update)
+
+    World.bg_turbidity = FloatProperty(
+        name="Turbidity",
+        description="Turbidity of the atmosphere",
+        min=1.0, max=20.0,
+        default=2.0,
+        update=call_world_update)
+
+    World.bg_ds_turbidity = FloatProperty(  # Darktides turbidity has different values
+        name="Turbidity",
+        description="Turbidity of the atmosphere",
+        min=2.0, max=12.0,
+        default=2.0,
+        update=call_world_update)
+
+    World.bg_a_var = FloatProperty(
+        name="Brightness of horizon gradient",
+        description="Darkening or brightening towards horizon",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_b_var = FloatProperty(
+        name="Luminance of horizon",
+        description="Luminance gradient near the horizon",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_c_var = FloatProperty(
+        name="Solar region intensity",
+        description="Relative intensity of circumsolar region",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_d_var = FloatProperty(
+        name="Width of circumsolor region",
+        description="Width of circumsolar region",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_e_var = FloatProperty(
+        name="Backscattered light",
+        description="Relative backscattered light",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_from = FloatVectorProperty(
+        name="Set sun position",
+        description="Set the position of the sun",
+        subtype='DIRECTION',
+        step=10, precision=3,
+        min=-1.0, max=1.0,
+        default=(1.0, 1.0, 1.0),
+        update=call_world_update)
+
+    World.bg_add_sun = BoolProperty(
+        name="Add sun",
+        description="Add a real sun light",
+        default=False,
+        update=call_world_update)
+
+    World.bg_sun_power = FloatProperty(
+        name="Sunlight power",
+        description="Sunlight power",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_background_light = BoolProperty(
+        name="Add skylight",
+        description="Add skylight",
+        default=False,
+        update=call_world_update)
+
+    World.bg_light_samples = IntProperty(
+        name="Samples",
+        description="Set skylight and sunlight samples",
+        min=1, max=512,
+        default=16,
+        update=call_world_update)
+
+    World.bg_dsaltitude = FloatProperty(
+        name="Altitude",
+        description="Moves the sky dome above or below the camera position",
+        min=-1.0, max=2.0,
+        default=0.0,
+        update=call_world_update)
+
+    World.bg_dsnight = BoolProperty(
+        name="Night",
+        description="Activate experimental night mode",
+        default=False,
+        update=call_world_update)
+
+    World.bg_dsbright = FloatProperty(
+        name="Sky brightness",
+        description="Brightness of the sky",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_power = FloatProperty(
+        name="Skylight power",
+        description="Multiplier for background color",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_exposure = FloatProperty(
+        name="Exposure",
+        description="Exposure correction for the sky (0 = no correction)",
+        min=0.0, max=10.0,
+        default=1.0,
+        update=call_world_update)
+
+    World.bg_clamp_rgb = BoolProperty(
+        name="Clamp RGB",
+        description="Clamp RGB values",
+        default=False)
+
+    World.bg_gamma_enc = BoolProperty(
+        name="Gamma encoding",
+        description="Apply gamma encoding to the sky",
+        default=True,
+        update=call_world_update)
+
+    ########### YafaRays volume integrator properties #############
+    World.v_int_type = EnumProperty(
+        name="Volume integrator",
+        description="Set the volume integrator",
+        items=(
+            ('None', "None", ""),
+            ('Single Scatter', "Single Scatter", "")
+        ),
+        default='None')
+
+    World.v_int_step_size = FloatProperty(
+        name="Step size",
+        description="Precision of volumetric rendering (in Blender units)",
+        min=0.0, max=100.0,
+        precision=3,
+        default=1.000)
+
+    World.v_int_adaptive = BoolProperty(
+        name="Adaptive",
+        description="Optimizes stepping calculations for NoiseVolumes",
+        default=False)
+
+    World.v_int_optimize = BoolProperty(
+        name="Optimize",
+        description="Precomputing attenuation in the entire volume at a 3d grid of points",
+        default=False)
+
+    World.v_int_attgridres = IntProperty(
+        name="Att. grid resolution",
+        description="Optimization attenuation grid resolution",
+        min=1, max=50,
+        default=1)
+
+    # ??? not sure about the following properties ???
+    # World.v_int_scale = FloatProperty(attr = "v_int_scale")
+    # World.v_int_alpha =       FloatProperty(attr = "v_int_alpha")
+    # World.v_int_dsturbidity = FloatProperty(attr = "v_int_dsturbidity")
+
+
+def unregister():
+    World.bg_type
+    World.bg_color_space
+    World.bg_zenith_color
+    World.bg_horizon_color
+    World.bg_zenith_ground_color
+    World.bg_horizon_ground_color
+    World.bg_single_color
+    World.bg_use_ibl
+    World.bg_with_caustic
+    World.bg_with_diffuse
+    World.bg_ibl_samples
+    World.bg_rotation
+    World.bg_turbidity
+    World.bg_ds_turbidity
+    World.bg_a_var
+    World.bg_b_var
+    World.bg_c_var
+    World.bg_d_var
+    World.bg_e_var
+    World.bg_from
+    World.bg_add_sun
+    World.bg_sun_power
+    World.bg_background_light
+    World.bg_light_samples
+    World.bg_dsaltitude
+    World.bg_dsnight
+    World.bg_dsbright
+    World.bg_power
+    World.bg_exposure
+    World.bg_clamp_rgb
+    World.bg_gamma_enc
+
+    World.v_int_type
+    World.v_int_step_size
+    World.v_int_adaptive
+    World.v_int_optimize
+    World.v_int_attgridres
diff --git a/ui/__init__.py b/ui/__init__.py
index 64f27d7..f8cdcec 100644
--- a/ui/__init__.py
+++ b/ui/__init__.py
@@ -1,4 +1,21 @@
-#This file is part of Yafaray Exporter Integration for Blender 2.5
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 from . import properties_yaf_render
 from . import properties_yaf_camera
 from . import properties_yaf_material
diff --git a/ui/ior_values.py b/ui/ior_values.py
index be29917..eeaf5a4 100644
--- a/ui/ior_values.py
+++ b/ui/ior_values.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 ior_list = [
     ('Liquid', [
         ('Acetone', 1.360),
diff --git a/ui/properties_yaf_AA_settings.py b/ui/properties_yaf_AA_settings.py
index c9ccb61..6dade62 100644
--- a/ui/properties_yaf_AA_settings.py
+++ b/ui/properties_yaf_AA_settings.py
@@ -1,54 +1,26 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
-# import types and props ---->
-from bpy.props import (IntProperty,
-                       FloatProperty,
-                       EnumProperty)
 from bpy.types import Panel
 from bl_ui.properties_render import RenderButtonsPanel
-RenderButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
-
-Scene = bpy.types.Scene
-
-Scene.AA_min_samples = IntProperty(
-    name="Samples",
-    description="Number of samples for first AA pass",
-    min=1,
-    default=1)
-
-Scene.AA_inc_samples = IntProperty(
-    name="Additional Samples",
-    description="Number of samples for additional AA passes",
-    min=1,
-    default=1)
 
-Scene.AA_passes = IntProperty(
-    name="Passes",
-    description=("Number of anti-aliasing passes."
-                 " Adaptive sampling (passes > 1) uses different pattern"),
-    min=1,
-    default=1)
-
-Scene.AA_threshold = FloatProperty(
-    name="Threshold",
-    description="Color threshold for additional AA samples in next pass",
-    min=0.0, max=1.0, precision=4,
-    default=0.05)
-
-Scene.AA_pixelwidth = FloatProperty(
-    name="Pixelwidth",
-    description="AA filter size",
-    min=1.0, max=20.0, precision=3,
-    default=1.5)
-
-Scene.AA_filter_type = EnumProperty(
-    name="Filter",
-    items=(
-        ('box', "Box", "AA filter type"),
-        ('mitchell', "Mitchell", "AA filter type"),
-        ('gauss', "Gauss", "AA filter type"),
-        ('lanczos', "Lanczos", "AA filter type")
-    ),
-    default="gauss")
+RenderButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
 
 
 class YAF_PT_AA_settings(RenderButtonsPanel, Panel):
@@ -61,13 +33,13 @@ class YAF_PT_AA_settings(RenderButtonsPanel, Panel):
 
         split = layout.split()
         col = split.column()
-        col.prop(scene, 'AA_filter_type')
-        col.prop(scene, 'AA_min_samples')
-        col.prop(scene, 'AA_pixelwidth')
+        col.prop(scene, "AA_filter_type")
+        col.prop(scene, "AA_min_samples")
+        col.prop(scene, "AA_pixelwidth")
 
         col = split.column()
-        col.prop(scene, 'AA_passes')
+        col.prop(scene, "AA_passes")
         sub = col.column()
         sub.enabled = scene.AA_passes > 1
-        sub.prop(scene, 'AA_inc_samples')
-        sub.prop(scene, 'AA_threshold')
+        sub.prop(scene, "AA_inc_samples")
+        sub.prop(scene, "AA_threshold")
diff --git a/ui/properties_yaf_camera.py b/ui/properties_yaf_camera.py
index 0963bdc..e1091da 100644
--- a/ui/properties_yaf_camera.py
+++ b/ui/properties_yaf_camera.py
@@ -1,145 +1,70 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
-#import types and props ---->
-from bpy.props import FloatProperty, EnumProperty, BoolProperty
 from bpy.types import Panel
-from bl_ui import properties_data_camera
-Camera = bpy.types.Camera
-
-
-def call_camera_update(self, context):
-    camera = context.camera
-    if camera is not None:
-        if camera.camera_type == 'orthographic':
-            camera.type = 'ORTHO'
-        else:
-            camera.type = 'PERSP'
-
-Camera.camera_type = EnumProperty(
-    name="Camera Type",
-    items=(
-        ('perspective', "Perspective", ""),
-        ('architect', "Architect", ""),
-        ('angular', "Angular", ""),
-        ('orthographic', "Ortho", "")
-    ),
-    update=call_camera_update,
-    default='perspective')
-
-Camera.angular_angle = FloatProperty(
-    name="Angle",
-    min=0.0, max=180.0, precision=3,
-    default=90.0)
-
-Camera.max_angle = FloatProperty(
-    name="Max Angle",
-    min=0.0, max=180.0, precision=3,
-    default=90.0)
-
-Camera.mirrored = BoolProperty(
-    name="Mirrored",
-    default=False)
-
-Camera.circular = BoolProperty(
-    name="Circular",
-    default=False)
-
-Camera.use_clipping = BoolProperty(
-    name="Use clipping",
-    default=False)
-
-Camera.bokeh_type = EnumProperty(
-    name="Bokeh type",
-    items=(
-        ('disk1', "Disk1", ""),
-        ('disk2', "Disk2", ""),
-        ('triangle', "Triangle", ""),
-        ('square', "Square", ""),
-        ('pentagon', "Pentagon", ""),
-        ('hexagon', "Hexagon", ""),
-        ('ring', "Ring", "")
-    ),
-    default='disk1')
-
-Camera.aperture = FloatProperty(
-    name="Aperture",
-    min=0.0, max=20.0, precision=5,
-    default=0.0)
-
-Camera.bokeh_rotation = FloatProperty(
-    name="Bokeh rotation",
-    min=0.0, max=180, precision=3,
-    default=0.0)
-
-Camera.bokeh_bias = EnumProperty(
-    name="Bokeh bias",
-    items=(
-        ('uniform', "Uniform", ""),
-        ('center', "Center", ""),
-        ('edge', "Edge", "")
-    ),
-    default='uniform')
-
-
-class YAF_PT_camera(Panel):
-    bl_label = "Camera"
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'data'
-    COMPAT_ENGINES = ['YAFA_RENDER']
+from bl_ui.properties_data_camera import CameraButtonsPanel
+
+CameraButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
 
-    @classmethod
-    def poll(cls, context):
-        engine = context.scene.render.engine
-        return context.camera and (engine in cls.COMPAT_ENGINES)
+
+class YAF_PT_camera(CameraButtonsPanel, Panel):
+    bl_label = "Camera"
 
     def draw(self, context):
         layout = self.layout
 
         camera = context.camera
 
-        layout.prop(camera, 'camera_type', expand=True)
+        layout.prop(camera, "camera_type", expand=True)
 
         layout.separator()
 
         if camera.camera_type == 'angular':
-            layout.prop(camera, 'angular_angle')
-            layout.prop(camera, 'max_angle')
-            layout.prop(camera, 'mirrored')
-            layout.prop(camera, 'circular')
+            layout.prop(camera, "angular_angle")
+            layout.prop(camera, "max_angle")
+            layout.prop(camera, "mirrored")
+            layout.prop(camera, "circular")
 
         elif camera.camera_type == 'orthographic':
-            layout.prop(camera, 'ortho_scale')
+            layout.prop(camera, "ortho_scale")
 
         elif camera.camera_type in {'perspective', 'architect'}:
-            layout.prop(camera, 'lens')
+            layout.prop(camera, "lens")
 
             layout.separator()
 
             layout.label("Depth of Field:")
-            layout.prop(camera, 'aperture')
+            layout.prop(camera, "aperture")
             split = layout.split()
-            split.prop(camera, 'dof_object', text="")
+            split.prop(camera, "dof_object", text="")
             col = split.column()
             if camera.dof_object is not None:
                 col.enabled = False
-            col.prop(camera, 'dof_distance', text="Distance")
+            col.prop(camera, "dof_distance", text="Distance")
 
-            layout.prop(camera, 'bokeh_type')
-            layout.prop(camera, 'bokeh_bias')
-            layout.prop(camera, 'bokeh_rotation')
+            layout.prop(camera, "bokeh_type")
+            layout.prop(camera, "bokeh_bias")
+            layout.prop(camera, "bokeh_rotation")
 
 
-class YAF_PT_camera_display(Panel):
+class YAF_PT_camera_display(CameraButtonsPanel, Panel):
     bl_label = "Display"
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'data'
-    COMPAT_ENGINES = ['YAFA_RENDER']
-
-    @classmethod
-    def poll(cls, context):
-        engine = context.scene.render.engine
-        return context.camera and (engine in cls.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout
@@ -149,26 +74,26 @@ class YAF_PT_camera_display(Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(camera, 'show_limits')
-        col.prop(camera, 'show_title_safe')
-        col.prop(camera, 'show_name')
+        col.prop(camera, "show_limits")
+        col.prop(camera, "show_title_safe")
+        col.prop(camera, "show_name")
 
         col = split.column()
-        col.prop(camera, 'draw_size', text="Size")
-        col.prop(camera, 'show_passepartout', text="Passepartout")
+        col.prop(camera, "draw_size", text="Size")
+        col.prop(camera, "show_passepartout", text="Passepartout")
         sub = col.column()
         sub.active = camera.show_passepartout
-        sub.prop(camera, 'passepartout_alpha', text="Alpha", slider=True)
+        sub.prop(camera, "passepartout_alpha", text="Alpha", slider=True)
 
         layout.separator()
-        layout.prop(camera, 'use_clipping')
+        layout.prop(camera, "use_clipping")
 
         split = layout.split()
         col = split.column(align=True)
         clip = col.column()
         clip.active = camera.use_clipping
-        clip.prop(camera, 'clip_start', text="Start")
-        clip.prop(camera, 'clip_end', text="End")
+        clip.prop(camera, "clip_start", text="Start")
+        clip.prop(camera, "clip_end", text="End")
 
         col = split.column()
-        col.prop_menu_enum(camera, 'show_guide')
+        col.prop_menu_enum(camera, "show_guide")
diff --git a/ui/properties_yaf_general_settings.py b/ui/properties_yaf_general_settings.py
index 52a9e49..1360041 100644
--- a/ui/properties_yaf_general_settings.py
+++ b/ui/properties_yaf_general_settings.py
@@ -1,123 +1,27 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
-import sys
 from ..ot import yafaray_presets
 from bl_ui.properties_render import RenderButtonsPanel
-RenderButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
-#import types and props ---->
-from bpy.props import (IntProperty,
-                       FloatProperty,
-                       EnumProperty,
-                       BoolProperty,
-                       StringProperty)
 from bpy.types import Panel, Menu
-Scene = bpy.types.Scene
-
-# Default Gamma values for Windows = 2.2, for Linux and MacOS = 1.8
-if sys.platform == "win32":
-    gamma = 2.20
-else:
-    gamma = 1.80
-
-Scene.gs_ray_depth = IntProperty(
-    name="Ray Depth",
-    description="Maximum depth for recursive raytracing",
-    min=0, max=64, default=2)
-
-Scene.gs_shadow_depth = IntProperty(
-    name="Shadow Depth",
-    description="Max. depth for transparent shadows calculation (if enabled)",
-    min=0, max=64, default=2)
-
-Scene.gs_threads = IntProperty(
-    name="Threads",
-    description="Number of threads to use for rendering",
-    min=1, default=1)
-
-Scene.gs_gamma = FloatProperty(
-    name="Gamma",
-    description="Gamma correction applied to final output, inverse correction \
-of textures and colors is performed",
-    min=0, max=5, default=gamma)
-
-Scene.gs_gamma_input = FloatProperty(
-    name="Gamma Input",
-    description="Gamma correction applied to input",
-    min=0, max=5, default=gamma)
-
-Scene.gs_tile_size = IntProperty(
-    name="Tile Size",
-    description="Size of the render buckets (tiles)",
-    min=0, max=1024, default=32)
-
-Scene.gs_tile_order = EnumProperty(
-    name="Tile Order",
-    description="Selects tiles order type",
-    items=(
-        ('linear', "Linear", ""),
-        ('random', "Random", "")
-    ),
-    default='random')
-
-Scene.gs_auto_threads = BoolProperty(
-    name="Auto Threads",
-    description="Activate thread number auto detection",
-    default=True)
-
-Scene.gs_clay_render = BoolProperty(
-    name="Clay Render",
-    description="Override all materials with a white diffuse material",
-    default=False)
-
-Scene.gs_draw_params = BoolProperty(
-    name="Draw Parameters",
-    description="Write the render parameters below the image",
-    default=False)
-
-Scene.gs_custom_string = StringProperty(
-    name="Custom String",
-    description="Custom string will be added to the info bar, \
-use it for CPU, RAM etc.",
-    default="")
 
-Scene.gs_premult = BoolProperty(
-    name="Premultiply",
-    description="Premultipy Alpha channel for renders with transparent background",
-    default=False)
-
-Scene.gs_transp_shad = BoolProperty(
-    name="Transparent Shadows",
-    description="Compute transparent shadows",
-    default=False)
-
-Scene.gs_clamp_rgb = BoolProperty(
-    name="Clamp RGB",
-    description="Reduce the color's brightness to a low dynamic",
-    default=False)
-
-Scene.gs_show_sam_pix = BoolProperty(
-    name="Show Sample Pixels",
-    description="Masks pixels marked for resampling during adaptive passes",
-    default=True)
-
-Scene.gs_z_channel = BoolProperty(
-    name="Render Depth Map",
-    description="Render depth map (Z-Buffer)",
-    default=False)
-
-Scene.gs_verbose = BoolProperty(
-    name="Log Info in Console",
-    description="Print YafaRay engine log messages in console window",
-    default=True)
-
-Scene.gs_type_render = EnumProperty(
-    name="Render",
-    description="Choose the render output method",
-    items=(
-        ('file', "Image File", "Render the Scene and write it to an Image File when finished"),
-        ('into_blender', "Into Blender", "Render the Scene into Blenders Renderbuffer"),
-        ('xml', "XML File", "Export the Scene to a XML File")
-    ),
-    default='into_blender')
+RenderButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
 
 
 class YAFARAY_MT_presets_render(Menu):
@@ -164,23 +68,26 @@ class YAF_PT_general_settings(RenderButtonsPanel, Panel):
 
         layout.separator()
 
-        row = layout.row()
-        col = row.column()
-        col.prop(scene, "gs_clay_render")
-        col.prop(scene, "gs_transp_shad")
-        col.prop(scene, "gs_premult")
+        split = layout.split()
+        col = split.column()
+        sub = col.split(percentage=0.7)
+        sub.prop(scene, "gs_clay_render")
+        if scene.gs_clay_render:
+            sub.prop(scene, "gs_clay_col", text="")
+        # col.prop(scene, "gs_mask_render")
         sub = col.column()
         sub.enabled = scene.gs_type_render == "file"
         sub.prop(scene, "gs_z_channel")
+        col.prop(scene, "gs_transp_shad")
+        col.prop(scene, "gs_premult")
         col.prop(scene, "gs_draw_params")
 
-        col = row.column()
+        col = split.column()
         col.prop(scene, "gs_auto_threads")
         col.prop(scene, "gs_clamp_rgb")
         col.prop(scene, "gs_show_sam_pix")
         col.prop(scene, "gs_verbose")
 
-        row = layout.row()
-        col = row.column()
+        col = layout.column()
         col.enabled = scene.gs_draw_params
         col.prop(scene, "gs_custom_string")
diff --git a/ui/properties_yaf_integrator.py b/ui/properties_yaf_integrator.py
index 483c6cb..1772377 100644
--- a/ui/properties_yaf_integrator.py
+++ b/ui/properties_yaf_integrator.py
@@ -1,181 +1,26 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
-#import types and props ---->
 from bpy.types import Panel
 from bl_ui.properties_render import RenderButtonsPanel
-RenderButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
-from bpy.props import (IntProperty,
-                       FloatProperty,
-                       FloatVectorProperty,
-                       BoolProperty,
-                       EnumProperty)
-Scene = bpy.types.Scene
-
-Scene.intg_light_method = EnumProperty(
-    name="Lighting Method",
-    items=(
-        ('Direct Lighting', "Direct Lighting", ""),
-        ('Photon Mapping', "Photon Mapping", ""),
-        ('Pathtracing', "Pathtracing", ""),
-        ('Debug', "Debug", ""),
-        ('Bidirectional', "Bidirectional", ""),
-        ('SPPM', "SPPM", "")
-    ),
-    default='Direct Lighting')
-
-Scene.intg_use_caustics = BoolProperty(
-    name="Caustic Photons",
-    description="Enable photon map for caustics only",
-    default=False)
-
-Scene.intg_photons = IntProperty(
-    name="Photons",
-    description="Number of photons to be shot",
-    min=1, max=100000000,
-    default=500000)
-
-Scene.intg_caustic_mix = IntProperty(
-    name="Caustic Mix",
-    description="Max. number of photons to mix (blur)",
-    min=1, max=10000,
-    default=100)
-
-Scene.intg_caustic_depth = IntProperty(
-    name="Caustic Depth",
-    description="Max. number of scatter events for photons",
-    min=0, max=50,
-    default=10)
-
-Scene.intg_caustic_radius = FloatProperty(
-    name="Caustic Radius",
-    description="Max. radius to search for photons",
-    min=0.0001, max=100.0,
-    default=1.0)
-
-Scene.intg_use_AO = BoolProperty(
-    name="Ambient Occlusion",
-    description="Enable ambient occlusion",
-    default=False)
-
-Scene.intg_AO_samples = IntProperty(
-    name="Samples",
-    description="Number of samples for ambient occlusion",
-    min=1, max=1000,
-    default=32)
-
-Scene.intg_AO_distance = FloatProperty(
-    name="Distance",
-    description=("Max. occlusion distance."
-                 " Surfaces further away do not occlude ambient light"),
-    min=0.0, max=10000.0,
-    default=1.0)
-
-Scene.intg_AO_color = FloatVectorProperty(
-    name="AO Color",
-    description="Color Settings", subtype='COLOR',
-    min=0.0, max=1.0,
-    default=(0.9, 0.9, 0.9))
-
-Scene.intg_bounces = IntProperty(
-    name="Depth",
-    description="",
-    min=1,
-    default=4)
-
-Scene.intg_diffuse_radius = FloatProperty(
-    name="Search radius",
-    description="Radius to search for diffuse photons",
-    min=0.001,
-    default=1.0)
-
-Scene.intg_cPhotons = IntProperty(
-    name="Count",
-    description="Number of caustic photons to be shot",
-    min=1, default=500000)
 
-Scene.intg_search = IntProperty(
-    name="Search count",
-    description="Maximum number of diffuse photons to be filtered",
-    min=1, max=10000,
-    default=100)
-
-Scene.intg_final_gather = BoolProperty(
-    name="Final Gather",
-    description="Use final gathering (recommended)",
-    default=True)
-
-Scene.intg_fg_bounces = IntProperty(
-    name="Bounces",
-    description="Allow gather rays to extend to paths of this length",
-    min=1, max=20,
-    default=3)
-
-Scene.intg_fg_samples = IntProperty(
-    name="Samples",
-    description="Number of samples for final gathering",
-    min=1,
-    default=16)
-
-Scene.intg_show_map = BoolProperty(
-    name="Show radiance map",
-    description="Directly show radiance map, useful to calibrate the photon map (disables final gathering step)",
-    default=False)
-
-Scene.intg_caustic_method = EnumProperty(
-    name="Caustic Method",
-    items=(
-        ('None', "None", ""),
-        ('Path', "Path", ""),
-        ('Path+Photon', "Path+Photon", ""),
-        ('Photon', "Photon", "")),
-    description="Choose caustic rendering method",
-    default='None')
-
-Scene.intg_path_samples = IntProperty(
-    name="Path Samples",
-    description="Number of path samples per pixel sample",
-    min=1,
-    default=32)
-
-Scene.intg_no_recursion = BoolProperty(
-    name="No Recursion",
-    description="No recursive raytracing, only pure path tracing",
-    default=False)
-
-Scene.intg_debug_type = EnumProperty(
-    name="Debug type",
-    items=(
-        ('N', "N", ""),
-        ('dPdU', "dPdU", ""),
-        ('dPdV', "dPdV", ""),
-        ('NU', "NU", ""),
-        ('NV', "NV", ""),
-        ('dSdU', "dSdU", ""),
-        ('dSdV', "dSdV", "")),
-    default='dSdV')
-
-Scene.intg_show_perturbed_normals = BoolProperty(
-    name="Show perturbed normals",
-    description="Show the normals perturbed by bump and normal maps",
-    default=False)
-
-Scene.intg_pm_ire = BoolProperty(
-    name="PM IRE",
-    default=False)
-
-Scene.intg_pass_num = IntProperty(
-    name="Passes",
-    min=1,
-    default=1000)
-
-Scene.intg_times = FloatProperty(
-    name="Radius factor",
-    min=0.0,
-    default=1.0)
-
-Scene.intg_photon_radius = FloatProperty(
-    name="Search radius",
-    min=0.0,
-    default=1.0)
+RenderButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
 
 
 class YAF_PT_render(RenderButtonsPanel, Panel):
diff --git a/ui/properties_yaf_light.py b/ui/properties_yaf_light.py
index 01a15ca..d446bcc 100644
--- a/ui/properties_yaf_light.py
+++ b/ui/properties_yaf_light.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from bpy.types import Panel
 
diff --git a/ui/properties_yaf_material.py b/ui/properties_yaf_material.py
index a7e843b..b1fe859 100644
--- a/ui/properties_yaf_material.py
+++ b/ui/properties_yaf_material.py
@@ -1,3 +1,21 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from .ior_values import ior_list
 from bpy.types import Panel, Menu
@@ -9,11 +27,25 @@ from bl_ui.properties_material import (MATERIAL_MT_specials,
 MaterialButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
 
 
-class YAF_PT_material(MaterialButtonsPanel, Panel):
-    bl_label = "YafaRay Material"
+class MaterialTypePanel(MaterialButtonsPanel):
+    COMPAT_ENGINES = {'YAFA_RENDER'}
 
     @classmethod
     def poll(cls, context):
+        yaf_mat = context.material
+        engine = context.scene.render.engine
+        return check_material(yaf_mat) and (yaf_mat.mat_type in cls.material_type) and (engine in cls.COMPAT_ENGINES)
+
+
+class YAF_PT_context_material(MaterialButtonsPanel, Panel):
+    bl_label = ""
+    bl_options = {'HIDE_HEADER'}
+    COMPAT_ENGINES = {'YAFA_RENDER'}
+
+    @classmethod
+    def poll(cls, context):
+        # An exception, dont call the parent poll func because
+        # this manages materials for all engine types
         engine = context.scene.render.engine
         return (context.material or context.object) and (engine in cls.COMPAT_ENGINES)
 
@@ -63,7 +95,7 @@ class YAF_PT_material(MaterialButtonsPanel, Panel):
 
 
 class YAF_MATERIAL_PT_preview(MaterialButtonsPanel, Panel):
-    bl_label = "YafaRay Preview"
+    bl_label = "Preview"
 
     def draw(self, context):
         self.layout.template_preview(context.material)
@@ -106,172 +138,192 @@ class YAF_MT_presets_ior_list(Menu):
             sl.menu(sm.bl_idname)
 
 
-class YAF_PT_material_panel_diffuse(MaterialButtonsPanel, Panel):
-    bl_label = " "
-
-    @classmethod
-    def poll(cls, context):
-        yaf_mat = context.material
-        engine = context.scene.render.engine
-        return check_material(yaf_mat) and (engine in cls.COMPAT_ENGINES)
+class YAF_PT_shinydiffuse_diffuse(MaterialTypePanel, Panel):
+    bl_label = "Diffuse reflection"
+    material_type = 'shinydiffusemat'
 
     def draw(self, context):
         layout = self.layout
         yaf_mat = active_node_mat(context.material)
 
-        if yaf_mat.mat_type == "shinydiffusemat":
-            self.bl_label = "Diffuse reflection"
-            split = layout.split()
-            col = split.column()
-            col.prop(yaf_mat, "diffuse_color")
-            col.prop(yaf_mat, "emit")
-            layout.row().prop(yaf_mat, "diffuse_reflect", slider=True)
+        split = layout.split()
+        col = split.column()
+        col.prop(yaf_mat, "diffuse_color")
+        col.prop(yaf_mat, "emit")
+        layout.row().prop(yaf_mat, "diffuse_reflect", slider=True)
 
-            col = split.column()
-            sub = col.column()
-            sub.label(text="Reflectance model:")
-            sub.prop(yaf_mat, "brdf_type", text="")
-            brdf = sub.column()
-            brdf.enabled = yaf_mat.brdf_type == "oren-nayar"
-            brdf.prop(yaf_mat, "sigma")
+        col = split.column()
+        sub = col.column()
+        sub.label(text="Reflectance model:")
+        sub.prop(yaf_mat, "brdf_type", text="")
+        brdf = sub.column()
+        brdf.enabled = yaf_mat.brdf_type == "oren-nayar"
+        brdf.prop(yaf_mat, "sigma")
 
-            layout.separator()
+        layout.separator()
 
-            box = layout.box()
-            box.label(text="Transparency and translucency:")
-            split = box.split()
-            col = split.column()
-            col.prop(yaf_mat, "transparency", slider=True)
-            col = split.column()
-            col.prop(yaf_mat, "translucency", slider=True)
-            box.row().prop(yaf_mat, "transmit_filter", slider=True)
+        box = layout.box()
+        box.label(text="Transparency and translucency:")
+        split = box.split()
+        col = split.column()
+        col.prop(yaf_mat, "transparency", slider=True)
+        col = split.column()
+        col.prop(yaf_mat, "translucency", slider=True)
+        box.row().prop(yaf_mat, "transmit_filter", slider=True)
 
-        if yaf_mat.mat_type in {"glossy", "coated_glossy"}:
-            self.bl_label = "Diffuse reflection"
-            split = layout.split()
-            col = split.column()
-            col.prop(yaf_mat, "diffuse_color")
 
-            col = split.column()
-            ref = col.column(align=True)
-            ref.label(text="Reflectance model:")
-            ref.prop(yaf_mat, "brdf_type", text="")
-            sig = col.column()
-            sig.enabled = yaf_mat.brdf_type == "oren-nayar"
-            sig.prop(yaf_mat, "sigma")
-            layout.row().prop(yaf_mat, "diffuse_reflect", slider=True)
-
-        if yaf_mat.mat_type in {"glass", "rough_glass"}:
-            self.bl_label = "Real glass settings"
-            layout.label(text="Refraction and Reflections:")
-            split = layout.split()
-            col = split.column()
-            col.prop(yaf_mat, "IOR_refraction")
+class YAF_PT_shinydiffuse_specular(MaterialTypePanel, Panel):
+    bl_label = "Specular reflection"
+    material_type = 'shinydiffusemat'
 
-            col = split.column()
-            col.menu("YAF_MT_presets_ior_list", text=bpy.types.YAF_MT_presets_ior_list.bl_label)
+    def draw(self, context):
+        layout = self.layout
+        yaf_mat = active_node_mat(context.material)
 
-            split = layout.split()
-            col = split.column(align=True)
-            col.prop(yaf_mat, "absorption")
-            col.prop(yaf_mat, "absorption_dist")
+        split = layout.split()
+        col = split.column()
+        col.label(text="Mirror color:")
+        col.prop(yaf_mat, "mirror_color", text="")
 
-            col = split.column(align=True)
-            col.label(text="Dispersion:")
-            col.prop(yaf_mat, "dispersion_power")
+        col = split.column()
+        col.prop(yaf_mat, "fresnel_effect")
+        sub = col.column()
+        sub.enabled = yaf_mat.fresnel_effect
+        sub.prop(yaf_mat, "IOR_reflection", slider=True)
+        layout.row().prop(yaf_mat, "specular_reflect", slider=True)
 
-            if yaf_mat.mat_type == "rough_glass":
-                box = layout.box()
-                box.label(text="Glass roughness:")
-                box.row().prop(yaf_mat, "refr_roughness", slider=True)
 
-        if yaf_mat.mat_type == "blend":
-            self.bl_label = "Blend Material Settings"
-            split = layout.split()
-            col = split.column()
-            col.label(text="")
-            col.prop(yaf_mat, "blend_value", slider=True)
+class YAF_PT_glossy_diffuse(MaterialTypePanel, Panel):
+    bl_label = "Diffuse reflection"
+    material_type = 'glossy', 'coated_glossy'
 
-            layout.separator()
+    def draw(self, context):
+        layout = self.layout
+        yaf_mat = active_node_mat(context.material)
+
+        split = layout.split()
+        col = split.column()
+        col.prop(yaf_mat, "diffuse_color")
 
+        col = split.column()
+        ref = col.column(align=True)
+        ref.label(text="Reflectance model:")
+        ref.prop(yaf_mat, "brdf_type", text="")
+        sig = col.column()
+        sig.enabled = yaf_mat.brdf_type == "oren-nayar"
+        sig.prop(yaf_mat, "sigma")
+        layout.row().prop(yaf_mat, "diffuse_reflect", slider=True)
+
+
+class YAF_PT_glossy_specular(MaterialTypePanel, Panel):
+    bl_label = "Specular reflection"
+    material_type = 'glossy', 'coated_glossy'
+
+    def draw(self, context):
+        layout = self.layout
+        yaf_mat = active_node_mat(context.material)
+
+        split = layout.split()
+        col = split.column()
+        col.prop(yaf_mat, "glossy_color")
+        exp = col.column()
+        exp.enabled = yaf_mat.anisotropic == False
+        exp.prop(yaf_mat, "exponent")
+
+        col = split.column()
+        sub = col.column(align=True)
+        sub.prop(yaf_mat, "anisotropic")
+        ani = sub.column()
+        ani.enabled = yaf_mat.anisotropic == True
+        ani.prop(yaf_mat, "exp_u")
+        ani.prop(yaf_mat, "exp_v")
+        layout.row().prop(yaf_mat, "glossy_reflect", slider=True)
+        layout.row().prop(yaf_mat, "as_diffuse")
+
+        layout.separator()
+
+        if yaf_mat.mat_type == "coated_glossy":
             box = layout.box()
-            box.label(text="Choose the two materials you wish to blend.")
+            box.label(text="Coated layer for glossy:")
             split = box.split()
             col = split.column()
-            col.label(text="Material One:")
-            col.prop_search(yaf_mat, "material1", bpy.data, 'materials', text="")
+            col.prop(yaf_mat, "coat_mir_col")
+            col = split.column(align=True)
+            col.label(text="Fresnel reflection:")
+            col.prop(yaf_mat, "IOR_reflection")
+            col.label()
 
-            col = split.column()
-            col.label(text="Material Two:")
-            col.prop_search(yaf_mat, "material2", bpy.data, 'materials', text="")
 
+class YAF_PT_glass_real(MaterialTypePanel, Panel):
+    bl_label = "Real glass settings"
+    material_type = 'glass', 'rough_glass'
 
-class YAF_PT_material_panel_specular(MaterialButtonsPanel, Panel):
-    bl_label = " "
+    def draw(self, context):
+        layout = self.layout
+        yaf_mat = active_node_mat(context.material)
 
-    @classmethod
-    def poll(cls, context):
-        yaf_mat = context.material
-        engine = context.scene.render.engine
-        return check_material(yaf_mat) and (engine in cls.COMPAT_ENGINES) and not(yaf_mat.mat_type == "blend")
+        layout.label(text="Refraction and Reflections:")
+        split = layout.split()
+        col = split.column()
+        col.prop(yaf_mat, "IOR_refraction")
+
+        col = split.column()
+        col.menu("YAF_MT_presets_ior_list", text=bpy.types.YAF_MT_presets_ior_list.bl_label)
+
+        split = layout.split()
+        col = split.column(align=True)
+        col.prop(yaf_mat, "absorption")
+        col.prop(yaf_mat, "absorption_dist")
+
+        col = split.column(align=True)
+        col.label(text="Dispersion:")
+        col.prop(yaf_mat, "dispersion_power")
+
+        if yaf_mat.mat_type == "rough_glass":
+            box = layout.box()
+            box.label(text="Glass roughness:")
+            box.row().prop(yaf_mat, "refr_roughness", slider=True)
+
+
+class YAF_PT_glass_fake(MaterialTypePanel, Panel):
+    bl_label = "Fake glass settings"
+    material_type = 'glass', 'rough_glass'
 
     def draw(self, context):
         layout = self.layout
         yaf_mat = active_node_mat(context.material)
 
-        if yaf_mat.mat_type == "shinydiffusemat":
-            self.bl_label = "Specular reflection"
-            split = layout.split()
-            col = split.column()
-            col.label(text="Mirror color:")
-            col.prop(yaf_mat, "mirror_color", text="")
+        split = layout.split()
+        col = split.column()
+        col.prop(yaf_mat, "filter_color")
+        col = split.column()
+        col.prop(yaf_mat, "glass_mir_col")
+        layout.row().prop(yaf_mat, "glass_transmit", slider=True)
+        layout.row().prop(yaf_mat, "fake_shadows")
 
-            col = split.column()
-            col.prop(yaf_mat, "fresnel_effect")
-            sub = col.column()
-            sub.enabled = yaf_mat.fresnel_effect
-            sub.prop(yaf_mat, "IOR_reflection", slider=True)
-            layout.row().prop(yaf_mat, "specular_reflect", slider=True)
-
-        if yaf_mat.mat_type in {"glossy", "coated_glossy"}:
-            self.bl_label = "Specular reflection"
-            split = layout.split()
-            col = split.column()
-            col.prop(yaf_mat, "glossy_color")
-            exp = col.column()
-            exp.enabled = yaf_mat.anisotropic == False
-            exp.prop(yaf_mat, "exponent")
 
-            col = split.column()
-            sub = col.column(align=True)
-            sub.prop(yaf_mat, "anisotropic")
-            ani = sub.column()
-            ani.enabled = yaf_mat.anisotropic == True
-            ani.prop(yaf_mat, "exp_u")
-            ani.prop(yaf_mat, "exp_v")
-            layout.row().prop(yaf_mat, "glossy_reflect", slider=True)
-            layout.row().prop(yaf_mat, "as_diffuse")
+class YAF_PT_blend_(MaterialTypePanel, Panel):
+    bl_label = "Blend material settings"
+    material_type = 'blend'
 
-            layout.separator()
+    def draw(self, context):
+        layout = self.layout
+        yaf_mat = active_node_mat(context.material)
 
-            if yaf_mat.mat_type == "coated_glossy":
-                box = layout.box()
-                box.label(text="Coated layer for glossy:")
-                split = box.split()
-                col = split.column()
-                col.prop(yaf_mat, "coat_mir_col")
-                col = split.column(align=True)
-                col.label(text="Fresnel reflection:")
-                col.prop(yaf_mat, "IOR_reflection")
-
-        if yaf_mat.mat_type in {"glass", "rough_glass"}:
-            self.bl_label = "Fake glass settings"
-            split = layout.split()
-            col = split.column()
-            col.prop(yaf_mat, "filter_color")
-            col = split.column()
-            col.prop(yaf_mat, "glass_mir_col")
-            layout.row().prop(yaf_mat, "glass_transmit", slider=True)
-            layout.row().prop(yaf_mat, "fake_shadows")
+        split = layout.split()
+        col = split.column()
+        col.label(text="")
+        col.prop(yaf_mat, "blend_value", slider=True)
+
+        layout.separator()
+
+        box = layout.box()
+        box.label(text="Choose the two materials you wish to blend.")
+        split = box.split()
+        col = split.column()
+        col.label(text="Material One:")
+        col.prop_search(yaf_mat, "material1", bpy.data, 'materials', text="")
 
-del MaterialButtonsPanel
+        col = split.column()
+        col.label(text="Material Two:")
+        col.prop_search(yaf_mat, "material2", bpy.data, 'materials', text="")
diff --git a/ui/properties_yaf_object.py b/ui/properties_yaf_object.py
index 3eae817..a927a0a 100644
--- a/ui/properties_yaf_object.py
+++ b/ui/properties_yaf_object.py
@@ -1,7 +1,26 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
+from bpy.types import Panel
 
 
-class YAF_PT_object_light(bpy.types.Panel):
+class YAF_PT_object_light(Panel):
     bl_label = "YafaRay Object Properties"
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
diff --git a/ui/properties_yaf_render.py b/ui/properties_yaf_render.py
index 47f7d6b..813e4a0 100644
--- a/ui/properties_yaf_render.py
+++ b/ui/properties_yaf_render.py
@@ -1,35 +1,26 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
-#import types and props ---->
-from bpy.props import EnumProperty
 from bpy.types import Panel
 from bl_ui.properties_render import RenderButtonsPanel
+
 RenderButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
-Scene = bpy.types.Scene
-
-
-# set fileformat for image saving on same format as in YafaRay, both have default PNG
-def call_update_fileformat(self, context):
-    sc = context.scene
-    rd = sc.render
-    if sc.img_output != rd.file_format:
-        rd.file_format = sc.img_output
-        if rd.file_format == "OPEN_EXR" and sc.gs_z_channel:
-            rd.exr_zbuf = True
-
-
-# YafaRays own image output selection, default is PNG
-Scene.img_output = EnumProperty(
-    name="Image File Type",
-    description="Image will be saved in this file format",
-    items=(
-        ('PNG', " PNG (Portable Network Graphics)", ""),
-        ('TARGA', " TGA (Truevision TARGA)", ""),
-        ('JPEG', " JPEG (Joint Photographic Experts Group)", ""),
-        ('TIFF', " TIFF (Tag Image File Format)", ""),
-        ('OPEN_EXR', " EXR (IL&M OpenEXR)", ""),
-        ('HDR', " HDR (Radiance RGBE)", "")
-    ),
-    default='PNG', update=call_update_fileformat)
 
 
 class YAFRENDER_PT_render(RenderButtonsPanel, Panel):
diff --git a/ui/properties_yaf_strand.py b/ui/properties_yaf_strand.py
index 1f95958..fa5e3bb 100644
--- a/ui/properties_yaf_strand.py
+++ b/ui/properties_yaf_strand.py
@@ -1,12 +1,31 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
+from bpy.types import Panel
 
 
-class YAF_PT_strand_settings(bpy.types.Panel):
-    bl_label = 'Strand Settings'
+class YAF_PT_strand_settings(Panel):
+    bl_label = "Strand Settings"
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
-    bl_context = 'particle'
-    COMPAT_ENGINES = ['YAFA_RENDER']
+    bl_context = "particle"
+    COMPAT_ENGINES = {'YAFA_RENDER'}
 
     @classmethod
     def poll(cls, context):
diff --git a/ui/properties_yaf_texture.py b/ui/properties_yaf_texture.py
index 76868a1..445d733 100644
--- a/ui/properties_yaf_texture.py
+++ b/ui/properties_yaf_texture.py
@@ -1,49 +1,25 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from bl_ui.properties_material import active_node_mat
 from bl_ui.properties_texture import context_tex_datablock
-#import types and props ---->
 from bpy.types import Panel
-from bpy.props import (EnumProperty,
-                       StringProperty,
-                       BoolProperty)
-
-Texture = bpy.types.Texture
-
-
-# update blender propertie texture.type to YafaRay's texture.yaf_tex_type
-def call_tex_type_update(self, context):
-    tex = context.texture
-    tex.type = tex.yaf_tex_type
-
-Texture.yaf_tex_type = EnumProperty(
-    name="Type",
-    items=(
-        ('NONE', "None", ""),
-        ('BLEND', "Blend", ""),
-        ('CLOUDS', "Clouds", ""),
-        ('WOOD', "Wood", ""),
-        ('MARBLE', "Marble", ""),
-        ('VORONOI', "Voronoi", ""),
-        ('MUSGRAVE', "Musgrave", ""),
-        ('DISTORTED_NOISE', "Distorted Noise", ""),
-        ('IMAGE', "Image", "")
-    ),
-    update=call_tex_type_update,
-    default='NONE')
-
-Texture.yaf_tex_interpolate = EnumProperty(
-    name="Interpolation",
-    items=(
-        ('bilinear', "Bilinear", ""),
-        ('bicubic', "Bicubic", ""),
-        ('none', "None", "")
-    ),
-    default='bilinear')
-
-Texture.yaf_is_normal_map = BoolProperty(
-    name="Use map as normal map",
-    description="Use image RGB values for normal mapping",
-    default=False)
 
 
 class YAF_TextureButtonsPanel():
@@ -61,7 +37,6 @@ class YAF_TextureButtonsPanel():
 class YAF_TEXTURE_PT_context_texture(YAF_TextureButtonsPanel, Panel):
     bl_label = "YafaRay Textures"
     bl_options = {'HIDE_HEADER'}
-    # bl_show_header = True
     COMPAT_ENGINES = {'YAFA_RENDER'}
 
     @classmethod
@@ -102,7 +77,7 @@ class YAF_TEXTURE_PT_context_texture(YAF_TextureButtonsPanel, Panel):
             col.operator("texture.slot_move", text="", icon='TRIA_DOWN').type = 'DOWN'
             col.menu("TEXTURE_MT_specials", icon='DOWNARROW_HLT', text="")
 
-        split = layout.split(percentage=0.65)
+        split = layout.split(percentage=0.75)
         col = split.column()
 
         if tex_collection:
@@ -118,7 +93,8 @@ class YAF_TEXTURE_PT_context_texture(YAF_TextureButtonsPanel, Panel):
         col = split.column()
 
         if tex:
-            split = layout.split(percentage=0.2)
+            layout.separator()
+            split = layout.split(percentage=0.3)
 
             if tex.use_nodes:
 
@@ -127,7 +103,7 @@ class YAF_TEXTURE_PT_context_texture(YAF_TextureButtonsPanel, Panel):
                     split.prop(slot, "output_node", text="")
 
             else:
-                split.label(text="Type:")
+                split.label(text="Texture type:")
                 split.prop(tex, "yaf_tex_type", text="")
 
 
@@ -157,11 +133,10 @@ class YAF_TextureSlotPanel(YAF_TextureButtonsPanel):
             return False
 
         engine = context.scene.render.engine
-        return YAF_TextureButtonsPanel.poll(self, context) and (engine in cls.COMPAT_ENGINES)
+        return YAF_TextureButtonsPanel.poll(cls, context) and (engine in cls.COMPAT_ENGINES)
 
 
 class YAF_TextureTypePanel(YAF_TextureButtonsPanel):
-
     COMPAT_ENGINES = {'YAFA_RENDER'}
 
     @classmethod
@@ -255,9 +230,9 @@ class YAF_TEXTURE_PT_blend(YAF_TextureTypePanel, Panel):
         tex = context.texture
         layout.prop(tex, "progression")
         if tex.progression != 'LINEAR':  # TODO: remove this if other progression types are supported
-            layout.label(text='Not yet supported in YafaRay')
+            layout.label(text="Not yet supported in YafaRay")
         else:
-            layout.label(text=' ')
+            layout.label(text=" ")
 
 
 class YAF_TEXTURE_PT_image(YAF_TextureTypePanel, Panel):
@@ -281,20 +256,11 @@ class YAF_TEXTURE_PT_image_sampling(YAF_TextureTypePanel, Panel):
     def draw(self, context):
         layout = self.layout
 
-        idblock = context_tex_datablock(context)
         tex = context.texture
-
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Image:")
-        col.prop(tex, "use_alpha", text="Use Alpha")
-        col.prop(tex, "use_calculate_alpha", text="Calculate Alpha")
-        col.prop(tex, "use_flip_axis", text="Flip X/Y Axis")
-
-        col = split.column()
-        col.label(text="Interpolation:")
-        col.prop(tex, "yaf_tex_interpolate", text="")
+        layout.label(text="Image:")
+        layout.prop(tex, "use_alpha", text="Use Alpha")
+        layout.prop(tex, "use_calculate_alpha", text="Calculate Alpha")
+        layout.prop(tex, "use_flip_axis", text="Flip X/Y Axis")
 
 
 class YAF_TEXTURE_PT_image_mapping(YAF_TextureTypePanel, Panel):
@@ -466,6 +432,9 @@ class YAF_TEXTURE_PT_mapping(YAF_TextureSlotPanel, Panel):
             col.prop(tex, "texture_coords", text="")
 
             if tex.texture_coords == 'UV':
+                pass
+                #### UV layers not supported in yafaray engine ###
+                """
                 split = layout.split(percentage=0.3)
                 split.label(text="Layer:")
                 ob = context.object
@@ -473,6 +442,7 @@ class YAF_TEXTURE_PT_mapping(YAF_TextureSlotPanel, Panel):
                     split.prop_search(tex, "uv_layer", ob.data, "uv_textures", text="")
                 else:
                     split.prop(tex, "uv_layer", text="")
+                """
 
             elif tex.texture_coords == 'OBJECT':
                 split = layout.split(percentage=0.3)
@@ -530,23 +500,23 @@ class YAF_TEXTURE_PT_influence(YAF_TextureSlotPanel, Panel):
         engine = context.scene.render.engine
         return (engine in cls.COMPAT_ENGINES)
 
-    def factor_but(self, tex, layout, toggle, factor, name):
-        row = layout.row(align=True)
-        row.prop(tex, toggle, text="")
-        sub = row.row()
-        sub.enabled = getattr(tex, toggle)
-        sub.prop(tex, factor, text=name, slider=True)
-        return sub  # XXX, temp. use_map_normal needs to override.
-
     def draw(self, context):
 
         layout = self.layout
 
         idblock = context_tex_datablock(context)
 
-        tex_slot = context.texture_slot
+        tex = context.texture_slot
         texture = context.texture
 
+        def factor_but(layout, toggle, factor, name):
+            row = layout.row(align=True)
+            row.prop(tex, toggle, text="")
+            sub = row.row()
+            sub.active = getattr(tex, toggle)
+            sub.prop(tex, factor, text=name, slider=True)
+            return sub  # XXX, temp. use_map_normal needs to override.
+
         shaderNodes = dict()
         shaderNodes["Bump"] = ["use_map_normal", "normal_factor", "Bump"]
         shaderNodes["MirrorAmount"] = ["use_map_raymir", "raymir_factor", "Mirror Amount"]
@@ -567,42 +537,38 @@ class YAF_TEXTURE_PT_influence(YAF_TextureSlotPanel, Panel):
         materialShaderNodes["blend"] = ["BlendAmount"]
 
         if isinstance(idblock, bpy.types.Material):
-            material = context.material
-            materialType = material.mat_type
-
-            nodes = materialShaderNodes[materialType]
-
+            nodes = materialShaderNodes[idblock.mat_type]
             col = layout.column()
 
             for node in nodes:
                 value = shaderNodes[node]
-                self.factor_but(tex_slot, col, value[0], value[1], value[2])
-                if node == "Bump" and getattr(tex_slot, "use_map_normal") and texture.type == "IMAGE":
+                factor_but(col, value[0], value[1], value[2])
+                if node == "Bump" and getattr(tex, "use_map_normal") and texture.yaf_tex_type == 'IMAGE':
                     col.prop(texture, "yaf_is_normal_map", "Use map as normal map")
 
         elif isinstance(idblock, bpy.types.World):  # for setup world texture
             split = layout.split()
 
             col = split.column()
-            self.factor_but(tex_slot, col, "use_map_blend", "blend_factor", "Blend")
-            self.factor_but(tex_slot, col, "use_map_horizon", "horizon_factor", "Horizon")
-            col = split.column()
-            self.factor_but(tex_slot, col, "use_map_zenith_up", "zenith_up_factor", "Zenith Up")
-            self.factor_but(tex_slot, col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down")
+            factor_but(col, "use_map_blend", "blend_factor", "Blend")
+            factor_but(col, "use_map_horizon", "horizon_factor", "Horizon")
 
-        layout.separator()
+            col = split.column()
+            factor_but(col, "use_map_zenith_up", "zenith_up_factor", "Zenith Up")
+            factor_but(col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down")
 
         if not isinstance(idblock, bpy.types.ParticleSettings) and not isinstance(idblock, bpy.types.World):
             split = layout.split()
 
             col = split.column()
-            col.prop(tex_slot, "blend_type", text="Blend")
-            col.prop(tex_slot, "use_rgb_to_intensity", text="No RGB")
-            col.prop(tex_slot, "color", text="")
+            col.prop(tex, "blend_type", text="Blend")
+            col.prop(tex, "use_rgb_to_intensity", text="No RGB")
+            col.prop(tex, "color", text="")
 
             col = split.column()
-            col.prop(tex_slot, "invert", text="Negative")
-            col.prop(tex_slot, "use_stencil")
+            col.prop(tex, "invert", text="Negative")
+            col.prop(tex, "use_stencil")
 
         if isinstance(idblock, bpy.types.Material) or isinstance(idblock, bpy.types.World):
-            layout.row().prop(tex_slot, "default_value", text="Default Value", slider=True)
+            layout.separator()
+            layout.row().prop(tex, "default_value", text="Default Value", slider=True)
diff --git a/ui/properties_yaf_volume_integrator.py b/ui/properties_yaf_volume_integrator.py
index 42f4dd4..8ab3e94 100644
--- a/ui/properties_yaf_volume_integrator.py
+++ b/ui/properties_yaf_volume_integrator.py
@@ -1,67 +1,41 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
 from bpy.types import Panel
 from bl_ui.properties_world import WorldButtonsPanel
-WorldButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
-from bpy.props import (FloatProperty,
-                       BoolProperty,
-                       EnumProperty,
-                       IntProperty)
-
-World = bpy.types.World
-
-World.v_int_type = EnumProperty(
-    name="Volume integrator",
-    description="Set the volume integrator",
-    items=(
-        ('None', "None", ""),
-        ('Single Scatter', "Single Scatter", "")
-    ),
-    default='None')
-
-World.v_int_step_size = FloatProperty(
-    name="Step size",
-    description="Precision of volumetric rendering (in Blender units)",
-    min=0.0, max=100.0,
-    precision=3,
-    default=1.000)
-
-World.v_int_adaptive = BoolProperty(
-    name="Adaptive",
-    description="Optimizes stepping calculations for NoiseVolumes",
-    default=False)
 
-World.v_int_optimize = BoolProperty(
-    name="Optimize",
-    description="Precomputing attenuation in the entire volume at a 3d grid of points",
-    default=False)
-
-World.v_int_attgridres = IntProperty(
-    name="Att. grid resolution",
-    description="Optimization attenuation grid resolution",
-    min=1, max=50,
-    default=1)
-
-# ??? not sure about the following properties ???
-# World.v_int_scale = FloatProperty(attr = "v_int_scale")
-# World.v_int_alpha =       FloatProperty(attr = "v_int_alpha")
-# World.v_int_dsturbidity = FloatProperty(attr = "v_int_dsturbidity")
+WorldButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
 
 
 class YAF_PT_vol_integrator(WorldButtonsPanel, Panel):
     bl_label = "YafaRay Volume Integrator"
 
     def draw(self, context):
-
         layout = self.layout
+        world = context.world
 
-        layout.prop(context.world, "v_int_type")
+        layout.prop(world, "v_int_type")
         layout.separator()
 
-        if context.world.v_int_type == 'Single Scatter':
-            layout.prop(context.world, "v_int_step_size")
-            layout.prop(context.world, "v_int_adaptive")
-            layout.prop(context.world, "v_int_optimize")
-            if context.world.v_int_optimize:
-                layout.prop(context.world, "v_int_attgridres")
-
-del WorldButtonsPanel
+        if world.v_int_type == 'Single Scatter':
+            layout.prop(world, "v_int_step_size")
+            layout.prop(world, "v_int_adaptive")
+            layout.prop(world, "v_int_optimize")
+            if world.v_int_optimize:
+                layout.prop(world, "v_int_attgridres")
diff --git a/ui/properties_yaf_world.py b/ui/properties_yaf_world.py
index f338c7c..7bf0c19 100644
--- a/ui/properties_yaf_world.py
+++ b/ui/properties_yaf_world.py
@@ -1,268 +1,35 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
 import bpy
-# import types and props ---->
 from bpy.types import Panel
-from bpy.props import (EnumProperty,
-                       FloatProperty,
-                       FloatVectorProperty,
-                       IntProperty,
-                       BoolProperty)
-World = bpy.types.World
-
-
-def call_world_update(self, context):
-    world = context.scene.world
-    world.ambient_color = world.ambient_color
-
-World.bg_type = EnumProperty(
-    name="Background",
-    items=(
-        ('Gradient', "Gradient", "Gradient background"),
-        ('Texture', "Texture", "Textured background"),
-        ('Sunsky1', "Sunsky1", "Sunsky background"),
-        ('Sunsky2', "Sunsky2", "New model of Sunsky background"),
-        ('Single Color', "Single Color", "Single color background")
-    ),
-    default="Single Color",
-    update=call_world_update)
-
-World.bg_color_space = EnumProperty(
-    name="Color space",
-    items=(
-        ('CIE (E)', "CIE (E)", "Select color space model"),
-        ('CIE (D50)', "CIE (D50)", "Select color space model"),
-        ('sRGB (D65)', "sRGB (D65)", "Select color space model"),
-        ('sRGB (D50)', "sRGB (D50)", "Select color space model")
-    ),
-    default="CIE (E)",
-    update=call_world_update)
-
-World.bg_zenith_color = FloatVectorProperty(
-    name="Zenith color",
-    description="Zenith color",
-    subtype='COLOR',
-    min=0.0, max=1.0,
-    default=(0.57, 0.65, 1.0),
-    update=call_world_update)
-
-World.bg_horizon_color = FloatVectorProperty(
-    name="Horizon color",
-    description="Horizon color",
-    subtype='COLOR',
-    min=0.0, max=1.0,
-    default=(1.0, 1.0, 0.5),
-    update=call_world_update)
-
-World.bg_zenith_ground_color = FloatVectorProperty(
-    name="Zenith ground color",
-    description="Zenith ground color",
-    subtype='COLOR',
-    min=0.0, max=1.0,
-    default=(1.0, 0.9, 0.8),
-    update=call_world_update)
-
-World.bg_horizon_ground_color = FloatVectorProperty(
-    name="Horizon ground color",
-    description="Horizon ground color",
-    subtype='COLOR',
-    min=0.0, max=1.0,
-    default=(0.8, 0.6, 0.3),
-    update=call_world_update)
-
-World.bg_single_color = FloatVectorProperty(
-    name="Background color",
-    description="Background color",
-    subtype='COLOR',
-    min=0.0, max=1.0,
-    default=(0.7, 0.7, 0.7),
-    update=call_world_update)
-
-World.bg_use_ibl = BoolProperty(
-    name="Use IBL",
-    description="Use the background as the light source for your image",
-    default=False)
-
-World.bg_with_caustic = BoolProperty(
-    name="Caustic photons",
-    description="Allow background light to shoot caustic photons",
-    default=True)
-
-World.bg_with_diffuse = BoolProperty(
-    name="Diffuse photons",
-    description="Allow background light to shoot diffuse photons",
-    default=True)
-
-World.bg_ibl_samples = IntProperty(
-    name="IBL Samples",
-    description="Number of samples for direct lighting from background",
-    min=1, max=512,
-    default=16)
-
-World.bg_rotation = FloatProperty(
-    name="Rotation",
-    description="Rotation offset of background texture",
-    min=0.0, max=360.0,
-    default=0.0,
-    update=call_world_update)
-
-World.bg_turbidity = FloatProperty(
-    name="Turbidity",
-    description="Turbidity of the atmosphere",
-    min=1.0, max=20.0,
-    default=2.0,
-    update=call_world_update)
-
-World.bg_ds_turbidity = FloatProperty(  # Darktides turbidity has different values
-    name="Turbidity",
-    description="Turbidity of the atmosphere",
-    min=2.0, max=12.0,
-    default=2.0,
-    update=call_world_update)
-
-World.bg_a_var = FloatProperty(
-    name="Brightness of horizon gradient",
-    description="Darkening or brightening towards horizon",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_b_var = FloatProperty(
-    name="Luminance of horizon",
-    description="Luminance gradient near the horizon",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_c_var = FloatProperty(
-    name="Solar region intensity",
-    description="Relative intensity of circumsolar region",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_d_var = FloatProperty(
-    name="Width of circumsolor region",
-    description="Width of circumsolar region",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_e_var = FloatProperty(
-    name="Backscattered light",
-    description="Relative backscattered light",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_from = FloatVectorProperty(
-    name="Set sun position",
-    description="Set the position of the sun",
-    subtype='DIRECTION',
-    step=10, precision=3,
-    min=-1.0, max=1.0,
-    default=(1.0, 1.0, 1.0),
-    update=call_world_update)
-
-World.bg_add_sun = BoolProperty(
-    name="Add sun",
-    description="Add a real sun light",
-    default=False,
-    update=call_world_update)
-
-World.bg_sun_power = FloatProperty(
-    name="Sunlight power",
-    description="Sunlight power",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_background_light = BoolProperty(
-    name="Add skylight",
-    description="Add skylight",
-    default=False,
-    update=call_world_update)
-
-World.bg_light_samples = IntProperty(
-    name="Samples",
-    description="Set skylight and sunlight samples",
-    min=1, max=512,
-    default=16,
-    update=call_world_update)
-
-World.bg_dsaltitude = FloatProperty(
-    name="Altitude",
-    description="Moves the sky dome above or below the camera position",
-    min=-1.0, max=2.0,
-    default=0.0,
-    update=call_world_update)
-
-World.bg_dsnight = BoolProperty(
-    name="Night",
-    description="Activate experimental night mode",
-    default=False,
-    update=call_world_update)
-
-World.bg_dsbright = FloatProperty(
-    name="Sky brightness",
-    description="Brightness of the sky",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_power = FloatProperty(
-    name="Skylight power",
-    description="Multiplier for background color",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_exposure = FloatProperty(
-    name="Exposure",
-    description="Exposure correction for the sky (0 = no correction)",
-    min=0.0, max=10.0,
-    default=1.0,
-    update=call_world_update)
-
-World.bg_clamp_rgb = BoolProperty(
-    name="Clamp RGB",
-    description="Clamp RGB values",
-    default=False)
-
-World.bg_gamma_enc = BoolProperty(
-    name="Gamma encoding",
-    description="Apply gamma encoding to the sky",
-    default=True,
-    update=call_world_update)
-
-
-class YAFWORLD_PT_preview(Panel):
-    bl_label = "Background Preview"
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = "world"
-    COMPAT_ENGINES = {'YAFA_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        rd = context.scene.render
-        return (context.world) and (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES)
+from bl_ui.properties_world import WorldButtonsPanel
 
-    def draw(self, context):
-        self.layout.template_preview(context.world)
+WorldButtonsPanel.COMPAT_ENGINES = {'YAFA_RENDER'}
 
+from bl_ui.properties_world import WORLD_PT_preview
+WORLD_PT_preview.COMPAT_ENGINES.add('YAFA_RENDER')
+del WORLD_PT_preview
 
-class YAFWORLD_PT_world(Panel):
 
-    bl_label = 'Background Settings'
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'world'
+class YAFWORLD_PT_world(WorldButtonsPanel, Panel):
+    bl_label = "Background Settings"
     ibl = True
-    COMPAT_ENGINES = {'YAFA_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        rd = context.scene.render
-        return context.world and (rd.engine in cls.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout
@@ -270,7 +37,7 @@ class YAFWORLD_PT_world(Panel):
 
         split = layout.split()
         col = layout.column()
-        col.prop(world, 'bg_type', text="Background")
+        col.prop(world, "bg_type", text="Background")
 
         if world.bg_type == "Gradient":
 
@@ -282,14 +49,14 @@ class YAFWORLD_PT_world(Panel):
             col.label(text="Zenith ground:")
 
             col = split.column()
-            col.prop(world, 'bg_zenith_color', text="")
-            col.prop(world, 'bg_horizon_color', text="")
-            col.prop(world, 'bg_horizon_ground_color', text="")
-            col.prop(world, 'bg_zenith_ground_color', text="")
+            col.prop(world, "bg_zenith_color", text="")
+            col.prop(world, "bg_horizon_color", text="")
+            col.prop(world, "bg_horizon_ground_color", text="")
+            col.prop(world, "bg_zenith_ground_color", text="")
 
             split = layout.split(percentage=0.40)
             col = split.column()
-            col.prop(world, 'bg_use_ibl')
+            col.prop(world, "bg_use_ibl")
             col.label(text=" ")
 
         elif world.bg_type == "Texture":
@@ -298,7 +65,7 @@ class YAFWORLD_PT_world(Panel):
 
             if tex is not None:  # and tex.type == 'IMAGE': # revised if changed to yaf_tex_type
                 try:
-                    layout.template_ID(context.world, 'active_texture')  # new='texture.new')
+                    layout.template_ID(context.world, "active_texture")  # new="texture.new")
                 except:
                     pass
                 if  tex.type == "IMAGE":  # it allows to change the used image

-- 
yafaray-blender2.5-exporter packaging



More information about the pkg-multimedia-commits mailing list