I'm just comparing alternatives here - how would a save as work? would it pop up a dialog? that's what creating a new asset in the editor does, and it's more consistent and explicit because it's an always available option, and isn't something that would just be used once (when editing the broken reference asset)<br>
<br>I think ~, Alt-B, Select object type, Create Asset, pick location and name, OK is as good a way to make the initial asset as any.<br><br>If there is a different model that makes more sense, we can invest in that.<br><br>
<div class="gmail_quote">On Fri, Apr 11, 2008 at 11:56 AM, James Paige <<a href="mailto:Bob@hamsterrepublic.com">Bob@hamsterrepublic.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Fri, Apr 11, 2008 at 11:50:15AM -0700, Brian Fisher wrote:<br>
>    The error is bad there - but I think the correct solution is to create a<br>
>    new map in the editor that is connected to a file, and then edit it. The<br>
>    broken asset is really intended to be a "hey! you have a bad asset<br>
>    reference" object and to be a bootstrapping device (i.e. you can run it<br>
>    long enough to create an asset)<br>
><br>
>    basically it might be nice to have a "save as" mechanic, but I don't see<br>
>    how any such mechanic would be any less work than creating a new asset in<br>
>    the editor?<br>
<br>
</div>It would be needed for something edited directly in the game window.<br>
<div><div></div><div class="Wj3C7c"><br>
---<br>
James<br>
<br>
>    On Fri, Apr 11, 2008 at 11:31 AM, James Paige <<a href="mailto:Bob@hamsterrepublic.com">Bob@hamsterrepublic.com</a>><br>
>    wrote:<br>
><br>
>      I was running into problems when saving a not-yet-existing asset.<br>
><br>
>      Basically, I have a map asset which I create like so:<br>
><br>
>       map = AssetRef(BaseMap, "default")<br>
><br>
>      So "data/default.map" does not exist anymore, but it correctly uses the<br>
>      _BrokenMap object when I play, so I have a map, but when I try to call<br>
>      map.asset_save() it crashes because map has no .asset_metadata property.<br>
>      (which makes sense, because this was not deserialized from disk)<br>
><br>
>      So I have worked around the  problem by manually creating default.map in<br>
>      the editor, but is there some better way to say, "please save this<br>
>      asset to disk even though it was not loaded from disk"<br>
><br>
>      You can reproduce the problem I was having by deleting data/default.map,<br>
>      running main.py, and clicking anywhere (which triggers the<br>
>      .asset_save() call)<br>
><br>
>      ---<br>
>      James<br>
>      On Fri, Apr 11, 2008 at 11:09:58AM -0700, subversion@HamsterRepublic.com<br>
>      wrote:<br>
>      > james<br>
>      > 2008-04-11 11:09:57 -0700 (Fri, 11 Apr 2008)<br>
>      > 58<br>
>      > Math Marauders: Now saves any changes you make to the map<br>
>      > ---<br>
>      > A   marauders/data/default.map<br>
>      > U   marauders/locals.py<br>
>      > U   marauders/main.py<br>
>      > U   marauders/map.py<br>
>      ><br>
>      ><br>
>      _______________________________________________<br>
>      Dev mailing list<br>
>      <a href="mailto:Dev@lists.motherhamster.org">Dev@lists.motherhamster.org</a><br>
>      <a href="http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org" target="_blank">http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org</a><br>
<br>
> _______________________________________________<br>
> Dev mailing list<br>
> <a href="mailto:Dev@lists.motherhamster.org">Dev@lists.motherhamster.org</a><br>
> <a href="http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org" target="_blank">http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org</a><br>
<br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@lists.motherhamster.org">Dev@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org" target="_blank">http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org</a><br>
</div></div></blockquote></div><br>