示例#1
0
        private void LightPropertiesForm_Load(object sender, EventArgs e)
        {
            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
            {
                var node = Loader.Core.GetSelNode(index);

                if (node.ObjectRef != null && node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Light)
                {
                    lights.Add(node);
                }
            }

            Tools.PrepareCheckBox(chkNoExport, lights, "babylonjs_noexport");
            Tools.PrepareCheckBox(chkAutoAnimate, lights, "babylonjs_autoanimate");
            Tools.PrepareCheckBox(chkLoop, lights, "babylonjs_autoanimateloop");
            Tools.PrepareCheckBox(ckForceBackFaces, lights, "babylonjs_forcebackfaces");
            Tools.PrepareNumericUpDown(nupFrom, lights, "babylonjs_autoanimate_from");
            Tools.PrepareNumericUpDown(nupTo, lights, "babylonjs_autoanimate_to", 100.0f);

            Tools.PrepareNumericUpDown(nupBias, lights, "babylonjs_shadows_bias", 0.00005f);
            Tools.PrepareNumericUpDown(nupBlurScale, lights, "babylonjs_shadows_blurScale", 2);
            Tools.PrepareNumericUpDown(nupBlurBoxOffset, lights, "babylonjs_shadows_blurBoxOffset", 1);
            Tools.PrepareComboBox(cbCameraType, lights[0], "babylonjs_shadows_type", "Blurred ESM");

            Tools.PrepareTextBox(tagInput, lights, "babylonjs_tag");
        }
        private void CameraPropertiesForm_Load(object sender, EventArgs e)
        {
            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
            {
                var node = Loader.Core.GetSelNode(index);

                if (node.ObjectRef != null && node.ObjectRef.SuperClassID == SClass_ID.Camera)
                {
                    cameras.Add(node);
                }
            }

            Tools.PrepareCheckBox(chkCollisions, cameras, "babylonjs_checkcollisions");
            Tools.PrepareCheckBox(chkGravity, cameras, "babylonjs_applygravity");

            Tools.PrepareNumericUpDown(nupSpeed, cameras, "babylonjs_speed", 1.0f);
            Tools.PrepareNumericUpDown(nupInertia, cameras, "babylonjs_inertia", 0.9f);

            Tools.PrepareVector3Control(ellipsoidControl, cameras[0], "babylonjs_ellipsoid", 0.5f, 1.0f, 0.5f);

            Tools.PrepareCheckBox(chkAutoAnimate, cameras, "babylonjs_autoanimate");
            Tools.PrepareCheckBox(chkLoop, cameras, "babylonjs_autoanimateloop");
            Tools.PrepareNumericUpDown(nupFrom, cameras, "babylonjs_autoanimate_from");
            Tools.PrepareNumericUpDown(nupTo, cameras, "babylonjs_autoanimate_to", 100.0f);
        }
        private void ScenePropertiesForm_Load(object sender, EventArgs e)
        {
            //Tools.PrepareVector3Control(gravityControl, Loader.Core.RootNode, "babylonjs_gravity", 0, -0.9f);
            Tools.PrepareCheckBox(chkQuaternions, Loader.Core.RootNode, "babylonjs_exportquaternions", 1);
            Tools.PrepareCheckBox(chkAnimations, Loader.Core.RootNode, "babylonjs_donotoptimizeanimations", 1);

            Tools.PrepareCheckBox(chkCreateDefaultSkybox, Loader.Core.RootNode, "babylonjs_createDefaultSkybox", 1);
            Tools.PrepareNumericUpDown(nupSkyboxBlurLevel, new List <IINode> {
                Loader.Core.RootNode
            }, "babylonjs_skyboxBlurLevel", 0.3f);

            Tools.PrepareCheckBox(chkAddDefaultLight, Loader.Core.RootNode, "babylonjs_addDefaultLight", 1);

            Tools.PrepareCheckBox(chkAutoPlay, Loader.Core.RootNode, "babylonjs_sound_autoplay", 1);
            Tools.PrepareCheckBox(chkLoop, Loader.Core.RootNode, "babylonjs_sound_loop", 1);
            Tools.PrepareNumericUpDown(nupVolume, new List <IINode> {
                Loader.Core.RootNode
            }, "babylonjs_sound_volume", 1.0f);

            Tools.PrepareCheckBox(chkMorphExportTangent, Loader.Core.RootNode, "babylonjs_export_Morph_Tangents", 0);
            Tools.PrepareCheckBox(ckkMorphExportNormals, Loader.Core.RootNode, "babylonjs_export_Morph_Normals", 1);

            Tools.PrepareTextBox(txtSound, Loader.Core.RootNode, "babylonjs_sound_filename");

            //flightsim
            Tools.PrepareNumericUpDown(numFlightSimFadeScale, new List <IINode> {
                Loader.Core.RootNode
            }, "flightsim_fade_globalscale", 1.0f);
        }
        private void ObjectPropertiesForm_Load(object sender, EventArgs e)
        {
            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
            {
                var node = Loader.Core.GetSelNode(index);

                if (node.ObjectRef != null && node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Geomobject)
                {
                    objects.Add(node);
                }
            }

            Tools.PrepareCheckBox(chkNoExport, objects, "babylonjs_noexport");
            Tools.PrepareCheckBox(chkCollisions, objects, "babylonjs_checkcollisions");
            Tools.PrepareCheckBox(chkPickable, objects, "babylonjs_checkpickable");
            Tools.PrepareCheckBox(chkOptimize, objects, "babylonjs_optimizevertices");
            Tools.PrepareCheckBox(chkShowBoundingBox, objects, "babylonjs_showboundingbox");
            Tools.PrepareCheckBox(chkShowSubMeshesBoundingBox, objects, "babylonjs_showsubmeshesboundingbox");

            Tools.PrepareCheckBox(chkAutoAnimate, objects, "babylonjs_autoanimate", 1);
            Tools.PrepareCheckBox(chkLoop, objects, "babylonjs_autoanimateloop", 1);
            Tools.PrepareNumericUpDown(nupFrom, objects, "babylonjs_autoanimate_from");
            Tools.PrepareNumericUpDown(nupTo, objects, "babylonjs_autoanimate_to", 100.0f);
            Tools.PrepareNumericUpDown(nupAlphaIndex, objects, "babylonjs_alphaindex", 1000);

            Tools.PrepareNumericUpDown(nupMass, objects, "babylonjs_mass");
            Tools.PrepareNumericUpDown(nupFriction, objects, "babylonjs_friction", 0.2f);
            Tools.PrepareNumericUpDown(nupRestitution, objects, "babylonjs_restitution", 0.2f);

            Tools.PrepareComboBox(cbImpostor, objects[0], "babylonjs_impostor", "None");
        }
