Ejemplo n.º 1
0
		private bool DrawDetailsGeometry()
		{
			bool bChanged = false;

			EditorGUIUtility.labelWidth = 250;

			// TODO
			{
				bool oldValue = HEU_PluginSettings.Curves_ShowInSceneView;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Show Curves in Scene View");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.Curves_ShowInSceneView = newValue;
					HEU_HoudiniAsset.SetCurvesVisibilityInScene(newValue);
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				float oldValue = HEU_PluginSettings.NormalGenerationThresholdAngle;
				float newValue = EditorGUILayout.DelayedFloatField("Normal Generation Threshold Angle", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.NormalGenerationThresholdAngle = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();

			EditorGUIUtility.labelWidth = 0;

			return bChanged;
		}
Ejemplo n.º 2
0
		private bool DrawDetailsCooking()
		{
			bool bChanged = false;

			{
				bool oldValue = HEU_PluginSettings.CookingEnabled;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Enable Cooking");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.CookingEnabled = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.CookingTriggersDownstreamCooks;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Cooking Triggers Downstream Cooks");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.CookingTriggersDownstreamCooks = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.PushUnityTransformToHoudini;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Push Unity Transform To Houdini");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PushUnityTransformToHoudini = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.TransformChangeTriggersCooks;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Transform Change Triggers Cooks");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.TransformChangeTriggersCooks = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.CookTemplatedGeos;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Import Templated Geos");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.CookTemplatedGeos = newValue;
					bChanged = true;
				}
			}

			return bChanged;
		}
