Commit Graph

18 Commits

Author SHA1 Message Date
Campbell Barton
4f49a3b906 added ipo script template from blenderartists forTe, made scripts refresh on load factory settings and replaced elysiun with blenderartist.org in headers 2008-04-23 14:04:05 +00:00
Willian Padovani Germano
e85f145c19 Scripts:
- Scripts config editor was not working due to changes in module BPyRegistry.py.
- AC3D exporter: a little cleanup + small improvements like sorting objects.
2007-05-06 15:47:07 +00:00
Willian Padovani Germano
bdf75bfbef Scripts:
- Updated ac3d exporter to use first material found in the mesh for loose edges (lines) color. Inspired by bug report from Stewart Andreason. Also made a few updates to very old parts of the code, got rid of two "try/except".

- Updated ac3d importer to be even more forgiving to bad data. Also added option to turn transparency on in the 3D View for models using materials with alpha < 1.0. Added optional support for ac3d's subdiv tag, works by adding a subsurf modifier to the imported model(s) that have this tag, so they appear as intended.
2007-02-22 20:19:58 +00:00
Willian Padovani Germano
82bfd281f2 Scripts:
Misc updates to the ac3d importer and exporter:
- use Mesh instead of NMesh;
- properly export modified data and materials from either ob or obdata (thanks for mesh.getFromObject :) );
- option to export local rot and loc info;
- better import / export of hierarchies;
- + tiny updates here and there to support old or weird .ac files.
2007-01-14 18:13:47 +00:00
Campbell Barton
859b7f207e modified scripts from using older/depricated Python API commands, deprecated scn.getChildren() in the docs. 2006-12-25 09:17:23 +00:00
Willian Padovani Germano
2ca99a5e09 Scripts:
- Jean-Michel Soler updated the svg to obj module used by Paths
Importer (thanks!)
- user request: added option to control whether user prefers per face
(uv face select "TwoSided" toggle) or per mesh ("Double Sided") single /
double face info in ac3d exporter.

BPY:
- Blender_ShowHelp() was now crashing Blender when called for the
second time, due to EXPP_dict_set_item_str decrementing the reference
count of an object passed as argument to Blender_ShowHelp() (so not
owned by that function).
2006-06-18 19:05:51 +00:00
Willian Padovani Germano
4b01aa7aa5 Scripts:
The orange -> HEAD merge reverted some scripts to older versions. This only
affected the ones that already existed before the orange branch.
Minor issue, easy to fix.

All in all, kudos to kaito, Hos and others for all the hard work in
bringing (coding, merging) all these changes to the main branch.
2006-01-29 19:17:53 +00:00
Willian Padovani Germano
6cec51b259 BPython bug fixes:
- #2646 reported by Campbell: Python/Fileselector (moving from fileselector called by script to another space caused script to hang around open but not accessible)
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2646&group_id=9

- #2676 reported by Wim Van Hoydonck: 2.37 python scripts gui: event 8 ignored (thanks Ton for discussing / pointing what to do, Ken Hughes for also working on a fix)
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2676&group_id=9

- gui-less scripts with calls to progress bar inside fileselector callbacks didn't return to the previous space on exit (staying on Scripts win), requiring an event to do so (mouse movement, for example).  Quick fix for now, will rework a little after 2.37a for a better alternative, not needing to move to the Scripts win at all.

- added syntax colors access to Window.Theme module.

Scripts:

- updates by Jean-Michel Soler: svg2obj (svg paths import), tex2uvbaker, fixfromarmature;
- updates by Campbell Barton: obj import / export, console;
- tiny: converted vrml97 export to unix line endings;
- updates in ac3d exporter, help browser, save theme.

Thanks all mentioned above.
2005-06-11 05:30:14 +00:00
Willian Padovani Germano
d65fc84a68 Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!).  It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version.  For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System).  Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago.  For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9

BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode.  Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves.  This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True).  Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
Willian Padovani Germano
c16e5dad1c BPython:
- Small doc update in a script;
- Fixed bug #1742:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=1742&group_id=9

It was an internal error in bpython.  I was using G.main->script.last to find the currently running (if any) script, but this isn't reliable, we must check each open script to find out if one of them has the SCRIPT_RUNNING bitflag set.

Thanks intrr for reporting and blendix for pointing how to reproduce the bug.  From my tests it should be working fine now.
2004-11-09 14:07:25 +00:00
Willian Padovani Germano
c702b237d5 Scripts:
-- adding help_browser.py to show help for installed scripts;
-- updated scripts to include basic doc info to be shown with above script:
    script authors can / will / should update with more info, of course;
-- updated some scripts to newer versions: disp_paint, fixfromarmature, hotkeys, etc.
2004-11-07 16:31:13 +00:00
Willian Padovani Germano
9282827720 New scripts:
- hotkeys, obdatacopier and renameobjectbyblock, all from Jean-Michel Soler (jms);
- bevel_center by Loic Berthe, suggested for inclusion by jms;
- doc_browser, by Daniel Dunbar (Zr)

  Thanks to them for the new contributions!

  (I included doc_browser at 'Misc' because only users interested in script writing would actually use it, but it could also be under 'Help'.  Opinions?)