示例#5
0
        private void ObjectPropertiesForm_Load(object sender, EventArgs e)
        {
            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
            {
                var node = Loader.Core.GetSelNode(index);

                if (node.ObjectRef != null &&
                    (
                        node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Geomobject
                        ||
                        node.ObjectRef.Eval(0).Obj.SuperClassID == SClass_ID.Helper
                    ))
                {
                    objects.Add(node);
                }
            }

            Tools.PrepareCheckBox(chkNoExport, objects, "babylonjs_noexport");
            Tools.PrepareCheckBox(chkCollisions, objects, "babylonjs_checkcollisions");
            Tools.PrepareCheckBox(chkPickable, objects, "babylonjs_checkpickable");
            Tools.PrepareCheckBox(chkOptimize, objects, "babylonjs_optimizevertices");
            Tools.PrepareCheckBox(chkShowBoundingBox, objects, "babylonjs_showboundingbox");
            Tools.PrepareCheckBox(chkShowSubMeshesBoundingBox, objects, "babylonjs_showsubmeshesboundingbox");

            Tools.PrepareCheckBox(chkAutoAnimate, objects, "babylonjs_autoanimate", 1);
            Tools.PrepareCheckBox(chkBakeAnimationNode, objects, "babylonjs_BakeAnimation");
            Tools.PrepareCheckBox(chkLoop, objects, "babylonjs_autoanimateloop", 1);
            Tools.PrepareNumericUpDown(nupFrom, objects, "babylonjs_autoanimate_from");
            Tools.PrepareNumericUpDown(nupTo, objects, "babylonjs_autoanimate_to", 100.0f);
            Tools.PrepareNumericUpDown(nupAlphaIndex, objects, "babylonjs_alphaindex", 1000);

            Tools.PrepareNumericUpDown(nupMass, objects, "babylonjs_mass");
            Tools.PrepareNumericUpDown(nupFriction, objects, "babylonjs_friction", 0.2f);
            Tools.PrepareNumericUpDown(nupRestitution, objects, "babylonjs_restitution", 0.2f);

            Tools.PrepareComboBox(cbImpostor, objects[0], "babylonjs_impostor", "None");

            Tools.PrepareCheckBox(chkAutoPlay, objects, "babylonjs_sound_autoplay", 1);
            Tools.PrepareCheckBox(chkLoop, objects, "babylonjs_sound_loop", 1);
            Tools.PrepareNumericUpDown(nupVolume, objects, "babylonjs_sound_volume", 1.0f);
            Tools.PrepareNumericUpDown(nupPlaybackRate, objects, "babylonjs_sound_playbackrate", 1.0f);

            Tools.PrepareComboBox(cbDistanceModel, objects[0], "babylonjs_sound_distancemodel", "linear");
            Tools.PrepareNumericUpDown(nupMaxDistance, objects, "babylonjs_sound_maxdistance", 100.0f);
            Tools.PrepareNumericUpDown(nupRolloff, objects, "babylonjs_sound_rolloff", 1.0f);
            Tools.PrepareNumericUpDown(nupRefDistance, objects, "babylonjs_sound_refdistance", 1.0f);

            Tools.PrepareCheckBox(chkDirectional, objects, "babylonjs_sound_directional", 0);
            Tools.PrepareNumericUpDown(nupConeInnerAngle, objects, "babylonjs_sound_coneinnerangle", 360.00f);
            Tools.PrepareNumericUpDown(nupConeOuterAngle, objects, "babylonjs_sound_coneouterangle", 360.00f);
            Tools.PrepareNumericUpDown(nupConeOuterGain, objects, "babylonjs_sound_coneoutergain", 1.0f);

            Tools.PrepareTextBox(txtSound, objects[0], "babylonjs_sound_filename");

            Tools.PrepareTextBox(tagInput, objects, "babylonjs_tag");

            Tools.PrepareTextBox(txtASBAnimationTargetID, objects, "babylonjs_asb_anim_targetID");
            Tools.PrepareNumericUpDown(lodValueNumeric, objects, "flightsim_lod_value", 70.0f);
        }
