Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python modules are removed #781

Open
1 task done
nicolaje opened this issue Jan 26, 2018 · 5 comments
Open
1 task done

Python modules are removed #781

nicolaje opened this issue Jan 26, 2018 · 5 comments
Assignees
Labels

Comments

@nicolaje
Copy link
Collaborator

nicolaje commented Jan 26, 2018

Following the issue reported by David Battle in https://sympa.laas.fr/sympa/arc/morse-users/2018-01/msg00013.html

It seems python modules are removed from Blender objects in MORSE.

Minimal builder file to reproduce the issue:

See attached simulation environment from david on the mailing list.

Todo:

  • create a simpler minimal environment that reproduces the issue.

  • MORSE version: 1.4-147-gbd21e
  • Blender version: v.2.76.0
  • Python version: 3.5.2.
@battledj
Copy link

Currently looking at the following areas for potential issues:

builder/abstractcomponent.py: if not 'component_config.py' in bpymorse.get_texts().keys():
builder/environment.py: if not 'multinode_config.py' in bpymorse.get_texts().keys():
builder/bpymorse.py: texts_before = set(get_texts())
builder/bpymorse.py: texts_after = set(get_texts())
builder/bpymorse.py: return (texts_before ^ texts_after).pop()
builder/bpymorse.py:def get_texts():
builder/bpymorse.py: return bpy.data.texts
builder/bpymorse.py: if bpy and bpy.data.texts:
builder/bpymorse.py: return bpy.data.texts[name_or_id]

@nicolaje
Copy link
Collaborator Author

nicolaje commented Jan 31, 2018

Hi David @battledj ,

after a bit of digging, this is a Blender bug: when appending a Blender object from an external file (see

def append_meshes(self, objects=None, component=None, prefix=None):
and
def append_scenes(self, component=None):
in morse/src/morse/builder/abstractcomponent.py), only the Python scripts attached to the object are also imported, not the modules.

I have opened an issue on the Blender bug tracker:
https://developer.blender.org/T53960

and I prefer to wait for their input before implementing a MORSE specific fix.

The procedure to reproduce the bug outside of the MORSE scope is detailed in the bug report.

@battledj
Copy link

battledj commented Jan 31, 2018 via email

@nicolaje
Copy link
Collaborator Author

nicolaje commented Feb 1, 2018

So, according to the Blender developpers it is not a bug, but a feature :)
https://developer.blender.org/T53960

So we'll go the MORSE specific patch way.

@nicolaje nicolaje self-assigned this Feb 1, 2018
@battledj
Copy link

battledj commented Feb 1, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants