Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Softimage® / XSI SDK / Resize Relational view/frame event?
  RSS 2.0 ATOM  

Resize Relational view/frame event?
Rate this thread
 
30102
 
Permlink of this thread  
avatar
  • saajjj
  • Posted: 15 September 2008 10:33 AM
  • Total Posts: 161
  • Joined: 10 June 2008 12:38 PM

Hello,
I’ve finally finished my very first mini-plugin :) However, there are a few things which I would like to get sorted.
In the image attached you’ll see the general layout. It’s based on the Tool Development Environment layout and made using the new spanking new Text Editor Widget (TEW)

First, a little note:
I know that the TEW comes with it’s very own file/edit menu bar. It’s buggy, so I’ve got my own implementation of the common functions. For the curious, the combo box on the top right is a list of recently opened files.

The window itself is a relational view with two frames. The top frame has the script editor custom pset and the bottom frame has the standard script log pane. The two frames get divided by a movable splitter (marked B on the image).
The TEW itself has a little bar at the bottom (marked A on the image) which allows one to set it’s height.

My question is whether it would be possible to get rid of either one of the splitters so that I can resize the views by moving a single bar/splitter.

The TEW itself doesn’t support switching off A, so I suppose I’m stuck with that. I know I wouldn’t have this problem if I could find someway of capturing XSI’s output to the script log/history window and outputting the strings instead to a regular multi-text box below the TEW. Is capturing the strings sent to the script log possible?

Another way would’ve been to somehow capture the event when splitter B is moved and adjust the TEW height accordingly. Once again, I don’t think I can access that event or infact find out the new place/height of the splitter.

For those who like their code coloured with auto-completion, the scriptEditor will be released once I’m reasonably happy with it. (Don’t hold your breath)

Any help/ideas appreciated,
Cheers

Slightly off topic: In an ideal world I would want to be able to set the TEWs tab size. It’s currently set to 8, I usually work with 3. Also, I wish there was a way to access the selected text in a TEW (to run as code).



Attachment Attachment
Replies: 0
avatar
  • saajjj
  • Posted: 15 September 2008 10:53 PM

(ed: not) solved using history capture http://community.softimage.com/showthread.php?t=853

Edit: Great, I’m having the same problem as the thread starter above mentioned:
SDK docs say if nothing is selected in the script history window getAttributevalue("scriptline") should return the last line in the script history. All I can manage is to get an empty string.



Replies: 0
avatar
  • scaron
  • Posted: 16 September 2008 05:39 AM

hey sajjad

have you got a chance to log this bugs/requests to softimage? i too would like to use the scintilla editor inside xsi but stopped long before where you are now because of time.

now in the RV editor have you tried setting each view to 100%? or “*”? then your splitter should be set to movable. i tested this but no using the history log and a custom scintilla widget but rather just an explorer and a property panel.

can’t wait till you are “happy” with it.

steven



Replies: 0
avatar
  • saajjj
  • Posted: 16 September 2008 06:42 AM

Hi Steven,
I’ve just submitted the ‘historyline’ support request form.

As for the RV editor, I did try to set the top/bottom view to 50% each. It doesn’t make a difference for the Text Editor Widget because it reads its values from siUIHeight or incase that hasn’t been set it’s defaults to a preset value. Got similar results when using pixel value, *.

The percentage values seem to be respected only by built-in XSI view objects. I tried the above with both top/bottom views set to Texture Editor and both resized/scaled perfectly. Since my script editor is inside a custom property, which is inside a view, the percentages are ignored. I suppose this could be made to work if there was a way to make an siControls height fit to a percentage of the height of the parent PPG.

Slightly off topic but if SI had put attributes like the ones which are there for the Text Editor view in the Text Editor Widget, it would’ve been awesome. The ones I’m missing are:
[B]entrypoint[/B], [B]curlinenum[/B], [B]errorlinenum[/B] and [B]selectedtext[/B]
With stuff like entrypoint and curlinenum, I’m sure we could make a ‘function list’ combo or list box. The box could be updated through a timer event or refreshed manually. I think right now I waste most of my time scrolling around, trying to find functions which need editing.



Replies: 0
avatar
  • scaron
  • Posted: 16 September 2008 07:22 AM

ok i see the issue with the RV…

fill up those request forms with your bugs/requests. as a customer its the best way to influence their priorities next to them asking you directly.

it would best to see some type of UI library support or open framework so we can make pyQT/wxPython apps that easily talk to xsi. yes we know about CDH but that is way beyond my ability. i can make decent pyQT apps in no time just no way of getting them to talk to xsi. when that day comes the restraints will be lifted!

http://www.riverbankcomputing.co.uk/software/qscintilla/download

or make your own pyqt script editor!



Replies: 0
avatar
  • saajjj
  • Posted: 16 September 2008 08:22 AM

Although I’ve been messing around in XSI for a long time, I’m fairly new to programming anything beyond silly auto-rigs.

I did think, at one point, of using c++ to write my own text editor (with all the stuff I want) and put that in XSI. But I have absolutely no idea of where to start :) Going by what’s done in the XSIGameControlPanel SDK example, it seems one can pretty much do anything inside XSI.

My current knowldge of what can be done in XSI using c++ is pretty poor. For instance, is it possible to make a custom UI element for XSI in c++ (e.g. simple mouse drawn line on a canvas umm whiteboard), then using XSI scripting to plug it into a view and use its (whiteboards) properties for nefarious reasons?

edit: And erm, what’s CDH?



Replies: 0
avatar
  • scaron
  • Posted: 16 September 2008 08:27 AM

well there is the graphics sequencer for drawing/rendering in the viewport this is how the Dx views work.

here is some work done by angel pavon…
http://agedito.blogspot.com/search/label/Graphic%20sequencer

the other method for doing entirely custom interfaces is the custom display host.



Replies: 0
avatar
  • saajjj
  • Posted: 16 September 2008 08:56 AM

ah custom display host, I’ve been meaning to explore that, suppose the time is ripe. That Angel Pavon stuff is great!.



Replies: 0