PDA

View Full Version : Teststing Completed: Blender 2.5 TS3 Tools


cmomoney
28th Oct 2010, 10:37 PM
Blender 2.5 TS3 Tools
http://thumbs.modthesims.info/getimage.php?file=1166521

Testing has been completed and the tools can be found in the Downloads section: http://www.modthesims.info/download.php?t=433882 I would like to thank all the testers who participated. Your help was valuable. :)

This script includes a set of tools for creating objects for TS3. Originally two scripts (import and export), I've merged them into one script and added several features:

Import/export - import/export MLOD and MODL files(.s3asc)
EZ Bake - bake multiplier images with just a few clicks
Image Loader - apply images to objects and get and idea how they will look in-game(including alphas)
Fix Seams - fix unsightly seams created when splitting vertices/edges(aligns vertex normals)
Make Glass - automagically give a group a glass material with one click(Blender viewing only)
Hide Bones - hide/show the bones in an object with one click

I would appreciate any help in testing and comments/suggestions.

Installation:

1. Download and extract the "io_TS3_tools.py" and put it where you can find it.
2. Start Blender and go to File->User Preferences(or press CTRL+ALT+U).
3. Click the "Add-Ons" button at the top of the User Preferences window.
4. Click the "Import/Export" button on the left, then click the "Install Add-On" button at the bottom.
5. Navigate to where you extracted the file and select the "io_TS3_tools.py" and click "Install Add-On". TS3 Tools is added to the the list.
6. Click the check box to the right of the TS3 Tools in the list. The importer/exporter is added to the File->Import menu, and the TS3 Tools and TS3 Image Loader panels are added to the Properties Editor under Scene.
7. Close the User Preferences window, and hit CTRL+U to save as default(if you want TS3 Tools to be there next time you start Blender).

Importing/Exporting:

Importing:
1. Select the MLOD/MODL in s3pe, right click on it, and select "export". Rename the the file to name.lod(for MLODs) or name.model(for MODLs). Renaming is really only necessary for files with long names, because Blender has a limit. Save the file in it's own folder.
2. Open the MLOD/MODL file with the S3 Object Tool and decompile it.
3. Start Blender, and in the Properties editor under Scene, click the Import button in the TS3 Tools panel or go to File->Import->Sims 3 MLOD/MODL. Navigate to the your folder and select the name_filebase.s3asc file.

To assign a new mesh to a group:
1. Right-click on the new mesh, the hold SHIFT and right-click on the mesh you want to replace.
2. Press TAB to o into Edit mode, Select all the vertices, and hit DELETE(X). Select "All" in the pop-up.
3. Press TAB to go back to Object mode, and press CTRL+J to join the new mesh to the group.

To assign vertices to the joints:
1. Right-click on the mesh and press TAB to go into Edit mode.
2. Select the vertices you want to add to a joint. In the Properties editor, select the "Object Data" panel(button with triangle/w dots at the corners).
3.In the "Object Data" panel under 'Vertex Groups', select the joint you want to assign to, and click assign.

Note: Make sure to triangulate all meshes before exporting. Select all vertices in Edit mode and press CTRL+T.

Exporting:
1. In the Properties editor under Scene, click the Export button in the TS3 Tools panel or go to File->Export->Sims 3 MLOD/MODL. Navigate to the folder you imported from, select the name_filebase.s3asc file, and press "Export MLOD/MODL".
2. Recompile the MLOD/MODL with the S3 Object Tool.
3. In s3pe, open the package. If you didn't rename the file when you exported it from s3pe, right-click and select 'Import'. If you did rename the file, right click on the MLOD/MODL and select 'Replace'.


EZ Bake:

note: You must have a UV/Image editor window open in your scene. Also, Material mode must be set to GLSL and Shading method to Textured to view the results on the mesh. See this tutorial (http://www.simswiki.info/wiki.php?title=Tutorials:Setting_Up_Blender_2.5_For_TS3_Object_Creation).

1. Select the groups you want to bake.
2. In the TS3 Tools panel in the EZ Bake section, select the size of the image, and the baking method you want to use.
3. Click the Bake button. Press ALT+Z to change to Textured shading and see results on the mesh.
4. In the UV/Image editor, go to Image->Save As to save you image. Default format is .png. you will have to open your image in an graphics program to save it as a .dds. Also The image is a little too bright by TS3 standards, so you'll need to darken it as well(contrast, levels, etc.)

Image Loader

note: Material mode must be set to GLSL and Shading method to Textured to view the results on the mesh. See this tutorial (http://www.simswiki.info/wiki.php?title=Tutorials:Setting_Up_Blender_2.5_For_TS3_Object_Creation).

1. Select the group you want to add an image to in the Image Loader panel. Click Open under whatever image you're trying to load(multiplier, mask, or overlay).
2. Navigate to the image and click Open.
3. If another group uses the same image, select that group in the Image Loader, click the button with the picture on it(Browse ID data), and find the image in the list. Press ALT+Z to change to Textured shading and see results on the mesh. If some groups appear invisible, it is because no images are loaded for them.
4. To remove an image from a group, simply click the X next to that image.

Fix Seams:

note: If you use Fix Seams, you cannot go into Edit mode with the group you used it on, or Blender will recalculate the vertex normals and undo the fix. You can use Edit mode on other groups as long as you haven't used Fix Seams on them. Fix Seams Should probably be one of the last things you do before exporting. Also, the result may not be visible, and the only way to verify that it worked is to go into Edit mode and turn on the vertex normals. But then Blender will undo the fix once you go back to Object mode, so you'll have to do Fix Seams again. :P

1. While in Edit mode, select the only the vertices of the seam(it may be easier to select the edges in edge select mode). Do the same for all groups that have seams you want to fix.
2. While in Object mode, select all the groups that have seams to fix and click the Fix Seams button. If there were no problems, 'Alignment complete' will printed in the Console.

Show/Hide Bones:

Simply click the button to hide all bones in the object, and click again to show them.

Make Glass:

Select the group(s) you want to make glass and click Make Glass. Press ALT+Z to change to Textured shading and see results on the mesh.
note: This does not make your object glass in-game. It's is merely a representation for viewing in
Blender.

Issues:
Complex objects such as beds, cars, etc., will not represent the bones correctly.
Importing more than one MLOD/MODL can cause problems. To start a new project, you should restart Blender.

cmomoney
2nd Nov 2010, 04:12 PM
Updated: fixed inverted x axis for bones on import.

cmomoney
5th Nov 2010, 08:31 PM
Updated:
- fixed to work with Blender 2.55 release
- eliminated use of text file for data storage
- rewrite for faster processing

leesester
5th Nov 2010, 09:27 PM
Looking very cool CMo :) Thanks for this

cmomoney
23rd Nov 2010, 07:16 PM
Huge update! :bunny: I merged to two scripts into one and added many features. See first post.

orangemittens
24th Nov 2010, 12:38 AM
You *know* how happy this makes me Cmo :) Thank you for sharing it :up:

ps: especially the EZ Bake :bunny:

orangemittens
24th Nov 2010, 02:28 AM
sorry for the double post...but I'm wondering how many joints Blender supports. Is it more than 128?

cmomoney
25th Nov 2010, 04:04 AM
I don't know of any limit. You can easily add 1000+ joints to Blender without it crying foul.

orangemittens
25th Nov 2010, 06:49 PM
Ty :) (xtra so it lets me post)

Flowerpower42
7th Dec 2010, 07:18 AM
Thank you very much for this cmomoney, i waited so long for this.

Dizor
12th Dec 2010, 08:23 AM
Looks very intresting, but I still want to jump into creating CAS stuff. Still, I might download and fiddle with it a bit :)

Suncat
30th Dec 2010, 03:48 AM
The installation worked fine. (Still not ready to actually try it yet.)

You might want to edit the installation instructions--a couple of points still refer to two files.

cmomoney
30th Dec 2010, 04:38 PM
Thanks for the report and the heads up on the instructions. :)

simoro
2nd Jan 2011, 02:22 AM
Don't know if this post is still running, but I downloaded blender 2.56, and installing the add-on works fine, but when I try the import with either method, I get an error message (see attached picture). Basically, no file browser window pops up, and blender complains about not having access to a resource. I would have gotten 2.54 or 2.55, but it looks like they only offer the new hotness.

