[Bf-extensions-cvs] [cbf540d7] blender2.8: Amaranth: Update to 2.8

Pablo Vazquez noreply at git.blender.org
Sat Jul 14 04:00:43 CEST 2018


Commit: cbf540d77346fba76fc46777329b06f7db8c57a7
Author: Pablo Vazquez
Date:   Sat Jul 14 04:00:07 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBACcbf540d77346fba76fc46777329b06f7db8c57a7

Amaranth: Update to 2.8

* 'Remember Layers' does not longer apply for 2.8 and it wasn't that used anyway.
If a 'Remember Collections' is needed it can be implemented once the API is stable.
* Move stats and SMPTE Timecode to status bar
* Bump to 1.0.6

===================================================================

M	amaranth/__init__.py
M	amaranth/animation/timeline_extra_info.py
M	amaranth/misc/toggle_wire.py
M	amaranth/prefs.py
D	amaranth/render/remember_layers.py
M	amaranth/scene/stats.py

===================================================================

diff --git a/amaranth/__init__.py b/amaranth/__init__.py
index 8a579f20..e951c0b7 100644
--- a/amaranth/__init__.py
+++ b/amaranth/__init__.py
@@ -66,7 +66,6 @@ from amaranth.render import (
     unsimplify,
     final_resolution,
     samples_scene,
-    remember_layers,
     render_output_z,
     )
 
