def extra_nodes_tab(self, layout): def draw_freecad_ops(): dependency = sv_dependencies['freecad'] col = box.column(align=True) col.label(text=dependency.message, icon=get_icon(dependency.module)) row = col.row(align=True) row.operator('wm.url_open', text="Visit package website").url = dependency.url if dependency.module is None: tx = "Set path" else: tx = "Reset path" row.prop(self, 'FreeCAD_folder') row.operator('node.sv_select_freecad_path', text="Browse...").directory = self.FreeCAD_folder row.operator('node.sv_set_freecad_path', text=tx).FreeCAD_folder = self.FreeCAD_folder return row message_on_layout( layout, """Sverchok can use several external libraries, that provide \ some mathematical or other functions. We call such libraries "Dependencies". \ When these libraries are available, you will be able to use much more nodes \ in Sverchok. If you do not need all these features, you can skip installation of \ dependencies, or install only some of them.""") box = layout.box() box.label(text="Dependencies:") row = draw_message(box, "pip") if pip is not None: row.operator('node.sv_ex_pip_install', text="Upgrade PIP").package = "pip setuptools wheel" else: if ensurepip is not None: row.operator('node.sv_ex_ensurepip', text="Install PIP") else: row.operator( 'wm.url_open', text="Installation instructions" ).url = "https://pip.pypa.io/en/stable/installing/" draw_message(box, "scipy") draw_message(box, "geomdl") draw_message(box, "skimage") draw_message(box, "mcubes") draw_message(box, "circlify") draw_message(box, "cython") draw_message(box, "numba") draw_freecad_ops() if any(package.module is None for package in sv_dependencies.values()): box.operator( 'wm.url_open', text="Read installation instructions for missing dependencies" ).url = "https://github.com/nortikin/sverchok/wiki/Dependencies" draw_extra_addons(layout)
def extra_nodes_tab(self, layout): def draw_freecad_ops(): dependency = sv_dependencies['freecad'] col = box.column(align=True) col.label(text=dependency.message, icon=get_icon(dependency.module)) row = col.row(align=True) row.operator('wm.url_open', text="Visit package website").url = dependency.url if dependency.module is None: tx = "Set path" else: tx = "Reset path" row.prop(self, 'FreeCAD_folder') row.operator('node.sv_select_freecad_path', text="Browse...").directory = self.FreeCAD_folder row.operator('node.sv_set_freecad_path', text=tx).FreeCAD_folder = self.FreeCAD_folder return row box = layout.box() box.label(text="Dependencies:") row = draw_message(box, "pip") if pip is not None: row.operator('node.sv_ex_pip_install', text="Upgrade PIP").package = "pip setuptools wheel" else: if ensurepip is not None: row.operator('node.sv_ex_ensurepip', text="Install PIP") else: row.operator( 'wm.url_open', text="Installation instructions" ).url = "https://pip.pypa.io/en/stable/installing/" draw_message(box, "scipy") draw_message(box, "geomdl") draw_message(box, "skimage") draw_message(box, "mcubes") draw_message(box, "circlify") draw_message(box, "cython") draw_freecad_ops() if any(package.module is None for package in sv_dependencies.values()): box.operator( 'wm.url_open', text="Read installation instructions for missing dependencies" ).url = "https://github.com/nortikin/sverchok/wiki/Dependencies"