orangemittens
2nd Jan 2011, 11:15 AM
You can get 2.54 beta from the Blender release archive:

http://www.blender.org/download/get-blender/older-versions/

simoro
2nd Jan 2011, 02:04 PM
Shiny, 2.55 worked no problem. (^_^) Thanks.

cmomoney
2nd Jan 2011, 02:26 PM
2.56 changed the API a tad bit. I've already fixed my script for it, but I want to do more testing before I upload it. If you want the 2.56 version I can send it to you.

eta: the 2.56 version has a problem exporting modified uv maps. Gotta figure it out before I release it.

eta: Nevermind...I'm and idiot and and it works. Still testing...

matimalia
4th Jan 2011, 06:00 PM
hello,
until now, i've got the blender and de TS3 Tools, but !!!
I don't find the windows of ADD ONS with the pannel of install, unable to find it, ten times i returns but no results, can i have a screenshot for each step of procédure please.
thank you very much and happy new year for alls.

cmomoney
4th Jan 2011, 06:23 PM
You have to go to the File menu and select User Preferences(or press CTRL+ALT+U). The User Preferences window looks like this:

http://wiki.blender.org/uploads/thumb/2/27/User-pref-add-ons.png/640px-User-pref-add-ons.png

The Install Add-On button is at the bottom-left.

simoro
8th Jan 2011, 05:00 PM
With 2.54 and 2.55, the models import fine, but exporting doesn't seem to be doing anything. I am not getting any errors, and it says the export was successful, but no change to the file. Even tried exporting it to a different file name, and the file is never created. All I am doing is scaling the object on the z-axis to make it taller to test some effects in the game.

cmomoney
8th Jan 2011, 07:21 PM
How did you know it was unchanged, by comparing the files or testing in-game? It won't create a new file, it overwrites the originals.

simoro
9th Jan 2011, 02:07 AM
Oro, I kind of figured out what was going on. All I was doing was scaling the whole object along the Z axis. If I actually go into edit mode and move vertex points around, and export, it saves those changes no problem. It does not seem to register changes made by the just the scaler in either object mode or edit mode. Kind of weird.

cmomoney
9th Jan 2011, 05:40 AM
Changes made in Object mode aren't reflected because you're not actually changing the mesh. The object is just a container for the mesh. In Edit mode, you're changing vertex locations in the mesh, and that's what gets exported. Moving the object around in Object mode doesn't export because you're not changing the position of the mesh in relation to the origin. Any changes made to the mesh(including scaling) in Edit mode get exported, for example, I made the tissue box into a tissue not-a-box:
http://www.modyourpanties.com/hosting/24959_110108164419tissue.jpg

Anyway, I appreciate you testing this and reporting for me. :)

kathaludlee
9th Jan 2011, 08:01 PM
Hey there,

is there any other way to get the add-on installed? Every time I try to open the user preferences dialog, blender just crashes. Is it possible to just copy the script into the right folder and get blender recognize the file somehow else?

Greetings

cmomoney
9th Jan 2011, 08:21 PM
Try changing the Editor type to the User Preferences, instead of starting the new window. It's the button usually in the corner of every header/footer with a pic and up/down arrows on it.

cmomoney
12th Jan 2011, 03:45 AM
UPDATED:1-11-11
-updated for Blender 2.56(will not work in previous versions)
-fixed problem with exporting objects with two UVs (i.e. dressers)
-changed Hide button to Show/Hide button
-bones are now hidden on import.

simoro
12th Jan 2011, 03:58 PM
Oro, got some fun questions, I have. Is there a way to see and directly manipulate the actual 3d coordinates for selected vertices/bones/joints? Some of the models I am working with need to be very precise. When I use the transform functions, all Blender shows me is the Delta Vectors (the change from its point of origin).

Also, I discovered an issue with the exporter (maybe). Manipulating vertices in edit mode will export just fine, but when I try and edit bones and joints (such as lengthening a bone), the changes do not export. I have a similar problem when editing the .lod files. With the .lod files, even vertex changes are not exporting. To determine this, I have been making changes, exporting, re-loading blender, and importing the files to check for changes. The files I have been messing with are S3_01661233_00000001_87AF7BB43EEB007A%%+MODL_filebase.s3asc and S3_01D10F34_00010000_87AF7BB43EEB007A%%+MLOD_filebase.s3asc from DeltaBuild0. They are the model and lod for the platforms.

