Age | Commit message (Collapse) | Author |
|
internally use chars to 0/1.
|
|
This commit implements a way to define context of property which is used by
localization stuff and which is needed to resolve translation context when
some word wit the same english spelling is used in different meanings
(like Manual in meaning of tutorial, and Manual in meaning of something is
setting up by hand).
To define property's context there's a function RNA_def_property_translation_context.
If property doesn't have context, regular BLF_gettext function is used to get
translation of property name, otherwise BLF_pgettext is used for this.
Hence, for correct translation, messages in .po files should be marked
by "msgctxt" context, otherwise property with context declared wouldn't
be translated at all. Toolchain scripts from bf-translation project
would be updated soon.
If context for some values of enumerator property, property itself should
be moved to other context and all items from this enum would be moved to
this context automatically (it's impossible to move one few items to
another context).
P.S. Think context like "BRUSH" or "MODIFIER" are preferable than "NOUN" and "VERB"
because in some cases the same english noun used in different areas better be
translated differently to make translation more native.
|
|
Talked with Brecht and Campbell and they both agreed that bpy.types should match bpy.props
In the ideal world we would rename bpy.props to BooleanProperty. This would break scripts though. So we go for a compromise and at least have some consistency.
|
|
show when its supported.
|
|
property errors.
|
|
|
|
noticeable on large files.
- also netbeans project file generator now uses branch name for project.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
- move font.c unicode functions into string_utf8.c and rename to fit with other BLI_string funcs.
|
|
|
|
also replace use of strlen() where checking first char is enough.
|
|
this is annoying for translators so rather then correct along the way which gives merge conflicts for branches - print a complaint message.
|
|
layout.prop("blah", text="Translate Me!")
|
|
- replace (strlen(str) == 0) with str[0]=='\0'
|
|
last meeting.
This means script authors can perform actions using these callbacks rather then on drawing which puts blender in a readonly state.
Simple example:
import bpy
def up_func(self, context):
print("test")
bpy.types.Scene.testprop = bpy.props.FloatProperty(update=up_func)
bpy.context.scene.testprop = 11
# prints -> test
|
|
|
|
argument can optionally be a function rather then a list.
|
|
generic, to be used by render engine later.
|
|
- also fix own bad assert from yesterday & remove testing cmake print.
|
|
gives warnings with variable length args.
|
|
Was a naming collision with 'keys' python method, reserve keys/items/values/get for python.
Updated animsys_update.py for shapekey data paths.
renamed:
Particle.hair --> hair_keys
Particle.keys --> particle_keys
Key.keys --> key_blocks
EnumProperty.items --> enum_items
KeyMap.items --> keymap_items
noted:
http://wiki.blender.org/index.php/Dev:2.5/Py/API/Updates#Since_2.56a
|
|
|
|
|
|
|
|
|
|
- fix mistake with grease pencil UI (&& was intended but & used).
- use (void) rather then () across _all_ blenders code.
- a few minor edits, don't shadow stack variables in roll calculation & avoid running memset() for VBO vertex map.
|
|
was being used for errors when the new property wasn't on the last struct.
added CONTAINER_RNA_ID() define to get the ID from the ContainerRNA type.
|
|
The problem was flag-enums were being treated as regular enums, a default value of 0 was using the first enum item, whereas with flag enums we want to be able to use 0 as a default value to specify all flags are off.
|
|
also make rna function for new images require width and hight args.
|
|
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
|
|
this missed some cases, now also disallow ints to be wrapped as floats.
This commit also exposed a number of cases where ints/floats were incorrectly wrapped.
Bugs like [#25416] wont slip through the cracks anymore.
|
|
colors to 0 but now don't set a hard min, each property needs to define.
- use_old_bump setting only applies to material texture slots.
|
|
could be set to -100.0 if typed in manually, this is sure to cause bad/unpredictable behavior.
|
|
'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
|
|
to directly adjusting the loc/scale/rot.
- pose bone 'matrix_local' wasn't well named since it didn't work like object or regular bones.
- pose bone matrix values for rna had array access rather then 4x4 matrix access.
note: for pose bones update scripts by renaming 'matrix_local' --> 'matrix_basis'
|
|
initializers is a c99 feature.
|
|
other has corrupted filename)
|
|
- bpy.app.debug can now be set, removed bpy.data.debug (since this is not blendfile data)
- added bpy.app.tempdir, this is needed because the userpref temp dir isn't always set, $TEMP may be used instead and scripts need temp dir access.
|
|
PointerProperties
cant test if this fix solves the problem matt is having but it at least fixes an error caused by classes created in exec(),
when the properties pointers were copied the hash key still referred to the python object which could be freed. in most cases this wouldnt happen (would be kept in bytecode) but with exec() the property string is freed immediately.
|
|
- move: material.add_texture(tex, coords, mapto) --> material.texture_slots.add()
- added material.texture_slots.create(index), material.texture_slots.clear(index)
- texture slot functions also work for lamp and world now.
Other minor changes
- allow rna functions to set FUNC_NO_SELF and FUNC_USE_SELF_ID at once.
- [#23317] Changed some operators' RNA to accept lengths, a modification I made to this patch made it not work as intended, removed this edit so unit buttons appier in the UI for certain operators.
- Sphinx doc gen, 2 columns rather then 3, didnt quite fit in some cases.
|
|
using this for object.vertex_groups.assign([index list ...], group, weight, mode)
|
|
patch [#23317] Changed some operators' RNA to accept lengths
by Lorenzo Tozzi (oni_niubbo)
with the minor change to use XYZ subtype rather then LENGTH.
|
|
mix-in's to define properties.
An example of how this is useful - an importer mixin could define the filepath properties and a generic invoke function which can run the subclasses exec for each selected file.
- Panels and Menus now skip the property check when registering.
- renamed _idproperties_ to _idprops_ in function names, function names were getting very long.
|
|
|
|
- remove brush array for each Paint struct, just use a single brush pointer.
- removed rna function based template filtering.
- filter brushes using a flag on the brush and the pointer poll function.
- set the brushes using a new operator WM_OT_context_set_id().
TODO
- remake startup.blend, currently brush groupings are lost.
- rewrite WM_OT_context_set_id() to use rna introspection.
|
|
function for ID drobdowns (currently unused)
|
|
|
|
error if they collide with dynamic props.
|
|
eg:
bpy.types.Scene.IntProperty(attr="myprop") # adds
bpy.types.Scene.RemoveProperty(attr="myprop") # removes
|
|
|