Tagged 'General Scripting'

camera drawing splien

Hi guys!

I've been trying to make a camera create a spline when i move it ....in other words the idea is to make the camera behave like a pencil that draws a spline...

possible????

best

m

 

Passing var value from rollout to macro script

Hi!

I'm having a problem with a script I wrote. My main script is a macro script which I have assigned to a keyboard shorcut. The other script is a simple rollout with a pickbutton which stores an object in a global variable.

My macroscript should be able to read this global variable, but it only happens if I open a macro editor and evaluate an entire script (instead just using a shortcut). Otherwise it will just keep reporting undefined.

Get Used Material ID List from EditablePoly without face check

Hello,

Everybody on other forums use the check every face to read the Used Material IDs from an object, but there is a basic ID list in Editable Poly. I attached an image about it.

The only problem is that there is no chance to read this list from the Editable Poly.

Do somebody knows how can i read this list by script?

Copy and paste text from MaxScript Listener in a .Txt

Hello! I have a small question to do all of you:

With a little script, I have a button that find the position of an object.
In Listener I see write the position es. pos: [66.4655,8.38055,0].

Now, how do I transfer the result of the listener to a text file and open it after pressing the button?

Action: Press button > open .txt (not listener) with the result print.

Thanks and I hope in your help!!

scale big picture on a label

How to scale a picture (001.jpg) which has its own dimensions to display on a label

dotNetControl dropbtn "System.Windows.Forms.Label" pos:[50,4] width:155 height:121 

This code:

dropbtn.image = (dotNetclass "System.Drawing.image").fromfile "d:\folder\001.jpg"

is displaying a portion of the image inside 155x121px

Making a script stop a render/network render until the script is okayed by a user

Hi all, I started this script

http://www.scriptspot.com/3ds-max/scripts/hide-and-unhide-all-bones-and-...

and as you can tell it's very basic. Tassel came up with a more user friendly version and i'd like to enhance my script.

What I'd like to achieve is when this script is added to the pre-render scripts area, the script halts rendering until the relevant buttons are pressed. I'll add a "Render" button to it, but forst you pick "Hide Bones" to hide them and when you click the render button, max then renders the image.

Rotate pivot to Targeted Obj

How would I create this same script but without the hassle of using the point object and just modifying the actual objects pivot?

I'm trying to rotate a pivot to look in the direction of a target with an axis constraint.

To test just create a bunch of boxes on different position in 3d space and then create a sphere at 0,0,0 using that as the target.

targetObj = $Sphere001
sel = selection as array
for obj in sel do
(
	--pivotLookAt obj $Sphere001
	local dummyPt = point()
 
	dist = obj.pos - targetObj.pos
	dist = normalize dist
	upVec = [0,0,1]
	dp = dot dist upVec

For help output Spline Knot Position Array

Spline Knot Position Array output as txt or print

1.Each 4 Spline as a group
2.Output Spline Knot Position (Pos.X Pos.Y Pos.Z )such as :

Render outputSize that fit the object

Hi man! :)

How do I set the width and height measurements in rendering (setup) that fit a selected object in the top view?

Situation:

I have an object
I create a freecamera in Top Viewport
Renders the camera
The image (vfb) must correspond to an BoundigBox surrounding object

For the first three steps and dummy box are successful, but the last I do not understand how to do...

Do you have any suggestions?

Ciao
Michele

to get full path in listbox

this is good scripter source .
that is directory list box script.

when i select list box item ,i would like to know full path name .

first of all , pls make directory in c

c:temp - a - aa
- b - bb
- c - cc
- d - dd

 
 
------------------------------------------------------------------------
 
materialib_path = "c:\\temp\\"
 
paths_array = #()
paths_array_list = #()
current_files = #()
bitmap_count = #()
 
fn matlist a b = ()
fn get_info = ()
 
 
 
 
fn build_paths path count =
(
	count = count + 1
	append paths_array path