EDIT:
Actually, disregard the exporting problem for now. No changes I am making right now are exporting, so it is probably idiot user error on my part. I will play around and see if I can isolate the issue.

EDIT #2:
Seems that if you use the export option under the file menu, changes are not being exported. Using the export button on the 'properties' window does export changes. Still, only vertex changes on the model files are exporting though. Bone changes and .lod file changes don't seem to be taking at all.

Sorry 'bout the long multi-edited post.

cmomoney
12th Jan 2011, 06:18 PM
Oro, got some fun questions, I have. Is there a way to see and directly manipulate the actual 3d coordinates for selected vertices/bones/joints? Some of the models I am working with need to be very precise. When I use the transform functions, all Blender shows me is the Delta Vectors (the change from its point of origin).
If you press 'N' while in the 3D window, it brings up the Properties panel on the right. There, you can use the transform selected items with sliders or numerically, and globally or locally. Is that what you're asking?

Also, I discovered an issue with the exporter (maybe). Manipulating vertices in edit mode will export just fine, but when I try and edit bones and joints (such as lengthening a bone), the changes do not export. I have a similar problem when editing the .lod files. With the .lod files, even vertex changes are not exporting. To determine this, I have been making changes, exporting, re-loading blender, and importing the files to check for changes. The files I have been messing with are S3_01661233_00000001_87AF7BB43EEB007A%%+MODL_filebase.s3asc and S3_01D10F34_00010000_87AF7BB43EEB007A%%+MLOD_filebase.s3asc from DeltaBuild0. They are the model and lod for the platforms.

EDIT:
Actually, disregard the exporting problem for now. No changes I am making right now are exporting, so it is probably idiot user error on my part. I will play around and see if I can isolate the issue.

EDIT #2:
Seems that if you use the export option under the file menu, changes are not being exported. Using the export button on the 'properties' window does export changes. Still, only vertex changes on the model files are exporting though. Bone changes and .lod file changes don't seem to be taking at all.

Sorry 'bout the long multi-edited post.
Actually, the bones are there for reference only. I haven't added the ability to edit bones or .lod changes. The only changes that are exported are changes to the mesh. Even if they were exported, the compiler wouldn't compile the file, as it expects only mesh/material changes. I'm am currently trying to get around this.

simoro
12th Jan 2011, 08:42 PM
Ah, yes the coordinate system in that properties menu is what I was looking for, thanks. It doesn't work with bones/joints in edit mode, but if those are reference only, I have no need to mess with them anyway.

cmomoney
13th Jan 2011, 01:52 AM
Well, in case you did need to move the bones that way, you can select a bone in edit mode. Then in the Properties Editor, click the Bone button and it gives you the same transform buttons.

zano972
13th Jan 2011, 02:59 PM
Hi all,
Hi cmomoney,

After installing your io_TS3_tools.py on a new blender v.255 32 bits installation, I got the folowwing information (in the blender Command Line Window) and of course the plugin does not work...

Error importing TS3 model with Blender v2.55 32b (http://ateliers.les-dessous-des-sims3.fr/Public/Foreign/Blenderv2.55-ts3_plugin.jpg)

Thanks a lot for responses.

cmomoney
13th Jan 2011, 03:52 PM
The current version(as of 1-11-11) only works on 2.56. The command in that line in the error has been changed.

zano972
13th Jan 2011, 04:46 PM
Thanks a lot cmomoney and so long.

ellacharmed
25th Jan 2011, 05:51 AM
Great work, cmo! Thanks!

It's my first time tinkering with this, did 2.56 change the filter name?
There are 2 rows of
- Import-Export (plugin not listed)
- Import/Export (plugin listed here)

I edited the .py file, so all is good; until your next update.
Now to find some 2.5 tuts...

cmomoney
26th Jan 2011, 03:39 AM
Hi Ella :) . Something got changed, but since some of the popular add-ons(not built in) were showing up in the same list I didn't bother changing it. I would like to know what changes you made, I could update the current file with it. I working on another update with some new goodies, and a tutorial. They're saying 2.56 may be the last of the betas, and I want to be able to move this out of testing. So if anybody has anything they want added/changed....

