Page 1 of 4

PRP Importing

PostPosted: Mon Apr 06, 2009 12:47 am
by ardent red
Before I begin: I know that this isn't a feature of PyPRP, which is why I didn't put it in that forum. I'm also aware that support had stopped at some point for an importer, but I'm not sure if that's the case with the one available on the wiki, so I'm sorry if I'm not meant to be asking about this.

I've been trying to import PRP files into blender, and some import well. There are others that throw up this error:
Code: Select all
Traceback (most recent call last):
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/uruprp_import.py", line 150, in open_file
    import_prp(filename,basepath)
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/uruprp_import.py", line 111, in import_prp
    import_age(agename,basepath,pagename,version)
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/uruprp_import.py", line 93, in import_age
    age.import_page(pagename)
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/alcresmanager.py", line 979, in import_page
    page.import_all()
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/alcresmanager.py", line 213, in import_all
    scn.data.import_all(scene)
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/alc_ObjClasses.py", line 149, in import_all
    o.data.import_all(scene)
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/alc_ObjClasses.py", line 264, in import_all
    plDrawInterface.Import(self,root,obj)
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/alc_DrawClasses.py", line 1542, in _Import
    draw.data.import_obj(obj)
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/alc_DrawClasses.py", line 1536, in import_obj
    drawspans.data.import_mesh(obj,group)
  File "/Applications/blenderimport/blender.app/Contents/MacOS/.blender/scripts/alc_DrawClasses.py", line 1181, in import_mesh
    mat.mode |= Blender.Material.Modes.GROUP_EXCLUSIVE
ValueError: invalid bit(s) set in mask


The above error happened while trying to import Kadish_District_kdshForest.prp. Any ideas as to what could be causing this?

Cheers,
AR

Re: PRP Importing

PostPosted: Mon Apr 06, 2009 9:14 am
by D'Lanor
Since there are many versions mentioned in the wiki I am not sure which one you have. The most recent version that still supports importing is a modified version of PyPRP 1.3.0. It can be found here.

Re: PRP Importing

PostPosted: Mon Apr 06, 2009 9:34 am
by GPNMilano
I'm starting to think that people have been tinkering with the version that was on the Wiki in order to import ages and its been causing more errors than its been fixing.

When I first uploaded the modified importer scripts they were capable of importing an age entirely, with the exception of objects that had a DynamicTextMap for a texture. I just tested it with my (the original) version of the importer and the kadish forest imported completely without errors so obviously its been tweaked by others along the way.

Re: PRP Importing

PostPosted: Mon Apr 06, 2009 1:02 pm
by ardent red
I looked at the source and there are a few names of people who modified it around the problem area, so I guess external modifications have broken it. Could you PM me your original version, GPN?

Re: PRP Importing

PostPosted: Wed Apr 08, 2009 5:45 am
by greendragoon
Actually, I am interested in a copy, too. Perhaps you could post it somewhere public. :) Do the forums allow zip files to be uploaded?

Re: PRP Importing

PostPosted: Wed Apr 08, 2009 9:25 am
by GPNMilano
I've updated the link to the earlier stable version of the Importer in the wiki. You can also download it here: PyPRPImporter Instructions can be found on the wiki, but the important thing to remember it's scripts are not compatible with the current version of PyPRP, so you'll need to copy all the scripts in your blender scripts folder with the name "prp_Example" and move them out of there before putting the new scripts in, and then replace the new scripts (which all begin with either "alc" or "uru" when you're done with the "prp" scripts when you're done. Or alternatively you can install a seperate install of blender and use one for importing and the other for age buiding.

Re: PRP Importing

PostPosted: Mon Apr 13, 2009 6:13 pm
by ardent red
I'm still getting similar errors while importing, all to do with the material settings...
Code: Select all
Traceback (most recent call last):
  File "/Applications/uruimporter/blender.app/Contents/MacOS/.blender/scripts/uruprp_import.py", line 145, in open_file
    import_age(agename,basepath)
  File "/Applications/uruimporter/blender.app/Contents/MacOS/.blender/scripts/uruprp_import.py", line 90, in import_age
    page.import_all()
  File "/Applications/uruimporter/blender.app/Contents/MacOS/.blender/scripts/alcresmanager.py", line 210, in import_all
    scn.data.import_all(scene)
  File "/Applications/uruimporter/blender.app/Contents/MacOS/.blender/scripts/alc_ObjClasses.py", line 149, in import_all
    o.data.import_all(scene)
  File "/Applications/uruimporter/blender.app/Contents/MacOS/.blender/scripts/alc_ObjClasses.py", line 264, in import_all
    plDrawInterface.Import(self,root,obj)
  File "/Applications/uruimporter/blender.app/Contents/MacOS/.blender/scripts/alc_DrawClasses.py", line 1537, in _Import
    draw.data.import_obj(obj)
  File "/Applications/uruimporter/blender.app/Contents/MacOS/.blender/scripts/alc_DrawClasses.py", line 1531, in import_obj
    drawspans.data.import_mesh(obj,group)
  File "/Applications/uruimporter/blender.app/Contents/MacOS/.blender/scripts/alc_DrawClasses.py", line 1177, in import_mesh
    mat.mode |= Blender.Material.Modes["GROUP_EXCLUSIVE"]
ValueError: invalid bit(s) set in mask


They can appear in any age, though I could import the Cleft and Kirel without the problem occuring. After having a look at the blender python material stuff, there are a number of modes that can be used instead of "GROUP_EXCLUSIVE". Would it be doable to just change the mode to something that works, or would that screw other things up?

Re: PRP Importing

PostPosted: Mon Apr 13, 2009 11:46 pm
by GPNMilano
ardent, which version of blender are you using, also, which PRP file through up the error again. I've never had this error come up in this version before, so it'd be helpful to know why it is now.

Re: PRP Importing

PostPosted: Tue Apr 14, 2009 2:03 am
by ardent red
Urr... Blender 2.48a for Mac, the Python 2.5 version. Kadish is full of the errors: Kadish_District_kdshForest.prp, Kadish_District_kdshCourtyard.prp, Kadish_District_kdshGlowInTheDark.prp, Kadish_District_kdshPillars.prp, Kadish_District_kdshShadowPath.prp... I stopped checking there, but that should be enough prps to test things out. kdshVaultExterior and all of the scopeGUI's import without errors.

Re: PRP Importing

PostPosted: Tue Apr 14, 2009 7:03 am
by GPNMilano
Then this isn't a problem with pyprp, but a specific problem with the newer versions of blender, or that version of blender for the mac, as on my system it exports each of those prps just fine. I use Windows XP with the 2.45 version of Blender (also using Python 2.5).