I'm trying to figure out how to use the pycollada module inside an addon without installing the module on Blender, so I have a root folder called pycollada-master, which contains everything needed. I put it in my addon directory

I have tried various methods, but I can't understand the best way to use this , for example form. import pycollada-master obviously cannot be the correct way to use the modules, I think the answer is simple but I don't come to terms, I don't know if I have to use import sys or not. Anyone with some experience with this type of procedure know the answer?

  • $\begingroup$ @brockmann Hi, I don't understand why of this reference, am I doing something wrong? Please be specific as I don't understand why this link of yours would help me understand what you are referring to, yes, entire reposity is downloaded in my pc $\endgroup$ – Pastrokkio Feb 17 at 13:06
  • 2
    $\begingroup$ Not necessarily wrong but it's a git repository, you can clone it. Nice to know how that works anyway: en.wikipedia.org/wiki/Git $\endgroup$ – brockmann Feb 17 at 13:11
  • $\begingroup$ The hyphen is interpreted as a minus sign. This is why you see underscores in filenames. The collada folder is the module as is prob in link brockmann posted. Recommend you don't distribute with your addon, rather give instructions on how to install,or add installation via script. Notice github.com/skrat/bpycollada also doesn't come with collada module included. $\endgroup$ – batFINGER Feb 17 at 14:06
  • $\begingroup$ @batFINGER Hi, it looks like I managed to get the module working through import sys and sys.path.append () now works great. But I would like to understand why I advise against distributing it with this module (currently it is not in my interest) $\endgroup$ – Pastrokkio Feb 17 at 14:10
  • 1
    $\begingroup$ Let's say bpycollada also distributed the collada module and appended it to sys.path as well as another 10 addons The addon repo will have 12 copies of collada.Installing into a virtual environment can be as simple as pip install git+https://github.com/pycollada/pycollada Search for questions here re using ensure_pip which comes with blender. $\endgroup$ – batFINGER Feb 17 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.