Discombobulator New Version 9-26-05

I’m having so much fun with this Discombobulator :D. Here is my attempt.
http://img247.imageshack.us/img247/6168/metropolis6oa.th.jpg

No luck using the script. Perhaps because I am using Blender CVS?

I get this on the console:

File “<string>”, line 1200, in bevent
File “<string>”, line 493, in discombobulate
TypeError: unsupported operand type(s) for /: ‘vector’ and ‘int’

Any ideas what is happening?

Koba

Yeah, I tried to run it in the CVS as well, and it had the same problem. For now, try using it in 2.37 and I’ll see if I can fix the problem. Sorry about that.

It looks like bpy doesn’t support dividing a vector by an integer anymore

It works now, thanks. :smiley:

Koba

OK, I found some time and fixed the problem, I just had to make my own divide vector by integer method and replace any <vector>/<int> appearances. It should work in the Blender CVS now (at least it does for me). Just download it again: the link on the first post should be accurate. If you still have problems, let me know.

Thanks

Hello hello!

I wanted to first say thanks for doing this script. I’m going to need to make a fairly large city for my project and I’d actually started thinking about doing something similar to this until I found Discombobulator, ready for use!

I have feedback. I hope that’s okay.

  1. Assigned material indices get killed. It would be nice to have material indicies recognized (IE, the protrusions keep the material of the faces they’re from, so if you change all the materials of the tops you can have different materials, etc). Likewise, vertex groups are eaten and it would be nice to be able to keep them, although it’d also be nice to have a button which allows adding or not adding things to the groups.

  2. In line with the above, it’d be even better if Discombobulator itself created new, random colors for different parts (protrusion sides, tops, and doodads, for example), each with a new material and new material index, for simplifying keeping the parts separate.

  3. I’ve noticed that when you try to create protrusions with min/max taper of 0, strange things happen. (One such strange thing made one of my scenes totally unusable, and made Discombobulator crash when I tried to discombobulate a simple mesh.)

  4. Instead of warning people when min is more than max, why not just swap the values by default?

  5. It seems Discombobulator has issues dealing with meshes when you’re in edit mode; I know there’s a function to leave edit mode – are you using it?

  6. It’d be really sweet if instead of doing the copy-before-modding, you pushed the mesh onto Blender’s undo stack. Is that possible in Python?

Anyway, what you’ve done is amazing. I hope you keep working on it and that it becomes a permanent part of the Blender distribution.

I really like this script alot.I’m currently using it in a little project i’m working on right now.Anyway,heres a test render i did some time ago…

https://blenderartists.org/forum/viewtopic.php?p=452344&highlight=#452344

heya, thanks.

kattkieru:
I don’t mind the feedback.

  1. Yeah, I know about this… I actually tried to add code to keep materials in the early stages of the script, but it ended up more trouble than it was worth at the time. I was planning on adding material support soon, but I just haven’t found the time… sorry. I haven’t actually done anything with the vertex groups, so thanks for pointing that out.
  2. Same as above, I was actually looking into adding, not random colors, but different materials for protrusion/top/doodads.
  3. Sorry about it destroying one of the scenes, I haven’t run into this problem yet, but I will do some more experimentation to see if I can reproduce some of the problems.
  4. That is actually a great idea; I never thought of doing that. I had tried to make the slider stop once they reach the same value, but I never thought of swaping them.
  5. It does leave editmode.
  6. If you deselect the copy before modifying, it does go into the undo stack.

Thanks for the feedback, and I’ll see if I can find some time to make changes.

Syrux. I just wanted to say that your tutorial page was VERY CLEAR and well written. Which to me is the most important thing in a script. So many scripts or plugins for blender are written but with very bad docs So I even though they add value to blender I tend not to use them becasue I cannot deduce intially what each thing on the interface does.

Congradulations and keep up the good work

I like this, its really fun to play around with, though I suggest not hitting the discombobulate button hundreds of times, Blender suddenly took up about 240mb of my ram %|
Can I ask if this should really be called a discombobulator? I thought that was just a long name people made up when they didn’t want anyone else to understand, kinda quantum-phsyionics or the like…

Tobs

Hey guys, thanks for the comments, I’m glad people are finding this useful.

I just got around to adding some features and releasing a new version. Details are in post 1.

I haven’t done anything with vertex groups yet, because they are really messy, and figuring out which group each doodad goes to can get a little complex. Also, I haven’t touched UV coords yet because right now I’m not sure how to go about doing them.

Anyway, check out the new version and I will try to update the tutorial

Have fun

syrux: YOU ROCK buddy. Just that scrolling interface was worth getting this version. you need to publisize how you did that so other script makers can take a hint. Even without any extra functionality to the script that feature was word the download alone.

syrux: YOU ROCK buddy. Just that scrolling interface was worth getting this version. you need to publisize how you did that so other script makers can take a hint. Even without any extra functionality to the script that feature was word the download alone.

Thanks,

The scrolling interface, for anyone that is interested, was done in a tedious way. There might be a better way to do it, but this is what came to mind first for me. Basically, every gui element has it’s initial position plus a variable for each of the dimensions. In this case, I used hadd and wadd as variables for height addition and width addition.

Then, in the event(evt,val) method, you can have it check for evt == RIGHTARROWKEY or any other key (key constants found in the Blender API_Intro). All the event will do is add or subtract a certain amount from hadd or wadd depending on what key is pressed and will update the gui.

A quick note: using Blender.Redraw() didn’t update every time, so it is best to use Redraw(1) to update immediately.

Anyway, I hope more people will find that useful. Remember to test the new features out and let me know if something seems broken.

syrux you wrote.

> The initial Gui Layout will change depending on the aspect ratio of the window it is in.
> Using the arrow keys will scroll the gui.
A side note: for assigning material indices to each part, a 0 will cause that part to recieve whatever material was assigned to the original face. Discombobulator will create materials as needed by the assigned indices, up to 4. Any thing past that will be set to the highest material index available.

Ok the gui did not adjust to the aspect ratio of the viewport that i had up when I tried it. Do not take that as a solid observation though. I only tried once and was too amazed at the scrolling interface to really notice anything else.

Second: when you said:

Discombobulator will create materials as needed by the assigned indices, up to 4. Any thing past that will be set to the highest material index available

Did you mean that Discombobluatore will actually MAKE the materials AND the indexes. I ASSume it will assign them the default 0.8,0.8,0.8 grey color. The you can face select and click the color box to choose what you want. When you say “highest material index availible” do you mean highest one in the mesh before you discombobulate or will the script create new indexes starting with the highest one that was already there before it was run?

Once again GREAT tute.

Yes the script is very usefull, I used this script on my latest work too:
https://blenderartists.org/forum/viewtopic.php?t=51641

Wow.

New version is quite sexXxy. I think you fixed the bugs that bothered me in the last version, and it appears it’s been added to the official release (it was included in the 2.40 alpha!).

That’s sweet.

The most wanted feature for me is still the material group coloring (you said above you haven’t gotten to it yet). Once that’s finished you’ll have a fully functional deathstar!

… Or at least, someone could make you one with the plugin.

Please keep up the great work! My short may depend on your auspices. ^-^

Thanks for the comments,

SHABA1, it should add material indices if they aren’t already there. But, if you assign a material index to one higher than 4 or however many are linked to the mesh (if more than 4), then the script will just use the highest material index there is. Also, if there is no material assigned to the mesh, discombobulator won’t add any (there must be at least one material).

kattkieru, I’m still not sure about what you mean by material group coloring. If you leave the “Assign materials by part” button off, it will use the material that was assigned to each face before it was discombobulated. Also, if you change one of the assigned material indices rollers to 0, that portion of what is discombobulated will get the original material index.

Thanks again, and if you find something wrong, let me know.

Ahh. it wasn’t your fault; blender doesn’t update the materials list right away, so it appeared like there were none there.

Everything seems to be working amazingly well; I thank you again for the addition of the material things. I still think the creation of randomly-colored materials for the indices would be a nice bonus, but it’s not needed. Maybe I’m just lazy. :wink:

From a non-lazy standpoint I have two more suggestions, which you could take or leave:

  1. Can you make the scrolling respond to the scroll wheel on mice?
  2. Settings saving would be sweet. The script is sometimes closed by undo, and the default settings are a bit weird, so it’d be really cool to have those settings pushed either into a text file or into the .blend file (I heard there’s a way to do that using custom data blocks). This would also necessitiate a new button – “DEFAULT SETTINGS” or something.

Anyway, it’s working sweet now under 2.40 alpha. Cheers again!

See Edit

Help I get this error :

Using Python version 2.4
Traceback (most recent call last):
File “<string>”, line 1579, in bevent
File “<string>”, line 1214, in discombobulate
File “<string>”, line 254, in copyObjStuff
RuntimeError: object must be linked to object data (e.g. to a mesh) first

As you can see I am using Python 2.4 with Blender 2.40 Alpha 1, this is used on a cube with a basic material? Help!!!

Ken

EDIT : Oh I turned off “copy before modifying” and it worked!.