0
$\begingroup$

I am having some problems with Smart UV Project (Smart UV project creates overlapping uv-coordinates).

The wiki says that Smart UV Project searches seams and uses them to unwrap the mesh (https://www.blender.org/manual/render/blender_render/textures/mapping/uv/unwrapping.html#smart-uv-project).

The script for that is written in python (why not in C/C++? That could be a lot faster because the algorithm could be parallelized.) and is located here Blender\2.75\scripts\startup\bl_operators\uvcalc_smart_project.py. In Line 494 to 498 edge_seams is set. I also want to mark the edges as seams so that they are highlighted in the viewport.

But when I change something in the script (just a simple print("test")) I can't use Smart UV Project anymore because I get a lot of error messages when starting blender.

search for unknown operator 'OBJECT_OT_subdivision_set', 'OBJECT_OT_subdivision_
set'
search for unknown operator 'OBJECT_OT_subdivision_set', 'OBJECT_OT_subdivision_
set'
search for unknown operator 'OBJECT_OT_subdivision_set', 'OBJECT_OT_subdivision_
set'
search for unknown operator 'OBJECT_OT_subdivision_set', 'OBJECT_OT_subdivision_
set'
...
location: <unknown location>:-1
search for unknown operator 'RENDER_OT_preset_add', 'render.preset_add'
rna_uiItemO: operator missing srna 'render.preset_add'

C:\Program Files\Blender Foundation\Blender\2.75\scripts\startup\bl_ui\propertie
s_render.py:136
search for unknown operator 'RENDER_OT_preset_add', 'render.preset_add'
rna_uiItemO: operator missing srna 'render.preset_add'

Why can't I edit these files? Are they locked or something like that?

$\endgroup$
  • 4
    $\begingroup$ They are definitely not locked, but not sure what's going on there. There was a recent change to the addon management, but if there's no error until you edit a script, then it can't be it. Maybe post the entire script after your modifications, could be some strange syntax / whitespace error. Otherwise, refer to the official bug tracker. $\endgroup$ – CodeManX Jul 25 '15 at 14:29
  • 2
    $\begingroup$ python can be picky about formatting, if you don't add your extra line with the right indentation it can break all following code, also make sure you use spaces to indent in python and not tabs. Also of note is that seams and creases are two different settings that work separately and can also be displayed separately. $\endgroup$ – sambler Jul 26 '15 at 15:16
  • $\begingroup$ Ups, you were right! I used notepad++ for that simple change (normally I use pycharm) and so the indention was wrong (tab instead of spaces). Thanks! $\endgroup$ – Hamburml Jul 26 '15 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.