ellacharmed
27th Jan 2011, 02:44 AM
I just changed the slash to hyphen (dash) where it is referenced in a text-editor. I think there were 2 - iirc, at the top of the script file.
ie Import/Export to Import-Export

Am still learning the new interface and learning my way around doing the same Milkshape tasks. :)
Looking forward to your new updates and tut!

lenglel
27th Jan 2011, 11:27 AM
Cmomoney: Relocating conversation started in another thread.

> Could you please report in my script's thread, stating the objects you were trying to import?

A custom object of my own construction, tested and working in-game. I extracted the mlod
and modl resources with s3pe, then decompiled them one by one with wes howe's s3objtool
(v1.1). The resulting s3asc files were all blank, which is probably why they wouldn't load in
blender with your importer. Wes's tool was built with milkshape in mind, and the .s3asc files
might only be used for their names, to group the plethora of other files unleashed whenever
a mlod/modl resource is decompiled. The .s3ascg files looked like they might have a mesh
in them. I think I'll try changing their extensions to .s3asc and see what happens.

> As for using my scripts as an example, I wouldn't advise it, as I have very little experience in
> programming, so you may be dooming yourself from the start.
Be that as it may, I'd still rather climb a bush than an oak tree. I already got my script to
show up in the add-ons list by following your code, which was a lot farther than I got with
the blender tutorials I've looked at.

> If you look in Blender's script folder there are many examples there. I do my scripting inside Blender.
Thanks for the tip, and all the other nifty stuff you've done to keep the game from getting boring.

orangemittens
27th Jan 2011, 12:08 PM
What was the original clone lenglel? Although the s3asc appears blank, as you say, when I click on it and select import my objects have shown up in Blender every time.

cmomoney
27th Jan 2011, 01:43 PM
The .s3asc file is indeed blank, and just used to get the name for the rest of the files. The meshes are contained in the .s3ascg files. Changing their extensions will only make things worse, because my importer looks for .s3ascg files based on the .s3asc filebase name. If you could post the error(you can see it it the console window) and/or a MLOD/MODL that's giving the error, I could take a look at it. Thanks :) .

kathaludlee
27th Jan 2011, 03:30 PM
bug for 2.55: if the name of the file is too long, blender doesn't recognize the import-file as a .s3ac, because it cuts the last characters.

cmomoney
27th Jan 2011, 03:47 PM
bug for 2.55: if the name of the file is too long, blender doesn't recognize the import-file as a .s3ac, because it cuts the last characters.
I mentioned that in step 1 of Importing: Rename the the file to name.lod(for MLODs) or name.model(for MODLs). Renaming is really only necessary for files with long names, because Blender has a limit.

lenglel
27th Jan 2011, 11:29 PM
The .s3asc file is indeed blank, and just used to get the name for the rest of the files. The meshes are contained in the .s3ascg files. Changing their extensions will only make things worse, because my importer looks for .s3ascg files based on the .s3asc filebase name. If you could post the error(you can see it it the console window) and/or a MLOD/MODL that's giving the error, I could take a look at it. Thanks :) .

Turns out the object was loading, but is so much smaller than the
default cube that I couldn't see it from the default perspective.
So, it loads the object but I get the error shown in the attached
screen shot. I'm also attaching the .mlod file.

cmomoney
27th Jan 2011, 11:48 PM
They both imported without errors. I don't know what's wrong. That line just updates the scene.

lenglel
28th Jan 2011, 03:07 AM
I commented out line 603, the one that updates the scene, and it
loads without errors now. Maybe it has something to do with the
bone, which I assigned in milkshape? When it had the error the only
thing I saw was the mesh itself, now I'm seeing the mesh, shadow
group, and bone, but no error message. :blink:

cmomoney
28th Jan 2011, 03:18 AM
If all you saw was the mesh, and the mesh is group00, that means it quit building at that group, which was probably line 603. I don't think it's needed anyway, just something I didn't take out. Still odd why you get the error and I don't...

