From 5ff73c064ecae24e0470529503bda8ab76875ddd Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Thu, 19 Mar 2020 19:40:40 +0100 Subject: [PATCH] remove extra imports --- pype/plugins/blender/create/create_action.py | 8 ++++---- pype/plugins/blender/create/create_animation.py | 2 -- pype/plugins/blender/create/create_model.py | 1 + pype/plugins/blender/create/create_rig.py | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pype/plugins/blender/create/create_action.py b/pype/plugins/blender/create/create_action.py index 64dfe9ff90..68e2a50b61 100644 --- a/pype/plugins/blender/create/create_action.py +++ b/pype/plugins/blender/create/create_action.py @@ -7,7 +7,6 @@ from avalon.blender import Creator, lib import pype.blender.plugin - class CreateAction(Creator): """Action output for character rigs""" @@ -17,7 +16,6 @@ class CreateAction(Creator): icon = "male" def process(self): - import pype.blender asset = self.data["asset"] subset = self.data["subset"] @@ -29,9 +27,11 @@ class CreateAction(Creator): if (self.options or {}).get("useSelection"): for obj in lib.get_selection(): - if obj.animation_data is not None and obj.animation_data.action is not None: + if (obj.animation_data is not None + and obj.animation_data.action is not None): - empty_obj = bpy.data.objects.new( name = name, object_data = None ) + empty_obj = bpy.data.objects.new(name=name, + object_data=None) empty_obj.animation_data_create() empty_obj.animation_data.action = obj.animation_data.action empty_obj.animation_data.action.name = name diff --git a/pype/plugins/blender/create/create_animation.py b/pype/plugins/blender/create/create_animation.py index 0758db280f..b40a456c8f 100644 --- a/pype/plugins/blender/create/create_animation.py +++ b/pype/plugins/blender/create/create_animation.py @@ -7,7 +7,6 @@ from avalon.blender import Creator, lib import pype.blender.plugin - class CreateAnimation(Creator): """Animation output for character rigs""" @@ -17,7 +16,6 @@ class CreateAnimation(Creator): icon = "male" def process(self): - import pype.blender asset = self.data["asset"] subset = self.data["subset"] diff --git a/pype/plugins/blender/create/create_model.py b/pype/plugins/blender/create/create_model.py index 7a53f215f2..303a7a63a1 100644 --- a/pype/plugins/blender/create/create_model.py +++ b/pype/plugins/blender/create/create_model.py @@ -6,6 +6,7 @@ from avalon import api from avalon.blender import Creator, lib import pype.blender.plugin + class CreateModel(Creator): """Polygonal static geometry""" diff --git a/pype/plugins/blender/create/create_rig.py b/pype/plugins/blender/create/create_rig.py index b5860787ea..d28e854232 100644 --- a/pype/plugins/blender/create/create_rig.py +++ b/pype/plugins/blender/create/create_rig.py @@ -33,7 +33,6 @@ class CreateRig(Creator): # return found def process(self): - import pype.blender asset = self.data["asset"] subset = self.data["subset"] @@ -61,7 +60,7 @@ class CreateRig(Creator): for subobj in obj.children: - objects_to_link.add( subobj ) + objects_to_link.add(subobj) # Create a new collection and link the widgets that # the rig uses.