ScriptSpot

Forum topic · General Scripting

Script running a script - error

By cganim8r · 2009-05-01

Description

Hello people,

I am trying to get a script button to run another script that creates another dialog. However, it produces an error, below:

-- Type error: CreateDialog requires RolloutClass, got: undefined

A snippet from the 'boneselection' script is also below:

-----------------------

rollout FaceRollout "Face Rig" width:162 height:300
(
button btn1 "Face Rig" pos:[18,8] width:117 height:35 images:#("FaceRigBtn.bmp", undefined, 1, 1, 1, 1, 1) \
enabled:true \
on btn1 pressed do
createDialog FaceRollout 350 350
)

-------------------------------

I'm trying to run the script on pressing this button. Annoyingly, if I run the face script, then run the boneselection script afterwards, the dialog box appears without any errors. What makes this so and how do I stop it happening?

Thanks for any help, in advance.

Regards,

Neil

Comments (1)

rollout FaceRollout "Face

Anubis · 2009-05-01

rollout FaceRollout "Face Rig" width:162 height:300
(
	button btn1 "Face Rig"
	on btn1 pressed do
		createDialog FaceRollout2
)
createDialog FaceRollout
rollout FaceRollout2 "Face Rig 2" width:350 height:350
(
	label lblinf "Second Rollout"
)