Skip to content

Commit

Permalink
update doc. fix export filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
80prozent committed May 17, 2014
1 parent f6c0d28 commit eec2d7f
Show file tree
Hide file tree
Showing 18 changed files with 97 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ rollout rl_install "About AWDExtensions3dsmax" width:306 height:300
(

bitmap bmp1 "Bitmap" pos:[3,3] width:300 height:300 fileName:"AWDAbout.bmp"
label txt_stats versionCompleteLocal pos:[63,260] width:180 height:16 textAlign:#right
label txt_stats "" pos:[63,260] width:180 height:16 textAlign:#right

)


CreateDialog rl_install 306 300 modal:true
CreateDialog rl_install 306 300 modal:false
rl_install.txt_stats.text=versionCompleteLocal
)
macroScript OpenAWDHelpFile
category:"AWDCommands"
Expand Down
Binary file modified awayextensions3dsmax/AWDDocs.odt
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2011_32.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2011_64.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2012_32.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2012_64.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2013_32.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2013_64.dle
Binary file not shown.
Binary file modified awayextensions3dsmax/AWDExporter/maxawdexporter_2014_64.dle
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" ?>
<AWDMAXVERSION Major="0" Message="minor fixes materialSettings" Minor="9" Revision="87"/>
<AWDMAXVERSION Major="0" Message="update docs / remove inlcude manifest file from release builds" Minor="9" Revision="88"/>
Binary file not shown.
14 changes: 7 additions & 7 deletions maxawd_exporter.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='2013 Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='2014 Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='2015 Release|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2012 Release|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2011 Release|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2012 Release|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2011 Release|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2010 Release|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2013 Release|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2013 Release|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2014 Release|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2015 Release|Win32'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='2012 Release|x64'">bin</OutDir>
Expand All @@ -382,11 +382,11 @@
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='2013 Release|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='2014 Release|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='2015 Release|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2012 Release|x64'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2011 Release|x64'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2012 Release|x64'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2011 Release|x64'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2010 Release|x64'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2013 Release|x64'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2014 Release|x64'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2013 Release|x64'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2014 Release|x64'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='2015 Release|x64'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='2012 Debug|Win32'">C:\Program Files %28x86%29\Autodesk\3ds Max 2012\plugins</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='2011 debug|Win32'">C:\Program Files %28x86%29\Autodesk\3ds Max 2011\plugins</OutDir>
Expand Down
28 changes: 28 additions & 0 deletions src/maxawdexporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,34 @@ int MaxAWDExporter::ExecuteExport()
newMetaData->make_invalide();
awd->set_metadata(newMetaData);

if (!opts->ExportSkeletons()){
AWDBlockList * skeletonBlocks=awd->get_skeleton_blocks();
AWDBlock *skelBlock;
AWDBlockIterator it(skeletonBlocks);
while ((skelBlock = (AWDBlock *)it.next()) != NULL) {
skelBlock->make_invalide();
}
}
if (!opts->ExportSkelAnim()){
AWDBlockList * skelAnimSets=awd->get_amin_set_blocks();
AWDAnimationSet *skelAnimSetBlock;
AWDBlockIterator it(skelAnimSets);
while ((skelAnimSetBlock = (AWDAnimationSet *)it.next()) != NULL) {
if(skelAnimSetBlock->get_anim_type()==ANIMTYPESKELETON){
skelAnimSetBlock->make_invalide();
}
}
}
if (!opts->ExportVertexAnim()){
AWDBlockList * allAnimSets=awd->get_amin_set_blocks();
AWDAnimationSet *vertexAnimSetBlock;
AWDBlockIterator it(allAnimSets);
while ((vertexAnimSetBlock = (AWDAnimationSet *)it.next()) != NULL) {
if(vertexAnimSetBlock->get_anim_type()==ANIMTYPEVERTEX){
vertexAnimSetBlock->make_invalide();
}
}
}
UpdateProgressBar(MAXAWD_PHASE_FLUSH, 0);
output_debug_string("-> Start flush (Step5)");
awd->flush(fd);
Expand Down
16 changes: 13 additions & 3 deletions src/maxawdexporter_anim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ void MaxAWDExporter::ExportAnimations(BlockSettings* blockSettings){
delete it;
}
}
AWDAnimationSet *animSetBlock;
AWDBlockList * animSetBlocks = (AWDBlockList *)awd->get_amin_set_blocks();
if (animSetBlocks!=NULL){
if (animSetBlocks->get_num_blocks()>0){
it = new AWDBlockIterator(animSetBlocks);
while ((animSetBlock = (AWDAnimationSet * ) it->next()) != NULL) {
ExportAWDAnimSet(animSetBlock, NULL, blockSettings);
}
delete it;
}
}
}

