<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to ToolsEnvironments</title><link>https://sourceforge.net/p/blur-dev/wiki/ToolsEnvironments/</link><description>Recent changes to ToolsEnvironments</description><atom:link href="https://sourceforge.net/p/blur-dev/wiki/ToolsEnvironments/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 08 Feb 2014 00:17:01 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/blur-dev/wiki/ToolsEnvironments/feed" rel="self" type="application/rss+xml"/><item><title>ToolsEnvironments modified by Anonymous</title><link>https://sourceforge.net/p/blur-dev/wiki/ToolsEnvironments/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="understanding-the-tools-environments"&gt;Understanding the Tools Environments&lt;/h1&gt;
&lt;p&gt;This tutorial will walk you through how our code is structured and why. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understanding the Tools Environments&lt;ul&gt;
&lt;li&gt;Tools Environments&lt;/li&gt;
&lt;li&gt;appdata&lt;/li&gt;
&lt;li&gt;bin&lt;/li&gt;
&lt;li&gt;code&lt;/li&gt;
&lt;li&gt;common&lt;/li&gt;
&lt;li&gt;docs&lt;/li&gt;
&lt;li&gt;fusion&lt;/li&gt;
&lt;li&gt;maxscript&lt;/li&gt;
&lt;li&gt;resource&lt;/li&gt;
&lt;li&gt;workgroups&lt;/li&gt;
&lt;li&gt;Developing Tools &amp;amp; Scripts&lt;/li&gt;
&lt;li&gt;What is a tool vs. a script?&lt;/li&gt;
&lt;li&gt;Tool Structure&lt;/li&gt;
&lt;li&gt;Common Tool Structure&lt;/li&gt;
&lt;li&gt;How to Develop Tools&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="tools-environments"&gt;Tools Environments&lt;/h2&gt;
&lt;p&gt;The Treegrunt system is built upon the ToolsEnvironment system. This allows us to maintain and deploy tools across multiple environments simply - so we can have local, beta, gold, project, etc. environment locations that the Treegrunt can switch between. &lt;/p&gt;
&lt;p&gt;You'll get one environment - the Blur Offline environment. This has all of our Blur tools built as an installer and installed on your local machine at: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nl"&gt;c:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;blur&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;offline&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This path represents a Environment. &lt;/p&gt;
&lt;h3 id="appdata"&gt;appdata&lt;/h3&gt;
&lt;p&gt;This folder contains additional settings information pertaining to 3rd-party applications. &lt;/p&gt;
&lt;h3 id="bin"&gt;bin&lt;/h3&gt;
&lt;p&gt;The bin folder contains compiled versions of the DLLs that we deploy, as well as any installed scripts and is used by our installation system when creating builds. &lt;/p&gt;
&lt;p&gt;It represents the folder structure that will be installed for different packages, so you can see what will be installed into your applications. &lt;/p&gt;
&lt;h3 id="code"&gt;code&lt;/h3&gt;
&lt;p&gt;The code folder is our &lt;strong&gt;new&lt;/strong&gt; coding location - this is where all of our source code lives, broken down by language. &lt;/p&gt;
&lt;p&gt;For instance, python based tools will be found in: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and source code for plugins found in: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;cpp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;plugins&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We'll discuss the difference between &lt;code&gt;scripts&lt;/code&gt; and &lt;code&gt;tools&lt;/code&gt; in a little bit. &lt;/p&gt;
&lt;h3 id="common"&gt;common&lt;/h3&gt;
&lt;p&gt;Contains reusable resources that are not coding related. &lt;/p&gt;
&lt;h3 id="docs"&gt;docs&lt;/h3&gt;
&lt;p&gt;Contains user and technical documentation (very limited, if any, at the moment) &lt;/p&gt;
&lt;h3 id="fusion"&gt;fusion&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Legacy&lt;/strong&gt; Location for fusion scripts, will eventually migrate to &lt;code&gt;code/python&lt;/code&gt; and 'code/eyeonscript` &lt;/p&gt;
&lt;h3 id="maxscript"&gt;maxscript&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Legacy&lt;/strong&gt; Location for all of Blur's original code base for 3dsMax &amp;amp; XSI tools. Initially, this only contained maxscript tools, however, with the integration of Softimage, we began writing python tools in this trunk as well - before switching over to the new system. &lt;/p&gt;
&lt;h3 id="resource"&gt;resource&lt;/h3&gt;
&lt;p&gt;Additional resources - mostly used for internal use. &lt;/p&gt;
&lt;h3 id="workgroups"&gt;workgroups&lt;/h3&gt;
&lt;p&gt;Softimage plugins and scripts used to drive the Softimage addons we've developed. &lt;/p&gt;
&lt;h2 id="developing-tools-wzxhzdk7-scripts"&gt;Developing Tools &amp;amp; Scripts&lt;/h2&gt;
&lt;h3 id="what-is-a-tool-vs-a-script"&gt;What is a tool vs. a script?&lt;/h3&gt;
&lt;p&gt;A &lt;strong&gt;Script&lt;/strong&gt; can really be anything a developer wants it to be - we don't apply restrictions to it. For this reason, scripts have to be accessed differently based on their contents, and are managed by the TDs who have developed them. Its an easy way for sharing code without putting much pressure on consistency. &lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;Tool&lt;/strong&gt; is a bundle of code that gets registered to the Treegrunt system and as such, follows some coding standards not enforced in scripts. These are reviewed and maintained so that all tools follow the same standard. &lt;/p&gt;
&lt;p&gt;Tools will be found in: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Scripts will be found in: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;scripts&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="tool-structure"&gt;Tool Structure&lt;/h3&gt;
&lt;p&gt;Scripts, being simple as they are, won't be covered here. &lt;/p&gt;
&lt;p&gt;Within a tools folder hierarchy, there are 2 types of folders, &lt;code&gt;tool&lt;/code&gt; and &lt;code&gt;category&lt;/code&gt; folders. &lt;/p&gt;
&lt;p&gt;The only difference between them, is a &lt;code&gt;tool&lt;/code&gt; contains a &lt;code&gt;__meta__.xml&lt;/code&gt; file within it that contains registration information for the Treegrunt. &lt;/p&gt;
&lt;p&gt;This includes icon, main file, and description information. &lt;/p&gt;
&lt;p&gt;All other folders are &lt;code&gt;category&lt;/code&gt; folders - which will define the Category tree structure within Treegrunt. &lt;/p&gt;
&lt;p&gt;While there are no restrictions on the naming of category folders, we've been marking categories as starting with an &lt;code&gt;_&lt;/code&gt;, so that a developer can easily tell through the folder structure what is a &lt;code&gt;tool&lt;/code&gt; and what is a &lt;code&gt;category&lt;/code&gt;. &lt;/p&gt;
&lt;h3 id="common-tool-structure"&gt;Common Tool Structure&lt;/h3&gt;
&lt;p&gt;An example of a tools structure is: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
      &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;       &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;icon&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;treegrunt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ui&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="n"&gt;Dialog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ui&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Qt&lt;/span&gt; &lt;span class="n"&gt;Designer&lt;/span&gt; &lt;span class="n"&gt;UI&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt; &lt;span class="n"&gt;dialog&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;registers&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt; &lt;span class="n"&gt;as&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;package&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;__meta__&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;xml&lt;/span&gt;       &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;registers&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;treegrunt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="n"&gt;Dialog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt; &lt;span class="n"&gt;dialog&lt;/span&gt; &lt;span class="n"&gt;class&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pyw&lt;/span&gt;           &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;creates&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt; &lt;span class="n"&gt;application&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This would be a basic structure for a tool. Creating python tools as packages allows us to quickly and easily manage multiple scripts and dialogs all within a single entity. &lt;/p&gt;
&lt;h3 id="how-to-develop-tools"&gt;How to Develop Tools&lt;/h3&gt;
&lt;p&gt;Look through the &lt;a class="" href="/p/blur-dev/wiki/PyQt/"&gt;PyQt&lt;/a&gt; tutorial for more information. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 08 Feb 2014 00:17:01 -0000</pubDate><guid>https://sourceforge.netcc398735aef13d0a373c4149c7d48bf034bfd7da</guid></item></channel></rss>