outliner isolate node types

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2013   #1
outliner isolate node types

Hi,

I want to customize my outliners.
The first one should only display DAG objects. That can easily be done using:
itemFilter( "-byType", "dagNode" );


The second is harder. It should only display container nodes and all of its contents ( DAG,
non-DAG ).
Displaying containers is easy:
itemFilter( "-byType", "container", "-byType", "dagContainer" );


But how to exclusively display the other nodes which are part of the container?


The third one is also harder.
I would like to display only non-DAG nodes in the outliner.
I managed it with first getting all scene nodes and then use
itemFilter( "-difference", filterAllNodes, filterAllDAGNodes );


( filterAllNodes and FilterAllDAGNodes I got with "itemFilter()" and "itemFilter( "-byType", "dagNode" ), respectively )

That works, but when the scene gets bigger, the outliner takes some seconds! for processing ( obviously the "difference" operation?!? ) when things in the scene are changed.

May there be another option for the display of non-DAG nodes?


thanks!

Last edited by sciLoop : 04 April 2013 at 10:00 AM.
 
Old 05 May 2013   #2
Ok, maybe listing the complete script helps...
The question still is: how can the execution speed be improved.
With a lot of nodes in the scene, this outliner just gets damn slow.


  //
  global proc sciTriOutliner()
  {
  	// create the window
  	//
  	string $win_sciTriOutliner = "sciTriOutliner";
  	if( window( "-exists", $win_sciTriOutliner ) )
  	{deleteUI $win_sciTriOutliner;}
  
  	string $outlinerWindow = window( "-title", "sciTriOutliner", "sciTriOutliner" );
  	
  		paneLayout( "-configuration", "bottom3" );
  				
  			// Filter for DAG nodes.
  			//			
  			if( !itemFilter( "-exists", "sciDAGFilter" ) )
  			{
  				itemFilter( "-byType",			"dagNode",
  							"-text", 			(uiRes("m_initDefaultFilters.kGeometry")),
  							"-category",		"Modeling",
  							"-classification",	"builtIn",
  							"sciDAGFilter" );
  			}
  
  			// Filter for containers and sets.
  			//
  			if( !itemFilter( "-exists", "sciContainerSetsFilter" ) )
  			{
  				itemFilter(	"-byType",			"container", 
  							"-byType",			"dagContainer",
  							"-byType",			"partition",
  							"-byType",			"objectSet",
  							"-text",			"containerSets",
  							"-category",		"Modeling",
  							"-classification",	"builtIn",
  							"sciContainerSetsFilter" );
  			}
  
  			// Filter for nodes which are not DAGs, Sets and containers.
  			//
  			if( !itemFilter( "-exists", "sciNodeFilter" ) )
  			{
  				string $filterAllNodes = itemFilter();
  				string $filter3 = itemFilter( "-difference", $filterAllNodes, "sciContainerSetsFilter" );
  				string $filter4 = itemFilter( "-difference", $filter3, "sciDAGFilter", "sciNodeFilter" );
  			}
  			
  			// Create the outliners.
  			//
  			string $sciDAGOutliner		   = "sciDAGOutlinerEditor";
  			string $sciNodeOutliner		  = "sciNodeOutlinerEditor";
  			string $sciContainerSetsOutliner = "sciContainerSetsOutlinerEditor";
  						
  			string $outliner0 = 
  			outlinerEditor(	"-mainListConnection",			selectionConnection( "-worldList" ),
  							"-selectionConnection",			selectionConnection( "-modelList" ),
  							"-autoExpand",					false,
  							"-ignoreDagHierarchy",			false,
  							"-autoSelectNewObjects",		false,
  							"-doNotSelectNewObjects",		false,
  							"-transmitFilters",				false,
  							"-expandObjects",				false,							
  							"-highlightActive",				true,
  							"-highlightSecondary",			true,							
  							"-showDagOnly",					true,
  							"-showShapes",					false,							
  							"-showCompounds",				false,
  							"-showLeafs",					false,
  							"-showAttributes",				false,
  							"-showConnected",				false,
  							"-showUVAttrsOnly",				false,
  							"-showAnimCurvesOnly",			false,
  							"-showUpstreamCurves",			false,
  							"-showNumericAttrsOnly",		false,
  							"-showTextureNodesOnly",		false,
  							"-showPublishedAsConnected",	true,
  							"-expandConnections",			false,
  							"-showUnitlessCurves",			false,							
  							"-showSetMembers",				true,
  							"-showReferenceNodes",			true,
  							"-showReferenceMembers",		true,
  							"-showAssets",					true,
  							"-showContainerContents",		true,
  							"-showContainedOnly",			false,
  							"-showSelected",				false,
  							"-displayMode",					"DAG",
  							"-filter",						"sciDAGFilter",
  							$sciDAGOutliner );
  
  
  
  			string $outliner1 =
  			outlinerEditor(	"-mainListConnection",			selectionConnection( "-worldList" ),
  							"-selectionConnection",			selectionConnection( "-modelList" ),							
  							"-autoExpand",					false,
  							"-ignoreDagHierarchy",			false,
  							"-autoSelectNewObjects",		false,
  							"-doNotSelectNewObjects",		false,
  							"-transmitFilters",				false,
  							"-expandObjects",				false,							
  							"-highlightActive",				true,
  							"-highlightSecondary",			true,							
  							"-showDagOnly",					false,
  							"-showShapes",					false,							
  							"-showCompounds",				false,
  							"-showLeafs",					false,
  							"-showAttributes",				false,
  							"-showConnected",				false,
  							"-showUVAttrsOnly",				false,
  							"-showAnimCurvesOnly",			false,
  							"-showUpstreamCurves",			false,
  							"-showNumericAttrsOnly",		false,
  							"-showTextureNodesOnly",		false,
  							"-showPublishedAsConnected",	false,
  							"-expandConnections",			false,
  							"-showUnitlessCurves",			false,
  							
  							"-showSetMembers",				false,
  							"-showReferenceNodes",			false,
  							"-showReferenceMembers",		false,
  							"-showAssets",					false,
  							"-showContainerContents",		false,
  							"-showContainedOnly",			false,
  							"-showSelected",				false,
  							"-filter",						"sciNodeFilter",
  							$sciNodeOutliner );
  							
  							
  							
  			string $outliner2 =
  			outlinerEditor(	"-mainListConnection",			selectionConnection( "-worldList" ),							
  							"-selectionConnection",			selectionConnection( "-modelList" ),							
  							"-autoExpand",					false,
  							"-ignoreDagHierarchy",			false,
  							"-autoSelectNewObjects",		false,
  							"-doNotSelectNewObjects",		false,
  							"-transmitFilters",				false,
  							"-expandObjects",				false,							
  							"-highlightActive",				true,
  							"-highlightSecondary",			true,							
  							"-showDagOnly",					true,
  							"-showShapes",					false,							
  							"-showCompounds",				false,
  							"-showLeafs",					false,
  							"-showAttributes",				false,
  							"-showConnected",				false,
  							"-showUVAttrsOnly",				false,
  							"-showAnimCurvesOnly",			false,
  							"-showUpstreamCurves",			false,
  							"-showNumericAttrsOnly",		false,
  							"-showTextureNodesOnly",		false,
  							"-showPublishedAsConnected",	true,
  							"-expandConnections",			false,
  							"-showUnitlessCurves",			false,							
  							"-showSetMembers",				true,
  							"-showReferenceNodes",			true,
  							"-showReferenceMembers",		true,
  							"-showAssets",					true,
  							"-showContainerContents",		true,
  							"-showContainedOnly",			false,
  							"-showSelected",				false,
  							"-filter",						"sciContainerSetsFilter",
  							$sciContainerSetsOutliner );
  
  
  	window( "-e", "-height", 900, "-width", 500, $outlinerWindow );
  	showWindow( $outlinerWindow ); 
  	
  }
  
  


Try it out, I think its actually quite useful.



edit: the '-negate' flag of the 'itemFilter' command turned out to be useful!

Last edited by sciLoop : 09 September 2013 at 10:05 AM.
 
Old 05 May 2013   #3
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:54 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.