Age | Commit message (Collapse) | Author |
|
No need to call l10n stuff when it's disabled in the preferences.
Reviewed by @mont29, thanks!
|
|
Caused by own recent changes to menu handling
|
|
it was mistake in rB50b2c78ad8b6.
|
|
|
|
single terminator item.
Ideally no enum item function should return NULL, but since this is very
common and an intuitive mistake, better handle that case gracefully in
the RNA access function.
|
|
|
|
also fix leak in RNA_enum_is_equal
|
|
|
|
|
|
|
|
|
|
Was a mistake in rB9d6f05ed style edits (TRUE became false ;) ).
|
|
|
|
was often making much too big strings to show in a tip.
|
|
values of args
Refactored a bit WM api to generate operator's pystring, now it can also handle correctly macro operators. Thanks to Campbell for the review!
|
|
MEM_freeN().
|
|
|
|
pointer" to console.
|
|
When setting keymap properties to values equalling the RNA default, they will
get "unset" and automatic operator behavior is used. There is no way to
explicitly set the default value as a user.
1) To allow distinguishing uninitialized (not set) properties in the keymap
items, a few changes to the RNA struct comparison function are needed: Instead
of allowing only strict/non-strict comparison of 2 properties A and B in a
struct, this now has 3 modes:
* STRICT: compare only the actual property values (same as 'strict' before)
* UNSET_MATCH_ANY: if either A or B is unset, consider them a match (same as
non-strict before)
* UNSET_MATCH_NONE: if one property is set and the other not, consider them a
mismatch.
The new UNSET_MATCH_NONE mode is useful for keymaps, because it allows keeping
user-defined property values in the keymap even if they match the default
property value (see wm_keymap_diff function in wm_keymap.c)
2) A new operator is added for unsetting ID properties in the RMB context menu
and in user preferences next to keymap properties. This only works on ID
properties and deletes the ID property storage, so that the default value is used.
In the user preferences for keymaps the properties are shown in an inactive
layout to indicate that the default value is used (which some operators such as
the "select linked" op from the report use to trigger automatic behavior). When
the user sets a property it gets set and stays that way until explicitly "unset"
using the new operator.
|
|
When printing operator reports, ommit unset properties.
This is needed because in some cases operators check if a value is set or not, so filling in default arguments may change behavior.
|
|
|
|
This is kind of another way to animate layers which is disabled, but add an
exception to make this case work.
|
|
(reviewed by Brecht, thanks!):
* It was not clear that RNA_parameter_length_get() & co only affected dynamic properties, renamed them to RNA_parameter_dynamic_length_get() and such.
* Fixed RNA_function_find_parameter(), we can't use BLI_findstring() here, need to call RNA_property_identifier()!
* Fixed RNA_parameter_get() and RNA_parameter_set(), which were completely wrong for dynamic properties.
* Fixed RNA_parameter_dynamic_length_get/set_data(), they did not check the property was actually a dynamic one and were using again ugly blackmagic casting intead of ParameterDynAlloc structure!
* makesrna was still using an ugly hackish (and perhaps not always working) code when handling dynamic parameters, now synchronized with RNA_parameter_dynamic_length_get_data and RNA_parameter_get code.
|
|
|
|
size in some cases.
|
|
through.
|
|
(Keymap Editor)
|
|
bounds memory.
recent change to animsys r57904 exposed this error in some sintel files.
|
|
|
|
|
|
down, this time by the operator properties getting converted to a string for
display in the info window.
With 1000+ stroke points this can get slow, and takes up too much space anyway,
so now it's (somewhat arbitrarily) limited to printing only 10 points.
|
|
|
|
|
|
was due to slow implementation of slice operation for things like mesh uv data.
Made that faster now for cases where the internal storage is an array.
|
|
when strings use 'PROP_NEVER_NULL' we still want them to show an unlink button.
|
|
Some enums' items actually are generated from data (like the render layers of compo nodes), so they should not be translated. Added a PROP_ENUM_NO_TRANSLATE new RNA flag to tag those enums (only found those for nodes, but may be more of them around).
Also fix similar issue in main list of render layers (Py UI code! :P ).
|
|
|
|
Most of the places which relied on RNA_path_resolve() did so believing that if
it returned true, that it had found a valid property, and that the returned
pointer+property combination would be what the path referred to. However, it
turns out that if the property at the end of the path turns out to be a
"pointer" property (e.g. "data" for Object.data), this would automatically
become the pointer part, while the prop part would be set to null. Hence, if a
user accidentally (or otherwise) specifies a path for the single-property driver
variable type like this, then Blender would crash.
This commit introduces two convenience functions - RNA_path_resolve_property()
and RNA_path_resolve_property_full() - which mirror/wrap the existing
RNA_path_resolve() functions. The only difference though is that these include a
check to ensure that what was found from resolving the path was in fact a
property (they only return true iff this is the case), and make it explicitly
clear in the name that this is what they will do so that there's no further
confusion. It is possible to do without these wrapper functions by doing these
checks inline, but the few cases that had been patched already were pretty
hideous looking specimens. Using these just make it clearer and simpler for all.
I've also beefed up the docs on these a bit, and changed these to using bools.
|
|
Fixes an issue when adding several movie strips fails
second time in sequencer.
|
|
In fact almost any rna pointer-to-string had a memory leak.
Patch by Jakub Zolcik (sftd) with minor modification.
|
|
|
|
showing shortcuts in menus, now it shows them in the submenu.
|
|
bpy.data.mesh.remove(),
this should give an error message but it didn't.
|
|
|
|
Issue is that the real default context is NULL, however, in python and RNA, this value can't be used easily. So we use a specific string instead ("*"), defined as BLF_I18NCONTEXT_DEFAULT_BPYRNA.
From now on, all bpy/rna code should only use the BLF_I18NCONTEXT_DEFAULT_BPYRNA value, while all "usual" C code should use the BLF_I18NCONTEXT_DEFAULT value (BLF_pgettext is still able to "understand" both, anyway).
Also added BLF_is_default_context helper func, so that we can keep that check in a single place!
Finally, we should no need anymore to understand the void string "" as default context too - two values for a same thing are more than enough!
|
|
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.
=== Dynamic node type registration ===
Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes.
Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2].
=== Node group improvements ===
Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3].
The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there.
[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
|
|
|
|
support them.
|
|
|
|
to my
bugfix for multidimensional arrays.
|