@@ -250,6 +250,8 @@ private void OnHoverSelectOutputNodeMenu(PointerEnterEvent evt)
250250 var playableGraph = _graphPopupField . value ;
251251 if ( ! playableGraph . IsValid ( ) )
252252 {
253+ _selectOutputNodeMenu . menu . AppendAction ( "No PlayableOuput node" , null ,
254+ DropdownMenuAction . Status . Disabled ) ;
253255 return ;
254256 }
255257
@@ -276,15 +278,21 @@ private void OnHoverSelectOutputNodeMenu(PointerEnterEvent evt)
276278 continue ;
277279 }
278280
279- var nodeName = $ "{ outputNode . PlayableOutput . GetPlayableOutputType ( ) . Name } " +
280- $ " ( { outputNode . PlayableOutput . GetEditorName ( ) } ) ";
281+ var nodeName = $ "# { i } [ { outputNode . PlayableOutput . GetEditorName ( ) } ] " +
282+ $ " { outputNode . PlayableOutput . GetPlayableOutputType ( ) . Name } ";
281283 _selectOutputNodeMenu . menu . AppendAction ( nodeName , _ =>
282284 {
283285 _graphView . ClearSelection ( ) ;
284286 _graphView . AddToSelection ( outputNode ) ;
285287 _graphView . FrameSelection ( ) ;
286288 } ) ;
287289 }
290+
291+ if ( outputCount == 0 )
292+ {
293+ _selectOutputNodeMenu . menu . AppendAction ( "No PlayableOuput node" , null ,
294+ DropdownMenuAction . Status . Disabled ) ;
295+ }
288296 }
289297
290298 private void OnHoverSelectRootNodeMenu ( PointerEnterEvent evt )
@@ -294,6 +302,8 @@ private void OnHoverSelectRootNodeMenu(PointerEnterEvent evt)
294302 var playableGraph = _graphPopupField . value ;
295303 if ( ! playableGraph . IsValid ( ) )
296304 {
305+ _selectRootNodeMenu . menu . AppendAction ( "No root Playable node" , null ,
306+ DropdownMenuAction . Status . Disabled ) ;
297307 return ;
298308 }
299309
@@ -320,11 +330,9 @@ private void OnHoverSelectRootNodeMenu(PointerEnterEvent evt)
320330 continue ;
321331 }
322332
323- var nodeName = $ "{ playableNode . Playable . GetPlayableType ( ) ? . Name ?? "?" } ";
324- if ( ! string . IsNullOrEmpty ( playableNode . ExtraLabel ) )
325- {
326- nodeName = $ "{ nodeName } ({ playableNode . ExtraLabel } )";
327- }
333+ var nodeName = ! string . IsNullOrEmpty ( playableNode . ExtraLabel )
334+ ? $ "#{ i } [{ playableNode . ExtraLabel } ] { playableNode . Playable . GetPlayableType ( ) . Name } "
335+ : $ "#{ i } { playableNode . Playable . GetPlayableType ( ) . Name } ";
328336
329337 _selectRootNodeMenu . menu . AppendAction ( nodeName , _ =>
330338 {
@@ -333,6 +341,12 @@ private void OnHoverSelectRootNodeMenu(PointerEnterEvent evt)
333341 _graphView . FrameSelection ( ) ;
334342 } ) ;
335343 }
344+
345+ if ( rootPlayableCount == 0 )
346+ {
347+ _selectRootNodeMenu . menu . AppendAction ( "No root Playable node" , null ,
348+ DropdownMenuAction . Status . Disabled ) ;
349+ }
336350 }
337351 }
338352}
0 commit comments