[Bf-taskforce25] RNA Naming convention

Campbell Barton ideasman42 at gmail.com
Wed Dec 3 09:00:17 CET 2008


On Wed, Dec 3, 2008 at 4:24 PM, GSR <gsr.b3d at infernal-iceberg.com> wrote:
> Hi,
> ideasman42 at gmail.com (2008-12-03 at 1523.47 +1100):
>> On Wed, Dec 3, 2008 at 3:18 PM, GSR <gsr.b3d at infernal-iceberg.com> wrote:
>> > Hi,
>> > aligorith at gmail.com (2008-12-03 at 1716.27 +1300):
>> >> On Wed, Dec 3, 2008 at 5:10 PM, GSR <gsr.b3d at infernal-iceberg.com> wrote:
>> >>
>> >> > Hi,
>> >> > ideasman42 at gmail.com (2008-12-03 at 1451.33 +1100):
>> >> > > Could identifier names starting with numbers be forbidden with RNA?,
>> >> > > this is messing up python which cant do
>> >> > >   bpy.curves['MyCurve'].3d = True
>> >> > >
>> >> > > (using setattr works but is ugly syntax)
>> >> >
>> >> > Instead of making it special and as per
>> >> >
>> >> > http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA#Naming_Conventions
>> >> > "Don't shorten names unnecessarily." use three_d instead of 3d (and
>> >> > this example can be used to add the rule that identifiers must start
>> >> > with lower case, for compability).
>> >>
>> >> Ewwww.... I'd rather go with Campbell's suggestion than use something as
>> >> vulgar as this.
>> >
>> > And next time it is not a toggle? What prefix gets added?
>> >
>> > GSR
>>
>> Your right my suggestion doesn't cover this.
>> GSR - Do you have an example of a blender attribute like this?
>
> The point is that an easily solvable issue (find the proper name) was
> turned into an exception that would have to stay forever in the
> API. Floats do not get a leading "fl" neither 2 names with opposed
> meaning (in this case think negative or 1/f).
>
> tridimensional does not sound vulgar and starts with lower case letter.
>
> GSR

comparing to an "fl" prefix isn't correct, I'm suggesting
curve.enable3d not curve.bool3d


More information about the Bf-taskforce25 mailing list