Ejemplo n.º 3
0
	private bool DrawToolSettings()
	{
	    bool bChanged = false;

	    HEU_EditorUI.DrawSeparator();
	    {
		float oldValue = HEU_PluginSettings.ImageGamma;
		float newValue = EditorGUILayout.DelayedFloatField("Texture Gamma", oldValue);
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.ImageGamma = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		Color oldValue = HEU_PluginSettings.LineColor;
		Color newValue;
		if (HEU_PluginSettings.UseHDRColor)
		{
		    newValue = EditorGUILayout.ColorField(new GUIContent("Line Color", "Color of the line"), oldValue, true, true, true);
		}
		else
		{
		    newValue = EditorGUILayout.ColorField(new GUIContent("Line Color", "Color of the line"), oldValue);
		}

		if (newValue != oldValue)
		{
		    HEU_PluginSettings.LineColor = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.UseHybridCurveEditing;
		bool newValue =  HEU_EditorUI.DrawToggleLeft(oldValue, "Use Hybrid Curve Editing", "Toggles the usage of 'Hybrid Curve Editing', which overrides the shift function when working with curves.");
		if (oldValue != newValue)
		{
		    HEU_PluginSettings.UseHybridCurveEditing = newValue;
		    bChanged = true;
		}
	    }

	    return bChanged;
	}
Ejemplo n.º 4
0
	private bool DrawDetailsMaterials()
	{
	    bool bChanged = false;

	    HEU_PipelineType pipeline = HEU_RenderingPipelineDefines.GetPipeline();

	    bool isBuiltInRenderPipeline = pipeline == HEU_PipelineType.BiRP;

	    // Force set UseLegacyShaders to prevent possible locked state
	    if (!isBuiltInRenderPipeline && HEU_PluginSettings.UseLegacyShaders == true)
	    {
		HEU_PluginSettings.UseLegacyShaders = false;
	    }

	    using (new EditorGUI.DisabledScope(!isBuiltInRenderPipeline))
	    {
		bool oldValue = HEU_PluginSettings.UseLegacyShaders;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Use Legacy shaders as default", "Use the legacy shaders in case your device doesn't support shader model 3.0. Only supported for the built-in render pipeline.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.UseLegacyShaders = newValue;
		    bChanged = true;
		}
	    }

	    bool isUsingLegacyShaders = HEU_PluginSettings.UseLegacyShaders;

	    using (new EditorGUI.DisabledScope(isUsingLegacyShaders))
	    {
		bool oldValue = HEU_PluginSettings.UseSpecularShader;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Use Specular shader as default", "Use the specular workflow instead of the metallic one.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.UseSpecularShader = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();

	    return bChanged;
	}
Ejemplo n.º 5
0
		private bool DrawDetailsGeneral()
		{
			bool bChanged = false;
			{
				string oldPath = HEU_PluginSettings.AssetCachePath;
				EditorGUILayout.LabelField(new GUIContent("Houdini Asset Cache Path:", "Files generated by this plugin will be stored in this folder path relative to Assets/."));
				string newPath = EditorGUILayout.TextField("", oldPath);
				if (!newPath.Equals(oldPath))
				{
					HEU_PluginSettings.AssetCachePath = newPath;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.HoudiniInstallPath;
				string fileExt = "";

				EditorGUILayout.LabelField(new GUIContent("Override Houdini Install Path:", 
					"Set a specific Houdini installation to use for this plugin. The plugin's default version of Houdini will be ignored."));
				using (new EditorGUILayout.HorizontalScope())
				{
					string newPath = EditorGUILayout.DelayedTextField(oldPath);

					GUIStyle buttonStyle = HEU_EditorUI.GetNewButtonStyle_MarginPadding(0, 0);
					if (GUILayout.Button("...", buttonStyle, GUILayout.Width(30), GUILayout.Height(18)))
					{
						string panelMsg = "Select Houdini Install Path";
#if UNITY_EDITOR_OSX
						panelMsg += " (.app)";
#endif

						string openFilePath = UnityEditor.EditorUtility.OpenFolderPanel(panelMsg, newPath, fileExt);
						if (!string.IsNullOrEmpty(openFilePath))
						{
							newPath = openFilePath;
						}
					}

					if (!newPath.Equals(oldPath))
					{
						string msgPath = !string.IsNullOrEmpty(newPath) ? newPath : HEU_Platform.GetHoudiniEngineDefaultPath();

						string confirmMsg = string.Format(
							"Change the Houdini install path?\n"
							+ "  New path: {0}\n\n"
							+ "You will need to restart Unity to use this path!", msgPath);

						bool result = HEU_EditorUtility.DisplayDialog("Houdini Install Path Changed", confirmMsg, "Confirm", "Cancel");
						if (result)
						{
							HEU_PluginSettings.HoudiniInstallPath = newPath;
							bChanged = true;
						}
					}
				}
#if UNITY_EDITOR_OSX
				GUIStyle labelStyle = new GUIStyle(GUI.skin.label);
				labelStyle.wordWrap = true;
				EditorGUILayout.LabelField("  On macOS, you'll need to select the path to the .app folder.\n  E.g. /Applications/Houdini/Houdini16.5.616/Houdini Core 16.5.616.app", labelStyle);
#endif
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.HoudiniDebugLaunchPath;
				string fileExt = "";

				EditorGUILayout.LabelField(new GUIContent("Houdini Debug Executable:", "Set Houdini executable to launch when opening debug scenes."));
				using (new EditorGUILayout.HorizontalScope())
				{
					string newPath = EditorGUILayout.DelayedTextField(oldPath);

					GUIStyle buttonStyle = HEU_EditorUI.GetNewButtonStyle_MarginPadding(0, 0);
					if (GUILayout.Button("...", buttonStyle, GUILayout.Width(30), GUILayout.Height(18)))
					{
						string panelMsg = "Select Houdini Executable";
#if UNITY_EDITOR_OSX
						panelMsg += " (.app)";
#endif

						string openFilePath = UnityEditor.EditorUtility.OpenFilePanel(panelMsg, newPath, fileExt);
						if (!string.IsNullOrEmpty(openFilePath))
						{
							newPath = openFilePath;
						}
					}

					if (!newPath.Equals(oldPath))
					{
						HEU_PluginSettings.HoudiniDebugLaunchPath = newPath;
						bChanged = true;
					}
				}
#if UNITY_EDITOR_OSX
				GUIStyle labelStyle = new GUIStyle(GUI.skin.label);
				labelStyle.wordWrap = true;
				EditorGUILayout.LabelField("  On macOS, you'll need to select the path to the .app folder.\n  E.g. /Applications/Houdini/Houdini16.5.616/Houdini Core 16.5.616.app", labelStyle);
#endif
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.UseFullPathNamesForOutput;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Use Full Path Names For Output");
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.UseFullPathNamesForOutput = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.SetCurrentThreadToInvariantCulture;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Set Current Thread To Invariant Culture", "Enabling this sets to use InvariantCutulre which fixes locale-specific parsing issues such as using comma instead of dot for decimals.");
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.SetCurrentThreadToInvariantCulture = newValue;
					bChanged = true;
				}
			}

			return bChanged;
		}
Ejemplo n.º 6
0
		private bool DrawDetailsGeneral()
		{
			bool bChanged = false;
			{
				float oldValue = HEU_PluginSettings.PinSize;
				float newValue = EditorGUILayout.DelayedFloatField("Pin Size", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PinSize = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				Color oldValue = HEU_PluginSettings.PinColor;
				Color newValue = EditorGUILayout.ColorField("Pin Color", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PinColor = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				float oldValue = HEU_PluginSettings.ImageGamma;
				float newValue = EditorGUILayout.DelayedFloatField("Texture Gamma", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.ImageGamma = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				Color oldValue = HEU_PluginSettings.LineColor;
				Color newValue = EditorGUILayout.ColorField("Line Color", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.LineColor = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.HoudiniEngineEnvFilePath;
				string newPath = EditorGUILayout.TextField("Houdini Env File", oldPath);
				if (!newPath.Equals(oldPath))
				{
					HEU_PluginSettings.HoudiniEngineEnvFilePath = newPath;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.AssetCachePath;
				string newPath = EditorGUILayout.TextField("Houdini Asset Cache Path", oldPath);
				if (!newPath.Equals(oldPath))
				{
					HEU_PluginSettings.AssetCachePath = newPath;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.UseFullPathNamesForOutput;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Use Full Path Names For Output");
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.UseFullPathNamesForOutput = newValue;
					bChanged = true;
				}
			}

			return bChanged;
		}
Ejemplo n.º 7
0
        /// <summary>
        /// Draw the UI for the given input node
        /// </summary>
        /// <param name="inputNode"></param>
        public static void EditorDrawInputNode(HEU_InputNode inputNode)
        {
            int plusButtonWidth = 20;

            const string inputTypeTooltip = @"Input type of the object. 

The HDA type can accept any object with a HEU_HoudiniAssetRoot component. (Including curves)

The UNITY_MESH type can accept any GameObject (Including Terrain, HEU_BoundingVolumes).";
            GUIContent   inputTypeLabel   = new GUIContent("Input Type", inputTypeTooltip);

            GUIContent translateLabel = new GUIContent("    Translate");
            GUIContent rotateLabel    = new GUIContent("    Rotate");
            GUIContent scaleLabel     = new GUIContent("    Scale");

            PopulateCache(inputNode);

            EditorGUI.BeginChangeCheck();

            EditorGUILayout.BeginVertical(EditorStyles.helpBox);

            string labelName = inputNode.LabelName;

            if (!string.IsNullOrEmpty(labelName))
            {
                EditorGUILayout.LabelField(labelName);
            }

            EditorGUI.indentLevel++;

            HEU_InputNode.InputObjectType inputObjectType             = (HEU_InputNode.InputObjectType)inputNode._uiCache._inputObjectTypeProperty.intValue;
            HEU_InputNode.InputObjectType userSelectedInputObjectType = (HEU_InputNode.InputObjectType)EditorGUILayout.EnumPopup(inputTypeLabel, inputObjectType);
            if (userSelectedInputObjectType != inputObjectType)
            {
                SerializedProperty pendingInputObjectTypeProperty = HEU_EditorUtility.GetSerializedProperty(inputNode._uiCache._inputNodeSerializedObject, "_pendingInputObjectType");
                if (pendingInputObjectTypeProperty != null)
                {
                    pendingInputObjectTypeProperty.intValue = (int)userSelectedInputObjectType;
                }
            }
            else
            {
                EditorGUILayout.PropertyField(inputNode._uiCache._keepWorldTransformProperty);
                EditorGUILayout.PropertyField(inputNode._uiCache._packBeforeMergeProperty);

                if (HEU_InputNode.GetInternalObjectType(inputObjectType) == HEU_InputNode.InternalObjectType.HDA)
                {
                    SerializedProperty inputAssetsProperty = inputNode._uiCache._inputAssetsProperty;
                    if (inputAssetsProperty != null)
                    {
                        int  inputCount    = inputAssetsProperty.arraySize;
                        bool bSkipElements = false;

                        HEU_EditorUI.DrawSeparator();

                        EditorGUILayout.LabelField(string.Format("{0} input objects", inputCount));

                        using (var hs1 = new EditorGUILayout.HorizontalScope())
                        {
                            if (GUILayout.Button("Add Slot"))
                            {
                                inputAssetsProperty.InsertArrayElementAtIndex(inputCount);
                                bSkipElements = true;
                            }

                            if (GUILayout.Button("Clear"))
                            {
                                inputAssetsProperty.ClearArray();
                                bSkipElements = true;
                            }
                        }

                        DrawSelectionWindow(HEU_InputNode.InputObjectType.HDA, inputNode);

                        if (!bSkipElements)
                        {
                            using (var vs1 = new EditorGUILayout.VerticalScope())
                            {
                                for (int i = 0; i < inputCount; ++i)
                                {
                                    using (var hs2 = new EditorGUILayout.HorizontalScope())
                                    {
                                        EditorGUILayout.LabelField("Input " + (i + 1));

                                        if (GUILayout.Button("+", GUILayout.Width(plusButtonWidth)))
                                        {
                                            inputAssetsProperty.InsertArrayElementAtIndex(i);
                                            break;
                                        }

                                        if (GUILayout.Button("-", GUILayout.Width(plusButtonWidth)))
                                        {
                                            inputAssetsProperty.DeleteArrayElementAtIndex(i);
                                            break;
                                        }
                                    }

                                    EditorGUI.indentLevel++;
                                    using (var vs4 = new EditorGUILayout.VerticalScope())
                                    {
                                        if (i < inputNode._uiCache._inputAssetCache.Count)
                                        {
                                            HEU_InputNodeUICache.HEU_InputAssetUICache assetCache = inputNode._uiCache._inputAssetCache[i];

                                            UnityEngine.Object setObject = EditorGUILayout.ObjectField(assetCache._gameObjectProperty.objectReferenceValue, typeof(HEU_HoudiniAssetRoot), true);
                                            if (setObject != assetCache._gameObjectProperty.objectReferenceValue)
                                            {
                                                GameObject inputGO = setObject != null ? (setObject as HEU_HoudiniAssetRoot).gameObject : null;
                                                // Check not setting same asset as self
                                                if (inputGO == null || inputGO != inputNode.ParentAsset.RootGameObject)
                                                {
                                                    assetCache._gameObjectProperty.objectReferenceValue = inputGO;
                                                }
                                            }
                                        }
                                    }
                                    EditorGUI.indentLevel--;
                                }
                            }
                        }
                    }
                }
                else if (HEU_InputNode.GetInternalObjectType(inputObjectType) == HEU_InputNode.InternalObjectType.UNITY_MESH)
                {
                    SerializedProperty inputObjectsProperty = inputNode._uiCache._inputObjectsProperty;
                    if (inputObjectsProperty != null)
                    {
                        bool bSkipElements = false;

                        HEU_EditorUI.DrawSeparator();

                        EditorGUILayout.LabelField(string.Format("{0} input objects", inputObjectsProperty.arraySize));

                        using (var hs1 = new EditorGUILayout.HorizontalScope())
                        {
                            if (GUILayout.Button("Add Slot"))
                            {
                                inputObjectsProperty.arraySize++;
                                FixUpScaleProperty(inputObjectsProperty, inputObjectsProperty.arraySize - 1);
                                bSkipElements = true;
                            }

                            if (GUILayout.Button("Clear"))
                            {
                                inputObjectsProperty.ClearArray();
                                bSkipElements = true;
                            }
                        }

                        DrawSelectionWindow(inputObjectType, inputNode);

                        if (inputObjectType == HEU_InputNode.InputObjectType.UNITY_MESH && inputNode.MeshSettings != null)
                        {
                            HEU_EditorUI.DrawHeadingLabel("Mesh settings");
                            EditorGUI.indentLevel++;
                            {
                                UnityEditor.SerializedProperty exportCollidersProperty = inputNode._uiCache._meshSettingsProperty.FindPropertyRelative("_exportColliders");

                                exportCollidersProperty.boolValue = HEU_EditorUI.DrawToggleLeft(exportCollidersProperty.boolValue, _meshExportCollidersContent.text, _meshExportCollidersContent.tooltip);
                            }
                            EditorGUI.indentLevel--;
                        }
                        else if (inputObjectType == HEU_InputNode.InputObjectType.TILEMAP && inputNode.TilemapSettings != null)
                        {
                            HEU_EditorUI.DrawHeadingLabel("Tilemap settings");
                            EditorGUI.indentLevel++;
                            {
                                UnityEditor.SerializedProperty createGroupsForTilesProperty    = inputNode._uiCache._tilemapSettingsProperty.FindPropertyRelative("_createGroupsForTiles");
                                UnityEditor.SerializedProperty exportUnusedTilesProperty       = inputNode._uiCache._tilemapSettingsProperty.FindPropertyRelative("_exportUnusedTiles");
                                UnityEditor.SerializedProperty applyTileColorProperty          = inputNode._uiCache._tilemapSettingsProperty.FindPropertyRelative("_applyTileColor");
                                UnityEditor.SerializedProperty applyTilemapOrientationProperty = inputNode._uiCache._tilemapSettingsProperty.FindPropertyRelative("_applyTilemapOrientation");

                                createGroupsForTilesProperty.boolValue    = HEU_EditorUI.DrawToggleLeft(createGroupsForTilesProperty.boolValue, _tilemapCreateGroupsContent.text, _tilemapCreateGroupsContent.tooltip);
                                exportUnusedTilesProperty.boolValue       = HEU_EditorUI.DrawToggleLeft(exportUnusedTilesProperty.boolValue, _tilemapExportUnusedTilesContent.text, _tilemapExportUnusedTilesContent.tooltip);
                                applyTileColorProperty.boolValue          = HEU_EditorUI.DrawToggleLeft(applyTileColorProperty.boolValue, _tilemapColorContent.text, _tilemapColorContent.tooltip);
                                applyTilemapOrientationProperty.boolValue = HEU_EditorUI.DrawToggleLeft(applyTilemapOrientationProperty.boolValue, _tilemapOrientationContent.text, _tilemapOrientationContent.tooltip);
                            }
                            EditorGUI.indentLevel--;
                        }

                        if (!bSkipElements)
                        {
                            using (var vs1 = new EditorGUILayout.VerticalScope())
                            {
                                int inputCount = inputObjectsProperty.arraySize;
                                for (int i = 0; i < inputCount; ++i)
                                {
                                    using (var hs2 = new EditorGUILayout.HorizontalScope())
                                    {
                                        EditorGUILayout.LabelField("Input " + (i + 1));

                                        {
                                            if (GUILayout.Button("+", GUILayout.Width(plusButtonWidth)))
                                            {
                                                inputObjectsProperty.InsertArrayElementAtIndex(i);
                                                FixUpScaleProperty(inputObjectsProperty, i);
                                                break;
                                            }

                                            if (GUILayout.Button("-", GUILayout.Width(plusButtonWidth)))
                                            {
                                                inputObjectsProperty.DeleteArrayElementAtIndex(i);
                                                break;
                                            }
                                        }
                                    }

                                    EditorGUI.indentLevel++;
                                    using (var vs4 = new EditorGUILayout.VerticalScope())
                                    {
                                        if (i < inputNode._uiCache._inputObjectCache.Count && i < inputNode.InputObjects.Count)
                                        {
                                            HEU_InputNodeUICache.HEU_InputObjectUICache objectCache = inputNode._uiCache._inputObjectCache[i];
                                            GameObject oldObject = inputNode.InputObjects[i]._gameObject;

                                            GameObject newObject = null;


                                            switch (inputObjectType)
                                            {
                                            case HEU_InputNode.InputObjectType.TERRAIN:
                                                inputNode.InputObjects[i]._terrainReference = EditorGUILayout.ObjectField(inputNode.InputObjects[i]._terrainReference, typeof(Terrain), true) as Terrain;

                                                if (inputNode.InputObjects[i]._terrainReference != null)
                                                {
                                                    newObject = inputNode.InputObjects[i]._terrainReference.gameObject;
                                                }

                                                break;

                                            case HEU_InputNode.InputObjectType.BOUNDING_BOX:
                                                inputNode.InputObjects[i]._boundingVolumeReference = EditorGUILayout.ObjectField(inputNode.InputObjects[i]._boundingVolumeReference, typeof(HEU_BoundingVolume), true) as HEU_BoundingVolume;

                                                if (inputNode.InputObjects[i]._boundingVolumeReference != null)
                                                {
                                                    newObject = inputNode.InputObjects[i]._boundingVolumeReference.gameObject;
                                                }

                                                break;

                                            case HEU_InputNode.InputObjectType.TILEMAP:
                                                inputNode.InputObjects[i]._tilemapReference = EditorGUILayout.ObjectField(inputNode.InputObjects[i]._tilemapReference, typeof(Tilemap), true) as Tilemap;

                                                if (inputNode.InputObjects[i]._tilemapReference != null)
                                                {
                                                    newObject = inputNode.InputObjects[i]._tilemapReference.gameObject;
                                                }

                                                break;

                                            default:
                                                newObject = EditorGUILayout.ObjectField(inputNode.InputObjects[i]._gameObject, typeof(GameObject), true) as GameObject;
                                                break;
                                            }


                                            if (oldObject != newObject)
                                            {
                                                Undo.RecordObject(inputNode, "GameObject Assign");
                                                inputNode.InputObjects[i]._gameObject = newObject;
                                                // Set the reference to avoid strange bugs when switching input type modes
                                                inputNode.InputObjects[i].SetReferencesFromGameObject();
                                                EditorUtility.SetDirty(inputNode);
                                            }

                                            using (new EditorGUI.DisabledScope(!inputNode._uiCache._keepWorldTransformProperty.boolValue))
                                            {
                                                objectCache._transformOffsetProperty.boolValue = HEU_EditorUI.DrawToggleLeft(objectCache._transformOffsetProperty.boolValue, "Transform Offset");
                                                if (objectCache._transformOffsetProperty.boolValue)
                                                {
                                                    objectCache._translateProperty.vector3Value = EditorGUILayout.Vector3Field(translateLabel, objectCache._translateProperty.vector3Value);
                                                    objectCache._rotateProperty.vector3Value    = EditorGUILayout.Vector3Field(rotateLabel, objectCache._rotateProperty.vector3Value);
                                                    objectCache._scaleProperty.vector3Value     = EditorGUILayout.Vector3Field(scaleLabel, objectCache._scaleProperty.vector3Value);
                                                }
                                            }
                                        }
                                    }
                                    EditorGUI.indentLevel--;
                                }
                            }
                        }
                    }
                }
            }

            EditorGUI.indentLevel--;

            EditorGUILayout.EndVertical();

            if (EditorGUI.EndChangeCheck())
            {
                inputNode._uiCache._inputNodeSerializedObject.ApplyModifiedProperties();

                // When cooking, this will force input data to be uploaded
                inputNode.RequiresUpload = true;
                inputNode.ClearUICache();
            }
        }
Ejemplo n.º 8
0
		private bool DrawDetailsGeometry()
		{
			bool bChanged = false;

			EditorGUIUtility.labelWidth = 250;

			{
				bool oldValue = HEU_PluginSettings.Curves_ShowInSceneView;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Show Curves in Scene View");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.Curves_ShowInSceneView = newValue;
					HEU_HoudiniAsset.SetCurvesVisibilityInScene(newValue);
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				float oldValue = HEU_PluginSettings.NormalGenerationThresholdAngle;
				float newValue = EditorGUILayout.DelayedFloatField("Normal Generation Threshold Angle", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.NormalGenerationThresholdAngle = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultTerrainMaterial;
				if (_terrainMaterial == null && !string.IsNullOrEmpty(oldValue))
				{
					//Debug.Log("Loading terrain material at: " + oldValue);
					_terrainMaterial = HEU_MaterialFactory.LoadUnityMaterial(oldValue);
				}

				Material newMaterial = EditorGUILayout.ObjectField("Default Terrain Material", _terrainMaterial, typeof(Material), false) as Material;
				if (newMaterial != _terrainMaterial)
				{
					HEU_PluginSettings.DefaultTerrainMaterial = (newMaterial != null) ? HEU_AssetDatabase.GetAssetPathWithSubAssetSupport(newMaterial) : "";
					_terrainMaterial = newMaterial;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.TerrainSplatTextureDefault;
				string newValue = EditorGUILayout.DelayedTextField("Default Terrain Splat Texture", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.TerrainSplatTextureDefault = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultStandardShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Standard Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultStandardShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultTransparentShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Transparent Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultTransparentShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultVertexColorShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Vertex Color Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultVertexColorShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultCurveShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Curve Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultCurveShader = newValue;
					bChanged = true;
				}
			}

			HEU_EditorUI.DrawSeparator();

			EditorGUIUtility.labelWidth = 0;

			return bChanged;
		}
Ejemplo n.º 9
0
		private bool DrawDetailsGeneral()
		{
			bool bChanged = false;
			{
				float oldValue = HEU_PluginSettings.PinSize;
				float newValue = EditorGUILayout.DelayedFloatField("Pin Size", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PinSize = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				Color oldValue = HEU_PluginSettings.PinColor;
				Color newValue = EditorGUILayout.ColorField("Pin Color", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PinColor = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				float oldValue = HEU_PluginSettings.ImageGamma;
				float newValue = EditorGUILayout.DelayedFloatField("Texture Gamma", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.ImageGamma = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				Color oldValue = HEU_PluginSettings.LineColor;
				Color newValue = EditorGUILayout.ColorField("Line Color", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.LineColor = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.AssetCachePath;
				string newPath = EditorGUILayout.TextField("Houdini Asset Cache Path", oldPath);
				if (!newPath.Equals(oldPath))
				{
					HEU_PluginSettings.AssetCachePath = newPath;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.UseFullPathNamesForOutput;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Use Full Path Names For Output");
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.UseFullPathNamesForOutput = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.SetCurrentThreadToInvariantCulture;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Set Current Thread To Invariant Culture", "Enabling this sets to use InvariantCutulre which fixes locale-specific parsing issues such as using comma instead of dot for decimals.");
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.SetCurrentThreadToInvariantCulture = newValue;
					bChanged = true;
				}
			}

			return bChanged;
		}
        /// <summary>
        /// Draw the UI for the given input node
        /// </summary>
        /// <param name="inputNode"></param>
        public static void EditorDrawInputNode(HEU_InputNode inputNode)
        {
            int plusButtonWidth = 20;

            //GUIStyle boldLabelStyle = new GUIStyle(EditorStyles.boldLabel);
            //boldLabelStyle.alignment = TextAnchor.UpperLeft;

            GUIContent inputTypeLabel = new GUIContent("Input Type");

            GUIContent translateLabel = new GUIContent("    Translate");
            GUIContent rotateLabel    = new GUIContent("    Rotate");
            GUIContent scaleLabel     = new GUIContent("    Scale");

            PopulateCache(inputNode);

            EditorGUI.BeginChangeCheck();

            EditorGUILayout.BeginVertical(EditorStyles.helpBox);

            string labelName = inputNode.LabelName;

            if (!string.IsNullOrEmpty(labelName))
            {
                EditorGUILayout.LabelField(labelName);
            }

            EditorGUI.indentLevel++;

            HEU_InputNode.InputObjectType inputObjectType             = (HEU_InputNode.InputObjectType)inputNode._uiCache._inputObjectTypeProperty.intValue;
            HEU_InputNode.InputObjectType userSelectedInputObjectType = (HEU_InputNode.InputObjectType)EditorGUILayout.EnumPopup(inputTypeLabel, inputObjectType);
            if (userSelectedInputObjectType != inputObjectType)
            {
                SerializedProperty pendingInputObjectTypeProperty = HEU_EditorUtility.GetSerializedProperty(inputNode._uiCache._inputNodeSerializedObject, "_pendingInputObjectType");
                if (pendingInputObjectTypeProperty != null)
                {
                    pendingInputObjectTypeProperty.intValue = (int)userSelectedInputObjectType;
                }
            }
            else
            {
                EditorGUILayout.PropertyField(inputNode._uiCache._keepWorldTransformProperty);
                EditorGUILayout.PropertyField(inputNode._uiCache._packBeforeMergeProperty);

                if (inputObjectType == HEU_InputNode.InputObjectType.HDA)
                {
                    SerializedProperty inputAssetsProperty = inputNode._uiCache._inputAssetsProperty;
                    if (inputAssetsProperty != null)
                    {
                        int  inputCount    = inputAssetsProperty.arraySize;
                        bool bSkipElements = false;

                        HEU_EditorUI.DrawSeparator();

                        EditorGUILayout.LabelField(string.Format("{0} input objects", inputCount));

                        using (var hs1 = new EditorGUILayout.HorizontalScope())
                        {
                            if (GUILayout.Button("Add Slot"))
                            {
                                inputAssetsProperty.InsertArrayElementAtIndex(inputCount);

                                bSkipElements = true;
                            }

                            if (GUILayout.Button("Add Selection"))
                            {
                                HEU_SelectionWindow.ShowWindow(inputNode.HandleSelectedObjectsForInputHDAs, typeof(HEU_HoudiniAssetRoot));
                            }

                            if (GUILayout.Button("Clear"))
                            {
                                inputAssetsProperty.ClearArray();
                                bSkipElements = true;
                            }
                        }

                        if (!bSkipElements)
                        {
                            using (var vs1 = new EditorGUILayout.VerticalScope())
                            {
                                for (int i = 0; i < inputCount; ++i)
                                {
                                    using (var hs2 = new EditorGUILayout.HorizontalScope())
                                    {
                                        EditorGUILayout.LabelField("Input " + (i + 1));

                                        if (GUILayout.Button("+", GUILayout.Width(plusButtonWidth)))
                                        {
                                            inputAssetsProperty.InsertArrayElementAtIndex(i);
                                            break;
                                        }

                                        if (GUILayout.Button("-", GUILayout.Width(plusButtonWidth)))
                                        {
                                            inputAssetsProperty.DeleteArrayElementAtIndex(i);
                                            break;
                                        }
                                    }

                                    EditorGUI.indentLevel++;
                                    using (var vs4 = new EditorGUILayout.VerticalScope())
                                    {
                                        HEU_InputNodeUICache.HEU_InputAssetUICache assetCache = inputNode._uiCache._inputAssetCache[i];

                                        UnityEngine.Object setObject = EditorGUILayout.ObjectField(assetCache._gameObjectProperty.objectReferenceValue, typeof(HEU_HoudiniAssetRoot), true);
                                        if (setObject != assetCache._gameObjectProperty.objectReferenceValue)
                                        {
                                            GameObject inputGO = setObject != null ? (setObject as HEU_HoudiniAssetRoot).gameObject : null;
                                            // Check not setting same asset as self
                                            if (inputGO == null || inputGO != inputNode.ParentAsset.RootGameObject)
                                            {
                                                assetCache._gameObjectProperty.objectReferenceValue = inputGO;
                                            }
                                        }
                                    }
                                    EditorGUI.indentLevel--;
                                }
                            }
                        }
                    }
                }
                //else if (inputObjectType == HEU_InputNode.InputObjectType.CURVE)
                //{
                //	TODO INPUT CURVE
                //}
                else if (inputObjectType == HEU_InputNode.InputObjectType.UNITY_MESH)
                {
                    SerializedProperty inputObjectsProperty = inputNode._uiCache._inputObjectsProperty;
                    if (inputObjectsProperty != null)
                    {
                        bool bSkipElements = false;

                        HEU_EditorUI.DrawSeparator();

                        EditorGUILayout.LabelField(string.Format("{0} input objects", inputObjectsProperty.arraySize));

                        using (var hs1 = new EditorGUILayout.HorizontalScope())
                        {
                            if (GUILayout.Button("Add Slot"))
                            {
                                inputObjectsProperty.arraySize++;
                                FixUpScaleProperty(inputObjectsProperty, inputObjectsProperty.arraySize - 1);

                                bSkipElements = true;
                            }

                            if (GUILayout.Button("Add Selection"))
                            {
                                HEU_SelectionWindow.ShowWindow(inputNode.HandleSelectedObjectsForInputObjects, typeof(GameObject));
                            }

                            if (GUILayout.Button("Clear"))
                            {
                                inputObjectsProperty.ClearArray();
                                bSkipElements = true;
                            }
                        }

                        if (!bSkipElements)
                        {
                            using (var vs1 = new EditorGUILayout.VerticalScope())
                            {
                                int inputCount = inputObjectsProperty.arraySize;
                                for (int i = 0; i < inputCount; ++i)
                                {
                                    using (var hs2 = new EditorGUILayout.HorizontalScope())
                                    {
                                        EditorGUILayout.LabelField("Input " + (i + 1));

                                        //using (var vs3 = new EditorGUILayout.VerticalScope())
                                        {
                                            if (GUILayout.Button("+", GUILayout.Width(plusButtonWidth)))
                                            {
                                                inputObjectsProperty.InsertArrayElementAtIndex(i);
                                                FixUpScaleProperty(inputObjectsProperty, i);
                                                break;
                                            }

                                            if (GUILayout.Button("-", GUILayout.Width(plusButtonWidth)))
                                            {
                                                inputObjectsProperty.DeleteArrayElementAtIndex(i);
                                                break;
                                            }
                                        }
                                    }

                                    EditorGUI.indentLevel++;
                                    using (var vs4 = new EditorGUILayout.VerticalScope())
                                    {
                                        HEU_InputNodeUICache.HEU_InputObjectUICache objectCache = inputNode._uiCache._inputObjectCache[i];

                                        EditorGUILayout.PropertyField(objectCache._gameObjectProperty, GUIContent.none);

                                        using (new EditorGUI.DisabledScope(!inputNode._uiCache._keepWorldTransformProperty.boolValue))
                                        {
                                            objectCache._transformOffsetProperty.boolValue = HEU_EditorUI.DrawToggleLeft(objectCache._transformOffsetProperty.boolValue, "Transform Offset");
                                            if (objectCache._transformOffsetProperty.boolValue)
                                            {
                                                objectCache._translateProperty.vector3Value = EditorGUILayout.Vector3Field(translateLabel, objectCache._translateProperty.vector3Value);
                                                objectCache._rotateProperty.vector3Value    = EditorGUILayout.Vector3Field(rotateLabel, objectCache._rotateProperty.vector3Value);
                                                objectCache._scaleProperty.vector3Value     = EditorGUILayout.Vector3Field(scaleLabel, objectCache._scaleProperty.vector3Value);
                                            }
                                        }
                                    }
                                    EditorGUI.indentLevel--;
                                }
                            }
                        }
                    }
                }
            }

            EditorGUI.indentLevel--;

            EditorGUILayout.EndVertical();

            if (EditorGUI.EndChangeCheck())
            {
                inputNode._uiCache._inputNodeSerializedObject.ApplyModifiedProperties();

                // When cooking, this will force input data to be uploaded
                inputNode.RequiresUpload = true;
            }
        }
Ejemplo n.º 11
0
		private bool DrawDetailsGeometry()
		{
			bool bChanged = false;

			EditorGUIUtility.labelWidth = 250;

			{
				bool oldValue = HEU_PluginSettings.Curves_ShowInSceneView;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Show Curves in Scene View");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.Curves_ShowInSceneView = newValue;
					HEU_HoudiniAsset.SetCurvesVisibilityInScene(newValue);
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				float oldValue = HEU_PluginSettings.NormalGenerationThresholdAngle;
				float newValue = EditorGUILayout.DelayedFloatField("Normal Generation Threshold Angle", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.NormalGenerationThresholdAngle = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.TerrainSplatTextureDefault;
				string newValue = EditorGUILayout.DelayedTextField("Terrain Default Splat Texture", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.TerrainSplatTextureDefault = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultStandardShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Standard Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultStandardShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultTransparentShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Transparent Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultTransparentShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultVertexColorShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Vertex Color Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultVertexColorShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultCurveShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Curve Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultCurveShader = newValue;
					bChanged = true;
				}
			}

			HEU_EditorUI.DrawSeparator();

			EditorGUIUtility.labelWidth = 0;

			return bChanged;
		}
Ejemplo n.º 12
0
		private bool DrawDetailsGeneral()
		{
			bool bChanged = false;
			{
				float oldValue = HEU_PluginSettings.PinSize;
				float newValue = EditorGUILayout.DelayedFloatField("Pin Size", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PinSize = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				Color oldValue = HEU_PluginSettings.PinColor;
				Color newValue = EditorGUILayout.ColorField("Pin Color", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PinColor = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				float oldValue = HEU_PluginSettings.ImageGamma;
				float newValue = EditorGUILayout.DelayedFloatField("Texture Gamma", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.ImageGamma = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				Color oldValue = HEU_PluginSettings.LineColor;
				Color newValue = EditorGUILayout.ColorField("Line Color", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.LineColor = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.HoudiniEngineEnvFilePath;
				string fileExt = "env";

				using (new EditorGUILayout.HorizontalScope())
				{
					string newPath = EditorGUILayout.DelayedTextField(new GUIContent("Houdini Env File"), oldPath);

					GUIStyle buttonStyle = HEU_EditorUI.GetNewButtonStyle_MarginPadding(0, 0);
					if (GUILayout.Button("...", buttonStyle, GUILayout.Width(30), GUILayout.Height(18)))
					{
						string openFilePath = UnityEditor.EditorUtility.OpenFilePanel("Select Houdini Env file", newPath, fileExt);
						if(!string.IsNullOrEmpty(openFilePath))
						{
							newPath = openFilePath;
						}
					}

					if (!newPath.Equals(oldPath))
					{
						HEU_PluginSettings.HoudiniEngineEnvFilePath = newPath;
						bChanged = true;
					}

				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.AssetCachePath;
				string newPath = EditorGUILayout.TextField("Houdini Asset Cache Path", oldPath);
				if (!newPath.Equals(oldPath))
				{
					HEU_PluginSettings.AssetCachePath = newPath;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.UseFullPathNamesForOutput;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Use Full Path Names For Output");
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.UseFullPathNamesForOutput = newValue;
					bChanged = true;
				}
			}

			return bChanged;
		}
Ejemplo n.º 13
0
	private bool DrawDetailsCooking()
	{
	    bool bChanged = false;

	    {
		bool oldValue = HEU_PluginSettings.CookingEnabled;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue,
		    "Enable Cooking",
		    "If disabled, all cooking will stop.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookingEnabled = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.CookingTriggersDownstreamCooks;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, 
		    "Cooking Triggers Downstream Cooks",
		    "If enabled, modifying a parent HDA will also trigger cooks to other HDAs linked downstrema.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookingTriggersDownstreamCooks = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.CookDisabledGameObjects;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, 
		    "Cook Disabled GameObjects",
		    "If enabled, disabled GameObjects will not be cooked, as if the Enable Cooking option were set to true.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookDisabledGameObjects = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.PushUnityTransformToHoudini;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, 
		    "Push Unity Transform To Houdini",
		    "If enabled, pushes the Unity Transform value to Houdini. This is useful if you want to do something like Houdini SessionSync.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.PushUnityTransformToHoudini = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.TransformChangeTriggersCooks;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, 
		    "Transform Change Triggers Cooks",
		    "When activated, changing the transform of the HEU_HoudiniAsset object or an input node will trigger a cook.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.TransformChangeTriggersCooks = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    using (new EditorGUI.DisabledScope(!HEU_PluginSettings.TransformChangeTriggersCooks))
	    {
		bool oldValue = HEU_PluginSettings.ChildTransformChangeTriggersCooks;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, 
		    "Child Transform Change Triggers Cooks", 
		    "When activated, transform changes on children will also trigger cooks. Only valid if TransformChangeTriggersCook is enabled.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.ChildTransformChangeTriggersCooks = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.CookTemplatedGeos;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Import Templated Geos");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookTemplatedGeos = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.SupportHoudiniBoxType;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Support Houdini Box Type");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.SupportHoudiniBoxType = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.SupportHoudiniSphereType;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Support Houdini Sphere Type");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.SupportHoudiniSphereType = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.CookOptionSplitGeosByGroup;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Split Geos By Group");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookOptionSplitGeosByGroup = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.WriteCookLogs;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue,
		    "Write Cook Logs",
		    "If enabled, writes cook logs to the cook logs window. Useful for diagnosing issues, but may decrease performance");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.WriteCookLogs = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.UseHDRColor;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue,
		    "Use HDR Color",
		    "If enabled, uses HDR Color. Otherwise, uses the regular color picker.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.UseHDRColor = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.UseLegacyInputCurves;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, 
		    "Use Legacy Input Curves",
		    "Uses the old curve::1.0 node instead of HAPI curves.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.UseLegacyInputCurves = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.CookOnMouseUp;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, 
		    "Cook on Mouse Up",
		    "Certain parameters (e.g. Sliders, gradients, or animation curves) will cook excessively if we cook immedately. If on, will only cook on mouse up, improving UX.");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookOnMouseUp = newValue;
		    bChanged = true;
		}
	    }

	    // Setting for unit tests only
	    //HEU_EditorUI.DrawSeparator();
	    //{
	//	bool oldValue = HEU_PluginSettings.ShortenFolderPaths;
	//	bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Use Shorten paths");
	//	if (newValue != oldValue)
	//	{
	//	    HEU_PluginSettings.ShortenFolderPaths = newValue;
	//	    bChanged = true;
	//	}
	    //}

	    return bChanged;
	}
Ejemplo n.º 14
0
		private bool DrawDetailsGeometry()
		{
			bool bChanged = false;

			EditorGUIUtility.labelWidth = 250;

			{
				bool oldValue = HEU_PluginSettings.Curves_ShowInSceneView;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Show Curves in Scene View");
				if (newValue != oldValue)
				{
					HEU_PluginSettings.Curves_ShowInSceneView = newValue;
					HEU_HoudiniAsset.SetCurvesVisibilityInScene(newValue);
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				int oldValue = HEU_PluginSettings.MaxVerticesPerPrimitive;
				int newValue = EditorGUILayout.DelayedIntField("Max Vertices Per Primitive", oldValue);
				if (newValue != oldValue)
				{
					if (newValue == 3 || newValue == 4)
					{
						HEU_PluginSettings.MaxVerticesPerPrimitive = newValue;
						bChanged = true;
					}
					else
					{
						Debug.LogWarningFormat("Plugin only supports 3 (triangles) or 4 (quads) max vertices values.");
					}
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				float oldValue = HEU_PluginSettings.NormalGenerationThresholdAngle;
				float newValue = EditorGUILayout.DelayedFloatField("Normal Generation Threshold Angle", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.NormalGenerationThresholdAngle = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultTerrainMaterial;
				if (_terrainMaterial == null && !string.IsNullOrEmpty(oldValue))
				{
					//Debug.Log("Loading terrain material at: " + oldValue);
					_terrainMaterial = HEU_MaterialFactory.LoadUnityMaterial(oldValue);
				}

				Material newMaterial = EditorGUILayout.ObjectField("Default Terrain Material", _terrainMaterial, typeof(Material), false) as Material;
				if (newMaterial != _terrainMaterial)
				{
					string materialPath = "";
					if (newMaterial != null)
					{
						materialPath = HEU_AssetDatabase.GetAssetPathWithSubAssetSupport(newMaterial);
						if (!string.IsNullOrEmpty(materialPath) && (materialPath.StartsWith(HEU_Defines.DEFAULT_UNITY_BUILTIN_RESOURCES)))
						{
							// Default materials need to be specially handled
							materialPath = HEU_AssetDatabase.GetUniqueAssetPathForUnityAsset(newMaterial);
							newMaterial = HEU_AssetDatabase.LoadUnityAssetFromUniqueAssetPath<Material>(materialPath);
						}
					}

					HEU_PluginSettings.DefaultTerrainMaterial = materialPath;
					_terrainMaterial = newMaterial;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.TerrainSplatTextureDefault;
				string newValue = EditorGUILayout.DelayedTextField("Default Terrain Splat Texture", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.TerrainSplatTextureDefault = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultStandardShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Standard Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultStandardShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultTransparentShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Transparent Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultTransparentShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultVertexColorShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Vertex Color Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultVertexColorShader = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldValue = HEU_PluginSettings.DefaultCurveShader;
				string newValue = EditorGUILayout.DelayedTextField("Default Curve Shader", oldValue);
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.DefaultCurveShader = newValue;
					bChanged = true;
				}
			}

			HEU_EditorUI.DrawSeparator();

			EditorGUIUtility.labelWidth = 0;

			return bChanged;
		}
Ejemplo n.º 15
0
		private bool DrawDetailsGeneral()
		{
			bool bChanged = false;
			{
				float oldValue = HEU_PluginSettings.PinSize;
				float newValue = EditorGUILayout.DelayedFloatField("Pin Size", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PinSize = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				Color oldValue = HEU_PluginSettings.PinColor;
				Color newValue = EditorGUILayout.ColorField("Pin Color", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.PinColor = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				float oldValue = HEU_PluginSettings.ImageGamma;
				float newValue = EditorGUILayout.DelayedFloatField("Texture Gamma", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.ImageGamma = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				Color oldValue = HEU_PluginSettings.LineColor;
				Color newValue = EditorGUILayout.ColorField("Line Color", oldValue);
				if (newValue != oldValue)
				{
					HEU_PluginSettings.LineColor = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.AssetCachePath;
				string newPath = EditorGUILayout.TextField("Houdini Asset Cache Path", oldPath);
				if (!newPath.Equals(oldPath))
				{
					HEU_PluginSettings.AssetCachePath = newPath;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.UseFullPathNamesForOutput;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Use Full Path Names For Output");
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.UseFullPathNamesForOutput = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				bool oldValue = HEU_PluginSettings.SetCurrentThreadToInvariantCulture;
				bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Set Current Thread To Invariant Culture", "Enabling this sets to use InvariantCutulre which fixes locale-specific parsing issues such as using comma instead of dot for decimals.");
				if (!newValue.Equals(oldValue))
				{
					HEU_PluginSettings.SetCurrentThreadToInvariantCulture = newValue;
					bChanged = true;
				}
			}
			HEU_EditorUI.DrawSeparator();
			{
				string oldPath = HEU_PluginSettings.HoudiniDebugLaunchPath;
				string fileExt = "";

				EditorGUILayout.LabelField(new GUIContent("Houdini Debug Executable:", "Set Houdini executable to launch when opening debug scenes."));
				using (new EditorGUILayout.HorizontalScope())
				{
					string newPath = EditorGUILayout.DelayedTextField(oldPath);

					GUIStyle buttonStyle = HEU_EditorUI.GetNewButtonStyle_MarginPadding(0, 0);
					if (GUILayout.Button("...", buttonStyle, GUILayout.Width(30), GUILayout.Height(18)))
					{
						string panelMsg = "Select Houdini Executable";
#if UNITY_EDITOR_OSX
						panelMsg += " (.app)";
#endif

						string openFilePath = UnityEditor.EditorUtility.OpenFilePanel(panelMsg, newPath, fileExt);
						if (!string.IsNullOrEmpty(openFilePath))
						{
							newPath = openFilePath;
						}
					}

					if (!newPath.Equals(oldPath))
					{
						HEU_PluginSettings.HoudiniDebugLaunchPath = newPath;
						bChanged = true;
					}
				}
#if UNITY_EDITOR_OSX
				GUIStyle labelStyle = new GUIStyle(GUI.skin.label);
				labelStyle.wordWrap = true;
				EditorGUILayout.LabelField("  On macOS, you'll need to select the path to the .app folder.\n  E.g. /Applications/Houdini/Houdini16.5.616/Houdini Core 16.5.616.app", labelStyle);
#endif
			}

			return bChanged;
		}
Ejemplo n.º 16
0
        /// <summary>
        /// Unity callback to draw this UI.
        /// </summary>
        void OnGUI()
        {
            SetupUI();

            HEU_SessionSyncData syncData = GetSessionSyncData();

            EditorGUI.BeginChangeCheck();

            bool bSessionStarted  = (syncData != null && syncData.SyncStatus != HEU_SessionSyncData.Status.Stopped);
            bool bSessionCanStart = !bSessionStarted;

            if (bSessionCanStart)
            {
                // Only able to start a session if no session exists.
                HEU_SessionBase session = HEU_SessionManager.GetDefaultSession();
                if (session != null && session.IsSessionValid())
                {
                    bSessionCanStart = false;
                }
            }

            HEU_HoudiniAssetUI.DrawHeaderSection();

            // Draw SessionSync status.
            if (syncData != null)
            {
                if (syncData.SyncStatus == HEU_SessionSyncData.Status.Stopped)
                {
                    if (!bSessionCanStart)
                    {
                        EditorGUILayout.LabelField("Another session already running. Disconnect it to start SessionSync.");
                    }
                    else
                    {
                        EditorGUILayout.LabelField("Status: " + syncData.SyncStatus);
                    }
                }
                else
                {
                    EditorGUILayout.LabelField("Status: " + syncData.SyncStatus);
                }
            }
            else
            {
                if (!bSessionCanStart)
                {
                    EditorGUILayout.LabelField("Another session already running. Disconnect it to start SessionSync.");
                }
                else
                {
                    EditorGUILayout.LabelField("No active session.");
                }
            }

            EditorGUILayout.Separator();

            EditorGUI.indentLevel++;

            // Draw initial connection buttons (Start, Connect)
            using (new EditorGUILayout.HorizontalScope())
            {
                using (new EditorGUI.DisabledScope(bSessionStarted || !bSessionCanStart))
                {
                    if (GUILayout.Button("Start Houdini"))
                    {
                        StartAndConnectToHoudini(syncData);
                    }
                    else if (GUILayout.Button("Connect to Houdini"))
                    {
                        ConnectSessionSync(syncData);
                    }
                }
            }

            using (new EditorGUI.DisabledScope((syncData == null || !bSessionStarted) && bSessionCanStart))
            {
                if (GUILayout.Button("Disconnect"))
                {
                    Disconnect(syncData);
                }
            }

            EditorGUILayout.Separator();

            // Draw Connection Settings
            EditorGUILayout.LabelField("Connection Settings");

            using (new EditorGUI.DisabledScope(bSessionStarted))
            {
                SessionMode newSessionMode = (SessionMode)EditorGUILayout.EnumPopup("Type", _sessionMode);
                if (_sessionMode != newSessionMode)
                {
                    _sessionMode = newSessionMode;
                    HEU_PluginSettings.Session_Mode = newSessionMode;
                }

                EditorGUI.indentLevel++;
                if (_sessionMode == SessionMode.Pipe)
                {
                    string newPipeName = EditorGUILayout.DelayedTextField("Pipe Name", _pipeName);
                    if (_pipeName != newPipeName)
                    {
                        HEU_PluginSettings.Session_PipeName = newPipeName;
                        _pipeName = newPipeName;
                    }
                }
                else if (_sessionMode == SessionMode.Socket)
                {
                    int newPort = EditorGUILayout.DelayedIntField("Port", _port);
                    HEU_PluginSettings.Session_Port = newPort;
                    if (_port != newPort)
                    {
                        HEU_PluginSettings.Session_Port = newPort;
                        _port = newPort;
                    }
                }
                EditorGUI.indentLevel--;
            }

            EditorGUILayout.Separator();

            // The rest requires syncData

            // Synchronization settings, and new nodes
            if (syncData != null)
            {
                using (new EditorGUI.DisabledScope(syncData.SyncStatus != HEU_SessionSyncData.Status.Connected))
                {
                    EditorGUILayout.LabelField("Synchronization Settings");

                    EditorGUI.indentLevel++;

                    HEU_PluginSettings.SessionSyncAutoCook = HEU_EditorUI.DrawToggleLeft(HEU_PluginSettings.SessionSyncAutoCook, "Sync With Houdini Cook");

                    bool enableHoudiniTime = HEU_EditorUI.DrawToggleLeft(syncData._syncInfo.cookUsingHoudiniTime, "Cook Using Houdini Time");
                    if (syncData._syncInfo.cookUsingHoudiniTime != enableHoudiniTime)
                    {
                        syncData._syncInfo.cookUsingHoudiniTime = enableHoudiniTime;
                        UploadSessionSyncInfo(null, syncData);
                    }

                    bool enableSyncViewport = HEU_EditorUI.DrawToggleLeft(syncData._syncInfo.syncViewport, "Sync Viewport");
                    if (syncData._syncInfo.syncViewport != enableSyncViewport)
                    {
                        syncData._syncInfo.syncViewport = enableSyncViewport;
                        UploadSessionSyncInfo(null, syncData);
                    }

                    EditorGUI.indentLevel--;
                }

                EditorGUILayout.Separator();

                EditorGUILayout.LabelField("New Node");

                using (new EditorGUI.DisabledScope(syncData.SyncStatus != HEU_SessionSyncData.Status.Connected))
                {
                    EditorGUI.indentLevel++;

                    syncData._newNodeName = EditorGUILayout.TextField("Name", syncData._newNodeName);

                    syncData._nodeTypeIndex = EditorGUILayout.Popup("Type", syncData._nodeTypeIndex, _nodeTypesLabels);

                    using (new EditorGUI.DisabledGroupScope(string.IsNullOrEmpty(syncData._newNodeName)))
                    {
                        using (new EditorGUILayout.VerticalScope())
                        {
                            if (GUILayout.Button("Create"))
                            {
                                if (syncData._nodeTypeIndex >= 0 && syncData._nodeTypeIndex < 3)
                                {
                                    HEU_NodeSync.CreateNodeSync(null, _nodeTypes[syncData._nodeTypeIndex],
                                                                syncData._newNodeName);
                                }
                                else if (syncData._nodeTypeIndex == 3)
                                {
                                    CreateCurve(syncData._newNodeName);
                                }
                                else if (syncData._nodeTypeIndex == 4)
                                {
                                    CreateInput(syncData._newNodeName);
                                }
                            }

                            if (GUILayout.Button("Load NodeSync"))
                            {
                                LoadNodeSyncDialog(syncData._newNodeName);
                            }
                        }
                    }

                    EditorGUI.indentLevel--;
                }

                EditorGUILayout.Separator();

                // Log
                using (new EditorGUILayout.VerticalScope(_backgroundStyle))
                {
                    using (new EditorGUILayout.HorizontalScope())
                    {
                        EditorGUILayout.PrefixLabel(_eventMessageContent);

                        if (GUILayout.Button("Clear"))
                        {
                            ClearLog();
                        }
                    }

                    string logMsg = GetLog();

                    using (var scrollViewScope = new EditorGUILayout.ScrollViewScope(_eventMessageScrollPos, GUILayout.Height(120)))
                    {
                        _eventMessageScrollPos = scrollViewScope.scrollPosition;

                        GUILayout.Label(logMsg, _eventMessageStyle);
                    }
                }
            }

            EditorGUI.indentLevel--;

            if (EditorGUI.EndChangeCheck() && syncData != null)
            {
                HEU_SessionBase sessionBase = HEU_SessionManager.GetDefaultSession();
                if (sessionBase != null)
                {
                    HEU_SessionManager.SaveAllSessionData();
                }
            }
        }
Ejemplo n.º 17
0
	private bool DrawDetailsCooking()
	{
	    bool bChanged = false;

	    {
		bool oldValue = HEU_PluginSettings.CookingEnabled;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Enable Cooking");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookingEnabled = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.CookingTriggersDownstreamCooks;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Cooking Triggers Downstream Cooks");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookingTriggersDownstreamCooks = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.PushUnityTransformToHoudini;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Push Unity Transform To Houdini");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.PushUnityTransformToHoudini = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.TransformChangeTriggersCooks;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Transform Change Triggers Cooks");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.TransformChangeTriggersCooks = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.CookTemplatedGeos;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Import Templated Geos");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookTemplatedGeos = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.SupportHoudiniBoxType;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Support Houdini Box Type");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.SupportHoudiniBoxType = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.SupportHoudiniSphereType;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Support Houdini Sphere Type");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.SupportHoudiniSphereType = newValue;
		    bChanged = true;
		}
	    }
	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.CookOptionSplitGeosByGroup;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Split Geos By Group");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.CookOptionSplitGeosByGroup = newValue;
		    bChanged = true;
		}
	    }

	    HEU_EditorUI.DrawSeparator();
	    {
		bool oldValue = HEU_PluginSettings.WriteCookLogs;
		bool newValue = HEU_EditorUI.DrawToggleLeft(oldValue, "Write Cook Logs");
		if (newValue != oldValue)
		{
		    HEU_PluginSettings.WriteCookLogs = newValue;
		    bChanged = true;
		}
	    }

	    return bChanged;
	}