void MaxAWDExporter::ReadAWDSkeletonMod(Modifier *node_mod, INode * node){
Expand Down Expand Up @@ -1316,11 +1327,9 @@ AWDBlock * MaxAWDExporter::ExportAWDAnimSet(AWDAnimationSet * animSet, AWDBlockL
targetGeosList->append(block->get_geom());
}
delete itMeshes;
if (targetGeosList->get_num_blocks()==0)
return NULL;

AWD_Anim_Type animType=animSet->get_anim_type();
// if the clips for this animset have allready been created, we still check if it is compatible to the given list of mesh-instances

if (animSet->get_is_processed()){
/*AWDTriGeom *block;
itMeshes = new AWDBlockIterator(targetGeosList);
Expand All @@ -1341,6 +1350,7 @@ AWDBlock * MaxAWDExporter::ExportAWDAnimSet(AWDAnimationSet * animSet, AWDBlockL
delete targetGeosList;
delete itMeshes;
return NULL;*/
delete targetGeosList;
}
else{
delete targetGeosList;
Expand Down
6 changes: 4 additions & 2 deletions src/maxawdexporter_geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ void MaxAWDExporter::ProcessGeoBlocks()
while ((geoBlock = (AWDTriGeom * ) it->next()) != NULL){
INode * node = (INode *)INodeToGeoBlockCache->Get(geoBlock);
if (node==NULL){
//ERROR - THIS SHOULD NEVER HAPPEN
AWDMessageBlock * newWarning = new AWDMessageBlock(geoBlock->get_name(), "ERROR: Could not find the INode for this AWDGeometry.");
awd->get_message_blocks()->append(newWarning);
return;
}
lNodes.AppendNode( node );
Expand All @@ -24,7 +25,8 @@ void MaxAWDExporter::ProcessGeoBlocks()
while ((geoBlock = (AWDTriGeom * ) it->next()) != NULL){
INode * node = (INode *)INodeToGeoBlockCache->Get(geoBlock);
if (node==NULL){
//ERROR - THIS SHOULD NEVER HAPPEN
AWDMessageBlock * newWarning = new AWDMessageBlock(geoBlock->get_name(), "ERROR: Could not find the INode for this AWDGeometry.");
awd->get_message_blocks()->append(newWarning);
}
else{
int exportThis=false;
Expand Down
12 changes: 6 additions & 6 deletions src/maxawdexporter_materials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,9 @@ AWDMaterial *MaxAWDExporter::ExportOneMaterial(StdMat *mtl)
}
//int thisShading=stdMat2->GetShading();
}

bool exportTexMaterials=true;
int saveType=opts->TextureMode();
if (saveType!=0){
if ((saveType!=0)||(exportTexMaterials)){
for (i=0; i<mtl->NumSubTexmaps(); i++) {
Texmap *tex = mtl->GetSubTexmap(i);
// If there is a texture, AND that texture is a plain bitmap
Expand Down Expand Up @@ -717,9 +717,9 @@ AWDMaterial *MaxAWDExporter::ExportOneMaterial(StdMat *mtl)
}
if (hasDifftex || hasAmbTex){
awdMtl->set_type(AWD_MATTYPE_TEXTURE);
if (hasDifftex){
if ((hasDifftex)&&(awdDiffTex->get_isValid())){
awdMtl->set_texture(awdDiffTex);}
if (hasAmbTex){
if ((hasAmbTex)&&(awdAmbTex->get_isValid())){
awdMtl->set_ambientTexture(awdAmbTex);}
}
else{
Expand All @@ -741,9 +741,9 @@ AWDMaterial *MaxAWDExporter::ExportOneMaterial(StdMat *mtl)
awdMtl->set_glossStrength(glossLevel);
// this can optionally overwrite previous defined material-settings
GetCustomAWDMaterialSettings(mtl, awdMtl);
if (hasSpecTex){
if ((hasSpecTex)&&(awdSpecTex->get_isValid())){
awdMtl->set_specTexture(awdSpecTex);}
if (hasNormalTex){
if ((hasNormalTex)&&(awdNormalTex->get_isValid())){
awdMtl->set_normalTexture(awdNormalTex);}
awd->add_material(awdMtl);
materialCache->Set(mtl, awdMtl);
Expand Down
63 changes: 29 additions & 34 deletions src/maxawdexporter_scenegraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ void MaxAWDExporter::PreProcessSceneGraph(INode *node, bool parentExcluded, Bloc
bool excludeChild=parentExcluded;
bool isReference=false;
if (obj){
ILayer* thisLayer=(ILayer*)node->GetReference(NODE_LAYER_REF);
ILayerProperties* thisLayerprops=(ILayerProperties*)thisLayer->GetInterface(LAYERPROPERTIES_INTERFACE);
bool isSelectedLayer=thisLayerprops->getCurrent();
bool isEnabledLayer=thisLayerprops->getOn();
if((!isSelectedLayer)&&(opts->ExcludeUnselectedLayers())){
this->hasExcludedLayers=true;
allExcludedCache->Set(obj, true);
return;
}
if((!isEnabledLayer)&&(opts->ExcludeInvisibleLayers())){
this->hasExcludedLayers=true;
allExcludedCache->Set(obj, true);
return;
}

SClass_ID sid=obj->SuperClassID();
// no matter if set to export or "selectedObject"-export,
Expand Down Expand Up @@ -73,8 +59,7 @@ void MaxAWDExporter::PreProcessSceneGraph(INode *node, bool parentExcluded, Bloc
else if (ATTREQ(className_ptr,"AWDSkeleton")){
allExcludedCache->Set(obj, true);
this->hasExcludedObjects=true;
if (opts->ExportSkeletons())
ReadAWDSkeletonMod(node_mod, node);
ReadAWDSkeletonMod(node_mod, node);
}
else if (ATTREQ(className_ptr,"AWDVertexAnimSource")){
if (opts->ExportVertexAnim())
Expand All @@ -99,6 +84,18 @@ void MaxAWDExporter::PreProcessSceneGraph(INode *node, bool parentExcluded, Bloc
}
}
}
ILayer* thisLayer=(ILayer*)node->GetReference(NODE_LAYER_REF);
ILayerProperties* thisLayerprops=(ILayerProperties*)thisLayer->GetInterface(LAYERPROPERTIES_INTERFACE);
bool isSelectedLayer=thisLayerprops->getCurrent();
bool isEnabledLayer=thisLayerprops->getOn();
if((!isSelectedLayer)&&(opts->ExcludeUnselectedLayers())){
this->hasExcludedLayers=true;
allExcludedCache->Set(obj, true);
}
if((!isEnabledLayer)&&(opts->ExcludeInvisibleLayers())){
this->hasExcludedLayers=true;
allExcludedCache->Set(obj, true);
}
// if the node is allready excluded from export by its parent, we dont need to read its custom AWDObjectSettings
// and we dont need to check if its a light either...
if (excludeThis){
Expand Down Expand Up @@ -415,26 +412,24 @@ void MaxAWDExporter::ProcessSceneGraph(INode *node, AWDSceneBlock *parent, Block
if (mesh.getNumFaces()>0){
//output_debug_string(" -->Object is a Geometry");
AWDBlockList * matBlocks=NULL;
if ((opts->ExportScene())&&(opts->ExportMaterials())) {
//output_debug_string(" -->Search for materials on object");
matBlocks=GetMaterialsForMeshInstance(node);
if (autoMethodBlocks!=NULL){
if (autoMethodBlocks->get_num_blocks()>0){
if (matBlocks!=NULL){
AWDMaterial * awdMat=NULL;
AWDBlockIterator *itMat;
itMat = new AWDBlockIterator(matBlocks);
while ((awdMat = (AWDMaterial*)itMat->next()) != NULL) {
AWDBlock * awdFX=NULL;
AWDBlockIterator *itFX;
itFX = new AWDBlockIterator(autoMethodBlocks);
while ((awdFX = (AWDBlock*)itFX->next()) != NULL) {
awdMat->get_effectMethods()->append(awdFX);
}
delete itFX;
//output_debug_string(" -->Search for materials on object");
matBlocks=GetMaterialsForMeshInstance(node);
if (autoMethodBlocks!=NULL){
if (autoMethodBlocks->get_num_blocks()>0){
if (matBlocks!=NULL){
AWDMaterial * awdMat=NULL;
AWDBlockIterator *itMat;
itMat = new AWDBlockIterator(matBlocks);
while ((awdMat = (AWDMaterial*)itMat->next()) != NULL) {
AWDBlock * awdFX=NULL;
AWDBlockIterator *itFX;
itFX = new AWDBlockIterator(autoMethodBlocks);
while ((awdFX = (AWDBlock*)itFX->next()) != NULL) {
awdMat->get_effectMethods()->append(awdFX);
}
delete itMat;
delete itFX;
}
delete itMat;
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/maxawdexporter_textures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ AWDBitmapTexture * MaxAWDExporter::ExportBitmapTexture(BitmapTex *tex, AWDMateri

if (!isWrongMode){
awdTex = new AWDBitmapTexture(texname_ptr, strlen(texname_ptr));
int saveType=opts->TextureMode();
if (saveType==0){
awdTex->set_tex_type(EMBEDDED);
awdTex->make_invalide();
return awdTex;
}
}
if (customTexSettings.useUvAnim){
if(customTexSettings.thisID_len>0){
Expand Down

0 comments on commit eec2d7f

Please sign in to comment.