示例#6
0
 private void LoadDracoOptions()
 {
     Tools.PrepareNumericUpDown(dracoUserControl.CompressionLevelNumericUpDown, Loader.Core.RootNode, $"babylonjs_{DracoParameters.compressionLevel_param_name}", DracoParameters.compressionLevel_default);
     Tools.PrepareTrackBar(dracoUserControl.QPositionTrackBar, Loader.Core.RootNode, $"babylonjs_{DracoParameters.quantizePositionBits_param_name}", DracoParameters.quantizePositionBits_default);
     Tools.PrepareTrackBar(dracoUserControl.QNormalTrackBar, Loader.Core.RootNode, $"babylonjs_{DracoParameters.quantizeNormalBits_param_name}", DracoParameters.quantizeNormalBits_default);
     Tools.PrepareTrackBar(dracoUserControl.QTexcoordTrackBar, Loader.Core.RootNode, $"babylonjs_{DracoParameters.quantizeTexcoordBits_param_name}", DracoParameters.quantizeTexcoordBits_default);
     Tools.PrepareTrackBar(dracoUserControl.QColorTrackBar, Loader.Core.RootNode, $"babylonjs_{DracoParameters.quantizeColorBits_param_name}", DracoParameters.quantizeColorBits_default);
     Tools.PrepareTrackBar(dracoUserControl.QGenericTrackBar, Loader.Core.RootNode, $"babylonjs_{DracoParameters.quantizeGenericBits_param_name}", DracoParameters.quantizeGenericBits_default);
     Tools.PrepareCheckBox(dracoUserControl.UnifiedCheckBox, Loader.Core.RootNode, $"babylonjs_{DracoParameters.unifiedQuantization_param_name}", DracoParameters.unifiedQuantization_default?1:0);
 }
