Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Query current world grid spacing?

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 394 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 20/12/2012 at 03:22, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   r13 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;  C++  ;  XPRESSO  ;  PYTHON  ;

      ---------
      Does the api offer any way to query what the current world grid line spacing is and can it be changed programmatically? Is there any way to read and/or change the many Viewport settings under the "Display, Filter, View, Back, HUD and Steroscopic" tabs?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 20/12/2012 at 04:23, xxxxxxxx wrote:

        Hi Xen,

        Originally posted by xxxxxxxx

        Does the  **api  **offer any way to query what the current world grid line spacing is and can it be changed programmatically?

        Yes, here's some Python code:

          
        bd = doc.GetActiveBaseDraw()
        bd[c4d.BASEDRAW_DATA_SNAP_PLANE_SPACING] = 150
        c4d.EventAdd()
        

        Originally posted by xxxxxxxx

        Is there any way to read and/or change the many Viewport settings under the "Display, Filter, View, Back, HUD and Steroscopic" tabs?

        The BASEDRAW_ enum ( resource\res\description\dbasedraw.h ) contains all the parameters IDs for the view settings.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 20/12/2012 at 04:50, xxxxxxxx wrote:

          Thanks.

          I need to get a proper handle on how this all works because atm it's not doing what I expect.

          I entered your code and the grid spacing figure changed to 1500 (not 150).  Also, by editing the code and changing the 150 to another number did not cause the figure to update - even after compiling and hitting Execute nothing changed.

          Where exactly can I learn about how the scripting UI is supposed to work?  Why doesn't the edited code work or replace the old code?

          Is there another set of documentation I'm missing here?  I can't find anything in the c4d help to explain how to go about actually enter and modify any code - where's that info?

          Forgive my ignorance here, but I am only just starting to get into the whole scripting thing but have no clue what I'm dealing with.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 20/12/2012 at 05:29, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            I entered your code and the grid spacing figure changed to 1500 (not 150).  Also, by editing the code and changing the 150 to another number did not cause the figure to update - even after compiling and hitting Execute nothing changed.

            This is because you are in millimeters world unit. And nothing changes because the value has been already set.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post