Permalink
Browse files

Base modules and first maya2corona framework

Signed-off-by: haggi <git@haggi.de>
  • Loading branch information...
haggi
haggi committed Mar 30, 2013
1 parent e0fd16a commit 07be431e85dfc3241d0f352f45fb6682e41c2a13
Showing with 2,283 additions and 305 deletions.
  1. 0 src/mayaToBase/mt@_devmodule/ressources/{_Renderer.xml → @Renderer.xml}
  2. +22 −0 src/mayaToBase/src/@/@.cpp
  3. +28 −0 src/mayaToBase/src/@/@.h
  4. +1 −0 src/mayaToBase/src/@/@Geometry.cpp
  5. +1 −0 src/mayaToBase/src/@/@Lights.cpp
  6. +1 −0 src/mayaToBase/src/@/@RendererController.cpp
  7. 0 src/mayaToBase/src/@/@RendererController.h
  8. +1 −0 src/mayaToBase/src/@/@Shaders.cpp
  9. +1 −0 src/mayaToBase/src/@/@TileCallback.cpp
  10. 0 src/mayaToBase/src/@/@TileCallback.h
  11. +1 −0 src/mayaToBase/src/@/@Utils.cpp
  12. +0 −2 src/mayaToBase/src/mt@_common/mt@_MayaObject.h
  13. +14 −19 src/mayaToBase/src/mt@_common/mt@_mayaScene.cpp
  14. +2 −2 src/mayaToBase/src/mt@_common/mt@_mayaScene.h
  15. +5 −1 src/mayaToBase/src/mt@_common/mt@_renderGlobals.cpp
  16. +1 −0 src/mayaToBase/src/mt@_common/mt@_renderGlobals.h
  17. +3 −0 src/mayaToBase/src/mt@_common/mt@_renderGlobalsNode.cpp
  18. +7 −7 src/mayaToBase/src/pluginMain.cpp
  19. +11 −9 src/mayaToBase/vs2010/mayaTo@.vcxproj
  20. +18 −9 src/mayaToBase/vs2010/mayaTo@.vcxproj.filters
  21. +3 −0 src/mayaToBase/vs2010/mayaTo@.vcxproj.user
  22. +15 −0 src/mayaToBase/vs2010/sourceCodeDocs/coronaMaterials.txt
  23. +113 −3 src/mayaToBase/vs2010/sourceCodeDocs/globalsNodeAttributes.txt
  24. BIN src/mayaToCorona/mtco_devmodule/icons/Corona.png
  25. BIN src/mayaToCorona/mtco_devmodule/plug-ins/mayaToCorona_maya2014.mll
  26. 0 src/mayaToCorona/mtco_devmodule/ressources/{_Renderer.xml → CoronaRenderer.xml}
  27. +6 −9 src/mayaToCorona/mtco_devmodule/scripts/AETemplates/AEcoronaNodeTemplate.py
  28. +294 −138 src/mayaToCorona/mtco_devmodule/scripts/mtco_initialize.py
  29. +613 −0 src/mayaToCorona/mtco_devmodule/scripts/renderGlobalsUIInfo.py
  30. +30 −0 src/mayaToCorona/src/Corona/Corona.cpp
  31. +28 −0 src/mayaToCorona/src/Corona/Corona.h
  32. +1 −0 src/mayaToCorona/src/Corona/CoronaGeometry.cpp
  33. +1 −0 src/mayaToCorona/src/Corona/CoronaLights.cpp
  34. +1 −0 src/mayaToCorona/src/Corona/CoronaRendererController.cpp
  35. 0 src/mayaToCorona/src/Corona/CoronaRendererController.h
  36. +1 −0 src/mayaToCorona/src/Corona/CoronaShaders.cpp
  37. +1 −0 src/mayaToCorona/src/Corona/CoronaTileCallback.cpp
  38. 0 src/mayaToCorona/src/Corona/CoronaTileCallback.h
  39. +1 −0 src/mayaToCorona/src/Corona/CoronaUtils.cpp
  40. +11 −11 src/mayaToCorona/src/mayaToCorona.cpp
  41. +4 −4 src/mayaToCorona/src/mayaToCorona.h
  42. +0 −2 src/mayaToCorona/src/mtco_common/mtco_MayaObject.h
  43. +16 −19 src/mayaToCorona/src/mtco_common/mtco_mayaScene.cpp
  44. +2 −2 src/mayaToCorona/src/mtco_common/mtco_mayaScene.h
  45. +264 −11 src/mayaToCorona/src/mtco_common/mtco_renderGlobals.cpp
  46. +89 −0 src/mayaToCorona/src/mtco_common/mtco_renderGlobals.h
  47. +411 −18 src/mayaToCorona/src/mtco_common/mtco_renderGlobalsNode.cpp
  48. +92 −6 src/mayaToCorona/src/mtco_common/mtco_renderGlobalsNode.h
  49. +7 −7 src/mayaToCorona/src/pluginMain.cpp
  50. +11 −9 src/mayaToCorona/vs2010/mayaToCorona.vcxproj
  51. +18 −9 src/mayaToCorona/vs2010/mayaToCorona.vcxproj.filters
  52. +15 −0 src/mayaToCorona/vs2010/sourceCodeDocs/coronaMaterials.txt
  53. +118 −8 src/mayaToCorona/vs2010/sourceCodeDocs/globalsNodeAttributes.txt
