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
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
