Keep up-to-date with Free tutorials!!

 

Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more

 

Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

 
submit tutorial
1 | 2 | 3
Developing a Scripted Utility

| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star full
(2 Votes)
| 33234 Views
| 0 Comments
| Comments 0
Date Added: 9th December 2009
Software used:
Keywords:

Other functions in Utility


on copyOption changed State do
(
copyState=State
)

This function will be called when copy option radio buttons are changed.

If changed then store current state to a variable copyState.

on ObjPlacer open do
(
addRollout Abt
addRollout Param
)

This function will be called when object placer utility opened. Add About and Parameter rollout to the utility panel.

on ObjPlacer close do
(
removeRollout Abt
removeRollout Param
)

This function called when object placer utility closed.

Remove About and Parameter rollout in the utility panel.

Align function

Align function calculates the transformation value of source object from a polygon or vertex of destination object. This technique is also explained in MaxScript user reference "How do I align the UVMap modifier to the selected face?" (Fig06)

1138_tid_Fig-6-NormalCalculation.jpg
Fig. 06 - NormalCalculation

fn Align souCopy desNormal pos =
(
worldUpVector = [0,0,1]
rightVector = normalize (cross worldUpVector desNormal)
upVector = normalize ( cross rightVector desNormal)
theMatrix = matrix3 rightVector upVector desNormal Pos
souCopy.transform = theMatrix
)


Align function with three arguments. A copy of source object, destination objects normal and position.

The default value of world up vector is [0, 0, 1]

Calculate right vector from world up vector and normal value

Calculate local up vector from right vector and normal value.

Store right vector, up vector normal and position to theMatrix as a matrix3 value

Set Source object transformation to theMatrix


Copy Option Function

The copy option function make copies of source object according to user's selection.

fn CopySource numCopies=
(
case copyState of
(
1:
souCpy = for i = 1 to numCopies collect(copy sourceObj)
2:
souCpy = for i = 1 to numCopies collect(instance sourceObj)
default:
souCpy = for i = 1 to numCopies collect(reference sourceObj)
)
return souCpy


If copy option function called

Check the state of copy option radio buttons.

According to copy type make copy of object and store it to an array souCpy .

Return souCopy.

Script Link: Objectplacer.ms

I hope this tutorial is helpful. If u have any questions or suggestions, just mail me sathish101@gmail.com.




< previous page

 
1 | 2 | 3
Related Tutorials

Making a cartoon character

by Boris Joanovic
published on 2016-08-12

Keywords: Boris Joanovic, cartoon, 3ds Max, making of

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star full (2)
Comments 0 Views 2205

Making of Mclaren MP412-C

by João Paulo Lamonde
published on 2016-07-22

Keywords: João Paulo Lamonde, hard surface, car, 3ds Max, making of

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star full (3)
Comments 0 Views 5074

Making of CATS

by Ongushi Piyavachara Arunotai
published on 2016-07-14

Keywords: Ongushi Arunotai, 3ds Max, cat, making of

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star full (2)
Comments 1 Views 3645

Self Portrait 1k0 2k16 making of

by Nicolas Brunet
published on 2016-07-13

Keywords: Nicolas Brunet, 3ds Max, self portrait, making of

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star full (2)
Comments 0 Views 2148
Readers Comments (Newest on Top)
no comments!
No comments yet. Be the first to comment!
Add Your Comment