Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/animation_nodes/__init__.py b/animation_nodes/__init__.py
- index 3d37c896..d5bf321b 100644
- --- a/animation_nodes/__init__.py
- +++ b/animation_nodes/__init__.py
- @@ -20,7 +20,7 @@ Created by Jacques Lucke
- bl_info = {
- - "name": "Animation Nodes",
- + "name": "Animation Nodes (testing)",
- "description": "Node based visual scripting system designed for motion graphics in Blender.",
- "author": "Jacques Lucke",
- "version": (2, 1, 1),
- @@ -45,9 +45,9 @@ compilationInfoPath = join(currentDirectory, "compilation_info.json")
- addonName = basename(currentDirectory)
- -if addonName != "animation_nodes":
- +if addonName != "animation_nodes_test":
- message = ("\n\n"
- - "The name of the folder containing this addon has to be 'animation_nodes'.\n"
- + "The name of the folder containing this addon has to be 'animation_nodes_test'.\n"
- "Please rename it.")
- raise Exception(message)
- @@ -181,17 +181,24 @@ updateSocketInfo()
- ##################################
- import bpy
- +import addon_utils
- def register():
- + if "animation_nodes" in addon_utils.addons_fake_modules:
- + default,state = addon_utils.check("animation_nodes")
- + if state:
- + addon_utils.disable("animation_nodes")
- + #bpy.ops.wm.addon_disable(module="animation_nodes")
- + #bpy.utils.unregister_module("animation_nodes")
- bpy.utils.register_module(__name__)
- for module in modules:
- if hasattr(module, "register"):
- module.register()
- - print("Registered Animation Nodes with {} modules.".format(len(modules)))
- + print("Registered Animation Nodes (test) with {} modules.".format(len(modules)))
- def unregister():
- bpy.utils.unregister_module(__name__)
- for module in modules:
- if hasattr(module, "unregister"):
- module.unregister()
- - print("Unregistered Animation Nodes.")
- + print("Unregistered Animation Nodes (test).")
- diff --git a/animation_nodes/execution/code_generator.py b/animation_nodes/execution/code_generator.py
- index 43235c29..f6752358 100644
- --- a/animation_nodes/execution/code_generator.py
- +++ b/animation_nodes/execution/code_generator.py
- @@ -40,9 +40,9 @@ def iter_Imports(nodes = []):
- yield "import itertools"
- yield "from time import perf_counter as getCurrentTime"
- yield "from mathutils import Vector, Matrix, Quaternion, Euler"
- - yield "AN = animation_nodes = sys.modules.get({})".format(repr(addonName))
- - yield "from animation_nodes.data_structures import *"
- - yield "from animation_nodes import algorithms"
- + yield "AN = animation_nodes_test = sys.modules.get({})".format(repr(addonName))
- + yield "from animation_nodes_test.data_structures import *"
- + yield "from animation_nodes_test import algorithms"
- def get_ImportModules(nodes):
- neededModules = {"bpy", "sys"}
- @@ -57,7 +57,7 @@ def getModulesNeededByNodes(nodes):
- return list(moduleNames)
- def get_LoadMeasurementsDict():
- - return "_node_execution_times = animation_nodes.execution.measurements.getMeasurementsDict()"
- + return "_node_execution_times = animation_nodes_test.execution.measurements.getMeasurementsDict()"
- def iter_GetNodeReferences(nodes):
- yield "nodes = bpy.data.node_groups[{}].nodes".format(repr(nodes[0].nodeTree.name))
- @@ -131,7 +131,7 @@ def iterNodeExecutionLines_Monitored(node, variables):
- handleExecutionCodeCreationException(node)
- yield " pass"
- yield "except Exception as e:"
- - yield " animation_nodes.problems.NodeRaisesExceptionDuringExecution({}).report()".format(repr(node.identifier))
- + yield " animation_nodes_test.problems.NodeRaisesExceptionDuringExecution({}).report()".format(repr(node.identifier))
- yield " raise"
- def iterNodeExecutionLines_MeasureTimes(node, variables):
- diff --git a/animation_nodes/nodes/object/object_id_key.py b/animation_nodes/nodes/object/object_id_key.py
- index dfa929d0..53cd16fa 100644
- --- a/animation_nodes/nodes/object/object_id_key.py
- +++ b/animation_nodes/nodes/object/object_id_key.py
- @@ -125,7 +125,7 @@ class ObjectIDKeyNode(bpy.types.Node, AnimationNode):
- yield "numbers = _key.getList(objects, %s)" % keyName
- def getList_Exists(self, objects):
- - from animation_nodes.id_keys import doesIDKeyExist
- + from animation_nodes_test.id_keys import doesIDKeyExist
- return [doesIDKeyExist(object, self.keyDataType, self.keyName) for object in objects]
- def delete(self):
- diff --git a/setup.py b/setup.py
- index 6a994e2f..f8093b8d 100644
- --- a/setup.py
- +++ b/setup.py
- @@ -26,7 +26,7 @@ from _setuputils.setup_info_files import getSetupInfoList
- from _setuputils.export import execute_Export, execute_ExportC
- from _setuputils.compile_libraries import execute_CompileLibraries
- -addonName = "animation_nodes"
- +addonName = "animation_nodes_test"
- addonDirectory = os.path.join(currentDirectory, addonName)
- defaultConfigPath = os.path.join(currentDirectory, "conf.default.json")
- configPath = os.path.join(currentDirectory, "conf.json")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement