Re: Add another 3D model to an existing 3D model?

by enkonyito » Thu Sep 16, 2021 3:45 am

When I select a light and added sources manually, only the light is taken into account when exporting the selection in OBJ format.
If I only select the sources added manually, the .obj and .mtl files are empty when exporting the selection in OBJ format.

How to bypass the restriction in the [font=courier new]WriteNode[/font] method of the [font=courier new]OBJWriter[/font] class?

Code: Select all

...else if (node instanceof Shape3D) {
      Shape3D shape = (Shape3D)node;
      Appearance appearance = shape.getAppearance();
      RenderingAttributes renderingAttributes = appearance != null
          ? appearance.getRenderingAttributes() : null;
      if (shape.numGeometries() >= 1
          && (renderingAttributes == null
              || renderingAttributes.getVisible())) {
...
	// Start a new object at OBJ format
        this.out.write("g " + objectName + "\n");
...