@@ -90,12 +89,12 @@ from amaranth.misc import (
 bl_info = {
     "name": "Amaranth Toolset",
     "author": "Pablo Vazquez, Bassam Kurdali, Sergey Sharybin, Lukas Tönne, Cesar Saez",
-    "version": (1, 0, 5),
-    "blender": (2, 74),
+    "version": (1, 0, 6),
+    "blender": (2, 80, 0),
     "location": "Everywhere!",
     "description": "A collection of tools and settings to improve productivity",
     "warning": "",
-    "wiki_url": "http://pablovazquez.org/amaranth",
+    "wiki_url": "https://pablovazquez.art/amaranth",
     "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
     "category": "Scene",
 }
diff --git a/amaranth/animation/timeline_extra_info.py b/amaranth/animation/timeline_extra_info.py
index 7e494ee6..8419345d 100644
--- a/amaranth/animation/timeline_extra_info.py
+++ b/amaranth/animation/timeline_extra_info.py
@@ -60,8 +60,8 @@ def label_timeline_extra_info(self, context):
 
 
 def register():
-    bpy.types.TIME_HT_header.append(label_timeline_extra_info)
+    bpy.types.STATUSBAR_HT_header.append(label_timeline_extra_info)
 
 
 def unregister():
-    bpy.types.TIME_HT_header.remove(label_timeline_extra_info)
+    bpy.types.STATUSBAR_HT_header.remove(label_timeline_extra_info)
diff --git a/amaranth/misc/toggle_wire.py b/amaranth/misc/toggle_wire.py
index 9102f3ba..d815ad3a 100644
--- a/amaranth/misc/toggle_wire.py
+++ b/amaranth/misc/toggle_wire.py
@@ -125,10 +125,10 @@ def clear_properties():
 def register():
     init_properties()
     bpy.utils.register_class(AMTH_OBJECT_OT_wire_toggle)
-    bpy.types.VIEW3D_PT_view3d_display.append(ui_object_wire_toggle)
+    bpy.types.VIEW3D_PT_view3d_properties.append(ui_object_wire_toggle)
 
 
 def unregister():
     bpy.utils.unregister_class(AMTH_OBJECT_OT_wire_toggle)
-    bpy.types.VIEW3D_PT_view3d_display.remove(ui_object_wire_toggle)
+    bpy.types.VIEW3D_PT_view3d_properties.remove(ui_object_wire_toggle)
     clear_properties()
diff --git a/amaranth/prefs.py b/amaranth/prefs.py
index 59281f48..00d29358 100644
--- a/amaranth/prefs.py
+++ b/amaranth/prefs.py
@@ -33,7 +33,7 @@ class AmaranthToolsetPreferences(bpy.types.AddonPreferences):
     )
     use_scene_refresh = BoolProperty(
         name="Refresh Scene",
-        description="Specials Menu [W], or hit F5",
+        description="Specials Menu [W]",
         default=True,
     )
     use_timeline_extra_info = BoolProperty(
@@ -48,7 +48,7 @@ class AmaranthToolsetPreferences(bpy.types.AddonPreferences):
     )
     use_scene_stats = BoolProperty(
         name="Extra Scene Statistics",
-        description="Display extra scene statistics in Info header (may be slow in heavy scenes)",
+        description="Display extra scene statistics in the status bar (may be slow in heavy scenes)",
         default=False,
     )
     frames_jump = IntProperty(
diff --git a/amaranth/render/remember_layers.py b/amaranth/render/remember_layers.py
deleted file mode 100644
index a9fcbb6b..00000000
--- a/amaranth/render/remember_layers.py
+++ /dev/null
@@ -1,240 +0,0 @@
-#  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.
-"""
-Remember Layers for Render
-If you're doing lighting/rendering tasks, you'll probably have a bunch of
-layers that you want/need to be enabled for final renders.
-
-When tweaking lighting, or if somebody else has to open the file to check
-something, you/they are likely to tweak the layers visibility and forget
-which ones were needed for the render to look good.
-
-In the Render Layers properties, you'll now find a "Save Current Layers for
-Render" button, this will save the currently visible scene layers as those
-that should be enabled for render. You can adjust this further by clicking
-on the slots on the right.
-
-Now all you need to do before saving your file for rendering is press the
-"View Layers for Render". Find it on the Render Layers properties.
-"""
-
-import bpy
-from bpy.types import Operator
-from bpy.props import (
-        BoolProperty,
-        IntProperty,
-        )
-
-
-# FEATURE: Set Layers to Render
-class AMTH_SCENE_OT_layers_render_save(Operator):
-    """Save the current scene layers as those that should be enabled for final renders"""
-    bl_idname = "scene.amaranth_layers_render_save"
-    bl_label = "Save as Layers for Render"
-
-    def execute(self, context):
-        which = []
-        n = -1
-
-        for l in context.scene.layers:
-            n += 1
-            if l:
-                which.append(n)
-
-        context.scene["amth_layers_for_render"] = which
-        self.report({"INFO"}, "Layers for Render Saved")
-
-        return {"FINISHED"}
-
-
-class AMTH_SCENE_OT_layers_render_view(Operator):
-    """Enable the scene layers that should be active for final renders"""
-    bl_idname = "scene.amaranth_layers_render_view"
-    bl_label = "View Layers for Render"
-
-    def execute(self, context):
-        scene = context.scene
-        layers_render = scene["amth_layers_for_render"]
-
-        for window in bpy.context.window_manager.windows:
-            screen = window.screen
-
-            for area in screen.areas:
-                if area.type == "VIEW_3D":
-                    override = {
-                        "window": window,
-                        "screen": screen,
-                        "scene": scene,
-                        "area": area,
-                        "region": area.regions[4],
-                        "blend_data": context.blend_data}
-
-                    if layers_render:
-                        bpy.ops.view3d.layers(
-                            override,
-                            nr=layers_render[0] + 1,
-                            extend=False,
-                            toggle=False)
-
-                        for n in layers_render:
-                            context.scene.layers[n] = True
-                    else:
-                        bpy.ops.view3d.layers(
-                            override,
-                            nr=1,
-                            extend=False,
-                            toggle=False)
-                        self.report({"INFO"}, "No layers set for render")
-
-                    break
-
-        return {"FINISHED"}
-
-
-class AMTH_SCENE_OT_layers_render_set_individual(Operator):
-    """Whether this layer should be enabled or not for final renders"""
-    bl_idname = "scene.amaranth_layers_render_set_individual"
-    bl_label = "Set This Layer for Render"
-
-    toggle = BoolProperty()
-    number = IntProperty()
-
-    def execute(self, context):
-        number = self.number
-
-        new_layers = []
-
-        for la in context.scene["amth_layers_for_render"]:
-            new_layers.append(la)
-
-        if len(context.scene["amth_layers_for_render"]) and number in new_layers:
-            new_layers.remove(number)
-        else:
-            new_layers.append(number)
-
-        # Remove Duplicates
-        new_layers = list(set(new_layers))
-        context.scene["amth_layers_for_render"] = new_layers
-
-        bpy.ops.scene.amaranth_layers_render_view()
-
-        return {"FINISHED"}
-
-
-class AMTH_SCENE_OT_layers_render_clear(Operator):
-    """Clear layers for render"""
-    bl_idname = "scene.amaranth_layers_render_clear"
-    bl_label = "Clear Layers for Render"
-
-    def execute(self, context):
-
-        if context.scene.get("amth_layers_for_render"):
-            context.scene["amth_layers_for_render"] = []
-
-        return {"FINISHED"}
-
-
-def ui_layers_for_render(self, context):
-    get_addon = "amaranth" in context.user_preferences.addons.keys()
-    if not get_addon:
-        return
-
-    if context.user_preferences.addons["amaranth"].preferences.use_layers_for_render:
-        lfr_available = context.scene.get("amth_layers_for_render")
-        if lfr_available:
-            lfr = context.scene["amth_layers_for_render"]
-
-        layout = self.layout
-        layout.label("Layers for Rendering:")
-        split = layout.split()
-        col = split.column(align=True)
-        row = col.row(align=True)
-        row.operator(
-            AMTH_SCENE_OT_layers_render_save.bl_idname,
-            text="Replace Layers" if lfr_available else "Save Current Layers for Render",
-            icon="FILE_REFRESH" if lfr_available else "LAYER_USED")
-
-        if lfr_available:
-            row.operator(
-                AMTH_SCENE_OT_layers_render_clear.bl_idname,
-                icon="X", text="")
-            col = col.column(align=True)
-            col.enabled = True if lfr_available else False
-            col.operator(
-                AMTH_SCENE_OT_layers_render_view.bl_idname,
-                icon="RESTRICT_VIEW_OFF")
-
-            split = split.split()
-            col = split.column(align=True)
-            row = col.row(align=True)
-
-            for n in range(0, 5):
-                row.operator(
-                    AMTH_SCENE_OT_layers_render_set_individual.bl_idname,
-                    text="",
-                    icon="LAYER_ACTIVE" if n in lfr else "BLANK1").number = n
-            row = col.row(align=True)
-            for n in range(10, 15):
-                row.operator(
-                    AMTH_SCENE_OT_layers_render_set_individual.bl_idname,
-                  

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list