Forums   Articles   Events
SEARCH:
LOGIN:
Register Register Register Contact Us
Go Back   Game Artist Forums > Game Art > Support and Tech Discussion
Register FAQForum Rules Members List Calendar Mark Forums Read
Reply
 
LinkBack Thread Tools Display Modes
Old 28-06-2009, 10:06 AM   #1 (permalink)
Frequenter
Thewiruz's User Activity: 1/10
112 - 7
Help with a Maxscript called "Proportional Plane"

hello i need help solving a problem.I downloaded “Proper plane over at scriptspot

http://www.scriptspot.com/3ds-max/proportiona l-plane

Not sure if it has to do with 64bits Max or Vista x64?Or if its Max 2010?

The script was posted 2006 and i keep getting errors during 3ds startup.
And the script notepad or whatever the name is keeps poping up in the lower left corner ending with the letters NUL in the end of the script which 3ds Max generates at startup.
The script seems to work but its annoying.
Can someone please look at the code and see if they find any errors.

May be something simple i dont know?Im not as coder besides HTML then :/

Code:
/*
ProportionalPlane v.1.1
(c) Jon Seagull 2005.  May be freely distributed, used, and modified.

bugs/questions/praise to scripts@jonseagull.com

Automatically creates reference planes for modeling with the width and length wired
together, allowing the plane to be resized without losing bitmap proportions.

-Automatic material creation
-Choice of top/front/left orientation on create
-Customizable initial size based on either bitmap dimension
-Customizable name

added 1.1
-material name matches object name

*/

macroScript pPlane category:"JS Tools" buttonText:"pPlane" toolTip:"Proportional ImagePlane"
(   
   rollout pPlane "Proportional Plane" width:275 height:109
   (
      local theMap = bitmap 320 240 color:white
      
      button pickMap "Select Bitmap..." pos:[9,7] width:260 height:22
      radiobuttons lwSelect "" pos:[13,48] width:56 height:32 labels:#("Length", "Width") columns:1
      spinner size "" pos:[69,56] width:72 height:16 range:[1,999999,120] type:#worldunits scale:0.1
      button create "Create" pos:[220,38] width:48 height:65 enabled:false
      edittext nameField "Name: " pos:[15,82] width:142 height:16
      GroupBox grp1 "Creation Params" pos:[9,32] width:208 height:71
      radioButtons orientation "" pos:[167,52] width:37 height:48 columns:1 labels:#("Top", "Front", "Left")
         
      on pPlane open do nameField.text = uniqueName "ReferencePlane"
      
      on pickMap pressed do
      (
      local tempMap = selectBitmap caption:"Select Bitmap for Proportional Plane"
      if tempmap != undefined do (theMap = tempMap;pickmap.caption = theMap.filename;create.enabled = true)
      )
      
      on create pressed do
      (
      print themap.width
      print themap.height
      
      local planeRatio = (theMap.width as float)/(theMap.height as float)
      
      print planeratio
      
      --use length/width spinners to determine size
      if lwSelect.state == 1 then
         (
         local theLength = size.value
         local theWidth = theLength*PlaneRatio
         )
      else
         (
         local theWidth = size.value
         local theLength = theWidth*(1/PlaneRatio)
         )
         
      --build material
      local theMaterial = StandardMaterial selfIllumAmount:100
      theMaterial.diffusemap = bitmapTex bitmap:theMap
      showTextureMap theMaterial theMaterial.diffusemap on   
      assignNewName theMaterial
      
      --build plane
      local refPlane = plane name:namefield.text length:theLength width:theWidth lsegs:2 wsegs:2 mapCoords:true
      refplane.material = theMaterial
      refplane.material.name = refplane.name
         
      --wire parameters
      paramWire.connect2way refplane.baseobject[#width] refplane.baseobject[#length] ("length * " + planeratio as string) ("width / " + planeRatio as string)
      
      --position plane
      case orientation.state of
         (
         1:()
         2: (in coordsys (transmatrix refplane.transform.pos) refplane.rotation = (eulerangles -90 0 0))
         3: (in coordsys (transmatrix refplane.transform.pos) refplane.rotation = (eulerangles -90 90 0))
         )
      --clean up
      select refPlane
      nameField.text = uniqueName "ReferencePlane"
      )
   )
   createdialog pplane
)

I have posted for help on The Area but that forum is worthless,Noone seems to care

Thanks!
Thewiruz is offline   Reply With Quote
Old 28-06-2009, 10:17 AM   #2 (permalink)
Industry Artist
Dennispls's Avatar
Silver Star 
Dennispls's User Activity: 10/10
1,506 - 601
moved to appropriate subforum.
Have you contacted the ones responsible for the script?
__________________
Good Crit!
Dennis Griesheimer
Lelystad, The Netherlands
Linkedin
Dennispls is offline   Reply With Quote
Reply

Bookmarks
Digg del.icio.us StumbleUpon Google
Thread Tools
Display Modes




All times are GMT -5. The time now is 11:23 PM.


Powered by vBulletin® Version 3.7.0 Beta 4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2006-2008 Game-Artist.Net