Esempio n. 1
0
 def execute(self, context):
     for area in bpy.context.screen.areas:
         if area.type == 'NODE_EDITOR':
             NodeCommandHandler.clear_node_groups()
             NodeCommandHandler.get_or_create_node_tree()
             NodeCommandHandler.create_node("OCVLFirstStepsNode",
                                            location=(0, 0))
             NodeCommandHandler.create_node("OCVLTipNode",
                                            location=(400, 0))
             NodeCommandHandler.connect_nodes("Tip", "tip", "FirstSteps",
                                              "tip")
             NodeCommandHandler.view_all()
             bpy.ops.wm.modal_timer_refresh_first_steps_tip_operator()
             return {'FINISHED'}
     return {'CANCELLED'}
Esempio n. 2
0
    def execute(self, context):
        bpy.ops.node.clean_desk()
        NodeCommandHandler.clear_node_groups()
        NodeCommandHandler.get_or_create_node_tree()
        # orange_theme()
        bpy.engine_worker_thread.start()
        # bpy.jupyter_worker_thread.start()

        # self._timer = context.window_manager.event_timer_add(1, context.window)
        # context.window_manager.modal_handler_add(self)
        if self.loc_tutorial_path:
            url = "file://" + self.loc_tutorial_path
            webbrowser.open(url)
            logger.info("Opne tutorial from URL: {}".format(url))
        return {'FINISHED'}
Esempio n. 3
0
    def execute(self, context):
        for area in bpy.context.screen.areas:
            if area.type == 'NODE_EDITOR':
                NodeCommandHandler.clear_node_groups()
                NodeCommandHandler.get_or_create_node_tree()
                NodeCommandHandler.create_node("OCVLAuthNode",
                                               location=(520, 560))
                NodeCommandHandler.create_node("OCVLSettingsNode",
                                               location=(-300, 240))
                NodeCommandHandler.create_node("OCVLDocsNode",
                                               location=(-300, 100))
                NodeCommandHandler.create_node("OCVLSplashNode",
                                               location=(-60, 460))

                NodeCommandHandler.connect_nodes("Splash", "settings",
                                                 "Settings", "settings")
                NodeCommandHandler.connect_nodes("Splash", "docs", "Docs",
                                                 "docs")
                NodeCommandHandler.connect_nodes("Auth", "auth", "Splash",
                                                 "auth")
                NodeCommandHandler.view_all()
                return {'FINISHED'}
        return {'CANCELLED'}