示例#7
0
        private void ScenePropertiesForm_Load(object sender, EventArgs e)
        {
            Tools.PrepareVector3Control(gravityControl, Loader.Core.RootNode, "babylonjs_gravity", 0, -0.9f);
            Tools.PrepareCheckBox(chkQuaternions, Loader.Core.RootNode, "babylonjs_exportquaternions", 1);

            Tools.PrepareCheckBox(chkAutoPlay, Loader.Core.RootNode, "babylonjs_sound_autoplay", 1);
            Tools.PrepareCheckBox(chkLoop, Loader.Core.RootNode, "babylonjs_sound_loop", 1);
            Tools.PrepareNumericUpDown(nupVolume, new List <IINode> {
                Loader.Core.RootNode
            }, "babylonjs_sound_volume", 1.0f);

            Tools.PrepareTextBox(txtSound, Loader.Core.RootNode, "babylonjs_sound_filename");
        }
示例#8
0
        private void LightPropertiesForm_Load(object sender, EventArgs e)
        {
            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
            {
                var node = Loader.Core.GetSelNode(index);

                if (node.ObjectRef != null && node.ObjectRef.SuperClassID == SClass_ID.Light)
                {
                    lights.Add(node);
                }
            }

            Tools.PrepareCheckBox(chkAutoAnimate, lights, "babylonjs_autoanimate");
            Tools.PrepareCheckBox(chkLoop, lights, "babylonjs_autoanimateloop");
            Tools.PrepareNumericUpDown(nupFrom, lights, "babylonjs_autoanimate_from");
            Tools.PrepareNumericUpDown(nupTo, lights, "babylonjs_autoanimate_to", 100.0f);
        }
        private void ObjectPropertiesForm_Load(object sender, EventArgs e)
        {
            for (var index = 0; index < Loader.Core.SelNodeCount; index++)
            {
                var node = Loader.Core.GetSelNode(index);

                if (node.ObjectRef != null && node.ObjectRef.SuperClassID == SClass_ID.Geomobject)
                {
                    objects.Add(node);
                }
            }

            Tools.PrepareCheckBox(chkCollisions, objects, "babylonjs_checkcollisions");
            Tools.PrepareCheckBox(chkPickable, objects, "babylonjs_checkpickable");
            Tools.PrepareCheckBox(chkNoOptimize, objects, "babylonjs_nooptimize");
            Tools.PrepareCheckBox(chkShowBoundingBox, objects, "babylonjs_showboundingbox");
            Tools.PrepareCheckBox(chkShowSubMeshesBoundingBox, objects, "babylonjs_showsubmeshesboundingbox");

            Tools.PrepareCheckBox(chkAutoAnimate, objects, "babylonjs_autoanimate");
            Tools.PrepareCheckBox(chkLoop, objects, "babylonjs_autoanimateloop");
            Tools.PrepareNumericUpDown(nupFrom, objects, "babylonjs_autoanimate_from");
            Tools.PrepareNumericUpDown(nupTo, objects, "babylonjs_autoanimate_to", 100.0f);
        }