[Bf-committers] Node type OUTPUT_MATERIAL undefined

Campbell Barton ideasman42 at gmail.com
Tue Mar 19 14:17:13 CET 2013


On Tue, Mar 19, 2013 at 8:49 PM, Lukas Tönne <lukas.toenne at gmail.com> wrote:
> Sorry, should have documented these changes better.
>
> Here is a simple wiki page to collect all changes. The identifier
> string change you ran into is the most important, most other things
> should still work. Please let me know if you encounter more problems
> of this sort:
>
> http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes/API_changes
>
> The sphinx error seems to be a missing default value in RNA, will try
> to track it down.
>
> On Tue, Mar 19, 2013 at 2:33 AM, INTERLICHTSPIELHAUS
> <interlichtspielhaus at gmail.com> wrote:
>> hi
>>
>> just did a fresh svn update
>> and a script just broke
>>
>> i am creating a new shadernode with the following line
>>
>> out_node = nodeTree.nodes.new('OUTPUT_MATERIAL')
>>
>> i receive the following color
>> RuntimeError: Error: Node type OUTPUT_MATERIAL undefined
>>
>> could someone point me to online dox with the recent python api changes ?
>>
>> when i try to run sphinx_doc_gen.py locally
>> i get the following output + segmentation fault
>>
>> /home/interlichtspielhaus/blender/doc/python_api/rst/bmesh.ops.rst
>> RNA Warning: Current value "0" matches no enum in 'EnumProperty',
>> 'addon_filter', 'default'
>>
>> ./blender() [0x95f41e]
>> /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fd9dd28c4a0]
>> /lib/x86_64-linux-gnu/libc.so.6(+0x162c01) [0x7fd9dd3b8c01]
>> ./blender(StringProperty_default_value_length+0x2b) [0x139772b]
>> ./blender(RNA_property_string_length+0x61) [0x12fd831]
>> ./blender(RNA_property_string_get_alloc+0x36) [0x12fd896]
>> ./blender(pyrna_prop_to_py+0x168) [0xcc0b98]
>> ./blender() [0xcc0ec0]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(+0xbf9cb) [0x7fd9e1aea9cb]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x6003)
>> [0x7fd9e1a92743]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x5f62)
>> [0x7fd9e1a926a2]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x816)
>> [0x7fd9e1a95656]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x59f5)
>> [0x7fd9e1a92135]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x816)
>> [0x7fd9e1a95656]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x59f5)
>> [0x7fd9e1a92135]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x5f62)
>> [0x7fd9e1a926a2]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x5f62)
>> [0x7fd9e1a926a2]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x816)
>> [0x7fd9e1a95656]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyEval_EvalCode+0x3b)
>> [0x7fd9e1a9593b]
>> /usr/lib/x86_64-linux-gnu/libpython3.3m.so.1.0(PyRun_FileExFlags+0xb9)
>> [0x7fd9e1bdefc9]
>> ./blender() [0xcb6f96]
>> ./blender() [0x95e871]
>> ./blender(BLI_argsParse+0xc7) [0xf82e97]
>> ./blender(main+0xace) [0x9404fe]
>> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fd9dd27776d]
>> ./blender() [0x95e089]
>>
>> thanks
>> inS

The crash isnt caused by pynodes, rather BLF_I18NCONTEXT_DEFAULT being NULL,
This gets passed to RNA as the default translation context - and rna
functions don't check for a null default when getting that string.

Bastien, you added comment about why having BLF_I18NCONTEXT_DEFAULT
set to NULL is important, any suggestions on how to fix?

-- 
- Campbell


More information about the Bf-committers mailing list