1
$\begingroup$

If the button [ Run Script ] does nothing and Alt+P does nothing and right click Run Script does nothing. I don't even get an error message. Do I have to enable something?

This is my first ever attempt at running a python script:

https://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts/addons/object_batch_rename_datablocks.py

Wiki link: Batch Rename Datablocks

$\endgroup$
3
  • 2
    $\begingroup$ The problem is in the script. It gets executed, but it only adds an Operator and no gui for it. You can search for the operator with Spacebar. The name is "Batch Rename Datablocks". If you need some gui, the script must register a class of bpy.types.Panel $\endgroup$ Commented Jul 25, 2016 at 7:44
  • $\begingroup$ @Jerryno, sorry just see your comment. $\endgroup$
    – lemon
    Commented Jul 25, 2016 at 7:59
  • $\begingroup$ @lemon no problem at all, I had a chance to write an answer but did a quick comment instead. You invested the time and made a .gif, the points are yours. $\endgroup$ Commented Jul 25, 2016 at 12:35

2 Answers 2

3
$\begingroup$

In the 3D view, type space then type "batch rename..." :

enter image description here

"Run script" just allows this to be available.

Since this is an Addon (not a regular script) you can make it (the operator and its functionality) permanently available, see: How to install an Addon?

$\endgroup$
5
  • $\begingroup$ It is easy and simple. Thanks. But what is frustratingly consistent with blender.org is I am suppose to translate: "UI location | Search: Batch Rename Datablocks" Seems obvious in hindsight but for a one who is learning a new aspect this does not say to do this or this could just be a statement. It is not obvious this is an instruction or something that needs to be done for the script to work. It is all written with no consideration to the new user. Then I have to come here and bother the good folks for answers. If it wasn't for StackExchange I would not even try using blender. $\endgroup$ Commented Jul 25, 2016 at 8:13
  • $\begingroup$ @EricHuelin, I understand, but few new users need this kind of scripts as beginners.. Imagine yourself seeing MS Excel for the first time and try to play with some Visual Basic in it... $\endgroup$
    – lemon
    Commented Jul 25, 2016 at 8:16
  • $\begingroup$ The UI pops up but have no idea how to use it. All I wanted to do is replace the period "." with something else. I want to FBX export to Maya and periods in names are incompatible with Maya. $\endgroup$ Commented Jul 25, 2016 at 8:38
  • $\begingroup$ @EricHuelin, well, the usage is to write another question for that. Could you do it ? $\endgroup$
    – lemon
    Commented Jul 25, 2016 at 8:40
  • $\begingroup$ I just figured out what it is. It is useless for what I want to do. $\endgroup$ Commented Jul 25, 2016 at 8:54
0
$\begingroup$

Blender has a text editor in which you can run scripts.

Just open the text editor, paste your code and run script.

Hope it helps!

$\endgroup$
2
  • $\begingroup$ I did that. In the text editor I dragged and dropped the script and it shows the script in the text editor, I would not be able to right click Run Script otherwise. $\endgroup$ Commented Jul 25, 2016 at 7:27
  • $\begingroup$ Are you sure your script is working properly? Have you tried it with an other script? Maybe one you know works? $\endgroup$
    – Reaper
    Commented Jul 25, 2016 at 7:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .