Error using nxusBookMachine.py in Max

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.

Error using nxusBookMachine.py in Max

Postby GPNMilano » Tue Sep 04, 2012 4:56 am

Hey, I'm wondering if it's just me but I'm having some serious issues getting this particular python file to load up with the MaxPlugin.

I'm using Max 7 with Cyan's original release of their plugin. The log files show that it's having a syntax error with

Code: Select all
class AgeInstance():
    def __init__(self, ageData):
        self.ageInfo = ageData[0]
        self.population = ageData[1]
        self.owners = ageData[2]


The error is with the argument parenthesis in AgeInstance():. if I remove them then it passes to the next class which throws up the same error. So if I remove all of them with the exception of the main class "nxuxBookMachine(ptModifier)" it works fine except then it gets an error that it can't find datetime.py.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Error using nxusBookMachine.py in Max

Postby Christopher » Tue Sep 04, 2012 7:20 am

Do you use the cyan's file or the modified from the H-uru folk?

Christopher
User avatar
Christopher
 
Posts: 276
Joined: Mon Jul 19, 2010 3:25 am

Re: Error using nxusBookMachine.py in Max

Postby Paradox » Tue Sep 04, 2012 7:27 am

In recent-ish versions of Python 2.x, there's a subtle distinction between class AgeInstance and class AgeInstance().

This uses an "old-style" (2.2-style) class.
Code: Select all
class AgeInstance:


This uses a "new style" class, which extends from the object class.
Code: Select all
class AgeInstance():


I don't remember which version of Python introduced the distinction, but it's possible that Cyan's plugin with Python 2.3 doesn't understand the new style classes.
"And one day I woke to find the future held no place for me. I was unwanted in a world, that with my hands I'd helped to build. Where once was honesty and pride, I now stand broken and alone."
Paradox
 
Posts: 1261
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Error using nxusBookMachine.py in Max

Postby GPNMilano » Tue Sep 04, 2012 10:00 am

Christopher wrote:Do you use the cyan's file or the modified from the H-uru folk?

Christopher


Using Huru's nxusBookMachine.py with Cyan's max plugin.

Paradox wrote:In recent-ish versions of Python 2.x, there's a subtle distinction between class AgeInstance and class AgeInstance().

This uses an "old-style" (2.2-style) class.
Code: Select all
class AgeInstance:


This uses a "new style" class, which extends from the object class.
Code: Select all
class AgeInstance():


I don't remember which version of Python introduced the distinction, but it's possible that Cyan's plugin with Python 2.3 doesn't understand the new style classes.


I'm assuming that the above is correct. So I'm attempting to build a new version of the plugin using 2.7. Getting some errors though, it builds fine. Max is having issues itself with the water components, as well as a few other missing items. It's complaining that it's missing dlls for Plasma 2.0. So I'm assuming I need to rebuild both my plugin and my client. Doing so as we speak.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Error using nxusBookMachine.py in Max

Postby Tsar Hoikas » Tue Sep 04, 2012 12:53 pm

Python 2.3 supports new-style classes just fine (they were introduced in 2.2). Just change it to

Code: Select all
class AgeInstance(object):
Image
User avatar
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 1932
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Error using nxusBookMachine.py in Max

Postby GPNMilano » Wed Sep 05, 2012 6:47 am

Tsar Hoikas wrote:Python 2.3 supports new-style classes just fine (they were introduced in 2.2). Just change it to

Code: Select all
class AgeInstance(object):


Okay changing it just brings up the datetime error again. Looking at the sources it appears that Cyan's Client/Plugin, compiled with Python 2.2 didn't include the datetime.h file that is used when compiling the Huru Client/Plugin. Which means to use Huru's nxusBookMachine.py in Max I'd still have to compile my own plugin. Which is fine, I did that. But all the WaveSet components are missing in Max when using a newly compiled plugin.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Error using nxusBookMachine.py in Max

Postby Branan » Wed Sep 05, 2012 5:49 pm

Does the waveset component appear in the list but is missing from loaded objects? Or is it gone entirely?

If the former, could you create a minimal max file containing a waveset (I suppose generated with Cyan's plugin). That will make these sorts of things much easier to debug. I only have access to newer Max versions, so I can't load Cyan's plugin in order to generate test files.

Either way, opening an issue over on Github would be fantastic. Otherwise this is liable to get forgotten.
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: Error using nxusBookMachine.py in Max

Postby GPNMilano » Thu Sep 06, 2012 5:51 pm

Branan wrote:Does the waveset component appear in the list but is missing from loaded objects? Or is it gone entirely?

If the former, could you create a minimal max file containing a waveset (I suppose generated with Cyan's plugin). That will make these sorts of things much easier to debug. I only have access to newer Max versions, so I can't load Cyan's plugin in order to generate test files.

Either way, opening an issue over on Github would be fantastic. Otherwise this is liable to get forgotten.


I opened up an issue as suggested. It is gone entirely. The whole Water menu is missing, Wavesets, Enviornment map, Shoreline and water decals. The objects don't have any of the previously attached components and it spits out errors for each missing component on start up, but the file still opens just without them there. As I stated I'm going to attempt to recompile a new plugin with the most recent sources, so I can start using the current python scripts within 3ds Max. The version I compiled that threw up this error was a few months old but from a look at the commits it hadn't seemed that any work was done with the plugin in the time since I had updated my local repo.

EDIT: I should have some time to make a minimal max file and send it to you this weekend if you'd like.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am


Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests