Notifications
Clear all
[Closed] self reference geo Plugins
May 29, 2013 4:25 pm
Quick question I had rather than starting a brand new thread for it.
When creating a geoPlugin how do you properly reference itself?
Rather than selection[1]
because not in all cases is that geo selected.
such as
on buildMesh do
(
--build mesh function
--?-- this.node.material = undefined
--?-- this.node.wirecolor = random black white
)
10 Replies
2 Replies
I’m creating a geometry plugin and I need to reference itself.
For the sake of example so I want to adjust the material of itself…
on buildMesh do
(
--build mesh function
--?-- this.node.material = undefined
--?-- this.node.wirecolor = random black white
)
May 29, 2013 4:25 pm
I do not know how far to move each knot’s handle to make a perfect circle
May 29, 2013 4:25 pm
the geometry plugin can extend any other primitive plugins. in this case (refs.dependentnodes this firstonly:on) has to work.
May 29, 2013 4:25 pm
I mean Scripted SimpleObject Plug-ins not GeoPlugins…
plugin simpleObject tower_plugin_def
name:"Tower"
classID:#(145345,543211)
category:"Scripted Primitives"
(
parameters main rollout:params
(
height type:#worldUnits ui:height default:0
width type:#worldUnits ui:width default:0
depth type:#worldUnits ui:depth default:0
)
rollout params "Two Faces Parameters"
(
spinner height "Height" type:#worldunits range:[-1000,1000,0]
spinner width "Width" type:#worldunits range:[-1000,1000,0]
spinner depth "Depth" type:#worldunits range:[-1000,1000,0]
)
on buildMesh do
(
setMesh mesh \
verts:#([0,0,0],[width,0,0],[width,depth,0],[0,depth,0]) \
faces:#([3,2,1], [1,4,3])
extrudeFace mesh #(1,2) (height * 0.5) 40 dir:#common
extrudeFace mesh #(1,2) (height * 0.5) 50 dir:#common
)
tool create
(
on mousePoint click do
case click of
(
1: nodeTM.translation = gridPoint
3: #stop
)
on mouseMove click do
case click of
(
2: (width = gridDist.x; depth = gridDist.y)
3: height = gridDist.z
)
)
)
1 Reply