forked from bartvdbraak/blender
Cleanup: pep8
This commit is contained in:
parent
dbe1b07e05
commit
b66aa0b0a6
@ -209,6 +209,8 @@ def modules(module_cache=addons_fake_modules, *, refresh=True):
|
||||
)
|
||||
)
|
||||
return mod_list
|
||||
|
||||
|
||||
modules._is_first = True
|
||||
|
||||
|
||||
|
@ -172,6 +172,7 @@ def ui_draw_filter_register(
|
||||
|
||||
class Wrapper(cls_real):
|
||||
__slots__ = ()
|
||||
|
||||
def __getattribute__(self, attr):
|
||||
if attr == "layout":
|
||||
return UILayout_Fake(self_real.layout)
|
||||
|
@ -43,14 +43,17 @@ else:
|
||||
# XXX This is a quick hack to make it work with new I18n... objects! To be reworked!
|
||||
def main():
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser(description=
|
||||
"Merge one or more .po files into the first dest one.\n"
|
||||
"If a msgkey (msgctxt, msgid) is present in more than one merged po, the one in the first file "
|
||||
"wins, unless it’s marked as fuzzy and one later is not.\n"
|
||||
"The fuzzy flag is removed if necessary.\n"
|
||||
"All other comments are never modified.\n"
|
||||
"Commented messages in dst will always remain commented, and commented messages are never merged "
|
||||
"from sources.")
|
||||
parser = argparse.ArgumentParser(
|
||||
description=(
|
||||
"Merge one or more .po files into the first dest one.\n"
|
||||
"If a msgkey (msgctxt, msgid) is present in more than one merged po, the one in the first file "
|
||||
"wins, unless it’s marked as fuzzy and one later is not.\n"
|
||||
"The fuzzy flag is removed if necessary.\n"
|
||||
"All other comments are never modified.\n"
|
||||
"Commented messages in dst will always remain commented, and commented messages are never merged "
|
||||
"from sources."
|
||||
),
|
||||
)
|
||||
parser.add_argument('-s', '--stats', action="store_true", help="Show statistics info.")
|
||||
parser.add_argument('-r', '--replace', action="store_true",
|
||||
help="Replace existing messages of same \"level\" already in dest po.")
|
||||
|
@ -442,7 +442,7 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
|
||||
if not has_camera:
|
||||
# We had to add a temp camera, now we need to place it to see interesting objects!
|
||||
objects = tuple((ob.name, ob.library.filepath if ob.library else None) for ob in scene.objects
|
||||
if (not ob.hide_render) and (ob.type in OBJECT_TYPES_RENDER))
|
||||
if (not ob.hide_render) and (ob.type in OBJECT_TYPES_RENDER))
|
||||
|
||||
preview_render_do(render_context, 'scenes', scene.name, objects)
|
||||
|
||||
|
@ -98,5 +98,6 @@ def main():
|
||||
for value in read_blend_rend_chunk(arg):
|
||||
print("%d %d %s" % value)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -225,4 +225,5 @@ class BPyOpsSubModOp:
|
||||
return ("<function bpy.ops.%s.%s at 0x%x'>" %
|
||||
(self._module, self._func, id(self)))
|
||||
|
||||
|
||||
ops_fake_module = BPyOps()
|
||||
|
@ -183,6 +183,8 @@ def clean_name(name, replace="_"):
|
||||
|
||||
trans = maketrans_init()
|
||||
return name.translate(trans)
|
||||
|
||||
|
||||
clean_name._trans_cache = {}
|
||||
|
||||
|
||||
@ -223,6 +225,7 @@ def display_name(name):
|
||||
name = _clean_utf8(name)
|
||||
return name
|
||||
|
||||
|
||||
def display_name_to_filepath(name):
|
||||
"""
|
||||
Performs the reverse of display_name using literal versions of characters
|
||||
|
@ -30,4 +30,4 @@ __all__ = (
|
||||
"keyconfig_utils",
|
||||
"mesh_utils",
|
||||
"view3d_utils",
|
||||
)
|
||||
)
|
||||
|
@ -174,7 +174,7 @@ def bake_action_iter(
|
||||
|
||||
# Bendy Bones
|
||||
if pbone.bone.bbone_segments > 1:
|
||||
bbones[name] = {bb_prop : getattr(pbone, bb_prop) for bb_prop in BBONE_PROPS}
|
||||
bbones[name] = {bb_prop: getattr(pbone, bb_prop) for bb_prop in BBONE_PROPS}
|
||||
return matrix, bbones
|
||||
|
||||
if do_parents_clear:
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
__all__ = (
|
||||
"load_image",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
# limited replacement for BPyImage.comprehensiveImageLoad
|
||||
|
@ -32,7 +32,7 @@ __all__ = (
|
||||
"path_reference_copy",
|
||||
"path_reference_mode",
|
||||
"unique_name"
|
||||
)
|
||||
)
|
||||
|
||||
import bpy
|
||||
from bpy.props import (
|
||||
@ -53,23 +53,23 @@ def _check_axis_conversion(op):
|
||||
|
||||
class ExportHelper:
|
||||
filepath = StringProperty(
|
||||
name="File Path",
|
||||
description="Filepath used for exporting the file",
|
||||
maxlen=1024,
|
||||
subtype='FILE_PATH',
|
||||
)
|
||||
name="File Path",
|
||||
description="Filepath used for exporting the file",
|
||||
maxlen=1024,
|
||||
subtype='FILE_PATH',
|
||||
)
|
||||
check_existing = BoolProperty(
|
||||
name="Check Existing",
|
||||
description="Check and warn on overwriting existing files",
|
||||
default=True,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
name="Check Existing",
|
||||
description="Check and warn on overwriting existing files",
|
||||
default=True,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
|
||||
# needed for mix-ins
|
||||
order = [
|
||||
"filepath",
|
||||
"check_existing",
|
||||
]
|
||||
]
|
||||
|
||||
# subclasses can override with decorator
|
||||
# True == use ext, False == no ext, None == do nothing.
|
||||
@ -113,16 +113,16 @@ class ExportHelper:
|
||||
|
||||
class ImportHelper:
|
||||
filepath = StringProperty(
|
||||
name="File Path",
|
||||
description="Filepath used for importing the file",
|
||||
maxlen=1024,
|
||||
subtype='FILE_PATH',
|
||||
)
|
||||
name="File Path",
|
||||
description="Filepath used for importing the file",
|
||||
maxlen=1024,
|
||||
subtype='FILE_PATH',
|
||||
)
|
||||
|
||||
# needed for mix-ins
|
||||
order = [
|
||||
"filepath",
|
||||
]
|
||||
]
|
||||
|
||||
def invoke(self, context, event):
|
||||
context.window_manager.fileselect_add(self)
|
||||
@ -138,43 +138,45 @@ def orientation_helper_factory(name, axis_forward='Y', axis_up='Z'):
|
||||
def _update_axis_forward(self, context):
|
||||
if self.axis_forward[-1] == self.axis_up[-1]:
|
||||
self.axis_up = (self.axis_up[0:-1] +
|
||||
'XYZ'[('XYZ'.index(self.axis_up[-1]) + 1) % 3])
|
||||
'XYZ'[('XYZ'.index(self.axis_up[-1]) + 1) % 3])
|
||||
|
||||
members['axis_forward'] = EnumProperty(
|
||||
name="Forward",
|
||||
items=(('X', "X Forward", ""),
|
||||
('Y', "Y Forward", ""),
|
||||
('Z', "Z Forward", ""),
|
||||
('-X', "-X Forward", ""),
|
||||
('-Y', "-Y Forward", ""),
|
||||
('-Z', "-Z Forward", ""),
|
||||
),
|
||||
default=axis_forward,
|
||||
update=_update_axis_forward,
|
||||
)
|
||||
name="Forward",
|
||||
items=(
|
||||
('X', "X Forward", ""),
|
||||
('Y', "Y Forward", ""),
|
||||
('Z', "Z Forward", ""),
|
||||
('-X', "-X Forward", ""),
|
||||
('-Y', "-Y Forward", ""),
|
||||
('-Z', "-Z Forward", ""),
|
||||
),
|
||||
default=axis_forward,
|
||||
update=_update_axis_forward,
|
||||
)
|
||||
|
||||
def _update_axis_up(self, context):
|
||||
if self.axis_up[-1] == self.axis_forward[-1]:
|
||||
self.axis_forward = (self.axis_forward[0:-1] +
|
||||
'XYZ'[('XYZ'.index(self.axis_forward[-1]) + 1) % 3])
|
||||
'XYZ'[('XYZ'.index(self.axis_forward[-1]) + 1) % 3])
|
||||
|
||||
members['axis_up'] = EnumProperty(
|
||||
name="Up",
|
||||
items=(('X', "X Up", ""),
|
||||
('Y', "Y Up", ""),
|
||||
('Z', "Z Up", ""),
|
||||
('-X', "-X Up", ""),
|
||||
('-Y', "-Y Up", ""),
|
||||
('-Z', "-Z Up", ""),
|
||||
),
|
||||
default=axis_up,
|
||||
update=_update_axis_up,
|
||||
)
|
||||
name="Up",
|
||||
items=(
|
||||
('X', "X Up", ""),
|
||||
('Y', "Y Up", ""),
|
||||
('Z', "Z Up", ""),
|
||||
('-X', "-X Up", ""),
|
||||
('-Y', "-Y Up", ""),
|
||||
('-Z', "-Z Up", ""),
|
||||
),
|
||||
default=axis_up,
|
||||
update=_update_axis_up,
|
||||
)
|
||||
|
||||
members["order"] = [
|
||||
"axis_forward",
|
||||
"axis_up",
|
||||
]
|
||||
]
|
||||
|
||||
return type(name, (object,), members)
|
||||
|
||||
@ -205,7 +207,7 @@ _axis_convert_matrix = (
|
||||
((1.0, 0.0, 0.0), (0.0, -1.0, 0.0), (0.0, 0.0, -1.0)),
|
||||
((1.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, -1.0, 0.0)),
|
||||
((1.0, 0.0, 0.0), (0.0, 0.0, -1.0), (0.0, 1.0, 0.0)),
|
||||
)
|
||||
)
|
||||
|
||||
# store args as a single int
|
||||
# (X Y Z -X -Y -Z) --> (0, 1, 2, 3, 4, 5)
|
||||
@ -282,7 +284,7 @@ _axis_convert_lut = (
|
||||
{0x408, 0x810, 0xA20, 0x228, 0x081, 0x891, 0x699, 0x2A9, 0x102, 0x50A,
|
||||
0x71A, 0xB22, 0x4CB, 0x8D3, 0xAE3, 0x2EB, 0x144, 0x954, 0x75C, 0x36C,
|
||||
0x045, 0x44D, 0x65D, 0xA65},
|
||||
)
|
||||
)
|
||||
|
||||
_axis_convert_num = {'X': 0, 'Y': 1, 'Z': 2, '-X': 3, '-Y': 4, '-Z': 5}
|
||||
|
||||
@ -303,11 +305,11 @@ def axis_conversion(from_forward='Y', from_up='Z', to_forward='Y', to_up='Z'):
|
||||
"can't use up/forward on the same axis")
|
||||
|
||||
value = reduce(int.__or__, (_axis_convert_num[a] << (i * 3)
|
||||
for i, a in enumerate((from_forward,
|
||||
from_up,
|
||||
to_forward,
|
||||
to_up,
|
||||
))))
|
||||
for i, a in enumerate((from_forward,
|
||||
from_up,
|
||||
to_forward,
|
||||
to_up,
|
||||
))))
|
||||
|
||||
for i, axis_lut in enumerate(_axis_convert_lut):
|
||||
if value in axis_lut:
|
||||
@ -392,20 +394,21 @@ def unpack_face_list(list_of_tuples):
|
||||
|
||||
|
||||
path_reference_mode = EnumProperty(
|
||||
name="Path Mode",
|
||||
description="Method used to reference paths",
|
||||
items=(('AUTO', "Auto", "Use Relative paths with subdirectories only"),
|
||||
('ABSOLUTE', "Absolute", "Always write absolute paths"),
|
||||
('RELATIVE', "Relative", "Always write relative paths "
|
||||
"(where possible)"),
|
||||
('MATCH', "Match", "Match Absolute/Relative "
|
||||
"setting with input path"),
|
||||
('STRIP', "Strip Path", "Filename only"),
|
||||
('COPY', "Copy", "Copy the file to the destination path "
|
||||
"(or subdirectory)"),
|
||||
),
|
||||
default='AUTO',
|
||||
)
|
||||
name="Path Mode",
|
||||
description="Method used to reference paths",
|
||||
items=(
|
||||
('AUTO', "Auto", "Use Relative paths with subdirectories only"),
|
||||
('ABSOLUTE', "Absolute", "Always write absolute paths"),
|
||||
('RELATIVE', "Relative", "Always write relative paths "
|
||||
"(where possible)"),
|
||||
('MATCH', "Match", "Match Absolute/Relative "
|
||||
"setting with input path"),
|
||||
('STRIP', "Strip Path", "Filename only"),
|
||||
('COPY', "Copy", "Copy the file to the destination path "
|
||||
"(or subdirectory)"),
|
||||
),
|
||||
default='AUTO',
|
||||
)
|
||||
|
||||
|
||||
def path_reference(filepath,
|
||||
|
@ -177,8 +177,8 @@ def addon_keymap_register(wm, keymaps_description):
|
||||
for km_info, km_items in keymaps_description:
|
||||
km_name, km_sptype, km_regtype, km_ismodal = km_info
|
||||
kmap = [k for k in kconf.keymaps
|
||||
if k.name == km_name and k.region_type == km_regtype and
|
||||
k.space_type == km_sptype and k.is_modal == km_ismodal]
|
||||
if k.name == km_name and k.region_type == km_regtype and
|
||||
k.space_type == km_sptype and k.is_modal == km_ismodal]
|
||||
if kmap:
|
||||
kmap = kmap[0]
|
||||
else:
|
||||
@ -202,8 +202,8 @@ def addon_keymap_unregister(wm, keymaps_description):
|
||||
for km_info, km_items in keymaps_description:
|
||||
km_name, km_sptype, km_regtype, km_ismodal = km_info
|
||||
kmaps = (k for k in kconf.keymaps
|
||||
if k.name == km_name and k.region_type == km_regtype and
|
||||
k.space_type == km_sptype and k.is_modal == km_ismodal)
|
||||
if k.name == km_name and k.region_type == km_regtype and
|
||||
k.space_type == km_sptype and k.is_modal == km_ismodal)
|
||||
for kmap in kmaps:
|
||||
for kmi_kwargs, props in km_items:
|
||||
idname = kmi_kwargs["idname"]
|
||||
|
@ -27,7 +27,7 @@ __all__ = (
|
||||
"edge_loops_from_edges",
|
||||
"ngon_tessellate",
|
||||
"face_random_points",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def mesh_linked_uv_islands(mesh):
|
||||
@ -286,7 +286,7 @@ def edge_loops_from_edges(mesh, edges=None):
|
||||
ok = True
|
||||
while ok:
|
||||
ok = False
|
||||
#for i, ed in enumerate(edges):
|
||||
# for i, ed in enumerate(edges):
|
||||
i = len(edges)
|
||||
while i:
|
||||
i -= 1
|
||||
@ -303,7 +303,7 @@ def edge_loops_from_edges(mesh, edges=None):
|
||||
vert_end = line_poly[-1]
|
||||
ok = 1
|
||||
del edges[i]
|
||||
#break
|
||||
# break
|
||||
elif v1 == vert_start:
|
||||
line_poly.insert(0, v2)
|
||||
vert_start = line_poly[0]
|
||||
@ -315,7 +315,7 @@ def edge_loops_from_edges(mesh, edges=None):
|
||||
vert_start = line_poly[0]
|
||||
ok = 1
|
||||
del edges[i]
|
||||
#break
|
||||
# break
|
||||
line_polys.append(line_poly)
|
||||
|
||||
return line_polys
|
||||
@ -481,7 +481,7 @@ def ngon_tessellate(from_data, indices, fix_loops=True):
|
||||
ii += len(verts)
|
||||
|
||||
fill = tessellate_polygon([[v[0] for v in loop] for loop in loop_list])
|
||||
#draw_loops(loop_list)
|
||||
# draw_loops(loop_list)
|
||||
#raise Exception("done loop")
|
||||
# map to original indices
|
||||
fill = [[vert_map[i] for i in reversed(f)] for f in fill]
|
||||
|
@ -26,7 +26,7 @@ __all__ = (
|
||||
"object_add_grid_scale_apply_operator",
|
||||
"object_image_guess",
|
||||
"world_to_camera_view",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
import bpy
|
||||
@ -218,24 +218,24 @@ class AddObjectHelper:
|
||||
self.rotation.zero()
|
||||
|
||||
view_align = BoolProperty(
|
||||
name="Align to View",
|
||||
default=False,
|
||||
update=view_align_update_callback,
|
||||
)
|
||||
name="Align to View",
|
||||
default=False,
|
||||
update=view_align_update_callback,
|
||||
)
|
||||
location = FloatVectorProperty(
|
||||
name="Location",
|
||||
subtype='TRANSLATION',
|
||||
)
|
||||
name="Location",
|
||||
subtype='TRANSLATION',
|
||||
)
|
||||
rotation = FloatVectorProperty(
|
||||
name="Rotation",
|
||||
subtype='EULER',
|
||||
)
|
||||
name="Rotation",
|
||||
subtype='EULER',
|
||||
)
|
||||
layers = BoolVectorProperty(
|
||||
name="Layers",
|
||||
size=20,
|
||||
subtype='LAYER',
|
||||
options={'HIDDEN', 'SKIP_SAVE'},
|
||||
)
|
||||
name="Layers",
|
||||
size=20,
|
||||
subtype='LAYER',
|
||||
options={'HIDDEN', 'SKIP_SAVE'},
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(self, context):
|
||||
|
@ -153,6 +153,7 @@ def topretty_py(py_data, indent=" "):
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# testing code.
|
||||
|
||||
|
@ -19,12 +19,12 @@
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# Original copyright (see docstring):
|
||||
#*****************************************************************************
|
||||
# ****************************************************************************
|
||||
# Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
|
||||
#
|
||||
# Distributed under the terms of the BSD License. The full license is in
|
||||
# the file COPYING, distributed as part of this software.
|
||||
#*****************************************************************************
|
||||
# ****************************************************************************
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
|
@ -224,6 +224,7 @@ def execute(context, is_interactive):
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
execute.hooks = []
|
||||
|
||||
|
||||
|
@ -40,6 +40,7 @@ def shell_run(text):
|
||||
|
||||
add_scrollback(output, style)
|
||||
|
||||
|
||||
PROMPT = "$ "
|
||||
|
||||
|
||||
@ -64,7 +65,7 @@ def execute(context, is_interactive):
|
||||
|
||||
|
||||
def autocomplete(context):
|
||||
#~ sc = context.space_data
|
||||
# sc = context.space_data
|
||||
# TODO
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
@ -140,7 +140,7 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr
|
||||
return None
|
||||
|
||||
#rna_path_bone = rna_path[:rna_path.index("]") + 1]
|
||||
#return obj.path_resolve(rna_path_bone)
|
||||
# return obj.path_resolve(rna_path_bone)
|
||||
bone_name = rna_path.split("[")[1].split("]")[0]
|
||||
return obj.pose.bones[bone_name[1:-1]]
|
||||
|
||||
@ -179,6 +179,7 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr
|
||||
print("\nSaved:", filepath)
|
||||
return True
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import os
|
||||
tmppath = "/tmp/test.dot"
|
||||
|
@ -36,7 +36,7 @@ __all__ = (
|
||||
"RKS_GEN_rotation",
|
||||
"RKS_GEN_scaling",
|
||||
"RKS_GEN_bendy_bones",
|
||||
)
|
||||
)
|
||||
|
||||
import bpy
|
||||
|
||||
@ -219,6 +219,7 @@ def RKS_GEN_scaling(ksi, context, ks, data):
|
||||
|
||||
# ------
|
||||
|
||||
|
||||
# Property identifiers for Bendy Bones
|
||||
bbone_property_ids = (
|
||||
"bbone_curveinx",
|
||||
|
@ -121,7 +121,7 @@ def register_node_categories(identifier, cat_list):
|
||||
"category": cat,
|
||||
"poll": cat.poll,
|
||||
"draw": draw_node_item,
|
||||
})
|
||||
})
|
||||
panel_type = type("NODE_PT_category_" + cat.identifier, (bpy.types.Panel,), {
|
||||
"bl_space_type": 'NODE_EDITOR',
|
||||
"bl_region_type": 'TOOLS',
|
||||
@ -130,7 +130,7 @@ def register_node_categories(identifier, cat_list):
|
||||
"category": cat,
|
||||
"poll": cat.poll,
|
||||
"draw": draw_node_item,
|
||||
})
|
||||
})
|
||||
|
||||
menu_types.append(menu_type)
|
||||
panel_types.append(panel_type)
|
||||
|
@ -25,7 +25,7 @@ __all__ = (
|
||||
"draw_filtered",
|
||||
"draw_hierarchy",
|
||||
"draw_keymaps",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
import bpy
|
||||
@ -174,7 +174,7 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
|
||||
sub.prop(kmi, "propvalue", text="")
|
||||
else:
|
||||
# One day...
|
||||
#~ sub.prop_search(kmi, "idname", bpy.context.window_manager, "operators_all", text="")
|
||||
# sub.prop_search(kmi, "idname", bpy.context.window_manager, "operators_all", text="")
|
||||
sub.prop(kmi, "idname", text="")
|
||||
|
||||
if map_type not in {'TEXTINPUT', 'TIMER'}:
|
||||
@ -207,6 +207,7 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
|
||||
draw_km(display_keymaps, kc, kmm, None, layout, level + 1)
|
||||
layout.context_pointer_set("keymap", km)
|
||||
|
||||
|
||||
_EVENT_TYPES = set()
|
||||
_EVENT_TYPE_MAP = {}
|
||||
_EVENT_TYPE_MAP_EXTRA = {}
|
||||
@ -234,10 +235,10 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
|
||||
"RMB": 'RIGHTMOUSE',
|
||||
"LMB": 'LEFTMOUSE',
|
||||
"MMB": 'MIDDLEMOUSE',
|
||||
})
|
||||
})
|
||||
_EVENT_TYPE_MAP_EXTRA.update({
|
||||
"%d" % i: "NUMPAD_%d" % i for i in range(10)
|
||||
})
|
||||
})
|
||||
# done with once off init
|
||||
|
||||
filter_text_split = filter_text.strip()
|
||||
@ -251,7 +252,7 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
|
||||
"cmd": "oskey",
|
||||
"oskey": "oskey",
|
||||
"any": "any",
|
||||
}
|
||||
}
|
||||
# KeyMapItem like dict, use for comparing against
|
||||
# attr: {states, ...}
|
||||
kmi_test_dict = {}
|
||||
@ -260,8 +261,8 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
|
||||
kmi_test_type = []
|
||||
|
||||
# initialize? - so if a if a kmi has a MOD assigned it wont show up.
|
||||
#~ for kv in key_mod.values():
|
||||
#~ kmi_test_dict[kv] = {False}
|
||||
# for kv in key_mod.values():
|
||||
# kmi_test_dict[kv] = {False}
|
||||
|
||||
# altname: attr
|
||||
for kk, kv in key_mod.items():
|
||||
@ -374,7 +375,7 @@ def draw_keymaps(context, layout):
|
||||
|
||||
row = subcol.row(align=True)
|
||||
|
||||
#~ row.prop_search(wm.keyconfigs, "active", wm, "keyconfigs", text="Key Config")
|
||||
# row.prop_search(wm.keyconfigs, "active", wm, "keyconfigs", text="Key Config")
|
||||
text = bpy.path.display_name(wm.keyconfigs.active.name)
|
||||
if not text:
|
||||
text = "Blender (default)"
|
||||
@ -382,8 +383,8 @@ def draw_keymaps(context, layout):
|
||||
row.operator("wm.keyconfig_preset_add", text="", icon='ZOOMIN')
|
||||
row.operator("wm.keyconfig_preset_add", text="", icon='ZOOMOUT').remove_active = True
|
||||
|
||||
#~ layout.context_pointer_set("keyconfig", wm.keyconfigs.active)
|
||||
#~ row.operator("wm.keyconfig_remove", text="", icon='X')
|
||||
# layout.context_pointer_set("keyconfig", wm.keyconfigs.active)
|
||||
# row.operator("wm.keyconfig_remove", text="", icon='X')
|
||||
row.separator()
|
||||
rowsub = row.split(align=True, percentage=0.33)
|
||||
# postpone drawing into rowsub, so we can set alert!
|
||||
|
@ -26,7 +26,7 @@ import bmesh
|
||||
__all__ = (
|
||||
"select_prev",
|
||||
"select_next",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def other_edges_over_face(e):
|
||||
@ -303,8 +303,9 @@ def select_next(bm, report):
|
||||
for fn in (pass_fn, set, sum_set, len):
|
||||
uuid_cmp_test = fn(uuid_cmp)
|
||||
ele_pair_next_uuid_test = [
|
||||
(ele, uuid) for (ele, uuid) in ele_pair_next_uuid
|
||||
if uuid_cmp_test == fn(uuid)]
|
||||
(ele, uuid) for (ele, uuid) in ele_pair_next_uuid
|
||||
if uuid_cmp_test == fn(uuid)
|
||||
]
|
||||
if len(ele_pair_next_uuid_test) > 1:
|
||||
ele_pair_next_uuid = ele_pair_next_uuid_test
|
||||
elif len(ele_pair_next_uuid_test) == 1:
|
||||
|
@ -527,6 +527,8 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
|
||||
ksi.addProp(ks, bone, prop)
|
||||
|
||||
# All properties that are likely to get animated in a character rig, only selected bones.
|
||||
|
||||
|
||||
class BUILTIN_KSI_WholeCharacterSelected(KeyingSetInfo):
|
||||
"""Insert a keyframe for all properties that are likely to get animated in a character rig """
|
||||
"""(only selected bones)"""
|
||||
@ -557,6 +559,8 @@ class BUILTIN_KSI_WholeCharacterSelected(KeyingSetInfo):
|
||||
###############################
|
||||
|
||||
# Delta Location
|
||||
|
||||
|
||||
class BUILTIN_KSI_DeltaLocation(KeyingSetInfo):
|
||||
"""Insert keyframes for additional location offset"""
|
||||
bl_label = "Delta Location"
|
||||
@ -643,6 +647,7 @@ class BUILTIN_KSI_DeltaScale(KeyingSetInfo):
|
||||
|
||||
###############################
|
||||
|
||||
|
||||
# Note that this controls order of options in 'insert keyframe' menu.
|
||||
# Better try to keep some logical order here beyond mere alphabetical one, also because of menu entries shortcut.
|
||||
# See also T51867.
|
||||
|
@ -69,12 +69,13 @@ def group_tools_draw(self, layout, context):
|
||||
layout.operator("node.group_ungroup")
|
||||
layout.separator()
|
||||
|
||||
|
||||
# maps node tree type to group node type
|
||||
node_tree_group_type = {
|
||||
'CompositorNodeTree': 'CompositorNodeGroup',
|
||||
'ShaderNodeTree': 'ShaderNodeGroup',
|
||||
'TextureNodeTree': 'TextureNodeGroup',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# generic node group items generator for shader, compositor and texture node groups
|
||||
@ -159,25 +160,25 @@ shader_node_categories = [
|
||||
NodeItem("ShaderNodeParticleInfo"),
|
||||
NodeItem("ShaderNodeObjectInfo"),
|
||||
NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
|
||||
]),
|
||||
]),
|
||||
ShaderOldNodeCategory("SH_OUTPUT", "Output", items=[
|
||||
NodeItem("ShaderNodeOutput"),
|
||||
NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
|
||||
]),
|
||||
]),
|
||||
ShaderOldNodeCategory("SH_OP_COLOR", "Color", items=[
|
||||
NodeItem("ShaderNodeMixRGB"),
|
||||
NodeItem("ShaderNodeRGBCurve"),
|
||||
NodeItem("ShaderNodeInvert"),
|
||||
NodeItem("ShaderNodeHueSaturation"),
|
||||
NodeItem("ShaderNodeGamma"),
|
||||
]),
|
||||
]),
|
||||
ShaderOldNodeCategory("SH_OP_VECTOR", "Vector", items=[
|
||||
NodeItem("ShaderNodeNormal"),
|
||||
NodeItem("ShaderNodeMapping"),
|
||||
NodeItem("ShaderNodeVectorCurve"),
|
||||
NodeItem("ShaderNodeVectorTransform"),
|
||||
NodeItem("ShaderNodeNormalMap"),
|
||||
]),
|
||||
]),
|
||||
ShaderOldNodeCategory("SH_CONVERTOR", "Converter", items=[
|
||||
NodeItem("ShaderNodeValToRGB"),
|
||||
NodeItem("ShaderNodeRGBToBW"),
|
||||
@ -188,12 +189,12 @@ shader_node_categories = [
|
||||
NodeItem("ShaderNodeCombineRGB"),
|
||||
NodeItem("ShaderNodeSeparateHSV"),
|
||||
NodeItem("ShaderNodeCombineHSV"),
|
||||
]),
|
||||
]),
|
||||
ShaderOldNodeCategory("SH_GROUP", "Group", items=node_group_items),
|
||||
ShaderOldNodeCategory("SH_LAYOUT", "Layout", items=[
|
||||
NodeItem("NodeFrame"),
|
||||
NodeItem("NodeReroute"),
|
||||
]),
|
||||
]),
|
||||
|
||||
# New Shader Nodes (Cycles)
|
||||
ShaderNewNodeCategory("SH_NEW_INPUT", "Input", items=[
|
||||
@ -216,14 +217,14 @@ shader_node_categories = [
|
||||
NodeItem("ShaderNodeUVMap"),
|
||||
NodeItem("ShaderNodeUVAlongStroke", poll=line_style_shader_nodes_poll),
|
||||
NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
|
||||
]),
|
||||
]),
|
||||
ShaderNewNodeCategory("SH_NEW_OUTPUT", "Output", items=[
|
||||
NodeItem("ShaderNodeOutputMaterial", poll=object_shader_nodes_poll),
|
||||
NodeItem("ShaderNodeOutputLamp", poll=object_shader_nodes_poll),
|
||||
NodeItem("ShaderNodeOutputWorld", poll=world_shader_nodes_poll),
|
||||
NodeItem("ShaderNodeOutputLineStyle", poll=line_style_shader_nodes_poll),
|
||||
NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
|
||||
]),
|
||||
]),
|
||||
ShaderNewNodeCategory("SH_NEW_SHADER", "Shader", items=[
|
||||
NodeItem("ShaderNodeMixShader"),
|
||||
NodeItem("ShaderNodeAddShader"),
|
||||
@ -245,7 +246,7 @@ shader_node_categories = [
|
||||
NodeItem("ShaderNodeVolumeAbsorption"),
|
||||
NodeItem("ShaderNodeVolumeScatter"),
|
||||
NodeItem("ShaderNodeVolumePrincipled"),
|
||||
]),
|
||||
]),
|
||||
ShaderNewNodeCategory("SH_NEW_TEXTURE", "Texture", items=[
|
||||
NodeItem("ShaderNodeTexImage"),
|
||||
NodeItem("ShaderNodeTexEnvironment"),
|
||||
@ -260,7 +261,7 @@ shader_node_categories = [
|
||||
NodeItem("ShaderNodeTexBrick"),
|
||||
NodeItem("ShaderNodeTexPointDensity"),
|
||||
NodeItem("ShaderNodeTexIES"),
|
||||
]),
|
||||
]),
|
||||
ShaderNewNodeCategory("SH_NEW_OP_COLOR", "Color", items=[
|
||||
NodeItem("ShaderNodeMixRGB"),
|
||||
NodeItem("ShaderNodeRGBCurve"),
|
||||
@ -269,7 +270,7 @@ shader_node_categories = [
|
||||
NodeItem("ShaderNodeHueSaturation"),
|
||||
NodeItem("ShaderNodeGamma"),
|
||||
NodeItem("ShaderNodeBrightContrast"),
|
||||
]),
|
||||
]),
|
||||
ShaderNewNodeCategory("SH_NEW_OP_VECTOR", "Vector", items=[
|
||||
NodeItem("ShaderNodeMapping"),
|
||||
NodeItem("ShaderNodeBump"),
|
||||
@ -279,7 +280,7 @@ shader_node_categories = [
|
||||
NodeItem("ShaderNodeNormal"),
|
||||
NodeItem("ShaderNodeVectorCurve"),
|
||||
NodeItem("ShaderNodeVectorTransform"),
|
||||
]),
|
||||
]),
|
||||
ShaderNewNodeCategory("SH_NEW_CONVERTOR", "Converter", items=[
|
||||
NodeItem("ShaderNodeMath"),
|
||||
NodeItem("ShaderNodeValToRGB"),
|
||||
@ -293,16 +294,16 @@ shader_node_categories = [
|
||||
NodeItem("ShaderNodeCombineHSV"),
|
||||
NodeItem("ShaderNodeWavelength"),
|
||||
NodeItem("ShaderNodeBlackbody"),
|
||||
]),
|
||||
]),
|
||||
ShaderNewNodeCategory("SH_NEW_SCRIPT", "Script", items=[
|
||||
NodeItem("ShaderNodeScript"),
|
||||
]),
|
||||
]),
|
||||
ShaderNewNodeCategory("SH_NEW_GROUP", "Group", items=node_group_items),
|
||||
ShaderNewNodeCategory("SH_NEW_LAYOUT", "Layout", items=[
|
||||
NodeItem("NodeFrame"),
|
||||
NodeItem("NodeReroute"),
|
||||
]),
|
||||
]
|
||||
]),
|
||||
]
|
||||
|
||||
compositor_node_categories = [
|
||||
# Compositor Nodes
|
||||
@ -318,7 +319,7 @@ compositor_node_categories = [
|
||||
NodeItem("CompositorNodeTime"),
|
||||
NodeItem("CompositorNodeTrackPos"),
|
||||
NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
|
||||
]),
|
||||
]),
|
||||
CompositorNodeCategory("CMP_OUTPUT", "Output", items=[
|
||||
NodeItem("CompositorNodeComposite"),
|
||||
NodeItem("CompositorNodeViewer"),
|
||||
@ -326,7 +327,7 @@ compositor_node_categories = [
|
||||
NodeItem("CompositorNodeOutputFile"),
|
||||
NodeItem("CompositorNodeLevels"),
|
||||
NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
|
||||
]),
|
||||
]),
|
||||
CompositorNodeCategory("CMP_OP_COLOR", "Color", items=[
|
||||
NodeItem("CompositorNodeMixRGB"),
|
||||
NodeItem("CompositorNodeAlphaOver"),
|
||||
@ -340,7 +341,7 @@ compositor_node_categories = [
|
||||
NodeItem("CompositorNodeColorCorrection"),
|
||||
NodeItem("CompositorNodeTonemap"),
|
||||
NodeItem("CompositorNodeZcombine"),
|
||||
]),
|
||||
]),
|
||||
CompositorNodeCategory("CMP_CONVERTOR", "Converter", items=[
|
||||
NodeItem("CompositorNodeMath"),
|
||||
NodeItem("CompositorNodeValToRGB"),
|
||||
@ -357,7 +358,7 @@ compositor_node_categories = [
|
||||
NodeItem("CompositorNodeSepYCCA"),
|
||||
NodeItem("CompositorNodeCombYCCA"),
|
||||
NodeItem("CompositorNodeSwitchView"),
|
||||
]),
|
||||
]),
|
||||
CompositorNodeCategory("CMP_OP_FILTER", "Filter", items=[
|
||||
NodeItem("CompositorNodeBlur"),
|
||||
NodeItem("CompositorNodeBilateralblur"),
|
||||
@ -372,14 +373,14 @@ compositor_node_categories = [
|
||||
NodeItem("CompositorNodeDBlur"),
|
||||
NodeItem("CompositorNodePixelate"),
|
||||
NodeItem("CompositorNodeSunBeams"),
|
||||
]),
|
||||
]),
|
||||
CompositorNodeCategory("CMP_OP_VECTOR", "Vector", items=[
|
||||
NodeItem("CompositorNodeNormal"),
|
||||
NodeItem("CompositorNodeMapValue"),
|
||||
NodeItem("CompositorNodeMapRange"),
|
||||
NodeItem("CompositorNodeNormalize"),
|
||||
NodeItem("CompositorNodeCurveVec"),
|
||||
]),
|
||||
]),
|
||||
CompositorNodeCategory("CMP_MATTE", "Matte", items=[
|
||||
NodeItem("CompositorNodeKeying"),
|
||||
NodeItem("CompositorNodeKeyingScreen"),
|
||||
@ -393,7 +394,7 @@ compositor_node_categories = [
|
||||
NodeItem("CompositorNodeChromaMatte"),
|
||||
NodeItem("CompositorNodeColorMatte"),
|
||||
NodeItem("CompositorNodeDoubleEdgeMask"),
|
||||
]),
|
||||
]),
|
||||
CompositorNodeCategory("CMP_DISTORT", "Distort", items=[
|
||||
NodeItem("CompositorNodeScale"),
|
||||
NodeItem("CompositorNodeLensdist"),
|
||||
@ -408,14 +409,14 @@ compositor_node_categories = [
|
||||
NodeItem("CompositorNodeStabilize"),
|
||||
NodeItem("CompositorNodePlaneTrackDeform"),
|
||||
NodeItem("CompositorNodeCornerPin"),
|
||||
]),
|
||||
]),
|
||||
CompositorNodeCategory("CMP_GROUP", "Group", items=node_group_items),
|
||||
CompositorNodeCategory("CMP_LAYOUT", "Layout", items=[
|
||||
NodeItem("NodeFrame"),
|
||||
NodeItem("NodeReroute"),
|
||||
NodeItem("CompositorNodeSwitch"),
|
||||
]),
|
||||
]
|
||||
]),
|
||||
]
|
||||
|
||||
texture_node_categories = [
|
||||
# Texture Nodes
|
||||
@ -425,12 +426,12 @@ texture_node_categories = [
|
||||
NodeItem("TextureNodeTexture"),
|
||||
NodeItem("TextureNodeImage"),
|
||||
NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
|
||||
]),
|
||||
]),
|
||||
TextureNodeCategory("TEX_OUTPUT", "Output", items=[
|
||||
NodeItem("TextureNodeOutput"),
|
||||
NodeItem("TextureNodeViewer"),
|
||||
NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
|
||||
]),
|
||||
]),
|
||||
TextureNodeCategory("TEX_OP_COLOR", "Color", items=[
|
||||
NodeItem("TextureNodeMixRGB"),
|
||||
NodeItem("TextureNodeCurveRGB"),
|
||||
@ -438,11 +439,11 @@ texture_node_categories = [
|
||||
NodeItem("TextureNodeHueSaturation"),
|
||||
NodeItem("TextureNodeCompose"),
|
||||
NodeItem("TextureNodeDecompose"),
|
||||
]),
|
||||
]),
|
||||
TextureNodeCategory("TEX_PATTERN", "Pattern", items=[
|
||||
NodeItem("TextureNodeChecker"),
|
||||
NodeItem("TextureNodeBricks"),
|
||||
]),
|
||||
]),
|
||||
TextureNodeCategory("TEX_TEXTURE", "Textures", items=[
|
||||
NodeItem("TextureNodeTexNoise"),
|
||||
NodeItem("TextureNodeTexDistNoise"),
|
||||
@ -454,26 +455,26 @@ texture_node_categories = [
|
||||
NodeItem("TextureNodeTexWood"),
|
||||
NodeItem("TextureNodeTexMusgrave"),
|
||||
NodeItem("TextureNodeTexStucci"),
|
||||
]),
|
||||
]),
|
||||
TextureNodeCategory("TEX_CONVERTOR", "Converter", items=[
|
||||
NodeItem("TextureNodeMath"),
|
||||
NodeItem("TextureNodeValToRGB"),
|
||||
NodeItem("TextureNodeRGBToBW"),
|
||||
NodeItem("TextureNodeValToNor"),
|
||||
NodeItem("TextureNodeDistance"),
|
||||
]),
|
||||
]),
|
||||
TextureNodeCategory("TEX_DISTORT", "Distort", items=[
|
||||
NodeItem("TextureNodeScale"),
|
||||
NodeItem("TextureNodeTranslate"),
|
||||
NodeItem("TextureNodeRotate"),
|
||||
NodeItem("TextureNodeAt"),
|
||||
]),
|
||||
]),
|
||||
TextureNodeCategory("TEX_GROUP", "Group", items=node_group_items),
|
||||
TextureNodeCategory("TEX_LAYOUT", "Layout", items=[
|
||||
NodeItem("NodeFrame"),
|
||||
NodeItem("NodeReroute"),
|
||||
]),
|
||||
]
|
||||
]),
|
||||
]
|
||||
|
||||
|
||||
def register():
|
||||
|
Loading…
Reference in New Issue
Block a user