Git Product home page Git Product logo

Comments (22)

ly29 avatar ly29 commented on June 12, 2024

The add on right now needs to be in folder called svrx. I created a symlink from my add-on directory to my git repo.

I wanted to avoid a hack like we did in Sverchok.
It is on of the unsolved issues.

# monkey patch the sverchok name, I am sure there is a better way to do this.

if __name__ != "sverchok":
    sys.modules["sverchok"] = sys.modules[__name__]

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

The idea being that there would be a file download which has the correct name instead of sverchok-master that most people that use sverchok probably uses avoid such trickery.

But maybe I am overly worried about a quite small detail

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

Btw how do you symlink on windows? Want to play with my new work laptop

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

I don't think that's a terrible hack btw. I think zero users have complained about anything related to it.

symlink, you've probably figured out by now :)
I use
mklink /D destination_path origin_path

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

you do need to open cmd prompt with admin privileges tho..

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

ok cloned and symlinked as svrx, new error..

  File "2.78\scripts\modules\addon_utils.py", line 330, in enable
    mod = __import__(module_name)
  File "svrx\__init__.py", line 70, in <module>
    imported_modules = import_submodules(__name__)
  File "svrx\__init__.py", line 66, in import_submodules
    results.update(import_submodules(full_name))
  File "svrx\__init__.py", line 66, in import_submodules
    results.update(import_submodules(full_name))
  File "svrx\__init__.py", line 64, in import_submodules
    results[full_name] = importlib.import_module(full_name)
  File "2.78\python\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "svrx\nodes\generator\circle.py", line 14, in <module>
    List[Faces]
  File "svrx\nodes\node_base.py", line 230, in real_node_func
    get_signature(func)
  File "svrx\nodes\node_base.py", line 186, in get_signature
    s_type, level = parse_type(s_type)
  File "svrx\nodes\node_base.py", line 200, in parse_type
    return s_type.__parameters__[0], 1
IndexError: tuple index out of range

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

s_type.__parameters__ appears to be an empty tuple when that IndexError is spat out.

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

I will put the old fix in. That error is strange, I was thinking I would have to remove typing.List anyway but this is strange.

Test the following in the python prompt?

>>> from typing import List
>>> List[int].__parameters__
(<class 'int'>,)

I will have make my own meta class that does what I want I guess, for now all List[type] -> [type]

from sverchok.

zeffii avatar zeffii commented on June 12, 2024
>>> from typing import List
>>> List[int].__parameters__
()

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

But that also requires some changes in other places..

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

that's python 3.5.2 locally too.. same thing

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

It is a new module, prone to change, I have 3.5.1. Dropping that for now.

Only really used to look nice in a hackish way..

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

@zeffii
Please test now

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

Catching this early is very helpful, thanks for testing

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

roger that, yeah loads up fine. add SvRxNodeMeshOut to the menu or something, i couldn't find it had to add via code to layout.

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

yeah it is a logical lapse from me. Needs to be fixed.

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

there's no real reason why an input socket can't accept more than 1 link , right?

else we can have bm sockets, that accept either a real bm link or (verts+edges/faces) and get converted into bm (warning to the user that this has some overhead.. but whatever)

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

alternatively, if a verts socket is linked into a bm socket, svrx can spawn a converter node..

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

getting a few bm nodes done would quickly make exploration more fun

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

I think we should have a mesh socket going into the outputs nodes, for now mostly testing the base system.

from sverchok.

ly29 avatar ly29 commented on June 12, 2024

it imports so closing for now, the menu is on my radar

from sverchok.

zeffii avatar zeffii commented on June 12, 2024

good

from sverchok.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.