Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Source & macOS binary of USD exporter for SketchUp

License

NotificationsYou must be signed in to change notification settings

drwave/usd-sketchup

Repository files navigation

This plug-in adds the ability to exportPixar's Universal SceneDescription files fromSketchUpPro. It has been tested with SketchUp Pro2016, 2017, 2018 and 2019.

It adds three options to theFile->Export->3D Model menu:

  • Pixar USD binary File (*.usd)
  • Pixar USD ASCII File (*.usda)
  • Pixar USDZ File (*.usdz)

There are also options on the export panel to conditionally exportnormals,curves,edges, andlines, as well as theability to organize the USD as asingle file or as aset offiles that reference each other.

Theusdz files this exporter writes out takes care to write out in a way that is compatible with Apple'sARKit 2, which is more constrained than the generalusdz specification, but that support can be toggled on or off in theOptions... dialog.

The exporter also leverages the newUsdPreviewSurfaceto support texture export from SketchUp.

Getting the Prebuilt Plugin for macOS

We are providing a pre-built version of the plug-inhere. Afterdownloading, you'll want to copy it into thePlugIns directoryinside the SketchUp Pro app bundle. You can do this from the Terminalby the following. Note you will need to type an admin password, asthat directory is probably write-protected.

sudo cp -rf USDExporter.plugin /Applications/SketchUp\ 2018/SketchUp.app/Contents/PlugIns/

Once you have copied it there, you should see the 3 USD export optionsunder theFile->Export->3D Model menu.

This build has been (lightly) tested on SketchUp 2019 (Version19.2.221) on macOS 10.14.6, and was built with Xcode 10.3 (10G8)

Getting Help

Need help understanding certain concepts in USD? SeeGetting Helpwith USD or visittheforum.

If you are experiencing undocumented problems with the software,pleasefile abug.

Supported Platforms

SketchUp Pro runs on macOS and Windows, but this plug-in iscurrently only supported on macOS.

This plug-in was developed on macOS but care has been taken to makesure that, as much as possible, it should be straightforward to portto Windows. BothSketchUp's SDK (developer accountrequired)on Windows and macOS contain an example plug-in calledskp_to_xml,which this plug-in took inspiration from, so if someone wants to portthis to Windows they should just need to look in theSDK/samples/skp_to_xml/win/ and in theUSD SketchUp Mac folderhere and do the equivalent for Windows.

Dependencies

NameVersion
macOS10.13 or higher
SketchUp Pro2016 or higher
Xcode9 or higher
SketchUp SDKrecent
USD18.09 or higher

Getting and Building the Code

1. Install prerequisites (seeDependencies for required versions)

Note: to build this plug-in you will need aSketchUp Developer/Trimble account and anApple Developer account.

The rest of these instructions assume you have aMac withXcode andSketchUpPro installed.

2. Download the USD source code

You can download source code archives fromGitHub or usegit to clone the repository.

git clone https://github.com/PixarAnimationStudios/USD

3. Run the USD build script

MacOS:

In a terminal, runxcode-select to ensure command line developertools are installed. Then run the script. We recommend buildingwithout Python, without imaging, and as a monolithic library thatincludes tbb in it. The included Xcode project assumes that it hasbeen built that way and installed into/opt/local/USDForSketchUp.

python USD/build_scripts/build_usd.py --build-args TBB,extra_inc=big_iron.inc --no-python --no-imaging --no-usdview --build-monolithic /opt/local/USDForSketchUp

4. Download the SketchUp SDK

Once you login to theTrimble/SketchUp developeraccount(look in upper right corner of that linked page), download theSDK. Unzipand install this somewhere on your machine, for example,~/SketchUpSDKs/SDK_Mac_2019-0-752_0

5. Download the USD SketchUp exporter plug-in source code

You can download source code archives fromGitHub or usegitto clone the repository.

git clone https://github.com/drwave/usd-sketchup

At the top level of the repository, make a link to the SketchUp SDKyou installed. For example, if the SDK you downloaded wasSDK_Mac_18-0-18665 and you put it in a subdirectory off yourhome directory calledSketchUpSDKs, you would do:

cd usd-sketchupln -s ~/SketchUpSDKs/SDK_Mac_2019-0-752_0 SDK_Mac

6. Build the USD SketchUp exporter plugin

Launch Xcode on theprojectfile. Youmay need to fix up various things in the Xcode file that are specificto your build if you have changed them (i.e. installed USD in adifferent location, have a different version of SketchUp installed,etc.).

You should create symlinks for SketchUp SDK (asSDK_Mac) and USD (asUSD) in this folder.

For example:

ln -s /Users/<you>/SketchUpSDKs/SDK_Mac_2019-0-752_0 ./lib/SDK_Macln -s /opt/local/USDForSketchUp ./lib/USD

The Xcode project assumes that you are building forSketchUp Pro2019, and building the target will actually copy the resultingUSDExporter.plugin into SketchUp Pro's app bundle in the PlugInsdirectory, i.e./Applications/SketchUp\ 2019/SketchUp.app/Contents/PlugIns/.

Initially, that directory will probably not be writable on your machine, so you may need to make it writable:

sudo chmod a+w /Applications/SketchUp\ 2019/SketchUp.app/Contents/PlugIns/

Copying the plug-in to the directory makes it very easy to debug theplug-in, as you can launch SketchUp Pro from inside of Xcode, setbreakpoints in your plug-in, etc. Very handy when doing development.

6. Build the USD SketchUp exporter command line app

Launch Xcode on theprojectfile. Youmay need to fix up various things in the Xcode file that are specificto your build if you have changed them (i.e. installed USD in adifferent location, have a different version of SketchUp installed,etc.).

Contributing

If you'd like to contribute to this USD plug-in (and we appreciate thehelp!), please see theContributing pagein the documentation for more information.


[8]ページ先頭

©2009-2025 Movatter.jp