Пример #1
0
        internal static void CreaseGroupRecursively(CSGGroup group, ref int shapesCreasedCount)
        {
            CSGShapeArray childShapeList = group.GetShapes();

            for (int shapeIndex = 0; shapeIndex < childShapeList.GetSize(); shapeIndex++)
            {
                CreaseShape(childShapeList.GetElement(shapeIndex), ref shapesCreasedCount);
            }

            CSGGroupArray childGroupList = group.GetChildren();

            for (int groupIndex = 0; groupIndex < childGroupList.GetSize(); groupIndex++)
            {
                CreaseGroupRecursively(childGroupList.GetElement(groupIndex), ref shapesCreasedCount);
            }
        }
Пример #2
0
        private void ExportGroupShapes(CSGGroup group, FBXScene fbxScene, FBXNode sceneNode, string groupName, FBXNode node)
        {
            CSGShapeArray childShapeList = group.GetShapes();

            for (int shapeIndex = 0; shapeIndex < childShapeList.GetSize(); shapeIndex++)
            {
                // this little bit of weirdness is due to View3D and Paint3D not being able to have multiple shapes on the same node
                // there may need to be an export option for this at some point
                var subnode = node;
                if (shapeIndex > 0)
                {
                    string subGroupName = this.GetUniqueName(groupName + "_" + shapeIndex.ToString(), "group");

                    subnode = FBXNode.Create(sceneNode, subGroupName);
                    node.AddChild(subnode);
                }

                this.ExportShape(fbxScene, subnode, childShapeList.GetElement(shapeIndex));
                subnode.SetShadingMode(ArcManagedFBX.Types.EShadingMode.eTextureShading);
            }
        }