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.
Post Reply
User avatar
GPNMilano
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am
MOULa KI#: 24104

Error using nxusBookMachine.py in Max

Post by GPNMilano »

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
Christopher
Posts: 276
Joined: Mon Jul 19, 2010 3:25 am
MOULa KI#: 0

Re: Error using nxusBookMachine.py in Max

Post by Christopher »

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

Christopher
Paradox
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada
Contact:

Re: Error using nxusBookMachine.py in Max

Post by Paradox »

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.
User avatar
GPNMilano
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am
MOULa KI#: 24104

Re: Error using nxusBookMachine.py in Max

Post by GPNMilano »

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
Tsar Hoikas
Councilor of Technical Direction
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
MOULa KI#: 23335
Location: South Georgia
Contact:

Re: Error using nxusBookMachine.py in Max

Post by Tsar Hoikas »

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
GPNMilano
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am
MOULa KI#: 24104

Re: Error using nxusBookMachine.py in Max

Post by GPNMilano »

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
Branan
Gehn Shard Admin
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
MOULa KI#: 66990
Location: Portland, OR

Re: Error using nxusBookMachine.py in Max

Post by Branan »

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
GPNMilano
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am
MOULa KI#: 24104

Re: Error using nxusBookMachine.py in Max

Post by GPNMilano »

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
Post Reply

Return to “Plasma Development”