I am having an issue where
obj_location appears to be changing to
this is part of a larger bit of code, and this is the part of it that isn’t working as I thought it should:
obj_name = bpy.context.scene.objects.name obj_loc = bpy.data.objects[obj_name].location # set objects location origin = (0,0,0) # define origin location bpy.data.objects[obj_name].location = origin # move object to origin # export to GTLF parameters removed bpy.data.objects[obj_name].location = obj_loc # set object back to it's original location
When I try a simple Python test this isn’t the case- is there something I am missing here when it comes to Blender Python? Example of testing code below, which when run,
Location switches to appropriate values as I expected.
Location = (5,5,5) LOC = Location Origin = (0,0,0) Location = Origin print('Location = ' + str(Location)) Location = LOC print('Location = ' + str(Location))