Commit e0666c44 authored by CansecoGPC's avatar CansecoGPC
Browse files

Amaranth fixes

parent af1d8170
......@@ -75,7 +75,6 @@ from amaranth.animation import (
)
from amaranth.misc import (
dopesheet_grapheditor,
color_management,
dupli_group_id,
toggle_wire,
......
# 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()
......@@ -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)
......@@ -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
......
......@@ -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():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment