Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: figuring out what size is in this export script  (Read 3187 times)

0 Members and 1 Guest are viewing this topic.

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
figuring out what size is in this export script
« on: June 14, 2013, 07:19:36 AM »

I'm trying to figure out what getSize is in this code.  Do you think it's specific to a spotlight, which is what the object is, or is it just a general object attribute?
Maybe you would be able to tell from the context.  There is no getSize() attribute for a object that I can find.  There's scale, or it could be dealing with the size of the spot.  There is a slider for that in Blender. 
Code: [Select]
if blender_light.getType()==2:             #spotlight
e1=Mathutils.Euler([obj.RotX, obj.RotY, obj.RotZ])
e2=e1.toMatrix()
light_vec=Vector([obj.LocX, obj.LocY, obj.LocZ])
size = obj.getSize()
isy, isz = size[1], size[2]
if isy!=0.0: isy = 1.0/isy
if isz!=0.0: isz = 1.0/isz
lookdir = (-matrix[2][0]*isz, -matrix[2][1]*isz, -matrix[2][2]*isz)
lookAt = (light_loc[0] + 10*lookdir[0], light_loc[1] + 10*lookdir[1], light_loc[2] + 10*lookdir[2])
light.spotlight.target = lookAt
Logged

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: figuring out what size is in this export script
« Reply #1 on: June 14, 2013, 05:10:35 PM »

After some searches, it appears to be scale.  Weird terminology.
Logged

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: figuring out what size is in this export script
« Reply #2 on: June 20, 2013, 10:01:22 PM »

Well, I got the export to make a 3ds file.  It finds a camera in the scene, but doesn't show the floor.  It's a little over my head I think.  There were just too many changes since the script was made.
Logged
 

Page created in 0.036 seconds with 23 queries.