Export Error with CameraMsg

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Export Error with CameraMsg

Postby GPNMilano » Wed Dec 09, 2009 7:15 am

Camera Messages seem to have an issue with exporting a cmd of responderundothirdperson and above. It's registering an indexerror of "list index out of range" it traces back this command in prp_Types

Code: Select all
def SetBit(self,index):
        dwordidx = index >> 5 # (Equivalent to index / 32 ) Maximum 32 bits per dword

        if dwordidx >= len(self.data): # append another dword if neccesary
            self.data.append(0x00000000)

        self.data[dwordidx] |= ( 1 << (index & 31)) # (index & 31)  gives the bit index within this dword


it's having trouble etting a bit DWord higher than 32 which responderundothirdperson and others are.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Export Error with CameraMsg

Postby Christian Walther » Sun Dec 20, 2009 6:08 am

Shot in the dark: This should probably say
Code: Select all
        while dwordidx >= len(self.data): # append more dwords if neccessary

otherwise you can't set bits more than 32 indices higher than the last existing one.
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Export Error with CameraMsg

Postby Zrax » Sun Dec 20, 2009 2:40 pm

Right. In fact, I think I remember finding a similar bug in the hsBitVector of libPlasma, so that's a pretty good bet for the fix.
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano


Return to Building

Who is online

Users browsing this forum: No registered users and 11 guests

cron