Scripted Helper object plugin

Submitted by:Pitter Alderson

Date added:07 May, 2012

Category:Maxscript

An example for Scripted Helper object plugin

Tags: object plugin

Code Snippet:

    plugin Helper HelperTest_DisplayMesh
name:"HelperTest"
classID:#(0x47db14fe, 0x4e9b5f90)
category:"Standard"
extends:dummy
(
local lastSize, meshObj

parameters pblock rollout:params (
size type:#float animatable:true ui:amount default:40.0
)

rollout params "HelperTest Parameters" (
Spinner amount "Size:" range:[0, 1e9, 40]
)

on getDisplayMesh do (
if (meshObj == undefined) do (
meshObj = createInstance teapot radius:size mapCoords:false
lastSize = size
)

if size != lastSize do (
meshObj.radius = size
lastSize = size
)
meshObj.mesh
)

tool create (
on mousePoint click do (
viewTM = getCPTM()
nodeTM = (transMatrix worldPoint) * (inverse viewTM)
#stop
)
)
)
 
 

Comments