[Bf-extensions-cvs] [e0666c44] master: Amaranth fixes
CansecoGPC
noreply at git.blender.org
Tue Dec 3 15:48:40 CET 2019
Commit: e0666c44cd2e6a76b5896355e70d5580fed66e98
Author: CansecoGPC
Date: Tue Dec 3 14:59:50 2019 +0100
Branches: master
https://developer.blender.org/rBACe0666c44cd2e6a76b5896355e70d5580fed66e98
Amaranth fixes
===================================================================
M amaranth/__init__.py
D amaranth/misc/dopesheet_grapheditor.py
M amaranth/modeling/symmetry_tools.py
M amaranth/node_editor/templates/vectorblur.py
M amaranth/render/meshlight_select.py
===================================================================
diff --git a/amaranth/__init__.py b/amaranth/__init__.py
index 07efa619..3a4dd49f 100644
--- a/amaranth/__init__.py
+++ b/amaranth/__init__.py
@@ -75,7 +75,6 @@ from amaranth.animation import (
)
from amaranth.misc import (
- dopesheet_grapheditor,
color_management,
dupli_group_id,
toggle_wire,
diff --git a/amaranth/misc/dopesheet_grapheditor.py b/amaranth/misc/dopesheet_grapheditor.py
deleted file mode 100644
index c48a30a6..00000000
--- a/amaranth/misc/dopesheet_grapheditor.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.
-"""
-Shortcut: Ctrl+Tab to switch between Dopesheet/Graph Editor
-
-Hit Ctrl + Tab to switch between Dopesheet and the Graph Editor.
-Developed during Caminandes Open Movie Project
-"""
-
-
-import bpy
-
-KEYMAPS = list()
-
-
-def register():
- wm = bpy.context.window_manager
- kc = wm.keyconfigs.addon
-
- km = kc.keymaps.new(name="Graph Editor", space_type="GRAPH_EDITOR")
- kmi = km.keymap_items.new("wm.context_set_enum", "TAB", "PRESS", ctrl=True)
- kmi.properties.data_path = "area.type"
- kmi.properties.value = "DOPESHEET_EDITOR"
- KEYMAPS.append((km, kmi))
-
- km = kc.keymaps.new(name="Dopesheet", space_type="DOPESHEET_EDITOR")
- kmi = km.keymap_items.new("wm.context_set_enum", "TAB", "PRESS", ctrl=True)
- kmi.properties.data_path = "area.type"
- kmi.properties.value = "GRAPH_EDITOR"
- KEYMAPS.append((km, kmi))
-
- km = kc.keymaps.new(name="Dopesheet", space_type="DOPESHEET_EDITOR")
- kmi = km.keymap_items.new("wm.context_toggle_enum",
- "TAB", "PRESS", shift=True)
- kmi.properties.data_path = "space_data.mode"
- kmi.properties.value_1 = "ACTION"
- kmi.properties.value_2 = "DOPESHEET"
- KEYMAPS.append((km, kmi))
-
-
-def unregister():
- for km, kmi in KEYMAPS:
- km.keymap_items.remove(kmi)
- KEYMAPS.clear()
diff --git a/amaranth/modeling/symmetry_tools.py b/amaranth/modeling/symmetry_tools.py
index be300ca1..da342abc 100644
--- a/amaranth/modeling/symmetry_tools.py
+++ b/amaranth/modeling/symmetry_tools.py
@@ -166,11 +166,24 @@ class AMTH_MESH_OT_make_symmetric(bpy.types.Operator):
return {"FINISHED"}
+def ui_symmetry_tools(self, context):
+ if bpy.context.mode == 'EDIT_MESH':
+ self.layout.separator()
+ self.layout.operator(
+ AMTH_MESH_OT_find_asymmetric.bl_idname,
+ icon="ALIGN_CENTER", text="Find Asymmetric")
+ self.layout.operator(
+ AMTH_MESH_OT_make_symmetric.bl_idname,
+ icon="ALIGN_JUSTIFY", text="Make Symmetric")
+
+
def register():
bpy.utils.register_class(AMTH_MESH_OT_find_asymmetric)
bpy.utils.register_class(AMTH_MESH_OT_make_symmetric)
-
+ bpy.types.VIEW3D_MT_edit_mesh.append(ui_symmetry_tools)
+
def unregister():
bpy.utils.unregister_class(AMTH_MESH_OT_find_asymmetric)
bpy.utils.unregister_class(AMTH_MESH_OT_make_symmetric)
+ bpy.types.VIEW3D_MT_edit_mesh.remove(ui_symmetry_tools)
diff --git a/amaranth/node_editor/templates/vectorblur.py b/amaranth/node_editor/templates/vectorblur.py
index 2cb9b452..2bc01e48 100644
--- a/amaranth/node_editor/templates/vectorblur.py
+++ b/amaranth/node_editor/templates/vectorblur.py
@@ -41,18 +41,18 @@ class AMTH_NODE_OT_AddTemplateVectorBlur(bpy.types.Operator):
bpy.ops.node.select_all(action="DESELECT")
act_node = tree.nodes.active
- rlayer = act_node.scene.render.layers[act_node.layer]
+ #rlayer = act_node.scene.render.layers[act_node.layer]
- if not rlayer.use_pass_vector:
- rlayer.use_pass_vector = True
+ #if not rlayer.use_pass_vector:
+ #rlayer.use_pass_vector = True
vblur = tree.nodes.new(type="CompositorNodeVecBlur")
vblur.use_curved = True
vblur.factor = 0.5
tree.links.new(act_node.outputs["Image"], vblur.inputs["Image"])
- tree.links.new(act_node.outputs["Z"], vblur.inputs["Z"])
- tree.links.new(act_node.outputs["Speed"], vblur.inputs["Speed"])
+ tree.links.new(act_node.outputs["Depth"], vblur.inputs["Z"])
+ tree.links.new(act_node.outputs["Vector"], vblur.inputs["Speed"])
if tree.nodes.active:
vblur.location = tree.nodes.active.location
diff --git a/amaranth/render/meshlight_select.py b/amaranth/render/meshlight_select.py
index b7c7c886..cad3a95a 100644
--- a/amaranth/render/meshlight_select.py
+++ b/amaranth/render/meshlight_select.py
@@ -50,7 +50,7 @@ class AMTH_OBJECT_OT_select_meshlights(bpy.types.Operator):
def button_select_meshlights(self, context):
if utils.cycles_exists() and utils.cycles_active(context):
- self.layout.operator('object.select_meshlights', icon="LAMP_SUN")
+ self.layout.operator('object.select_meshlights', icon="LIGHT_SUN")
def register():
More information about the Bf-extensions-cvs
mailing list