Tagged 'General Scripting'

Boolean script question

Hello. I need help with boolean script. I want to write a tool that makes a chamfer to those edges that appears when two boolean objects intersects. Something like "Modo Meshfusion" functionality, but simplier. So, there are two main question.

Question number one - how to catch those edges? The problem is that bollean operation automatically selects not all of those edges, but all of those vertices. How to convert the selection of vertices to the selection of edges that lies between vertices?

Wha is a Ray?

I never found proper documentation of Ray in autodesk online help.

  • What is a Ray() function?
  • How to use it?
  • Where to use it?
  • Another Question. It is easy to get the position of a vertex by  $.verts[number].pos but how about polygon or faces? Is there any way we can get the position of each faces in sub object level mode? Thanks.

    search array

    How would you go about creating a search edittext dialog to search an array?

    eg.

    myarray = #("name1, "name2", "name3")

    search with keyword like 1 to return string name of name1.

    simple "info" script

    hi
    i'm writing a little script thet tracks the current resolution and rendertime.
    the render engine is iray
    here is the code

    try destroyDialog getvalues catch()
    rollout getvalues "iray_values" width:105 height:100
    (
     
    		edittext framesettings "" fieldWidth:95 offset:[-12,-3] height:32 align:#left readonly:true
     
    		button gv "getval" offset:[1,1] height:16 width:100 align:#center
     
     
    	-- Get current resolution and time
    	fn curval = 
    	(
     
    		rws = renderwidth as string
    		rhs = renderheight as string
     
    		renderers.current = iray_Renderer()

    Modify this pivot-to-face code so that it can be used for multiple selection at once

    Hi

    Please see this code (which I found http://www.scriptspot.com/forums/3ds-max/general-scripting/align-pivot from 2012)

    Also, by some reason, the pivot changes to something else when the code is run a second time.
    So if the method can be done better, please just improve it. Thanks!
    (ps, I removed the mxs/code tag because it messed up the text by some reason..)

    fn RotatePivotOnly obj index=
    (
    rot = (matrixFromNormal (polyop.getFaceNormal obj index)*obj.transform ) as quat
    rotValInv=inverse rot
    animate off in coordsys local obj.rotation*=RotValInv

    function not able to run on all array ellements!

    Hello! i'm new on maxscript. Thanx a lot for the time you'll spend to help me. sorry for my english it's not my native language... At Least I'm sorry if it's not the good section to post my trouble.

    I'm working on a script able to create an orthogonal projection of the object as a simplify shape.

    Actualy i try to auto weld all the knots of the differents shapes i creat.
    And i don't understand why it's only work on one shape (the last of the list exactly).

    fn AutoWeld theShape =
    (
    	-- function which select all knots from a shape and weld them.
    	select theShape

    Can I link Point Helper wiht Center of XForm modifer?

    In scene is some OBJECT with XForm modifer.
    I animate this OBJECT, and transform (rotate) this OBJECT in time by XForm modifer.
    Position Center and Gizmo of XForm modifer change over time.

    Can I link Point Helper wiht Center of XForm modifer?
    How to do it?

    Maxscripting

    Hi guys!

    I am trying to do script which can help me do one task faster.
    Need to select all scene objects then add edit poly modifier and select edge by index number one.
    I have done part, but it doing task for one object. but need to do for all scene objects.

    select $box001
    subobjectLevel = 2
    $.EditablePoly.SetSelection #Edge #{1}
    subobjectLevel = 0
    max hide selection ()

    Can anyone help me with this ?

    Thanks!

    Create a log of render times per frame

    Hey everyone,
    I'm trying to write (what should be) a simple script that stores the data from the rendering dialog to a .txt file. I want to be able to extract the values for last frame time, frame number, and maybe some others, but I can't find a way to access those values. Can that be done in maxscript or python? If so, how?

    MaxScript to automate rgb color conversion to gamma 2.2?

    hi, I was wondering if there is a plugin to do so, but couldn't find, so I started to script my own.

    decided to do so because I have many old models wich I use to populate my scenes at work, and these models have materials made on a 1.0 gamma environment, and everytime I want to use one of them, I have to manually convert all colors to match a 2.2 gamma equivalent.

    Syndicate content