HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [FF Quartz.e] - .hgm assets Instanced as GR2INSTANCE  (Read 1774 times)

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
[FF Quartz.e] - .hgm assets Instanced as GR2INSTANCE
« on: May 11, 15, 05:49:56 AM »

All of our HGM assets (which is all of our static assets) are now instanced as GR2 Instances.
I can't be 100% sure, but from work logs, these were all HGM instances prior to quartz.  (not saying it positively is the update, but we've made no changes). 

I started finding settings here and there that weren't working and when I started checking code, it's because the noderefs were returning none since they were looking for an HGM Instance specifically.

These models (and the code that queries them) have been in place for a year at least, and no recent changes to them or the code.  I've double checked just to be sure no one made changes to the edit_handler or the prototypes on our end, and they're still HE default.  These are all simple static models (.hgm). 

From scanning through the _editHandler class script and the validations that occur, I can't see for the life of me how this is even possible. 

Any idea what's happened or where to look? 
« Last Edit: Jun 11, 15, 08:47:15 PM by HE-Cooper »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Quartz.d - .hgm assets Instanced as GR2INSTANCE
« Reply #1 on: May 11, 15, 06:34:37 AM »

Note:  I printed this out from _editHandlerClassMethods while creating an hgm asset

_ProcessEditCommand: cmd=addinst  myNodeID=9223372099322022207  fields=roomName, instanceType, Position  values=default, GR2Instance, (-133.01373291,3.414422274,-12.210457802)


Thats as far as I can trace as its the entry point from c++

Has something changed with model format perhaps?

*EDIT*
As a temporary fix I've implemented the following OverRide in E_EditHandlerClassmethods to catch any new
instances and force them to be created as HGMInstance type instance IF a gr2Instance is called for.

In case this would cause some unforseen issue down the road I'll remove it once this is corrected.
Just to be sure, am I correct in understanding that .gr2 files are legacy only and no longer a standard?

Code: [Select]
method HE_allowEditRequest(editor_account_id as ID, cmd as String, myNodeID as ID, fields as List of String, values as List of String, RawData as RawData, isAllowed references Boolean, error references String ) as Boolean
  resend as Boolean
  newValues as List of String
  loop i from 1 to values.length
    temp as String = values[i]
    if ToLower(temp) = "gr2instance"     
      add back "hgminstance" to newValues
      resend = true
      continue
    .
    add back temp to newValues
  .
  if resend
    isAllowed = false
    $EDIT._ProcessEditCommand( editor_account_id, cmd, GetAreaNumber(), myNodeID, fields, newValues, RawData)
    return false
  .
  isAllowed = true
  return true
.


This works for new instances created, and I could code up a script pretty quick to  convert any others back to HGMInstance type if need be, but I'll hold off til this is figured out.
« Last Edit: May 11, 15, 01:14:26 PM by ToY-Krun »
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Quartz.d - .hgm assets Instanced as GR2INSTANCE
« Reply #2 on: May 11, 15, 01:18:18 PM »

GR2 files are indeed the legacy format, whatever is going on here is definitely not an intended behavior.  We're taking a look.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Quartz.d - .hgm assets Instanced as GR2INSTANCE
« Reply #3 on: May 11, 15, 01:27:39 PM »

Thanks Bennett for the quick reply.
I really hated to add another possible problem, so I've checked everything I could think of on this end before I mentioned it.

could this be in any way related to the post I made about the navmesh ignoring models?
https://community.heroengine.com/forums/index.php/topic,5806.0.html

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Quartz.d - .hgm assets Instanced as GR2INSTANCE
« Reply #4 on: Jun 11, 15, 07:21:50 PM »

I've double checked and this is still happening.

_allowEditRequest  is receiving two values:
default and then GR2Instance.

I've re-added the override I made for now to catch it and replace GR2Instance with HGMInstance.

Thanks