Tagged 'General Scripting'

How to use C# to get the parameters of the Tiles procedural texture?

How to use C# to get the parameters of the Tiles procedural texture?

case "Tiles":
 
     Debug.Print($"======{texType}======");
 
     Debug.Print($"{tex.ClassName(false)} has {tex.NumParamBlocks} params");
 
 

print message:

======Tiles======
Tiles has 0 params

Dialog Positions

Hey guys,

I am trying to write a script for a rollout/createDialog, that docks to the rendering dialog box.
So that poeple can select presets and other tools before hitting render.

My idea was to create a callback for when the render dialog is opened and then run the rollout script, which would find the position of the render dialog and position itself next to it.

I found this, but it seems to only work for MS dialogs.

GetDialogPos

Does anyone know how to do this?

Thanks

Distance along the Z axis from the selected object

Hello everyone! I don't understand scripts. Please help me make a script if it's not difficult: so that it interactively shows the distance along the Z axis from the selected object (help point) to the selected vertex (editable poly). This used to work with Working Pivot, but now it doesn't work at the subobject level.

How do switch between pivot selection per hotkey?

Hi,
in 3ds max i have 3 modes to switch the pivot selection.

Pivot Point Center
Use Selection Center
Use Transform Coordinate center

for faster work, i will switch it per hotkey. But in the Hotkey-Editor i don't find a name like and the max script listener has no print from it.

Has anyone tried to grab this per script or found a Hotkey-Editor name?

regards,
Ulrich

MapButton with a jpg file as image

EASY QUESTION . it's such a simple question that in a day of testing I couldn't solve it and not even chatgpt can help me. and looking at the max online guide I'm pretty sure that not even autodesk knows how to do it).
I would like to make a button with a jpg, simple. no strange stuff, script pages.

what's wrong with this line of code?

mapButton 'btn1' "MapButton" width:75 height:90 pos:[20,10] map:@"G:\\XXX\SCRIPT_interfaccia\SCRIPT_Library\Immagini_Tessere\STANDARD\KKK\file_0001.jpg"

grazie
love for everyone

attach by geometry name

Hi guys can someone kindlt help me do a script that attachs by geometry name?

check if node has transform

I would like to check if some node n has transformation, which means

n.transform!=matrix3 1

Just using != doesn´t work, as far I have read it´s only avaible since max 2018 and I need my script to work with older versions of max.

multiple script objects problem

Hi,
I made a little script to "straighten" a spline to have its overall slope.
It works but I want to apply the script to selected splines ( loop ) and then it don't work anymore... Anybody can help ? :-)

BS = selection[1]
BSW = BS.wirecolor
SP = copy BS
select SP
macros.run "Modifier Stack" "Convert_to_Spline"
verts = numKnots SP
NP=SplineShape pos:[0,0,0]
addNewSpline NP
PO = getKnotPoint SP 1 1
addKnot NP 1  #corner #line [0,0,PO.z]
NEWD = 0
for i=1 to (verts-1) do
(
PA = getKnotPoint SP 1 i
PB = getKnotPoint SP 1 (i +1) 
PAF = [PA.x,PA.y,0]

event handler for a custom thumbnails

Hi,

I need help with a dot-net. My frirnd and I are making a custom library image browser using dot-net in max rollout. The thumbnails are showing properly using/loading custom dot-net controls. But we cannot managed to set an event handler when clicking a thumb. we want something like
"on small_dialog clicked sender arg do ()". But the click makes no change

do we need to make an new event and make it public from dot-net? I attached the code and dll as well and a screenshot.

I know partial max-script and he knows moderate dot-net. together we are almost disastrous.

"while not eof f do" but from the second line

Hi,

I would like to read an external file but not from the first line, from the second one.

Is there a simple way ?

Thanks

Syndicate content