public void onAddLight(object sender, EventArgs e)
        {
            ObjectPickerDlg dlg = new ObjectPickerDlg();
            dlg.Text = "Add Light";

            TreeNode sceneNode = mNode.Parent.Parent;
            SceneJS scene = (SceneJS)sceneNode.Tag;

            foreach (LightJS light in scene.mLights)
            {
                bool found = false;
                foreach (TreeNode n in mLNode.Nodes)
                {
                    if (light.Name == n.Text)
                    {
                        found = true;
                        break;
                    }
                }
                if (!found)
                {
                    dlg.ObjectList.Items.Add(light.Name);
                }
            }

            if (dlg.ShowDialog() != DialogResult.Cancel)
            {
                string lightname = (string)dlg.ObjectList.SelectedItem;
                if (NativeWrapper.AddObjectToPass("renderPass", mName, "light", lightname))
                {
                    mLNode.Nodes.Add(lightname);
                }
            }
        }
        public void onAddRenderObject(object sender, EventArgs e)
        {
            ObjectPickerDlg dlg = new ObjectPickerDlg();
            dlg.Text = "Add Render Object";

            TreeNode sceneNode = mNode.Parent.Parent;
            SceneJS scene = (SceneJS)sceneNode.Tag;

            foreach (RenderObjectJS ro in scene.mRenderObjects)
            {
                bool found = false;
                foreach (TreeNode n in mRONode.Nodes)
                {
                    if (ro.Name == n.Text)
                    {
                        found = true;
                        break;
                    }
                }
                if (!found)
                {
                    dlg.ObjectList.Items.Add(ro.Name);
                }
            }

            if (dlg.ShowDialog() != DialogResult.Cancel)
            {
                string roname = (string)dlg.ObjectList.SelectedItem;
                AddRenderObject(roname);
            }
        }
        public void onAddCamera(object sender, EventArgs e)
        {
            ObjectPickerDlg dlg = new ObjectPickerDlg();
            dlg.Text = "Add Camera";

            TreeNode sceneNode = mTreeNode.Parent.Parent;
            SceneJS scene = (SceneJS)sceneNode.Tag;

            foreach (CameraJS cam in scene.mCameras)
            {
                bool found = false;
                foreach (TreeNode n in mCamNode.Nodes)
                {
                    if (cam.Name == n.Text)
                    {
                        found = true;
                        break;
                    }
                }
                if (!found)
                {
                    dlg.ObjectList.Items.Add(cam.Name);
                }
            }

            if (dlg.ShowDialog() != DialogResult.Cancel)
            {
                string roname = (string)dlg.ObjectList.SelectedItem;
                if (NativeWrapper.AddObjectToPass("updatePass", mName, "camera", roname))
                {
                    mCamNode.Nodes.Add(roname);
                }
            }
        }