BPython related:
- Added scriptlink methods to object, lamp, camera and world.
- Object: added object.makeTrack and object.clearTrack (old track method).
- sys: made sys.exists(path) return 0 for not found; 1 for file, 2 for dir and -1 for neither.
- doc updates and fixes.
- made ONLOAD event work.  G.f's SCENESCRIPT bit was being zeroed in set_app_data.
- Blender: updated functions Load and Save to support the builtin importers and exporters besides .blend (dxf, videoscape, vrml 1.0, stl, ...)
- Draw: added mouse wheel events.
- Scene: added scene.play to play back animations (like ALT+A and SHIFT+ALT+A).  Makes a good counter, too, when the 'win' attribute is set to a space that doesn't "animate".

The scene.play() addition and the fix to ONLOAD scriptlinks is part of the work for a Blender demo mode.  It already works, but I'll still add support for Radiosity calculations and fix a thing in main(): it executes onload scripts too early (BIF_Init), giving funny results in alt+a animations and renderings when firing up Blender.  Loading after the program is up has no such problems.  When I finish I'll post examples of demo mode scripts.
2004-07-03 05:17:04 +00:00
Willian Padovani Germano
ddec3db89d - New Blender.Draw method by Campbell Barton (Cam / ideasman):
PupStrInput, a wrapper for the Blender String popup (thanks!)
- Fixed bug #1374 reported by Gabriel Beloin (gabio, thanks too):
    http://projects.blender.org/tracker/?func=detail&atid=125&aid=1374&group_id=9
    There was a minor mistake in the import menu: vrml called dxf and vice-versa and shortcuts were wrong (removed them).
- Doc updates, minor updates elsewhere.
2004-06-16 01:18:57 +00:00
Willian Padovani Germano
467311ad34 - New script:
Wim Van Hoydonck contributed the famous Knife script (put under Modifiers group) developed by Stefano Selleri and himself (thank to both!)
- Added helper function Blender.sys.makename, updated docs and script ac3d_export to use it (shall update other exporters too):
  this function is just a simple helper to format a filename as needed (change extension, strip dirname, it defaults to use G.sce as path).
- Added a test method: Blender.Scene.getScriptlinks(eventName):
  just testing, if this path proves useful other functions will be added and made general, for objects, etc.
2004-06-15 04:16:30 +00:00
Matt Ebb
d34f89b755 * Edited and consistent-ified the File->Import menu item labels and fileselect button labels, as discussed on the forums.
* Added items for importing DXF, VRML, etc. in the File->Import menu, that just call the normal Open function. Most people don't even know that you can open these formats through the normal Open fileselect, so this will make it more obvious.

* Removed the 'Export Selected' menu, and put poor old lonely STL in the Import and Export menus too. Most of the exporters export only the selected object anyway, so it's not really a necessary distinction to make.
2004-06-11 02:12:37 +00:00
Willian Padovani Germano
a6d077bae2 Scripts:
- tiny updates for better behavior, unix line endings, cvs Id tags;
- Updated DX7 exporter (thanks to author Ben Omari who's also working on a DX8 one);
- added sysinfo script;

Interface (scripts):

- changed behavior for which win is chosen for script guis:
    Now there's a smarter order, guis will use either:
    - Scripts win
    - Buttons win (if not a script from groups Wizards or Utils)
    - Text win
    - Closest bigger area
- Added a button to the scripts header so that it's faster to return to the buttons win (this can be made general), if that was the previous win used.
2004-06-10 03:27:46 +00:00
Willian Padovani Germano
b82be27659 Bundled scripts:
-starting updates and new additions for Blender 2.34:
  Some of the new scripts require Python modules not builtin with Blender, so you either need a full Python install or the needed extra modules.  This is an ongoing work, there should be more scripts, better testing and also proper ways to tell users they don't have all expected modules.  It's expected that Win users won't need full Python installs, since we can provide a minimal zip with the needed modules from 2.34 on.

Thanks to Anthony D'Agostino (scorpius), Jean-Michel Soler (jms) and Campbell Barton (Cam / ideasman) for donating the scripts now added / updated.

BPython:
-added two new script menu groups: Tools and Utils.  We still need to find places elsewhere in the gui where the groups can be put.
2004-06-07 01:34:15 +00:00
Willian Padovani Germano
33dd2f5e0d BPython:
- as proposed by Ton, default dir for menu enabled scripts is:
userhome/.blender/scripts if available or (using bprogname -- argv[0]),
blenderInstallationDir/.blender/scripts/ otherwise.
- moved a piece of code from BPY_interface.c to BPY_menus.c to get rid
of a linkage warning reported by J. Walton
-- added the first scripts to release/scripts:

We need time to get more scripts there, but the situation should improve
consistently from now on.  Adding three export scripts: cal3d, directX, ac3d.
And one import: ac3d.
2004-01-27 03:34:16 +00:00