Did you see the latest awesomeness being implemented in Blender just today!!!

Really hope that the ruler ends up to be a clone of SketchUp one, which is a fundamental tool for mechanical/architectural modeling. :yes:

Well… I understand what you want to say but certainly the unability of this blenderartists forum to keep the spaces before the text is not helping you one iota to express. :stuck_out_tongue:

I am going to try:

function_a()
{
if(test)
{
do stuff;
}
else
{
do nothing;
}
}

LOL, no way. We only can post some image of the code.
I don’t care much of the structure of the code. I am not paranoic. But really having the brackets in same column for me is the way. And indentation would show you very clearly the structure as you wanted to post and I also tried.

LOL, you’re very welcome to it, great somebody found it useful. Great thread!

For code formatting we have the

 tag. Only visible in advanced post view, though, the one with the hash icon.


int myfunc() {
a = 1;
b = 4;
printf("Hello World!);

return 0;
}

Yeah!


function_a()
{ 
   if(test)
   {
     do stuff;
   }
   else
   {
     do nothing;
   }
} 

Ha! Someone must have noted my comment a while back about this very matter. Good to see this implemented at long last. I never understood why users would ever be forced to click one item in a row/column at a time.

Thanks Bao2 for starting this thread. Very useful - sometimes it is difficult to keep track of these small changes/additiones.

At last!!! :smiley: Rulers!!! :spin: Big thank you!!!

Really interesting thread. Thanks

The new code format is generally considered better “practice” in every design document I’ve ever seen. Not sure why, as I much prefer to read it the other way as well.

It’s funny, but coming from a non-scripting language background, all these various formats are alien and hard for me to read. Braces and brackets and colons, oh my. VB might require a little more typing (and I know it in no way compares in functionality), but I find it’s readability far ahead.

Anyway, that ruler and protractor looks awesome. Going to have play with that a bit.

oh baby, this looks damn sexy…

Code is more compact this way, so less vertical scrolling, better overview. I was like you at first, but when you start to use it, that becomes quite natural quickly, I have now hard time to go back.

Wait wait… what? What does that have to do with scripting languages? Most of this code is in C.

Is exactly the same length in my case because the line with the starting bracket I use for writing code too. So I like this:


function_a() 
{ if(test)   
  { do stuff;   
  }  
  else   
  { do nothing;   
  } 
}


instead this:


function_a(){ 
  if(test){ 
    do stuff;   
  }   
  else{ 
    do nothing;   
  } 
}


Is much clearer the way I like.
I also don’t understand the 4 spaces for indentation thing. I like two. Why four? It creates much wider lines with very nested code.

Last thing about programming style: I love the “camel” form for variables. For example look to this code:

x = abs(myfunction()*3.0);
b = “The result is:”;

And now using Camel format:

fCoordX = abs(myfunction()*3.0);
sResult = “The result is:”;

Where first letter says it is a float or a string in the two lines above. And then a descriptive name.
The idea of not using the first letter I think is because all the code editors have the option of hovering the mouse and it shows it is a float or what it is. But well, why to have to hover the mouse when I can see it directly in the name??? Also, what if I am looking to the code not in the code editor but in a web page like Blender Foundation svn page? I do this many times and sometimes I wonder what the variable is and I have to open the file to know)
I use for global variables the camel as seen above. For local variables I use: fcoordx, sresult. First letter is always what the variable is and then a meaningful name to the variable, and if it is local in low caps.

So: each one has its own likings in programming and is really difficult sometimes feel comfortable reading code written by others. How will be this solved in the future? I wonder. But at the moment there is no solution in any code editor. If you change the code to fit what you like the commits would be a nightmare!

Tablet users will like this
http://lists.blender.org/pipermail/bf-blender-cvs/2013-March/054298.html

Pressure spacing for all paint modes now, it looks like he’s already gotten most of the unification work done so he can proceed to move on to the fun stuff.

EDIT: Here’s something that’s not even in Blender yet, but is already in a completed state and sitting in the patch tracker.
http://projects.blender.org/tracker/index.php?func=detail&aid=34570&group_id=9&atid=127

I’ve always wondered when we would have the ability to change the view while in circle-select mode (which is what this patch is).

Bao

Camelcase is great, but different groups and companies will have different use cases. Some always use camelcase and use _p for things like pointers, some capitalize all pointers, some only camelcase class names. It definitely makes it harder to jump into a project mid-step without a design doc to go along with it.

Sorry, I wasn’t paying enough attention. For some reason I thought they were python excerpts.

its to line up with from tab sizes, since depending on software, tab is either 4 or 8 spaces. Just be glad its not 8.

very interesting and informative thread, i like the ruler tool, instead of using measure panel.

Tablet users will like this
http://lists.blender.org/pipermail/b…ch/054298.html

Pressure spacing for all paint modes now, it looks like he’s already gotten most of the unification work done so he can proceed to move on to the fun stuff.

that’s a goood news ! :eyebrowlift:

Ace Dragon, link better here instead the mail list because this is much easier to read I think no?