[Bf-extensions-cvs] [2a0f5812] master: Amaranth add-on: update to the latest API changes
CansecoGPC
noreply at git.blender.org
Wed May 22 16:31:35 CEST 2019
Commit: 2a0f581273e0f3e97b328cd628162a4856d3c1eb
Author: CansecoGPC
Date: Wed May 22 16:28:21 2019 +0200
Branches: master
https://developer.blender.org/rBAC2a0f581273e0f3e97b328cd628162a4856d3c1eb
Amaranth add-on: update to the latest API changes
Includes contributions by @nBurn, thanks!
Fixes T63909
Differential Revision: https://developer.blender.org/D4487
===================================================================
M amaranth/__init__.py
M amaranth/animation/jump_frames.py
M amaranth/misc/color_management.py
M amaranth/misc/dupli_group_id.py
M amaranth/node_editor/display_image.py
D amaranth/render/only_render.py
D amaranth/render/unsimplify.py
M amaranth/scene/debug.py
===================================================================
diff --git a/amaranth/__init__.py b/amaranth/__init__.py
index e951c0b7..463d0a57 100644
--- a/amaranth/__init__.py
+++ b/amaranth/__init__.py
@@ -62,8 +62,6 @@ from amaranth.render import (
meshlight_add,
meshlight_select,
passepartout,
- only_render,
- unsimplify,
final_resolution,
samples_scene,
render_output_z,
@@ -88,8 +86,8 @@ from amaranth.misc import (
# register the addon + modules found in globals()
bl_info = {
"name": "Amaranth Toolset",
- "author": "Pablo Vazquez, Bassam Kurdali, Sergey Sharybin, Lukas Tönne, Cesar Saez",
- "version": (1, 0, 6),
+ "author": "Pablo Vazquez, Bassam Kurdali, Sergey Sharybin, Lukas Tönne, Cesar Saez, CansecoGPC",
+ "version": (1, 0, 7),
"blender": (2, 80, 0),
"location": "Everywhere!",
"description": "A collection of tools and settings to improve productivity",
diff --git a/amaranth/animation/jump_frames.py b/amaranth/animation/jump_frames.py
index 661dcc8a..fb12cb35 100644
--- a/amaranth/animation/jump_frames.py
+++ b/amaranth/animation/jump_frames.py
@@ -173,8 +173,8 @@ def label(self, context):
def register():
bpy.utils.register_class(AMTH_SCREEN_OT_frame_jump)
bpy.utils.register_class(AMTH_SCREEN_OT_keyframe_jump_inbetween)
- bpy.types.USERPREF_PT_edit.append(ui_userpreferences_edit)
- bpy.types.USERPREF_PT_edit.append(label)
+ bpy.types.USERPREF_PT_animation_timeline.append(ui_userpreferences_edit)
+ bpy.types.USERPREF_PT_animation_timeline.append(label)
# register keyboard shortcuts
wm = bpy.context.window_manager
@@ -203,7 +203,7 @@ def register():
def unregister():
bpy.utils.unregister_class(AMTH_SCREEN_OT_frame_jump)
bpy.utils.unregister_class(AMTH_SCREEN_OT_keyframe_jump_inbetween)
- bpy.types.USERPREF_PT_edit.remove(ui_userpreferences_edit)
+ bpy.types.USERPREF_PT_animation_timeline.remove(ui_userpreferences_edit)
for km, kmi in KEYMAPS:
km.keymap_items.remove(kmi)
KEYMAPS.clear()
diff --git a/amaranth/misc/color_management.py b/amaranth/misc/color_management.py
index a8335aba..72ad4bb2 100644
--- a/amaranth/misc/color_management.py
+++ b/amaranth/misc/color_management.py
@@ -66,19 +66,19 @@ def ui_color_management_presets(self, context):
row = layout.row(align=True)
row.menu("AMTH_SCENE_MT_color_management_presets",
text=bpy.types.AMTH_SCENE_MT_color_management_presets.bl_label)
- row.operator("scene.color_management_preset_add", text="", icon="ZOOMIN")
+ row.operator("scene.color_management_preset_add", text="", icon="ZOOM_IN")
row.operator("scene.color_management_preset_add",
- text="", icon="ZOOMOUT").remove_active = True
+ text="", icon="ZOOM_OUT").remove_active = True
layout.separator()
def register():
bpy.utils.register_class(AMTH_AddPresetColorManagement)
bpy.utils.register_class(AMTH_SCENE_MT_color_management_presets)
- bpy.types.SCENE_PT_color_management.prepend(ui_color_management_presets)
+ bpy.types.RENDER_PT_color_management.prepend(ui_color_management_presets)
def unregister():
bpy.utils.unregister_class(AMTH_AddPresetColorManagement)
bpy.utils.unregister_class(AMTH_SCENE_MT_color_management_presets)
- bpy.types.SCENE_PT_color_management.remove(ui_color_management_presets)
+ bpy.types.RENDER_PT_color_management.remove(ui_color_management_presets)
diff --git a/amaranth/misc/dupli_group_id.py b/amaranth/misc/dupli_group_id.py
index b131eef2..05fa7129 100644
--- a/amaranth/misc/dupli_group_id.py
+++ b/amaranth/misc/dupli_group_id.py
@@ -186,12 +186,12 @@ def ui_object_id_duplis(self, context):
def register():
bpy.utils.register_class(AMTH_OBJECT_OT_id_dupligroup)
bpy.utils.register_class(AMTH_OBJECT_OT_id_dupligroup_clear)
- bpy.types.OBJECT_PT_duplication.append(ui_dupli_group_library_path)
+ bpy.types.OBJECT_PT_instancing.append(ui_dupli_group_library_path)
bpy.types.OBJECT_PT_relations.append(ui_object_id_duplis)
def unregister():
bpy.utils.unregister_class(AMTH_OBJECT_OT_id_dupligroup)
bpy.utils.unregister_class(AMTH_OBJECT_OT_id_dupligroup_clear)
- bpy.types.OBJECT_PT_duplication.remove(ui_dupli_group_library_path)
+ bpy.types.OBJECT_PT_instancing.remove(ui_dupli_group_library_path)
bpy.types.OBJECT_PT_relations.remove(ui_object_id_duplis)
diff --git a/amaranth/node_editor/display_image.py b/amaranth/node_editor/display_image.py
index 66d2f958..0dcefca8 100644
--- a/amaranth/node_editor/display_image.py
+++ b/amaranth/node_editor/display_image.py
@@ -94,7 +94,7 @@ def register():
kc = bpy.context.window_manager.keyconfigs.addon
km = kc.keymaps.new(name="Node Editor", space_type="NODE_EDITOR")
kmi = km.keymap_items.new("node.show_active_node_image",
- "ACTIONMOUSE", "DOUBLE_CLICK")
+ "LEFTMOUSE", "DOUBLE_CLICK")
KEYMAPS.append((km, kmi))
diff --git a/amaranth/render/only_render.py b/amaranth/render/only_render.py
deleted file mode 100644
index 664051dd..00000000
--- a/amaranth/render/only_render.py
+++ /dev/null
@@ -1,55 +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.
-"""
-3D View Shading Shortcuts
-
-Two new shortcuts have been added to the 3D View.
-Shift+Z Rendered Preview (now in Blender 2.70)
-Alt+Shift+Z Only Render
-"""
-
-import bpy
-
-
-KEYMAPS = list()
-
-
-class AMTH_VIEW3D_OT_show_only_render(bpy.types.Operator):
- bl_idname = "view3d.show_only_render"
- bl_label = "Show Only Render"
-
- def execute(self, context):
- space = bpy.context.space_data
-
- if space.show_only_render:
- space.show_only_render = False
- else:
- space.show_only_render = True
- return {"FINISHED"}
-
-
-def register():
- bpy.utils.register_class(AMTH_VIEW3D_OT_show_only_render)
- kc = bpy.context.window_manager.keyconfigs.addon
- km = kc.keymaps.new(name="3D View", space_type="VIEW_3D")
- kmi = km.keymap_items.new("view3d.show_only_render", "Z", "PRESS",
- shift=True, alt=True)
- KEYMAPS.append((km, kmi))
-
-
-def unregister():
- bpy.utils.unregister_class(AMTH_VIEW3D_OT_show_only_render)
- for km, kmi in KEYMAPS:
- km.keymap_items.remove(kmi)
- KEYMAPS.clear()
diff --git a/amaranth/render/unsimplify.py b/amaranth/render/unsimplify.py
deleted file mode 100644
index 25f9df1b..00000000
--- a/amaranth/render/unsimplify.py
+++ /dev/null
@@ -1,83 +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.
-"""
-Unsimplify Render
-
-Handy option when you want to simplify the 3D View but unsimplify during
-render. Find it on the Simplify panel under Scene properties.
-"""
-
-import bpy
-from amaranth import utils
-
-
-def init():
- scene = bpy.types.Scene
- scene.use_unsimplify_render = bpy.props.BoolProperty(
- default=False,
- name="Unsimplify Render",
- description="Disable Simplify during render")
- scene.simplify_status = bpy.props.BoolProperty(default=False)
-
-
-def clear():
- wm = bpy.context.window_manager
- for p in ("use_unsimplify_render", "simplify_status"):
- if wm.get(p):
- del wm[p]
-
-
- at bpy.app.handlers.persistent
-def unsimplify_render_pre(scene):
- render = scene.render
- scene.simplify_status = render.use_simplify
-
- if scene.use_unsimplify_render:
- render.use_simplify = False
-
-
- at bpy.app.handlers.persistent
-def unsimplify_render_post(scene):
- render = scene.render
- render.use_simplify = scene.simplify_status
-
-
-def unsimplify_ui(self, context):
- scene = bpy.context.scene
- self.layout.prop(scene, 'use_unsimplify_render')
-
-
-def register():
- init()
- bpy.app.handlers.render_pre.append(unsimplify_render_pre)
- bpy.app.handlers.render_post.append(unsimplify_render_post)
- bpy.types.SCENE_PT_simplify.append(unsimplify_ui)
- if utils.cycles_exists():
- if bpy.app.version >= (2, 79, 1):
- bpy.types.CYCLES_SCENE_PT_simplify.append(unsimplify_ui)
- else:
- bpy.types.CyclesScene_PT_simplify.append(unsimplify_ui)
-
-
-
-def unregister():
- clear()
- bpy.app.handlers.render_pre.remove(unsimplify_render_pre)
- bpy.app.handlers.render_post.remove(unsimplify_render_post)
- bpy.types.SCENE_PT_simplify.remove(unsimplify_ui)
- if utils.cycles_exists():
- if bpy.app.version >= (2, 79, 1):
- bpy.types.CYCLES_SCENE_PT_simplify.remove(unsimplify_ui)
- else:
- bpy.types.CyclesScene_PT_simplify.remove(unsimplify_ui)
diff --git a/amaranth/scene/debug.py b/amaranth/scene/debug.py
index 47b87025..c4962b5d 100755
--- a/amaranth/scene/debug.py
+++ b/amaranth/scene/debug.py
@@ -31,8 +31,8 @@ working on it!). It works since 0.8.8!
Under the "Scene Debug" panel in Scene propert
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list