Hotkey for Hiding? (solved!)

LoonyLoony Posts: 1,817
edited March 2020 in New Users

Hi, is there a Hotkey for "closing the eye" in the scene tab? in Big scenes, I fly around and click the object and then hide it by clicking the eye. Now I ask me is it possible to put that "eye" on my hotkey? So I can click an object, press whatever and then is the object hidden.

Sadly the F3/Hotkey dont have a Search function ;( would be nice...

Post edited by Loony on

Comments

  • RandomRandom Posts: 205

    There is a 'tool' set by 3D Universe in the market where you can hide things more easily but I found it worked inconsistantly.

  • LoonyLoony Posts: 1,817

    I dont want a complete tool, I tested the camera optimizer, but that doesnt work at my big House scene, because it only works with some kind of contents, not with groups, not with ... I don't know, it have too muche "nope" rules :/

     

  • macleanmaclean Posts: 2,438

    Caveat - This is an old script, not updated for DS 4, but it works perfectly.

    // DAZ Studio version 3.1  filetype DAZ Scriptvar nSelectedItems = Scene.getNumSelectedNodes();var n, curNode;function setPropertyNumeric( oProperty, aKeys ){	if( aKeys.length == 1 )	{		oProperty.setValue( aKeys[ 0 ] );		return true;	}	else if( oProperty.canAnimate() )	{		for( var i = 0; i < aKeys.length; i += 2 )		oProperty.setValue( aKeys[ i ] + m_nSTART_TIME, aKeys[ i + 1 ] );		return true;	}	return false;}function setTransformProperty( sPropertyName, aKeys ){	var oProperty;	switch( sPropertyName )	{		default:			break;	}	setPropertyNumeric( oProperty, aKeys );}if( nSelectedItems == 0 )	MessageBox.warning( "This action requires an item within the scene to be selected.", "Selection Error", "&OK", "" );else{	beginUndo();	for( n = 0; n < nSelectedItems; n++ )	{		curNode = Scene.getSelectedNode( n );		if( curNode != undefined )		{			curNode.setVisible( false );		}	}	acceptUndo( "Node preset" );}

    Copy it, paste it into a text editor, then save it with a .dsa extension. Select any figure, body part or prop and apply the preset. You can also undo the action. If you want another script to switch things back on, change the line near the end

    curNode.setVisible( false );

    to

    curNode.setVisible( true );

    This is from my Room Creator series of products, and installs onto a toolbar, but you can easily create a custom action and make a toolbar button for it yourself.

    mac

  • LoonyLoony Posts: 1,817

    I will test it later, thanks.

  • LoonyLoony Posts: 1,817

    Thanks works, I put V on it and it works thanks very much!

  • Richard HaseltineRichard Haseltine Posts: 100,804
    maclean said:

    Caveat - This is an old script, not updated for DS 4, but it works perfectly.

    // DAZ Studio version 3.1  filetype DAZ Scriptvar nSelectedItems = Scene.getNumSelectedNodes();var n, curNode;function setPropertyNumeric( oProperty, aKeys ){	if( aKeys.length == 1 )	{		oProperty.setValue( aKeys[ 0 ] );		return true;	}	else if( oProperty.canAnimate() )	{		for( var i = 0; i < aKeys.length; i += 2 )		oProperty.setValue( aKeys[ i ] + m_nSTART_TIME, aKeys[ i + 1 ] );		return true;	}	return false;}function setTransformProperty( sPropertyName, aKeys ){	var oProperty;	switch( sPropertyName )	{		default:			break;	}	setPropertyNumeric( oProperty, aKeys );}if( nSelectedItems == 0 )	MessageBox.warning( "This action requires an item within the scene to be selected.", "Selection Error", "&OK", "" );else{	beginUndo();	for( n = 0; n < nSelectedItems; n++ )	{		curNode = Scene.getSelectedNode( n );		if( curNode != undefined )		{			curNode.setVisible( false );		}	}	acceptUndo( "Node preset" );}

    Copy it, paste it into a text editor, then save it with a .dsa extension. Select any figure, body part or prop and apply the preset. You can also undo the action. If you want another script to switch things back on, change the line near the end

    curNode.setVisible( false );

    to

    curNode.setVisible( true );

    This is from my Room Creator series of products, and installs onto a toolbar, but you can easily create a custom action and make a toolbar button for it yourself.

    mac

    Is this derived from one of the old DS scripted presets, or a sample script? If so, credit etc. should be given. The script does have some redndant code, functions that are not used, and it shoud be checking it did something before adding itself to the Undo stack (with a more infromative name). I hope, having posted all of that, that it wasn't one of mine.

    Anyway, Rob has posted a sample showing how t do it more efficiently in DS 4: http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_visibility_toggle/start

  • LoonyLoony Posts: 1,817

    can that Script from "Rob" hide/unhide a clicked object with the same hotkey? CTRL+Z is neat, but... if I wanna undo it later it will not work.

    And yeah, normally I can read script language but the Script whichw as ehre posted did I not understand so much^^... your linked script Richards sounds better understandable :D

     

     

  • Richard HaseltineRichard Haseltine Posts: 100,804

    It's a toggle, it will hide what is visible and make visible what is hidden.

  • LoonyLoony Posts: 1,817
    edited March 2020

    seems like "your" script is better, I will try it later (doing a render now).

    Thanks

     

    tested and thanks, pressing V hide/unhide ^_^

    This will make the work much faster!

    Post edited by Loony on
  • macleanmaclean Posts: 2,438

    Richard,

    I paid for a number of scripts and a custom toolbar when I updated Room Creator. These were written for DS 2 by Guadaloup, who has completely vanished from the community and hasn't been seen for years. He did give me permission to distribute these, his only request being that the toolbar installation script remain encrypted.

     

     

Sign In or Register to comment.