Skip to content

Commit

Permalink
Rename "syncOnlyVisible" to "syncHidden"
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkww committed Feb 25, 2014
1 parent 49508f9 commit 61e0505
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions AssetCommand.C
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#define kSyncAttributesFlagLong "-syncAttributes"
#define kSyncOutputsFlag "-so"
#define kSyncOutputsFlagLong "-syncOutputs"
#define kSyncOnlyVisibleFlag "-sov"
#define kSyncOnlyVisibleFlagLong "-syncOnlyVisible"
#define kSyncHiddenFlag "-shi"
#define kSyncHiddenFlagLong "-syncHidden"
#define kSyncTemplatedGeosFlag "-stm"
#define kSyncTemplatedGeosFlagLong "-syncTemplatedGeos"

Expand Down Expand Up @@ -130,9 +130,9 @@ AssetCommand::newSyntax()
CHECK_MSTATUS(syntax.addFlag(kSyncAttributesFlag, kSyncAttributesFlagLong));
CHECK_MSTATUS(syntax.addFlag(kSyncOutputsFlag, kSyncOutputsFlagLong));

// -syncOnlyVisible will cause only those objects that are visible to be sync'ed
CHECK_MSTATUS(syntax.addFlag(kSyncOnlyVisibleFlag,
kSyncOnlyVisibleFlagLong,
// -syncHidden will cause hidden objects to be sync'ed
CHECK_MSTATUS(syntax.addFlag(kSyncHiddenFlag,
kSyncHiddenFlagLong,
MSyntax::kNoArg));


Expand Down Expand Up @@ -283,16 +283,16 @@ AssetCommand::parseArgs(const MArgList &args)
CHECK_MSTATUS_AND_RETURN_IT(status);
}

bool syncOnlyVisible = false;
if( argData.isFlagSet( kSyncOnlyVisibleFlag ) )
syncOnlyVisible = true;
bool syncHidden = false;
if( argData.isFlagSet( kSyncHiddenFlag ) )
syncHidden = true;

bool syncTemplatedGeos = false;
if( argData.isFlagSet( kSyncTemplatedGeosFlag ) )
syncTemplatedGeos = true;

AssetSubCommandSync* subCommand = new AssetSubCommandSync(
assetNodeObj, syncOnlyVisible, syncTemplatedGeos
assetNodeObj, syncHidden, syncTemplatedGeos
);

if(argData.isFlagSet(kSyncAttributesFlag))
Expand Down
6 changes: 3 additions & 3 deletions AssetSubCommandSync.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

AssetSubCommandSync::AssetSubCommandSync(
const MObject &assetNodeObj,
const bool syncOnlyVisible,
const bool syncHidden,
const bool syncTemplatedGeos
) :
AssetSubCommandAsset(assetNodeObj),
mySyncAll(true),
mySyncAttributes(false),
mySyncOutputs(false),
mySyncOnlyVisible( syncOnlyVisible ),
mySyncHidden( syncHidden ),
mySyncTemplatedGeos( syncTemplatedGeos )
{
}
Expand Down Expand Up @@ -108,7 +108,7 @@ AssetSubCommandSync::doIt()
MPlug instancedPlug = elemPlug.child( AssetNode::outputIsInstanced );
bool instanced = instancedPlug.asBool();

if( !mySyncOnlyVisible || visible || instanced )
if( !mySyncHidden || visible || instanced )
{
AssetSubCommand* syncOutput = new AssetSyncOutputObject(elemPlug,
myAssetNodeObj, visible, mySyncTemplatedGeos );
Expand Down
4 changes: 2 additions & 2 deletions AssetSubCommandSync.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AssetSubCommandSync : public AssetSubCommandAsset
public:
AssetSubCommandSync(
const MObject &assetNodeObj,
const bool syncOnlyVisible,
const bool syncHidden,
const bool syncTemplatedGeos
);
virtual ~AssetSubCommandSync();
Expand All @@ -31,7 +31,7 @@ class AssetSubCommandSync : public AssetSubCommandAsset
bool mySyncAttributes;
bool mySyncOutputs;

const bool mySyncOnlyVisible;
const bool mySyncHidden;
const bool mySyncTemplatedGeos;
MDagModifier myDagModifier;

Expand Down
6 changes: 3 additions & 3 deletions houdiniEngineCreateUI.mel
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ houdiniEngine_buildRecentAssetsMenu(string $menuItem)
}

global proc
houdiniEngine_syncAssetOutput(int $syncOnlyVisible, int $syncTemplated)
houdiniEngine_syncAssetOutput(int $syncHidden, int $syncTemplated)
{
string $currSels[] = `ls -sl`;
if( size($currSels) < 1 )
Expand All @@ -230,8 +230,8 @@ houdiniEngine_syncAssetOutput(int $syncOnlyVisible, int $syncTemplated)
delete $children[$ii];
}
string $cmd = "houdiniAsset";
if( $syncOnlyVisible )
$cmd = $cmd + " -syncOnlyVisible";
if( $syncHidden )
$cmd = $cmd + " -syncHidden";

if( $syncTemplated )
$cmd = $cmd + " -syncTemplatedGeos";
Expand Down
8 changes: 4 additions & 4 deletions performAssetSync.mel
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ proc string assembleCmd()

if( $assetSyncMode == 2 )
{
$cmd = ($cmd + " -syncOnlyVisible");
$cmd = ($cmd + " -syncHidden");
}

$cmd = $cmd + " -sync ";
Expand All @@ -212,13 +212,13 @@ proc string assembleCmd()

int $assetSyncMode = `optionVar -query assetSyncMode`;

int $syncOnlyVisible = 0;
int $syncHidden = 0;
if( $assetSyncMode == 2 )
{
$syncOnlyVisible = 1;
$syncHidden = 1;
}

$cmd = $cmd + $syncOnlyVisible;
$cmd = $cmd + $syncHidden;

$cmd += ",";

Expand Down

0 comments on commit 61e0505

Please sign in to comment.