View
@@ -0,0 +1,22 @@
+#include "@.h"
+
+
+@Renderer::@Renderer()
+{}
+@Renderer::~@Renderer()
+{}
+void @Renderer::render()
+{}
+void @Renderer::initializeRenderer()
+{}
+void @Renderer::updateShape(MayaObject *obj)
+{}
+void @Renderer::updateTransform(MayaObject *obj)
+{}
+void @Renderer::IPRUpdateEntities()
+{}
+void @Renderer::reinitializeIPRRendering()
+{}
+void @Renderer::abortRendering()
+{}
+
View
@@ -0,0 +1,28 @@
+#include "rendering/renderer.h"
+#include <maya/MObject.h>
+#include <vector>
+
+class mt@_MayaScene;
+class mt@_RenderGlobals;
+class mt@_MayaObject;
+
+class @Renderer : public Renderer
+{
+public:
+
+ mt@_MayaScene *mt@_scene;
+ mt@_RenderGlobals *mt@_renderGlobals;
+
+ std::vector<mt@_MayaObject *> interactiveUpdateList;
+ std::vector<MObject> interactiveUpdateMOList;
+
+ @Renderer();
+ ~@Renderer();
+ virtual void render();
+ virtual void initializeRenderer();
+ virtual void updateShape(MayaObject *obj);
+ virtual void updateTransform(MayaObject *obj);
+ virtual void IPRUpdateEntities();
+ virtual void reinitializeIPRRendering();
+ virtual void abortRendering();
+};
@@ -0,0 +1 @@
+#include "@.h"
@@ -0,0 +1 @@
+#include "@.h"
@@ -0,0 +1 @@
+#include "@.h"
No changes.
@@ -0,0 +1 @@
+#include "@.h"
@@ -0,0 +1 @@
+#include "@.h"
No changes.
@@ -0,0 +1 @@
+#include "@.h"
@@ -26,8 +26,6 @@ class mt@_MayaObject : public MayaObject
virtual bool geometryShapeSupported();
virtual mt@_ObjectAttributes *getObjectAttributes(ObjectAttributes *parentAttributes = NULL);
- bool isTransform();
- bool isGeo();
};
#endif
@@ -13,16 +13,16 @@ mt@_MayaScene::mt@_MayaScene():MayaScene(MayaScene::NORMAL)
{
getRenderGlobals();
this->mt@_renderer.mt@_scene = this;
- this->mt@_renderer.renderGlobals = this->renderGlobals;
- this->mt@_renderer.definePreRender();
+ this->mt@_renderer.mt@_renderGlobals = this->renderGlobals;
+ //this->mt@_renderer.definePreRender();
}
mt@_MayaScene::mt@_MayaScene(MayaScene::RenderType rtype):MayaScene(rtype)
{
getRenderGlobals();
this->mt@_renderer.mt@_scene = this;
- this->mt@_renderer.renderGlobals = this->renderGlobals;
- this->mt@_renderer.definePreRender();
+ this->mt@_renderer.mt@_renderGlobals = this->renderGlobals;
+ //this->mt@_renderer.definePreRender();
this->renderType = rtype;
}
@@ -50,10 +50,6 @@ void mt@_MayaScene::transformUpdateCallback(MayaObject *mobj)
if( obj->origObject == NULL)
return;
- // check if the original object has its own assembly, if not no update is needed
- if( ((mt@_MayaObject *)obj->origObject)->objectAssembly == NULL)
- return;
-
}else{
if( obj->instancerParticleId > -1)
{
@@ -63,8 +59,6 @@ void mt@_MayaScene::transformUpdateCallback(MayaObject *mobj)
return;
}
}else{
- if( obj->objectAssembly == NULL)
- return;
}
}
@@ -76,7 +70,7 @@ void mt@_MayaScene::transformUpdateCallback(MayaObject *mobj)
// will be called for every geometry deform step
// the very first time it will create an assembly and fill it with data
//
-void mt@_MayaScene::deformUpdateCallback(MayaObject *mobj)
+void mt@_MayaScene::shapeUpdateCallback(MayaObject *mobj)
{
mt@_MayaObject *obj = (mt@_MayaObject *)mobj;
logger.trace(MString("mt@_MayaScene::deformUpdateCallback"));
@@ -91,7 +85,7 @@ void mt@_MayaScene::deformUpdateCallback(MayaObject *mobj)
if( !obj->attributes->hasInstancerConnection )
return;
- this->mt@_renderer.updateDeform(obj);
+ this->mt@_renderer.updateShape(obj);
}
MayaObject *mt@_MayaScene::mayaObjectCreator(MObject& mobject)
@@ -146,7 +140,7 @@ bool mt@_MayaScene::doPreFrameJobs()
MString result;
MGlobal::executeCommand(this->renderGlobals->preFrameScript, result, true);
- this->mt@_renderer.defineLights();
+ //this->mt@_renderer.defineLights();
return true;
}
@@ -301,13 +295,14 @@ void mt@_MayaScene::updateInteraciveRenderScene(std::vector<MObject> mobjList)
this->mt@_renderer.interactiveUpdateMOList.push_back(mobjList[i]);
if( (this->mt@_renderer.interactiveUpdateList.size() > 0) || (this->mt@_renderer.interactiveUpdateMOList.size() > 0))
- this->mt@_renderer.mt@_controller.status = asr::IRendererController::ReinitializeRendering;
- //this->mt@_renderer.mt@_controller.status = asr::IRendererController::RestartRendering;
+ {
+ this->mt@_renderer.reinitializeIPRRendering();
+ }
}
void mt@_MayaScene::stopRendering()
{
- this->mt@_renderer.mt@_controller.status = asr::IRendererController::AbortRendering;
+ this->mt@_renderer.abortRendering();
}
bool mt@_MayaScene::renderImage()
@@ -317,10 +312,10 @@ bool mt@_MayaScene::renderImage()
this->renderGlobals->getImageName();
- this->mt@_renderer.defineScene(this->renderGlobals, this->objectList, this->lightList, this->camList, this->instancerNodeElements);
+ //this->mt@_renderer.defineScene(this->renderGlobals, this->objectList, this->lightList, this->camList, this->instancerNodeElements);
- if( this->renderGlobals->exportXMLFile)
- this->mt@_renderer.writeXML();
+ //if( this->renderGlobals->exportXMLFile)
+ // this->mt@_renderer.writeXML();
this->mt@_renderer.render();
@@ -15,15 +15,15 @@
class mt@_MayaScene : public MayaScene
{
public:
- AppleRender::@Renderer mt@_renderer;
+ @Renderer mt@_renderer;
mt@_RenderGlobals *renderGlobals;
MayaObject *defaultCamera; // needed for motionblur calculation
//std::map<MayaObject *, MObject> mayaObjMObjMap;
MiniMap<MObject, MayaObject *> mayaObjMObjMap;
virtual void transformUpdateCallback(MayaObject *);
- virtual void deformUpdateCallback(MayaObject *);
+ virtual void shapeUpdateCallback(MayaObject *);
virtual bool translateShaders(int timeStep);
virtual bool translateShapes(int timeStep);
virtual bool doPreRenderJobs();
@@ -9,9 +9,13 @@ static Logging logger;
mt@_RenderGlobals::mt@_RenderGlobals()
{
- this->getMtapGlobals();
+ this->getMt@Globals();
}
+MString mt@_RenderGlobals::getImageExt()
+{
+ return MString("ext");
+}
bool mt@_RenderGlobals::getMt@Globals()
{
@@ -14,6 +14,7 @@ class mt@_RenderGlobals : public RenderGlobals
// ------------- automatically created attributes start ----------- //
// ------------- automatically created attributes end ----------- //
bool getMt@Globals();
+ virtual MString getImageExt();
private:
};
@@ -2,6 +2,7 @@
#include <maya/MFnTypedAttribute.h>
#include <maya/MFnGenericAttribute.h>
#include <maya/MFnEnumAttribute.h>
+#include <maya/MFnMessageAttribute.h>
#include "mt@_renderGlobalsNode.h"
@@ -31,6 +32,8 @@ MStatus MayaTo@Globals::initialize()
MFnTypedAttribute tAttr;
MFnGenericAttribute gAttr;
MFnEnumAttribute eAttr;
+ MFnMessageAttribute mAttr;
+
MStatus stat = MStatus::kSuccess;
// ------------- automatically created attributes start ----------- //
@@ -65,14 +65,14 @@ MStatus uninitializePlugin( MObject obj)
return status;
}
- std::cout << "deregister mtap shader\n";
- status = plugin.deregisterNode( mt@_surfaceShader::id);
- if (!status) {
- status.perror("cannot deregister node: mt@_surfaceShader");
- return status;
- }
+ //std::cout << "deregister mt@ shader\n";
+ //status = plugin.deregisterNode( mt@_surfaceShader::id);
+ //if (!status) {
+ // status.perror("cannot deregister node: mt@_surfaceShader");
+ // return status;
+ //}
- std::cout << "update mtap shader ui\n";
+ std::cout << "update mtco shader ui\n";
MString command( "if( `window -exists createRenderNodeWindow` ) {refreshCreateRenderNodeWindow(\"" );
command += UserClassify;
command += "\");}\n";
@@ -186,7 +186,7 @@
<ImportLibrary>Debug/mayaTo@.lib</ImportLibrary>
</Link>
<PostBuildEvent>
- <Command>copy Debug\mayaTo@.mll ..\mt@_devmodule\plug-ins\mayaTo@.mll</Command>
+ <Command>copy Debug\mayaTo@.mll ..\mt@_devmodule\plug-ins\mayaTo@_maya2013.mll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug2014|x64'">
@@ -209,7 +209,7 @@
<ImportLibrary>Debug/mayaTo@.lib</ImportLibrary>
</Link>
<PostBuildEvent>
- <Command>copy Debug\mayaTo@.mll ..\mt@_devmodule\plug-ins\mayaTo@.mll</Command>
+ <Command>copy Debug\mayaTo@.mll ..\mt@_devmodule\plug-ins\mayaTo@_maya2014.mll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release2014|x64'">
@@ -232,7 +232,7 @@
<ImportLibrary>Release/mayaTo@.lib</ImportLibrary>
</Link>
<PostBuildEvent>
- <Command>copy Debug\mayaTo@.mll ..\mt@_devmodule\plug-ins\mayaTo@.mll</Command>
+ <Command>copy Debug\mayaTo@.mll ..\mt@_devmodule\plug-ins\mayaTo@_maya2014release.mll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -274,7 +274,7 @@
<ImportLibrary>Release/mayaTo@.lib</ImportLibrary>
</Link>
<PostBuildEvent>
- <Command>copy Release\mayaTo@.mll ..\deployment\mayaTo@\plug-ins\mayaTo@.mll</Command>
+ <Command>copy Release\mayaTo@.mll ..\deployment\mayaTo@\plug-ins\mayaTo@_maya2013release.mll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
@@ -286,6 +286,7 @@
<ClCompile Include="..\..\common\cpp\mayaScene.cpp" />
<ClCompile Include="..\..\common\cpp\memory\memoryInfo.cpp" />
<ClCompile Include="..\..\common\cpp\renderGlobals.cpp" />
+ <ClCompile Include="..\..\common\cpp\rendering\renderer.cpp" />
<ClCompile Include="..\..\common\cpp\shadingtools\material.cpp" />
<ClCompile Include="..\..\common\cpp\shadingtools\readShaderDefs.cpp" />
<ClCompile Include="..\..\common\cpp\shadingtools\shadingNode.cpp" />
@@ -297,13 +298,13 @@
<ClCompile Include="..\..\common\cpp\utilities\MiniMap.cpp" />
<ClCompile Include="..\..\common\cpp\utilities\pystring.cpp" />
<ClCompile Include="..\..\common\cpp\utilities\tools.cpp" />
+ <ClCompile Include="..\src\@\@RendererController.cpp" />
+ <ClCompile Include="..\src\@\@TileCallback.cpp" />
<ClCompile Include="..\src\@\@.cpp" />
<ClCompile Include="..\src\@\@Geometry.cpp" />
<ClCompile Include="..\src\@\@Lights.cpp" />
<ClCompile Include="..\src\@\@Shaders.cpp" />
<ClCompile Include="..\src\@\@Utils.cpp" />
- <ClCompile Include="..\src\@\mt@_rendererController.cpp" />
- <ClCompile Include="..\src\@\mt@_tileCallback.cpp" />
<ClCompile Include="..\src\mayaTo@.cpp" />
<ClCompile Include="..\src\mt@_common\mt@_mayaObject.cpp" />
<ClCompile Include="..\src\mt@_common\mt@_mayaScene.cpp" />
@@ -320,6 +321,7 @@
<ClInclude Include="..\..\common\cpp\mayaScene.h" />
<ClInclude Include="..\..\common\cpp\memory\memoryInfo.h" />
<ClInclude Include="..\..\common\cpp\renderGlobals.h" />
+ <ClInclude Include="..\..\common\cpp\rendering\renderer.h" />
<ClInclude Include="..\..\common\cpp\shadingtools\material.h" />
<ClInclude Include="..\..\common\cpp\shadingtools\readShaderDefs.h" />
<ClInclude Include="..\..\common\cpp\shadingtools\shadingNode.h" />
@@ -331,11 +333,11 @@
<ClInclude Include="..\..\common\cpp\utilities\MiniMap.h" />
<ClInclude Include="..\..\common\cpp\utilities\pystring.h" />
<ClInclude Include="..\..\common\cpp\utilities\tools.h" />
+ <ClInclude Include="..\src\@\@RendererController.h" />
+ <ClInclude Include="..\src\@\@TileCallback.h" />
<ClInclude Include="..\src\@\@.h" />
- <ClInclude Include="..\src\@\mt@_rendererController.h" />
- <ClInclude Include="..\src\@\mt@_tileCallback.h" />
<ClInclude Include="..\src\mayaTo@.h" />
- <ClInclude Include="..\src\mt@_common\mt@_MayaObject.h" />
+ <ClInclude Include="..\src\mt@_common\mt@_mayaObject.h" />
<ClInclude Include="..\src\mt@_common\mt@_mayaScene.h" />
<ClInclude Include="..\src\mt@_common\mt@_renderGlobals.h" />
<ClInclude Include="..\src\mt@_common\mt@_renderGlobalsNode.h" />
Oops, something went wrong.

0 comments on commit 07be431

Please sign in to comment.