diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-07 02:37:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-07 02:37:51 +0300 |
commit | 2fe5b9c9c1a362cdc0c47c1b80ecf541f329eb10 (patch) | |
tree | d66bc81655f35099fdde336eb421d660c1b14c77 /node_wrangler.py | |
parent | d3679225a384c66ea4538f164f50603003fdd94b (diff) |
node-wrangler: Remove use of register_module
Diffstat (limited to 'node_wrangler.py')
-rw-r--r-- | node_wrangler.py | 98 |
1 files changed, 96 insertions, 2 deletions
diff --git a/node_wrangler.py b/node_wrangler.py index 4f81b6ed..6c133ccf 100644 --- a/node_wrangler.py +++ b/node_wrangler.py @@ -4655,7 +4655,97 @@ kmi_defs = ( ) +classes = ( + NWPrincipledPreferences, + NWNodeWrangler, + NWLazyMix, + NWLazyConnect, + NWDeleteUnused, + NWSwapLinks, + NWResetBG, + NWAddAttrNode, + NWEmissionViewer, + NWFrameSelected, + NWReloadImages, + NWSwitchNodeType, + NWMergeNodes, + NWBatchChangeNodes, + NWChangeMixFactor, + NWCopySettings, + NWCopyLabel, + NWClearLabel, + NWModifyLabels, + NWAddTextureSetup, + NWAddPrincipledSetup, + NWAddReroutes, + NWLinkActiveToSelected, + NWAlignNodes, + NWSelectParentChildren, + NWDetachOutputs, + NWLinkToOutputNode, + NWMakeLink, + NWCallInputsMenu, + NWAddSequence, + NWAddMultipleImages, + NWViewerFocus, + NWSaveViewer, + NWResetNodes, + NodeWranglerPanel, + NodeWranglerMenu, + NWMergeNodesMenu, + NWMergeShadersMenu, + NWMergeMixMenu, + NWConnectionListOutputs, + NWConnectionListInputs, + NWMergeMathMenu, + NWBatchChangeNodesMenu, + NWBatchChangeBlendTypeMenu, + NWBatchChangeOperationMenu, + NWCopyToSelectedMenu, + NWCopyLabelMenu, + NWAddReroutesMenu, + NWLinkActiveToSelectedMenu, + NWLinkStandardMenu, + NWLinkUseNodeNameMenu, + NWLinkUseOutputsNamesMenu, + NWVertColMenu, + NWSwitchNodeTypeMenu, + NWSwitchShadersInputSubmenu, + NWSwitchShadersOutputSubmenu, + NWSwitchShadersShaderSubmenu, + NWSwitchShadersTextureSubmenu, + NWSwitchShadersColorSubmenu, + NWSwitchShadersVectorSubmenu, + NWSwitchShadersConverterSubmenu, + NWSwitchShadersLayoutSubmenu, + NWSwitchCompoInputSubmenu, + NWSwitchCompoOutputSubmenu, + NWSwitchCompoColorSubmenu, + NWSwitchCompoConverterSubmenu, + NWSwitchCompoFilterSubmenu, + NWSwitchCompoVectorSubmenu, + NWSwitchCompoMatteSubmenu, + NWSwitchCompoDistortSubmenu, + NWSwitchCompoLayoutSubmenu, + NWSwitchMatInputSubmenu, + NWSwitchMatOutputSubmenu, + NWSwitchMatColorSubmenu, + NWSwitchMatVectorSubmenu, + NWSwitchMatConverterSubmenu, + NWSwitchMatLayoutSubmenu, + NWSwitchTexInputSubmenu, + NWSwitchTexOutputSubmenu, + NWSwitchTexColorSubmenu, + NWSwitchTexPatternSubmenu, + NWSwitchTexTexturesSubmenu, + NWSwitchTexConverterSubmenu, + NWSwitchTexDistortSubmenu, + NWSwitchTexLayoutSubmenu, +) + def register(): + from bpy.utils import register_class + # props bpy.types.Scene.NWBusyDrawing = StringProperty( name="Busy Drawing!", @@ -4674,7 +4764,8 @@ def register(): default=0, description="An internal property used to store the source socket in a Lazy Connect operation") - bpy.utils.register_module(__name__) + for cls in classes: + register_class(cls) # keymaps addon_keymaps.clear() @@ -4703,6 +4794,8 @@ def register(): def unregister(): + from bpy.utils import unregister_class + # props del bpy.types.Scene.NWBusyDrawing del bpy.types.Scene.NWLazySource @@ -4727,7 +4820,8 @@ def unregister(): bpy.types.NODE_PT_active_node_generic.remove(reset_nodes_button) bpy.types.NODE_MT_node.remove(reset_nodes_button) - bpy.utils.unregister_module(__name__) + for cls in classes: + unregister_class(cls) if __name__ == "__main__": register() |