Whenever I export my mesh to FBX format (for use inside UE4) its pivot is set to center of the Blender scene (0,0,0), not respecting the original object's pivot position.
Does anyone know why or how to solve this, so that once imported into UE4 object's pivot would be where it should be instead being way off because it is set to original Blender scene center?
So I found the correct answer myself: if you use File -> Import Into Level instead of the expected normal Import function, then the import process is a bit different.
It will automatically create Blueprint for you with the root pivot still at the bottom center at 0,0,0 but now every object in there will have its own original pivot as seen in Blender...and that's it!
This is intended behavior as it allows you to compose scenes consisting of multiple objects in your DCC and have their relative offsets retained, and it gives you easy control over the pivot location of an individual object without having to mess with its hierarchy.
The right thing to do if you're exporting a single object is to place it so the world origin is wherever you want the pivot to be, and then export it.
Related
I'm developing a custom table component for very large and very custom content. Therefore I decided not to go with TableView, but start from scratch (i.e. Control). I adopted the idea of the VirtualFlow to create and manage only the visible part of the table and reuse cells that have become invisible. However I needed virtual rows and columns.
My CustomVirtualFlow implements layoutChildren(). From the component's size and scrollbar positions I know which cells are visible. If necessary, I add cells to the VirtualFlow. I then update the content and css pseudo class states (selected, focused, ...).
This works almost fine ... currently, my only problem is that the css styles are sometimes lagging: newly created cells are shown with e.g. wrong backgrounds for a moment and then get correcteted with the next pulse.
My explanation for this is that JavaFX performs layout in two passes:
first a css pass and secondly the layout pass that calls layoutChildren().
The css of newly added children (during layoutChildren) is therefore not processes correctly.
I tried to call applyCss() directly, which helps, but seems to do too much because it takes a lot of time.
My question is:
How is the correct way to add nodes during layout, i.e. if the size of the component makes it neccessary to use further nodes?
If it is not during layoutChildren(), where else should I do it?
This question related to Java-FX and its charting capabilities and resizing.
My problem is that I wanted to create a custom candlestick chart and I managed to get that done by going through the Ensemble application source code which was quite helpful.
The code for generating the candlestick is here:
http://javafx-ui-hxzon.googlecode.com/svn-history/r13/trunk/ChartsSampler/chartssampler/CandleStickChart.java
However, when I run my application, I seem to be stuck with a chart size that is fixed and does not resize according to my Tab Pane (the parent) resizing in my GUI. I've gone through the code, fiddled with it, changed the value of the minWidth and minHeight to USE_PREF_WIDTH AND USE_COMPUTE_WIDTH both but I cannot get it to fit to the parent Tab pane.
What am I missing?
I call AdvCandleStickChartSample in my controller as follows:
AdvCandleStickChartSample adv=new AdvCandleStickChartSample();
candleTab.setContent(adv);//candleTab has been predefined in an FXML file
My guess is I need to resize based on an event-handler? Am I correct in assuming this? Or am I not overriding a specific method that handles the resizing? When I create a dummy linechart and fill it with data and "run" it, it resizes fine along with the window.
Please help!
Never mind.
I found the answer. I simply had to override the layoutChildren() method by implementing the Pane superclass.
In the Ensemble application they accomplish this by implementing a "Sample" class which overrides the Pane super-class's layoutChildren() method
I have been trying to find an example or some hints on how to create an app that I could drag, resize, rotate images onto a UIView and then save the individual pieces (including their size, rotation and placement) and the entire UIView into CoreData. Kind of like the omnigraffle app.
Any tutorials, examples or anything on any piece of the app would be greatly appreciated.
for dragging a view
http://www.cocoacontrols.com/platforms/ios/controls/tkdragview
for roting a view http://www.cocoacontrols.com/platforms/ios/controls/ktonefingerrotationgesturerecognizer
for resizing a view
http://www.cocoacontrols.com/platforms/ios/controls/spuserresizableview
What respects to core data, its actually pretty straightforward just, gather the classes in one view, see the properties you need to save, and the new one you will need for your app and thats it.
Like:
Object Canvas containing a many relationship to morphlingViews wich contain all the properties as center, color, width, height, angle, UIPath (if you plan to create custom shapes) layer position (so it gets drawn correctly) and if you plan to connect the views as omnigraffle add a many realtionship to self (in morphlingViews) so you can take the center of different morphlingViews and add a simple line between them. (and a string if you plan to add drawInRect method to allow users to write in the objects, then it will be a good idea to add the text properties as well).
You can also add Quartz Composer drawing styles properties to the object, as shadow, shadowColor, shadowOffset, or add patterColor to add resizable background.
Hi I am just a week old with Monotouch, the task that I have in hand is to display a table on an ipad with multiple rows and multiple columns i.e. a grid like structure with many cells and each cell containing some data which can later be edited too.
My application should look somewhat like the figure below, except that it has to be working on an ipad.
The only useful link I've found is this, but this article discusses how to do so using Objective C(now since I am using Monotouch & c# so I am not comfortable with Objective C so I cannot understand this solution).
So my question how to achieve the same (i.e. a table with many columns and rows - a grid) using Monotouch.
Please help! Thanks in Advance.
Ajit,
If you want to use the UITableView'to render your data, you should effectively make it so that each "row" can render the columns in the way that you need.
What you need to do is to create a UIView subclass that can render the elements in your columns. There are various ways of doing that, you can:
Create your own UIView that implements a draw method and draws on demand.
Create a UIView that is a composite and merely has some children views
Once you have the view, you can add this to your UITableViewCell
You can follow some of my recommendations for creating those UITableViewCells here:
http://tirania.org/monomac/archive/2011/Jan-18.html
But 2-D browsing using a 1-D design is not optimal. Chances are that all that you want is to render your various items in a grid, so you might as well just use the UIScrollView directly and add all of your child UIViews there.
The only difference is that UITableView is designed to recycle/reuse some expensive objects (each row) while a basic design that stashes everything on the view will not have any of those benefits.
A more advanced option would be for you to create/destroys the views that are shown/hidden as the user scrolls.
I am attempting to rotate an MKMapView using MapKit.
I can display a map and rotate it, however not very efficiently. I create an MKMapView larger than the view and rotate it using CGAffineTransformMakeRotation, so the the grey areas behind the view are not visible. Although I have clip subviews checked in Interface Builder, I still have the feeling this is not the correct implementation.
This method does allow me to rotate any annotations displayed as MKPinAnnotationView conforms to the CGAffineTransformMakeRotation function, but I come into problems when trying to add an overlay to the map.
I can place an overlay on using the boundingMapRect property in the class declaration but the image remains unrotated on the display. Is there a way to achieve this? Or alternatively should I be rotating the MKMapView and annotations in a different method?
Thanks in advance for any advice or information.
Are you rotating the map so that it is facing the same way the user is? (i.e. not just North = Up). If so you don't need to do any transformation stuff at all, just set the MKUserTrackingMode to MKUserTrackingModeFollowWithHeading