self installing plugins - insert spaces instead of tabs

Discussions concerning programming of SOFTIMAGE©
Post Reply
missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

self installing plugins - insert spaces instead of tabs

Post by missingkey » 30 Dec 2013, 20:53

Hey All,

I'm playing around with creating self installing plugins, and just had a questions as to why it doesn't like spaces?

It seems most scripts, and editors will convert tabs to spaces for you. Just like the preference in the script editor (which is default?). from what I've read, this helps keep formatting when copy and pasting code between various sources/editors.

So why is it that self installing plugins want tabs instead of spaces?

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 11:02
Location: Montreal Canada
Contact:

Re: self installing plugins - insert spaces instead of tabs

Post by xsisupport » 30 Dec 2013, 23:14

It's the code that generates the plugins. The Custom Plugin wizard uses tabs, not spaces.

C:\Program Files\Autodesk\Softimage 2014 SP2\Addons\sdkui\Application\Plugins\SDKScriptGenerator.js
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: self installing plugins - insert spaces instead of tabs

Post by missingkey » 31 Dec 2013, 02:53

good enough for me!

Thanks Steve

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: self installing plugins - insert spaces instead of tabs

Post by EricTRocks » 01 Jan 2014, 02:13

Easy tip to swap them for spaces:
  • Change scripting preferences to use spaces instead of tabs.
  • Select all code in script editor
  • Hit Tab
  • While having all text still selected, hit shift+tab
Now you have replaces tabs for spaces.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests