PDA

View Full Version : Accessing the created node in plugins


TOMMY 3D FREAK
04-16-2003, 04:15 PM
Hi,

can anybody help me with the following?
I'm having trouble accesing the extended node in a geometry plugin.

Here's the deal, I scripted a geometry plugin that extends the geosphere plugin. When the user clicks anywhere in the viewpoint, the script places an instance of the plugin on the grid. I made a rollout with a spinner, that enables the user to adjust the extended geosphere's radius. But, and this is the catch!, When I for instance want to access modifiers on the geosphere, the delegate.modifiers returns an error. Of course it's possible to script: $.modifiers, but this won't work when then plugin is controlled form outside the plugin.

So to be short: is there anyway to access parameters such as scale, modifiers etc on the extende node that is created in a plugin?

Here's an example:
===============================================

plugin geometry Base
name:"base"
classID:#(12345,12345)
category:"New"
extends:geosphere
replaceUI:true
(
parameters main rollout:rad
(
radius type:#float UI:spnRadius
on radius set val do
(
delegate.radius=val
--------------------------------------------------------------------------------
In this part I want be able to scale the geosphere!?////////////
delegate.scale returns an error
this.scale also returns an error
-----------------------------------------------------------------------------------

)
)

tool create
(
on mousepoint click do if click == 1 then nodetm.pos=gridpoint
else
(

delegate.radius=20
addmodifier $ (noisemodifier())
#stop
)
)
rollout rad "Radius"
(
spinner spnRadius "Radius"

)
)

can anybody please help me out?

I
O
U

EricChadwick
04-16-2003, 07:06 PM
You'll probably get more responses if you go to the Sparks forum. Most of the folks here are artists.

http://sparks.discreet.com/webboard/wbpx.dll/~maxsdk

CGTalk Moderation
01-14-2006, 09:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.