lenglel
28th Jan 2011, 10:10 AM
Might have something to do with the fact that I installed the plug-in without
rearranging the ui as per the tutorial. But that's just a guess.

kathaludlee
30th Jan 2011, 01:50 PM
I get a quite similar error message and export doesn't change anything... and I only have the Import and Export button, none of the others (bake, make glass etc.)

cmomoney
30th Jan 2011, 03:28 PM
I need to know what you did before you tried to export. Where all the buttons there before?

kathaludlee
30th Jan 2011, 09:41 PM
No. I installed the script as described, but only the Import/Export buttons were visible. Import worked, although I got the same error-message in the cmd-window. I then replaced the mesh and tried to export it. Nothing happened, except for the error.

Maybe there is a change and I just don't recognize it. But shouldn't the mesh look like the one I created when I import it again after exporting?

cmomoney
30th Jan 2011, 10:12 PM
The other buttons don't show until after you have imported something. What were trying to import that gave you the error?

kathaludlee
31st Jan 2011, 09:52 AM
No matter what I import, I get the same error (but for the record, it was a livingroom chair and the BarstoolBrasserie). And additional buttons are not visible after import either.

cmomoney
31st Jan 2011, 01:29 PM
:( What is the error you get on import?

orangemittens
31st Jan 2011, 01:33 PM
I was able to import the barstool with no errors and without even changing the name of the MLOD. I've also not run into a living room chair yet that wouldn't import...which one was it you were trying?

ellacharmed
31st Jan 2011, 01:38 PM
@cmo,
does that mean the Import error in the console can be ignored?

@kathaludlee,
Blender has this quirk about opening and saving files where you have to click the file name so it appears in the bar before you click on the Save/Export button. Also, are you Exporting while in Object Mode?
When I forgot to Tab back and still was in Edit Mode, the Export script pop-up another error and the files remain unchanged.

found bundled python: D:\PROGRA~1\Blender\2.56\python
bpy.utils.addon_enable io_TS3_tools
Loading group00 ...
Traceback (most recent call last):
File "D:\Users\ella\AppData\Roaming\Blender Foundation\Blender\2.56\scripts\ad
dons\io_TS3_tools.py", line 327, in execute
self.parsefile()
File "D:\Users\ella\AppData\Roaming\Blender Foundation\Blender\2.56\scripts\ad
dons\io_TS3_tools.py", line 602, in parsefile
bpy.ops.object.shade_smooth()
File "D:\Users\ella\AppData\Roaming\Blender Foundation\Blender\2.56\scripts\mo
dules\bpy\ops.py", line 180, in __call__
ret = op_call(self.idname_py(), None, kw)
SystemError: Operator bpy.ops.object.shade_smooth.poll() failed, context is inco
rrect

location:<unknown location>:-1

cmomoney
31st Jan 2011, 01:47 PM
No error should be ignored, if something went wrong, it's wrong. I can't re-create the errors(except for the export in edit mode, but I can fix that). Which import error are you getting ella?

ellacharmed
31st Jan 2011, 01:57 PM
Those in the quote box above. I was importing the SmokeAlarm.

cmomoney
31st Jan 2011, 02:25 PM
:( That imported fine for me as well:

http://thumbs2.modthesims2.com/img/2/5/4/5/4/5/7/MTS2_cmomoney_1172136_sa.jpg

ellacharmed
31st Jan 2011, 06:11 PM
mkay, am stumped and stuck. :help:

The first time I imported:
- 1st image
- with errors but got the backplate and all 3 groups in
- got a console msg of "Build Complete"
- manage to manipulate vertices
- export successfully
- reimport sucessfully and mesh was the modified version as expected.


2nd attempt:
- 2nd image
- still with console errors
- only group00 imported
- no console msg of "Build Complete"

In between those two tries, I was watching some Blender tutorials and following along. But no changes were done to the User preferences or other settings.
Well, I also had dinner and watched TV, so maybe been dulled by full belly and become a tv-zombie. :faceslap: Did I miss something obvious?

I then saw they had released 2.56a and downloaded that, still same outcome.
Should I go back to the first 2.56 beta version?

cmomoney
31st Jan 2011, 07:24 PM
Maybe wait until you're hungry and tv deprived and try again? ;) I can't seem to make it error with the smoke detector, no matter ho many time I try. The Blender versions shouldn't make a difference, they didn't change anything related to my script. Is it still the 'SystemError: Operator bpy.ops.object.shade_smooth.poll() failed, context is incorrect' error?

ellacharmed
1st Feb 2011, 05:14 AM
Now it's line 603:

Loading group00 ...
Traceback (most recent call last):
File "D:\PROGRA~1\Blender\2.56\scripts\addons\io_TS3_tools.py", line 327, in e
xecute
self.parsefile()
File "D:\PROGRA~1\Blender\2.56\scripts\addons\io_TS3_tools.py", line 603, in p
arsefile
me.update(bpy.context.scene)
TypeError: Object.update(): error with argument 1, "refresh" - Function.refresh
expected a string enum or a set of strings in ('OBJECT', 'DATA', 'TIME')

location:<unknown location>:-1


I only have this add-on enabled.
What others do you use?

I just loaded Default settings again and downloaded new, cos I thought my messing about in there (when I edited the Filter name) bork things up. :)
... and no luck still. Just had coffee now and hungry and it's still not working. :jest: I tried again with many different objects thinking the upstream tools' (s3oc/s3pe) versions matter, all same outcome.

cmomoney
1st Feb 2011, 02:38 PM
@kathaludlee I can't see the errors. I think they have to be .jpg. And not getting all the groups IS a problem. If don't have all the groups, that means the process was interrupted. I meant that that line in the code wasn't needed, because all it does is update the scene.

kathaludlee
1st Feb 2011, 02:45 PM
To clearify that: import worked. I only had group00, but that seems to be fine, and no additional buttons.
Error appeared in line 327 and 630.

@ella: Exporting in object mode didn't change anything...

I hope this is not just a stupid user's fault, but so far, export doesn't work for me :(

cmomoney
1st Feb 2011, 03:00 PM
Are you unwrapping the new mesh? That's is what that first error comes from. The second error, I'm still trying to figure out.

cmomoney
1st Feb 2011, 08:39 PM
Updated: 2-1-11
-fixed add-on location(thanks ellacharmd3D :) )
-fixed dreaded line 603 error
-added check for missing groups
-added check for missing UVs
-added check for quad faces
-added fix to rename UV textures when named incorrectly
-added ability to read comments in files(in preparation for geostates)

Blender doesn't have a way to update add-ons, so if you have the previous script installed. you will have to navigate to the add-ons folder and replace .py file with the new one. The directory is located in(depending on your installation): C:\Users\current user\AppData\Roaming\Blender Foundation\Blender\2.56\scripts\addons

kathaludlee
2nd Feb 2011, 11:03 AM
Haha, got the problem! blender obviously kept the old version of the tool and thus simply didn't tell me it worked. So now I replaced the file in the blender-folder as described and imported the barstool and voila! My mesh was there! :) So everything's fine. Thanks a lot!! (for your patience...)

ellacharmed
2nd Feb 2011, 11:11 AM
Success!
On the Import, all groups in.
On the Export, changes are saved (verified with another import). Yay!

Thanks, cmomoney! :gjob:

I should probably note that the scripts appear in both %appdata% and Program Files (where I had set the install to), in my system. So when updating the Add-Ons, have to remember to check both places.

Probably means my previous phails were due to the outdated version in Program Files path. :faceslap:
(My hungry tummy notwithstanding. It may still be the cause of future snoeflakiness. :p )

eta: ah, sniped! I type slooow. I blame hunger!

lenglel
10th Feb 2011, 05:28 PM
cmomoney: Would the fix for the line 603 error go something like this?
replace:
me.update(bpy.context.scene)
with:
me.update('OBJECT')

I've been busy with other things the past couple of weeks, and just came
up with this. I'll go download the new version now. :)

cmomoney
10th Feb 2011, 06:08 PM
Maybe, but I just omitted it. I have uploaded a release version, it's currently in moderation. In it, I changed some error checking and fixed a problem with not being able to work with the sunshadows. I'd like to thank everyone for your help on this project. :)

ETA: The release version can now be found in the Downloads section: http://www.modthesims.info/download.php?t=433882.Thanks again! :D