Jump to content

Archived

This topic is now archived and is closed to further replies.

jamesinsincity

Grid Be Gone!

Recommended Posts

  • Topic Author
  • Hi All,

    I wonder if any of you have the script to get toggle the grid on and off - I lost it when I rebuilt my system this week (Vista).

    Thanks

    Jim

    Share this post


    Link to post
    Share on other sites

    I recall 3DAttack had this to download. But in 10.5 all you need to do is press Shift + V and on the HUD tab add the grid HUD element to the viewport. Clicking on this toggles the grid on and off. You can change the behaviour by right clicking on in the attributes and changing the grid HUD element to local. This then allows you to add a grid HUD element to each window and have each grid in each view either on or off.

    3DKiwi

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • I remember now who gave it to me - Rich_Art - is he still around these shores?

    Jim

    Share this post


    Link to post
    Share on other sites

    The 3DAttack version was actually part of a toggler plug-in.

    Here's a basic script version which popped up somewhere, possibly CGTalk(?).

    doc->GetActiveBaseDraw()#BASEDRAW_DISPLAYFILTER_GRID =
    !doc->GetActiveBaseDraw()#BASEDRAW_DISPLAYFILTER_GRID;[/codebox]

    Cheers, Alan.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Great! Thanks Al - I've been doing a lot of seas / oceans with dynamic interactions - and the grid will often visually confuse - I've come to depend on that toggle.

    Best

    Jim

    Share this post


    Link to post
    Share on other sites

    Yeah I use that script to. I've made a short cut with the letter G. wotrks great. :)

    Peace,

    Rich_Art. :signthankspin:

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • With the letter G??? Where and how do I do this Rich_Art - I'm not a programmer! (Hey good to see you here - whew!!)

    Jim

    Share this post


    Link to post
    Share on other sites

    You can assign any keystroke or combo with any modifier keys to create a shortcut.

    Just open the Command Manager, use the Name Filter to quickly jump to 'Toggle Grid'.

    In the sample below you can see that I have two Grid controls. One is the 3DA plugin, the other is the script.

    Select the script version, type the short-cut you want and click 'Assign'. That's it. :signthankspin:

    The Command Manager will alert you to any keystrokes which are already assigned.

    You can either re-assign or create another keystroke. Better to go for a unique new one and retain the defaults.

    Another option is to use the Script Manager to load an Icon and dock it to a convenient place in your tool menu.

    You can let the Script Manager create one or you can knit your own and simply load it, again in the Script Manager.

    Cheers, Alan.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Hi Al,

    Thanks for the work you put in explaining this to me - I'm pretty clear on how to get the command manager to assign a key and icon - what I'm not clear on is where to put that script - do I copy those lines of code onto a blank wordpad document and place it in "scripts" in the C4D Program Files?

    Jim

    Share this post


    Link to post
    Share on other sites

    No problem, Jim.

    You just paste into the panel in the Script Editor.

    First click "New" and enter a relevant name. I used Test in the example, you would use Grid.

    Copy and paste the script code into the main panel. Leave "Enable=True" as it is.

    If you have a custom icon, click "Load Icon". It will appear where the small white coffee icon is, beside the script drop-down button.

    Click "Execute" a couple of times to test the script. The grid in your viewport will toggle as you test.

    Finally, click "Save All". The script will be saved automatically to your Scripts folder and will be available via the drop-down button in the Script Manager or via the Plugins menu > User Scripts >.....

    Cheers, Alan.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • ALAN!! Thank you so much - it works like a charm - I REALLY APPRECIATE your help!

    Best

    Jim

    Share this post


    Link to post
    Share on other sites

    Thanks for the extra explanation. It is very simple but you have to know how to do it. :)

    Peace,

    Rich_Art. :signthankspin:

    Share this post


    Link to post
    Share on other sites
    Guest
    This topic is now closed to further replies.

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...