Import errors

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Import errors

Postby Robert The Rebuilder » Thu Mar 13, 2008 5:42 am

Is anyone working on the various import errors? Here are the ones I've discovered so far:

- plLayerAnimation.read() encounters a NoneType for self.fTimeConvert

- plAnimTimeConvert has no getVersion()

- plAnimTimeConvert.read() needs to attempt to read the messages that are implemented to date (see plCameraModifier1.read() for an example)

- plLayerAnimation has no ToBlenderMTex() method

- plCameraBrain1_FirstPerson.read() claims that it has no attribute fOffset because plCameraBrain1_FirstPerson.__init__ needs to call plCameraBrain1_Avatar.__init___(), not plCameraBrain1._init__()

- Imported visual objects do not appear in the blender scene - only physical objects

I'll offer to help; I just don't want to do duplicate work.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Import errors

Postby andylegate » Thu Mar 13, 2008 6:38 am

Yay! Glad to see it wasn't just me that could not import most Ages anymore.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Import errors

Postby Nadnerb » Thu Mar 13, 2008 10:15 am

At the moment, I believe that the focus of those actively developing the plugin features is on successful exports, so you're certainly welcome to fix up the import problems, especially if they're entirely preventing successful imports. :)
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Import errors

Postby Robert The Rebuilder » Thu Mar 13, 2008 12:35 pm

OK - I have the fixes. I checked them into contrib/RTR; the files are
Here are the specific fixes I did:

Robert The Rebuilder wrote:- plLayerAnimation.read() encounters a NoneType for self.fTimeConvert

I added a check for None then assign it an instance of plAnimTimeConvert.
Robert The Rebuilder wrote:- plAnimTimeConvert has no getVersion()

I added a getVersion method and a version variable, as well as a default version constructor argument.
Robert The Rebuilder wrote:- plAnimTimeConvert.read() needs to attempt to read the messages that are implemented to date (see plCameraModifier1.read() for an example)

I borrowed code from plCameraModifier1.read() for reading in the messages, surrounded by a try/except that traps any errors in reading and throws an exception to abort the input (with an appropriate error message). This is necessary until we have all the possible message classes implemented.
Robert The Rebuilder wrote:- plLayerAnimation has no ToBlenderMTex() method

Added a stub method. Since plLayer.ToBlenderMTex() sets mtex.colfac and mtex.neg according to the layer's opacity and blend flags, it didn't seem to apply to a layer animation. So, this stub method does nothing except keeping the import going to the finish.
Robert The Rebuilder wrote:- plCameraBrain1_FirstPerson.read() claims that it has no attribute fOffset because plCameraBrain1_FirstPerson.__init__ needs to call plCameraBrain1_Avatar.__init___(), not plCameraBrain1._init__()

Made that fix.
Robert The Rebuilder wrote:- Imported visual objects do not appear in the blender scene - only physical objects


This is not true; the visual objects do appear in a blender scene named after the page; however, physical objects are placed in the default scene. I didn't address that bug in these fixes.

Could someone review these and check them into trunk for me, please?
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Import errors

Postby Chacal » Thu Mar 13, 2008 4:58 pm

Don't forget these errors that D'Lanor found:
Yes, alc_MatClasses and alc_AnimClasses are importing each other.

And alc_MatClasses is importing alc_AnimClasses in two different ways. I guess this needs some code cleaning.


From this thread.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2439
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Import errors

Postby Goofy » Sat Mar 15, 2008 10:36 am

So I'm right in thinking that the importing part of the plugin is more or less being ignored atm? Reason I'm thinking this is as each newer plugin comes there seems to be more and more import problems.

The plugin I have which I believe is 1.2.0 will not import certain ages. I tried to import the neighborhood and got errors and nothing happened. I then tried to import neighborhood02 and it worked with no errors. Also I tried to import the relto and got major errors. Heres the error from importing relto(personal age)

Code: Select all

Traceback (most recent call last):
  File "<string>", line 145, in open_file
  File "<string>", line 90, in import_age
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcresmanag
er.py", line 195, in import_all
    self.load()
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcresmanag
er.py", line 126, in load
    self.prp.read(f)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcprpfile.
py", line 576, in read
    obj.read(buf)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcprpfile.
py", line 374, in read
    o.read(buf,offset,size)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcprpfile.
py", line 280, in read
    self.data.read(buf,size)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_CamClas
ses.py", line 173, in read
    Msg = PrpMessage.FromStream(stream)
NameError: global name 'PrpMessage' is not defined

I was thinking about what I believe grogyan did to the relto and wanted to import the relto to add a change and got the above error while importing it. was thinking of adding a new relto page. ;)
We keep moving forward,
openning up new doors and doing new things,
Because we're curious... and curiosity keeps
leading us down new paths

Walt Disney

Keep moving forward
Goofy
 
Posts: 162
Joined: Mon Oct 01, 2007 8:51 pm

Re: Import errors

Postby D'Lanor » Sat Mar 15, 2008 11:28 am

The last plugin version that could do proper imports was the 0.5 stable version. During import everything was also extracted as raw objects. This ensured that objects the plugin could not handle would not get lost. During export the plugin would reassemble the prp file from the raw objects.

Unfortunately this feature has been removed now. When these removal plans were announced I asked what the plugin would do with objects it cannot handle. I never got a reply. So I guess they will just end up in limbo.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Import errors

Postby Aloys » Sat Mar 15, 2008 5:25 pm

As it stands now the plugin stops importing as soon as it encounters a problem of some kind, and any other objects that it would have succesfully imported before stopping is lost? Is that correct?
User avatar
Aloys
 
Posts: 1864
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Import errors

Postby Trylon » Sun Mar 16, 2008 12:26 am

Yeah, those objects are limboed.

And indeed, to the frustration of myself and many others, the importer stops importing when it encounters an error.
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Import errors

Postby Robert The Rebuilder » Tue Mar 18, 2008 4:35 am

Bump.

Again - would someone check in these files for me to fix the import issues in the plugin?

Robert The Rebuilder wrote:OK - I have the fixes. I checked them into contrib/RTR; the files are
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Next

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron