New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redpawfx #21

Open
wants to merge 470 commits into
base: master
from
Commits
Jump to file or symbol
Failed to load files and symbols.
+79 −29
Diff settings

Always

Just for now

Viewing a subset of changes. View all

Adding a non working registry function.

  • Loading branch information...
sirpalee committed May 29, 2017
commit fc808ea7f00124f49fddac475e595f18a9aa4b79
@@ -1,4 +1,30 @@
set(PLUGIN_NAME partioVisualizerWriter)
install(FILES plugInfo.json
DESTINATION ${PLUGIN_NAME}/resources/)
include_directories($ENV{USD_ROOT}/third_party/maya/include)
link_directories($ENV{USD_ROOT}/third_party/maya/lib)
include_directories(${MAYA_INCLUDE_DIRS})
link_directories(${MAYA_LIBRARY_DIR})
set(MAYA_LIBS OpenMaya Foundation OpenMayaAnim OpenMayaFX OpenMayaUI OpenMayaRender)
find_package(Boost REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(TBB REQUIRED)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
include_directories(SYSTEM ${PYTHON_INCLUDE_DIRS})
include_directories(SYSTEM ${TBB_INCLUDE_DIRS})
add_library(${PLUGIN_NAME} SHARED primWriter.cpp)
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${PARTIO_LIBRARIES} ${Boost_LIBRARIES} ${MAYA_LIBS} tf gf sdf usd usdGeom usdMaya)
install(TARGETS ${PLUGIN_NAME}
DESTINATION .)
set(PLUGINFO_OUT ${CMAKE_CURRENT_BINARY_DIR}/plugInfo.json)
configure_file(plugInfo.json.in ${PLUGINFO_OUT})
install(FILES ${PLUGINFO_OUT}
DESTINATION ${PLUGIN_NAME}/resources/)

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,24 @@
{
"Plugins": [
{
"Info" : {
"UsdMaya" : {
"PrimWriter" : {
"mayaPlugin": "partio4Maya",
"providesTranslator": [ "partioVisualizer" ]
}
},
"Types" : {
"partioVisualizerWriter": {
"bases": [ "MayaPrimWriter" ]
}
}
},
"LibraryPath": "../@PLUGIN_NAME@.so",
"Name": "@PLUGIN_NAME@",
"ResourcePath": "resources",
"Root": "..",
"Type": "library"
}
]
}
@@ -0,0 +1,27 @@
#include <pxr/pxr.h>
#include <usdMaya/primWriterRegistry.h>
#include <usdMaya/MayaTransformWriter.h>
PXR_NAMESPACE_USING_DIRECTIVE
namespace {
class partioVisualizerWriter : public MayaTransformWriter {
public:
partioVisualizerWriter(const MDagPath & iDag, const SdfPath& uPath, bool instanceSource, usdWriteJobCtx& jobCtx) :
MayaTransformWriter(iDag, uPath, instanceSource, jobCtx) {
}
~partioVisualizerWriter() {};
};
using partioVisualizerWriterPtr = std::shared_ptr<partioVisualizerWriter>;
}
TF_REGISTRY_FUNCTION_WITH_TAG(PxrUsdMayaPrimWriterRegistry, partioVisualizerWriter) {
std::cerr << "Registering partio visualizer writer." << std::endl;
PxrUsdMayaPrimWriterRegistry::Register("partioVisualizerWriter",
[](const MDagPath& iDag,
const SdfPath& uPath, bool instanceSource,
usdWriteJobCtx& jobCtx) -> MayaPrimWriterPtr { return std::make_shared<partioVisualizerWriter>(
iDag, uPath, instanceSource, jobCtx); });
}
ProTip! Use n and p to navigate between commits in a pull request.