Show-hide floor in viewport

Hi!

I can't understand how to do - show or hide floor in viewport.

Is it really in Daz script?

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,888

    The floor grid can be shown from the viewport option menu  -the lined button in the top-right corner. There isn't a modelled floor to be shown or hidden, though in Iray there is an option to draw a ground as a shadow catcher - if you want a floor you need to add one (for example with a plane primitive from Create>New Primitive).

  • EdpaEdpa Posts: 46

    Richard, you didn't understand me :) 

    I mean using a script. Maybe floorstyle in 3DViewport ?

    From  ds3_daz_script_development_kit_3.0.1.144_docs : enum    DZ3DViewport Floostyle  - NO_FLOOR , WIRE_FLOOR , SOLID_FLOOR .

    I noticed too that the word floor is a reserved. In Script IDE it has blue color.

    But how to collect this n a normal script?  I am a newbie yet :)

  • Richard HaseltineRichard Haseltine Posts: 100,888
    // Get the Viewport Manager from the built-in MainWindow objectvar VPMgr = MainWindow.getViewportMgr();// If successful get the curret viewportif ( VPMgr ) {	var activeVP = VPMgr.getActiveViewport();	// and if that worked get its actual 3D viewport	if ( activeVP ) {		var threeDVP = activeVP.get3DViewport();		// and if that was successful we can set the floor type		// which is a property not a method so we just use =		if ( threeDVP ) {			// show			threeDVP.floorStyle = threeDVP.WIRE_FLOOR ;			// or hide			// threeDVP.floorStyle = threeDVP.NO_FLOOR ;		}	}}

     

  • EdpaEdpa Posts: 46

    Cool. Thanks. This working good

Sign In or Register to comment.