|
@@ -325,7 +325,7 @@ void CreateComponent(const String&in componentType)
|
|
|
/// \todo Allow to specify the createmode
|
|
/// \todo Allow to specify the createmode
|
|
|
for (uint i = 0; i < editNodes.length; ++i)
|
|
for (uint i = 0; i < editNodes.length; ++i)
|
|
|
{
|
|
{
|
|
|
- Component@ newComponent = editNodes[i].CreateComponent(componentType, editNodes[i].id < FIRST_LOCAL_ID ? REPLICATED : LOCAL);
|
|
|
|
|
|
|
+ Component@ newComponent = editNodes[i].CreateComponent(componentType, editNodes[i].replicated ? REPLICATED : LOCAL);
|
|
|
if (newComponent !is null)
|
|
if (newComponent !is null)
|
|
|
{
|
|
{
|
|
|
// Some components such as CollisionShape do not create their internal object before the first call to ApplyAttributes()
|
|
// Some components such as CollisionShape do not create their internal object before the first call to ApplyAttributes()
|
|
@@ -409,11 +409,11 @@ Node@ InstantiateNodeFromFile(File@ file, const Vector3& position, const Quatern
|
|
|
|
|
|
|
|
if (parent !is null)
|
|
if (parent !is null)
|
|
|
newNode.parent = parent;
|
|
newNode.parent = parent;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (newNode !is null)
|
|
if (newNode !is null)
|
|
|
{
|
|
{
|
|
|
newNode.scale = newNode.scale * scaleMod;
|
|
newNode.scale = newNode.scale * scaleMod;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
AdjustNodePositionByAABB(newNode);
|
|
AdjustNodePositionByAABB(newNode);
|
|
|
|
|
|
|
|
// Create an undo action for the load
|
|
// Create an undo action for the load
|
|
@@ -641,7 +641,7 @@ bool SceneCopy()
|
|
|
XMLFile@ xml = XMLFile();
|
|
XMLFile@ xml = XMLFile();
|
|
|
XMLElement rootElem = xml.CreateRoot("component");
|
|
XMLElement rootElem = xml.CreateRoot("component");
|
|
|
selectedComponents[i].SaveXML(rootElem);
|
|
selectedComponents[i].SaveXML(rootElem);
|
|
|
- rootElem.SetBool("local", selectedComponents[i].id >= FIRST_LOCAL_ID);
|
|
|
|
|
|
|
+ rootElem.SetBool("local", !selectedComponents[i].replicated);
|
|
|
sceneCopyBuffer.Push(xml);
|
|
sceneCopyBuffer.Push(xml);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -657,7 +657,7 @@ bool SceneCopy()
|
|
|
XMLFile@ xml = XMLFile();
|
|
XMLFile@ xml = XMLFile();
|
|
|
XMLElement rootElem = xml.CreateRoot("node");
|
|
XMLElement rootElem = xml.CreateRoot("node");
|
|
|
selectedNodes[i].SaveXML(rootElem);
|
|
selectedNodes[i].SaveXML(rootElem);
|
|
|
- rootElem.SetBool("local", selectedNodes[i].id >= FIRST_LOCAL_ID);
|
|
|
|
|
|
|
+ rootElem.SetBool("local", !selectedNodes[i].replicated);
|
|
|
sceneCopyBuffer.Push(xml);
|
|
sceneCopyBuffer.Push(xml);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -794,7 +794,7 @@ bool NodesParentToLastSelected()
|
|
|
{
|
|
{
|
|
|
if (lastSelectedNode.Get() is null)
|
|
if (lastSelectedNode.Get() is null)
|
|
|
return false;
|
|
return false;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (!CheckHierarchyWindowFocus() || !selectedComponents.empty || selectedNodes.empty)
|
|
if (!CheckHierarchyWindowFocus() || !selectedComponents.empty || selectedNodes.empty)
|
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
@@ -805,17 +805,17 @@ bool NodesParentToLastSelected()
|
|
|
|
|
|
|
|
// Parent selected nodes to root
|
|
// Parent selected nodes to root
|
|
|
Array<Node@> changedNodes;
|
|
Array<Node@> changedNodes;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// Find new parent node it selected last
|
|
// Find new parent node it selected last
|
|
|
Node@ lastNode = lastSelectedNode.Get(); //GetListNode(hierarchyList.selection);
|
|
Node@ lastNode = lastSelectedNode.Get(); //GetListNode(hierarchyList.selection);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (uint i = 0; i < selectedNodes.length; ++i)
|
|
for (uint i = 0; i < selectedNodes.length; ++i)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
Node@ sourceNode = selectedNodes[i];
|
|
Node@ sourceNode = selectedNodes[i];
|
|
|
if ( sourceNode.id == lastNode.id)
|
|
if ( sourceNode.id == lastNode.id)
|
|
|
continue; // Skip last node it is parent
|
|
continue; // Skip last node it is parent
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (sourceNode.parent.id == lastNode.id)
|
|
if (sourceNode.parent.id == lastNode.id)
|
|
|
continue; // Root or already parented to root
|
|
continue; // Root or already parented to root
|
|
|
|
|
|
|
@@ -838,20 +838,20 @@ bool NodesParentToLastSelected()
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-bool SceneSmartDuplicateNode()
|
|
|
|
|
-{
|
|
|
|
|
|
|
+bool SceneSmartDuplicateNode()
|
|
|
|
|
+{
|
|
|
const float minOffset = 0.1;
|
|
const float minOffset = 0.1;
|
|
|
-
|
|
|
|
|
- if (!CheckHierarchyWindowFocus() || !selectedComponents.empty
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!CheckHierarchyWindowFocus() || !selectedComponents.empty
|
|
|
|| selectedNodes.empty || lastSelectedNode.Get() is null)
|
|
|| selectedNodes.empty || lastSelectedNode.Get() is null)
|
|
|
return false;
|
|
return false;
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
Node@ node = lastSelectedNode.Get();
|
|
Node@ node = lastSelectedNode.Get();
|
|
|
Node@ parent = node.parent;
|
|
Node@ parent = node.parent;
|
|
|
Vector3 offset = Vector3(1,0,0); // default offset
|
|
Vector3 offset = Vector3(1,0,0); // default offset
|
|
|
-
|
|
|
|
|
- if (parent is editorScene) // if parent of selected node is Scene make empty parent for it and place in same position;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (parent is editorScene) // if parent of selected node is Scene make empty parent for it and place in same position;
|
|
|
{
|
|
{
|
|
|
parent = CreateNode(LOCAL);
|
|
parent = CreateNode(LOCAL);
|
|
|
SceneChangeParent(parent, editorScene, false);
|
|
SceneChangeParent(parent, editorScene, false);
|
|
@@ -861,20 +861,20 @@ bool SceneSmartDuplicateNode()
|
|
|
SceneChangeParent(node, parent, false);
|
|
SceneChangeParent(node, parent, false);
|
|
|
parent = node.parent;
|
|
parent = node.parent;
|
|
|
SelectNode(node, false);
|
|
SelectNode(node, false);
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
Vector3 size;
|
|
Vector3 size;
|
|
|
BoundingBox bb;
|
|
BoundingBox bb;
|
|
|
-
|
|
|
|
|
- // get bb for offset
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // get bb for offset
|
|
|
Drawable@ drawable = GetFirstDrawable(node);
|
|
Drawable@ drawable = GetFirstDrawable(node);
|
|
|
if (drawable !is null)
|
|
if (drawable !is null)
|
|
|
{
|
|
{
|
|
|
bb = drawable.boundingBox;
|
|
bb = drawable.boundingBox;
|
|
|
size = bb.size * drawable.node.worldScale;
|
|
size = bb.size * drawable.node.worldScale;
|
|
|
- offset = Vector3(size.x, 0, 0);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ offset = Vector3(size.x, 0, 0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// make offset on axis that select user by mouse
|
|
// make offset on axis that select user by mouse
|
|
|
if (gizmoAxisX.selected)
|
|
if (gizmoAxisX.selected)
|
|
|
{
|
|
{
|
|
@@ -892,10 +892,10 @@ bool SceneSmartDuplicateNode()
|
|
|
offset = node.worldRotation * Vector3(0,0,size.z);
|
|
offset = node.worldRotation * Vector3(0,0,size.z);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
- offset = lastOffsetForSmartDuplicate;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ offset = lastOffsetForSmartDuplicate;
|
|
|
|
|
+
|
|
|
Vector3 lastInstancePosition = node.worldPosition;
|
|
Vector3 lastInstancePosition = node.worldPosition;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
SelectNode(node, false);
|
|
SelectNode(node, false);
|
|
|
SceneDuplicate();
|
|
SceneDuplicate();
|
|
|
Node@ newInstance = parent.children[parent.numChildren-1];
|
|
Node@ newInstance = parent.children[parent.numChildren-1];
|
|
@@ -903,7 +903,7 @@ bool SceneSmartDuplicateNode()
|
|
|
newInstance.worldPosition = lastInstancePosition;
|
|
newInstance.worldPosition = lastInstancePosition;
|
|
|
newInstance.Translate(offset, TS_WORLD);
|
|
newInstance.Translate(offset, TS_WORLD);
|
|
|
newInstance.name = parent.name + "Instance" + String(parent.numChildren-1);
|
|
newInstance.name = parent.name + "Instance" + String(parent.numChildren-1);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
lastOffsetForSmartDuplicate = offset;
|
|
lastOffsetForSmartDuplicate = offset;
|
|
|
UpdateNodeAttributes();
|
|
UpdateNodeAttributes();
|
|
|
return true;
|
|
return true;
|
|
@@ -913,7 +913,7 @@ bool ViewCloser()
|
|
|
{
|
|
{
|
|
|
if (selectedNodes.length > 0 || selectedNodes.length > 0)
|
|
if (selectedNodes.length > 0 || selectedNodes.length > 0)
|
|
|
LocateNodesAndComponents(selectedNodes, selectedComponents);
|
|
LocateNodesAndComponents(selectedNodes, selectedComponents);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -976,7 +976,7 @@ bool SceneEnableAllNodes()
|
|
|
// Toggle enabled state of nodes recursively
|
|
// Toggle enabled state of nodes recursively
|
|
|
Array<Node@> allNodes;
|
|
Array<Node@> allNodes;
|
|
|
allNodes = editorScene.GetChildren(true);
|
|
allNodes = editorScene.GetChildren(true);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (uint i = 0; i < allNodes.length; ++i)
|
|
for (uint i = 0; i < allNodes.length; ++i)
|
|
|
{
|
|
{
|
|
|
// Do not attempt to disable the Scene
|
|
// Do not attempt to disable the Scene
|
|
@@ -992,10 +992,10 @@ bool SceneEnableAllNodes()
|
|
|
group.actions.Push(action);
|
|
group.actions.Push(action);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
Array<Component@> allComponents;
|
|
Array<Component@> allComponents;
|
|
|
allComponents = editorScene.GetComponents();
|
|
allComponents = editorScene.GetComponents();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (uint i = 0; i < allComponents.length; ++i)
|
|
for (uint i = 0; i < allComponents.length; ++i)
|
|
|
{
|
|
{
|
|
|
// Some components purposefully do not expose the Enabled attribute, and it does not affect them in any way
|
|
// Some components purposefully do not expose the Enabled attribute, and it does not affect them in any way
|
|
@@ -1135,7 +1135,7 @@ uint SceneFindChildIndex(Node@ parent, Node@ child)
|
|
|
if (parent.children[i] is child)
|
|
if (parent.children[i] is child)
|
|
|
return i;
|
|
return i;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1146,7 +1146,7 @@ uint SceneFindComponentIndex(Node@ node, Component@ component)
|
|
|
if (node.components[i] is component)
|
|
if (node.components[i] is component)
|
|
|
return i;
|
|
return i;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1333,7 +1333,7 @@ bool SceneRenderZoneCubemaps()
|
|
|
bool success = false;
|
|
bool success = false;
|
|
|
Array<Zone@> capturedThisCall;
|
|
Array<Zone@> capturedThisCall;
|
|
|
bool alreadyCapturing = activeCubeCapture.length > 0; // May have managed to quickly queue up a second round of zones to render cubemaps for
|
|
bool alreadyCapturing = activeCubeCapture.length > 0; // May have managed to quickly queue up a second round of zones to render cubemaps for
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (uint i = 0; i < selectedNodes.length; ++i)
|
|
for (uint i = 0; i < selectedNodes.length; ++i)
|
|
|
{
|
|
{
|
|
|
Array<Component@>@ zones = selectedNodes[i].GetComponents("Zone", true);
|
|
Array<Component@>@ zones = selectedNodes[i].GetComponents("Zone", true);
|
|
@@ -1347,7 +1347,7 @@ bool SceneRenderZoneCubemaps()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
for (uint i = 0; i < selectedComponents.length; ++i)
|
|
for (uint i = 0; i < selectedComponents.length; ++i)
|
|
|
{
|
|
{
|
|
|
Zone@ zone = cast<Zone>(selectedComponents[i]);
|
|
Zone@ zone = cast<Zone>(selectedComponents[i]);
|
|
@@ -1360,7 +1360,7 @@ bool SceneRenderZoneCubemaps()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// Start rendering cubemaps if there are any to render and the queue isn't already running
|
|
// Start rendering cubemaps if there are any to render and the queue isn't already running
|
|
|
if (activeCubeCapture.length > 0 && !alreadyCapturing)
|
|
if (activeCubeCapture.length > 0 && !alreadyCapturing)
|
|
|
activeCubeCapture[0].Start();
|
|
activeCubeCapture[0].Start();
|
|
@@ -1396,7 +1396,7 @@ bool SceneAddChildrenStaticModelGroup()
|
|
|
SaveEditAction(action);
|
|
SaveEditAction(action);
|
|
|
SetSceneModified();
|
|
SetSceneModified();
|
|
|
FocusComponent(smg);
|
|
FocusComponent(smg);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1436,7 +1436,7 @@ bool SceneSetChildrenSplinePath(bool makeCycle)
|
|
|
SaveEditAction(action);
|
|
SaveEditAction(action);
|
|
|
SetSceneModified();
|
|
SetSceneModified();
|
|
|
FocusComponent(sp);
|
|
FocusComponent(sp);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1488,7 +1488,7 @@ Drawable@ GetFirstDrawable(Node@ node)
|
|
|
return drawable;
|
|
return drawable;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1505,7 +1505,7 @@ void AssignModel(StaticModel@ assignee, String modelPath)
|
|
|
action.Define(assignee, oldModel, model);
|
|
action.Define(assignee, oldModel, model);
|
|
|
SaveEditAction(action);
|
|
SaveEditAction(action);
|
|
|
SetSceneModified();
|
|
SetSceneModified();
|
|
|
- FocusComponent(assignee);
|
|
|
|
|
|
|
+ FocusComponent(assignee);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void CreateModelWithStaticModel(String filepath, Node@ parent)
|
|
void CreateModelWithStaticModel(String filepath, Node@ parent)
|
|
@@ -1547,20 +1547,20 @@ void CreateModelWithAnimatedModel(String filepath, Node@ parent)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool ColorWheelSetupBehaviorForColoring()
|
|
bool ColorWheelSetupBehaviorForColoring()
|
|
|
-{
|
|
|
|
|
|
|
+{
|
|
|
Menu@ menu = GetEventSender();
|
|
Menu@ menu = GetEventSender();
|
|
|
if (menu is null)
|
|
if (menu is null)
|
|
|
return false;
|
|
return false;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
coloringPropertyName = menu.name;
|
|
coloringPropertyName = menu.name;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (coloringPropertyName == "menuCancel") return false;
|
|
if (coloringPropertyName == "menuCancel") return false;
|
|
|
-
|
|
|
|
|
- if (coloringComponent.typeName == "Light")
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (coloringComponent.typeName == "Light")
|
|
|
{
|
|
{
|
|
|
Light@ light = cast<Light>(coloringComponent);
|
|
Light@ light = cast<Light>(coloringComponent);
|
|
|
- if (light !is null)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ if (light !is null)
|
|
|
|
|
+ {
|
|
|
if (coloringPropertyName == "menuLightColor")
|
|
if (coloringPropertyName == "menuLightColor")
|
|
|
{
|
|
{
|
|
|
coloringOldColor = light.color;
|
|
coloringOldColor = light.color;
|
|
@@ -1568,28 +1568,28 @@ bool ColorWheelSetupBehaviorForColoring()
|
|
|
}
|
|
}
|
|
|
else if (coloringPropertyName == "menuSpecularIntensity")
|
|
else if (coloringPropertyName == "menuSpecularIntensity")
|
|
|
{
|
|
{
|
|
|
- // ColorWheel have only 0-1 range output of V-value(BW), and for huge-range values we divide in and multiply out
|
|
|
|
|
- float scaledSpecular = light.specularIntensity * 0.1f;
|
|
|
|
|
|
|
+ // ColorWheel have only 0-1 range output of V-value(BW), and for huge-range values we divide in and multiply out
|
|
|
|
|
+ float scaledSpecular = light.specularIntensity * 0.1f;
|
|
|
coloringOldScalar = scaledSpecular;
|
|
coloringOldScalar = scaledSpecular;
|
|
|
ShowColorWheelWithColor(Color(scaledSpecular,scaledSpecular,scaledSpecular));
|
|
ShowColorWheelWithColor(Color(scaledSpecular,scaledSpecular,scaledSpecular));
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
else if (coloringPropertyName == "menuBrightnessMultiplier")
|
|
else if (coloringPropertyName == "menuBrightnessMultiplier")
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
float scaledBrightness = light.brightness * 0.1f;
|
|
float scaledBrightness = light.brightness * 0.1f;
|
|
|
coloringOldScalar = scaledBrightness;
|
|
coloringOldScalar = scaledBrightness;
|
|
|
ShowColorWheelWithColor(Color(scaledBrightness,scaledBrightness,scaledBrightness));
|
|
ShowColorWheelWithColor(Color(scaledBrightness,scaledBrightness,scaledBrightness));
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- else if (coloringComponent.typeName == "StaticModel")
|
|
|
|
|
|
|
+ else if (coloringComponent.typeName == "StaticModel")
|
|
|
{
|
|
{
|
|
|
StaticModel@ model = cast<StaticModel>(coloringComponent);
|
|
StaticModel@ model = cast<StaticModel>(coloringComponent);
|
|
|
- if (model !is null)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ if (model !is null)
|
|
|
|
|
+ {
|
|
|
Material@ mat = model.materials[0];
|
|
Material@ mat = model.materials[0];
|
|
|
- if (mat !is null)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ if (mat !is null)
|
|
|
|
|
+ {
|
|
|
if (coloringPropertyName == "menuDiffuseColor")
|
|
if (coloringPropertyName == "menuDiffuseColor")
|
|
|
{
|
|
{
|
|
|
Variant oldValue = mat.shaderParameters["MatDiffColor"];
|
|
Variant oldValue = mat.shaderParameters["MatDiffColor"];
|
|
@@ -1610,55 +1610,55 @@ bool ColorWheelSetupBehaviorForColoring()
|
|
|
Variant oldValue = mat.shaderParameters["MatEmissiveColor"];
|
|
Variant oldValue = mat.shaderParameters["MatEmissiveColor"];
|
|
|
Array<String> values = oldValue.ToString().Split(' ');
|
|
Array<String> values = oldValue.ToString().Split(' ');
|
|
|
coloringOldColor = Color(values[0].ToFloat(),values[1].ToFloat(),values[2].ToFloat()); // RGB
|
|
coloringOldColor = Color(values[0].ToFloat(),values[1].ToFloat(),values[2].ToFloat()); // RGB
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
ShowColorWheelWithColor(coloringOldColor);
|
|
ShowColorWheelWithColor(coloringOldColor);
|
|
|
}
|
|
}
|
|
|
else if (coloringPropertyName == "menuEnvironmentMapColor")
|
|
else if (coloringPropertyName == "menuEnvironmentMapColor")
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
Variant oldValue = mat.shaderParameters["MatEnvMapColor"];
|
|
Variant oldValue = mat.shaderParameters["MatEnvMapColor"];
|
|
|
Array<String> values = oldValue.ToString().Split(' ');
|
|
Array<String> values = oldValue.ToString().Split(' ');
|
|
|
coloringOldColor = Color(values[0].ToFloat(),values[1].ToFloat(),values[2].ToFloat()); //RGB
|
|
coloringOldColor = Color(values[0].ToFloat(),values[1].ToFloat(),values[2].ToFloat()); //RGB
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
ShowColorWheelWithColor(coloringOldColor);
|
|
ShowColorWheelWithColor(coloringOldColor);
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- else if (coloringComponent.typeName == "Zone")
|
|
|
|
|
|
|
+ else if (coloringComponent.typeName == "Zone")
|
|
|
{
|
|
{
|
|
|
Zone@ zone = cast<Zone>(coloringComponent);
|
|
Zone@ zone = cast<Zone>(coloringComponent);
|
|
|
- if (zone !is null)
|
|
|
|
|
|
|
+ if (zone !is null)
|
|
|
{
|
|
{
|
|
|
if (coloringPropertyName == "menuAmbientColor")
|
|
if (coloringPropertyName == "menuAmbientColor")
|
|
|
{
|
|
{
|
|
|
coloringOldColor = zone.ambientColor;
|
|
coloringOldColor = zone.ambientColor;
|
|
|
}
|
|
}
|
|
|
- else if (coloringPropertyName == "menuFogColor")
|
|
|
|
|
|
|
+ else if (coloringPropertyName == "menuFogColor")
|
|
|
{
|
|
{
|
|
|
coloringOldColor = zone.fogColor;
|
|
coloringOldColor = zone.fogColor;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
ShowColorWheelWithColor(coloringOldColor);
|
|
ShowColorWheelWithColor(coloringOldColor);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- else if (coloringComponent.typeName == "Text3D")
|
|
|
|
|
|
|
+ else if (coloringComponent.typeName == "Text3D")
|
|
|
{
|
|
{
|
|
|
Text3D@ txt = cast<Text3D>(coloringComponent);
|
|
Text3D@ txt = cast<Text3D>(coloringComponent);
|
|
|
- if (txt !is null)
|
|
|
|
|
|
|
+ if (txt !is null)
|
|
|
{
|
|
{
|
|
|
if (coloringPropertyName == "c" || coloringPropertyName == "tl")
|
|
if (coloringPropertyName == "c" || coloringPropertyName == "tl")
|
|
|
coloringOldColor = txt.colors[C_TOPLEFT];
|
|
coloringOldColor = txt.colors[C_TOPLEFT];
|
|
|
- else if (coloringPropertyName == "tr")
|
|
|
|
|
|
|
+ else if (coloringPropertyName == "tr")
|
|
|
coloringOldColor = txt.colors[C_TOPRIGHT];
|
|
coloringOldColor = txt.colors[C_TOPRIGHT];
|
|
|
- else if (coloringPropertyName == "bl")
|
|
|
|
|
|
|
+ else if (coloringPropertyName == "bl")
|
|
|
coloringOldColor = txt.colors[C_BOTTOMLEFT];
|
|
coloringOldColor = txt.colors[C_BOTTOMLEFT];
|
|
|
- else if (coloringPropertyName == "br")
|
|
|
|
|
|
|
+ else if (coloringPropertyName == "br")
|
|
|
coloringOldColor = txt.colors[C_BOTTOMRIGHT];
|
|
coloringOldColor = txt.colors[C_BOTTOMRIGHT];
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
ShowColorWheelWithColor(coloringOldColor);
|
|
ShowColorWheelWithColor(coloringOldColor);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|